diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2021-05-01 05:19:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-01 08:19:48 -0400 |
commit | 27da5511a0c0b12fcabe29cf38c3f8a0f0b444b9 (patch) | |
tree | bd0c6670b2b0cca8400117842ed2abf9668dac90 /src | |
parent | ca6107cfbc1b9994d8a36494965f0b270dc2b77b (diff) | |
download | rneovim-27da5511a0c0b12fcabe29cf38c3f8a0f0b444b9.tar.gz rneovim-27da5511a0c0b12fcabe29cf38c3f8a0f0b444b9.tar.bz2 rneovim-27da5511a0c0b12fcabe29cf38c3f8a0f0b444b9.zip |
docs: Treesitter (#13260)
* doc & fixes: Generate treesitter docs
* fixup to treesitter-core
* docs(treesitter): fix docs for most functions
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/lua/vim.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua index 75e759094f..3994c5bc5b 100644 --- a/src/nvim/lua/vim.lua +++ b/src/nvim/lua/vim.lua @@ -400,7 +400,10 @@ do wfw = true; winbl = true; winblend = true; winfixheight = true; winfixwidth = true; winhighlight = true; winhl = true; wrap = true; } + + --@private local function new_buf_opt_accessor(bufnr) + --@private local function get(k) if window_options[k] then return a.nvim_err_writeln(k.." is a window option, not a buffer option") @@ -410,23 +413,34 @@ do end return a.nvim_buf_get_option(bufnr or 0, k) end + + --@private local function set(k, v) if window_options[k] then return a.nvim_err_writeln(k.." is a window option, not a buffer option") end return a.nvim_buf_set_option(bufnr or 0, k, v) end + return make_meta_accessor(get, set) end vim.bo = new_buf_opt_accessor(nil) + + --@private local function new_win_opt_accessor(winnr) + + --@private local function get(k) if winnr == nil and type(k) == "number" then return new_win_opt_accessor(k) end return a.nvim_win_get_option(winnr or 0, k) end - local function set(k, v) return a.nvim_win_set_option(winnr or 0, k, v) end + + --@private + local function set(k, v) + return a.nvim_win_set_option(winnr or 0, k, v) + end return make_meta_accessor(get, set) end vim.wo = new_win_opt_accessor(nil) |