aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_eval_files.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen_eval_files.lua')
-rwxr-xr-xscripts/gen_eval_files.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/gen_eval_files.lua b/scripts/gen_eval_files.lua
index b9ea4e73f0..a9431ae2e5 100755
--- a/scripts/gen_eval_files.lua
+++ b/scripts/gen_eval_files.lua
@@ -617,8 +617,8 @@ local function render_option_meta(_f, opt, write)
end
for _, s in pairs {
- { 'wo', 'window' },
- { 'bo', 'buffer' },
+ { 'wo', 'win' },
+ { 'bo', 'buf' },
{ 'go', 'global' },
} do
local id, scope = s[1], s[2]
@@ -661,8 +661,8 @@ end
local function scope_to_doc(s)
local m = {
global = 'global',
- buffer = 'local to buffer',
- window = 'local to window',
+ buf = 'local to buffer',
+ win = 'local to window',
tab = 'local to tab page',
}
@@ -670,7 +670,7 @@ local function scope_to_doc(s)
return m[s[1]]
end
assert(s[1] == 'global')
- return 'global or ' .. m[s[2]] .. ' |global-local|'
+ return 'global or ' .. m[s[2]] .. (s[2] ~= 'tab' and ' |global-local|' or '')
end
-- @param o vim.option_meta
@@ -717,7 +717,9 @@ local function get_option_meta()
local optinfo = vim.api.nvim_get_all_options_info()
local ret = {} --- @type table<string,vim.option_meta>
for _, o in ipairs(opts) do
- if o.desc then
+ local is_window_option = #o.scope == 1 and o.scope[1] == 'win'
+ local is_option_hidden = o.immutable and not o.varname and not is_window_option
+ if not is_option_hidden and o.desc then
if o.full_name == 'cmdheight' then
table.insert(o.scope, 'tab')
end