neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 7a6e8d4430764d34b189a038ae41c7c31297cc20
parent e790c87cd8bfd9198e8f2bb72f25d00038178beb
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Mon, 12 Jan 2026 11:50:57 +0800

docs: misc (#37281)

Close #37289
Close #37348

Co-authored-by: Marc Jakobi <marc@jakobi.dev>
Co-authored-by: Anton Kesy <anton@kesy.de>
Diffstat:
Mruntime/doc/dev_arch.txt | 2+-
Mruntime/doc/insert.txt | 3---
Mruntime/doc/options.txt | 11+++++------
Mruntime/lua/vim/_meta/options.lua | 11+++++------
Mruntime/lua/vim/health/health.lua | 2+-
Mruntime/lua/vim/lsp.lua | 4++--
Mruntime/lua/vim/lsp/buf.lua | 2+-
Mruntime/lua/vim/lsp/client.lua | 2+-
Mscripts/collect_typos.lua | 4+++-
Msrc/cjson/lua_cjson.c | 2+-
Msrc/nvim/options.lua | 11+++++------
Msrc/nvim/vterm/screen.c | 2+-
Mtest/functional/lua/with_spec.lua | 2+-
Mtest/functional/plugin/lsp_spec.lua | 2+-
Mtest/unit/os/fs_spec.lua | 2+-
15 files changed, 29 insertions(+), 33 deletions(-)

diff --git a/runtime/doc/dev_arch.txt b/runtime/doc/dev_arch.txt @@ -71,7 +71,7 @@ Compatibility with Vim's `if_lua` is explicitly a non-goal. *dev-lua-builtin* Lua modules that are necessary even if VIMRUNTIME is invalid (generally, data -structures and essential utilties), must be compiled into the `nvim` binary. +structures and essential utilities), must be compiled into the `nvim` binary. There are two ways to do that: - if they are private, put the code file in `runtime/lua/vim/_core/` - if they are public, choose a new filepath in `runtime/lua/vim/` diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt @@ -1945,9 +1945,6 @@ i Insert text before the cursor [count] times. *I* I Insert text before the first non-blank in the line [count] times. - When the 'H' flag is present in 'cpoptions' and the - line only contains blanks, insert start just before - the last blank. For using "I" in Visual block mode see |v_b_I|. *gI* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt @@ -4050,9 +4050,8 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer Lisp mode: When <Enter> is typed in insert mode set the indent for the next line to Lisp standards (well, sort of). Also happens with - "cc" or "S". 'autoindent' must also be on for this to work. The 'p' - flag in 'cpoptions' changes the method of indenting: Vi compatible or - better. Also see 'lispwords'. + "cc" or "S". 'autoindent' must also be on for this to work. + Also see 'lispwords'. The '-' character is included in keyword characters. Redefines the "=" operator to use this same indentation algorithm rather than calling an external program if 'equalprg' is empty. @@ -5981,11 +5980,11 @@ A jump table for the options with a short description can be found at |Q_op|. different values, you might consider setting 'smarttab'. The 'L' flag in 'cpoptions' alters tab behavior when 'list' is - enabled. See also |ins-expandtab| ans user manual section |30.5| for + enabled. See also |ins-expandtab| and user manual section |30.5| for in-depth explanations. - The value of 'softtabstop' will be ignored if 'varsofttabstop' is set to - anything other than an empty string. + The value of 'softtabstop' will be ignored if 'varsofttabstop' is set + to anything other than an empty string. *'spell'* *'nospell'* 'spell' boolean (default off) diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua @@ -4037,9 +4037,8 @@ vim.go.lsp = vim.go.linespace --- Lisp mode: When <Enter> is typed in insert mode set the indent for --- the next line to Lisp standards (well, sort of). Also happens with ---- "cc" or "S". 'autoindent' must also be on for this to work. The 'p' ---- flag in 'cpoptions' changes the method of indenting: Vi compatible or ---- better. Also see 'lispwords'. +--- "cc" or "S". 'autoindent' must also be on for this to work. +--- Also see 'lispwords'. --- The '-' character is included in keyword characters. Redefines the --- "=" operator to use this same indentation algorithm rather than --- calling an external program if 'equalprg' is empty. @@ -6379,11 +6378,11 @@ vim.wo.sms = vim.wo.smoothscroll --- different values, you might consider setting 'smarttab'. --- --- The 'L' flag in 'cpoptions' alters tab behavior when 'list' is ---- enabled. See also `ins-expandtab` ans user manual section `30.5` for +--- enabled. See also `ins-expandtab` and user manual section `30.5` for --- in-depth explanations. --- ---- The value of 'softtabstop' will be ignored if 'varsofttabstop' is set to ---- anything other than an empty string. +--- The value of 'softtabstop' will be ignored if 'varsofttabstop' is set +--- to anything other than an empty string. --- --- @type integer vim.o.softtabstop = 0 diff --git a/runtime/lua/vim/health/health.lua b/runtime/lua/vim/health/health.lua @@ -175,7 +175,7 @@ local function check_performance() -- check for slow shell invocation local slow_cmd_time = 1.5e9 local start_time = vim.uv.hrtime() - -- Vimscript's sytem() is used to actually invoke a shell + -- Vimscript's system() is used to actually invoke a shell vim.fn.system('echo') local elapsed_time = vim.uv.hrtime() - start_time if elapsed_time > slow_cmd_time then diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua @@ -338,12 +338,12 @@ end --- @nodoc --- @class vim.lsp.config ---- @field [string] vim.lsp.Config +--- @field [string] vim.lsp.Config? --- @field package _configs table<string,vim.lsp.Config> lsp.config = setmetatable({ _configs = {} }, { --- @param self vim.lsp.config --- @param name string - --- @return vim.lsp.Config + --- @return vim.lsp.Config? __index = function(self, name) validate_config_name(name) diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua @@ -1449,7 +1449,7 @@ function M.selection_range(direction, timeout_ms) lsp.log.error(result[client.id].error.code, result[client.id].error.message) end - -- We only requested one range, thus we get the first and only reponse here. + -- We only requested one range, thus we get the first and only response here. local response = assert(result[client.id].result[1]) ---@type lsp.SelectionRange local ranges = {} ---@type lsp.Range[] local lines = api.nvim_buf_get_lines(0, 0, -1, false) diff --git a/runtime/lua/vim/lsp/client.lua b/runtime/lua/vim/lsp/client.lua @@ -941,7 +941,7 @@ function Client:_supports_registration(method) return type(capability) == 'table' and capability.dynamicRegistration end ---- Get provider for a method to be registered dyanamically. +--- Get provider for a method to be registered dynamically. --- @param method vim.lsp.protocol.Method | vim.lsp.protocol.Method.Registration function Client:_registration_provider(method) local capability_path = lsp.protocol._request_name_to_server_capability[method] diff --git a/scripts/collect_typos.lua b/scripts/collect_typos.lua @@ -111,7 +111,9 @@ local function main() { 'gh', 'pr', 'diff', tostring(pr_number), '--patch' }, 'Failed to get patch of PR ' .. pr_number ) - if run({ 'git', 'apply', '--index', '-' }, patch_file) then + -- Using --3way allows skipping changes already included in a previous commit. + -- If there are conflicts, it will fail and need manual conflict resolution. + if run({ 'git', 'apply', '--index', '--3way', '-' }, patch_file) then table.insert(close_pr_lines, ('Close #%d'):format(pr_number)) for author in patch_file:gmatch('\nFrom: (.- <.->)\n') do local co_author_line = ('Co-authored-by: %s'):format(mime_decode(author)) diff --git a/src/cjson/lua_cjson.c b/src/cjson/lua_cjson.c @@ -640,7 +640,7 @@ static void json_create_config(lua_State *l) /* Update characters that require further processing */ cfg->ch2token['f'] = T_UNKNOWN; /* false? */ - cfg->ch2token['i'] = T_UNKNOWN; /* inf, ininity? */ + cfg->ch2token['i'] = T_UNKNOWN; /* inf, infinity? */ cfg->ch2token['I'] = T_UNKNOWN; cfg->ch2token['n'] = T_UNKNOWN; /* null, nan? */ cfg->ch2token['N'] = T_UNKNOWN; diff --git a/src/nvim/options.lua b/src/nvim/options.lua @@ -5306,9 +5306,8 @@ local options = { desc = [=[ Lisp mode: When <Enter> is typed in insert mode set the indent for the next line to Lisp standards (well, sort of). Also happens with - "cc" or "S". 'autoindent' must also be on for this to work. The 'p' - flag in 'cpoptions' changes the method of indenting: Vi compatible or - better. Also see 'lispwords'. + "cc" or "S". 'autoindent' must also be on for this to work. + Also see 'lispwords'. The '-' character is included in keyword characters. Redefines the "=" operator to use this same indentation algorithm rather than calling an external program if 'equalprg' is empty. @@ -8365,11 +8364,11 @@ local options = { different values, you might consider setting 'smarttab'. The 'L' flag in 'cpoptions' alters tab behavior when 'list' is - enabled. See also |ins-expandtab| ans user manual section |30.5| for + enabled. See also |ins-expandtab| and user manual section |30.5| for in-depth explanations. - The value of 'softtabstop' will be ignored if 'varsofttabstop' is set to - anything other than an empty string. + The value of 'softtabstop' will be ignored if 'varsofttabstop' is set + to anything other than an empty string. ]=], full_name = 'softtabstop', scope = { 'buf' }, diff --git a/src/nvim/vterm/screen.c b/src/nvim/vterm/screen.c @@ -488,7 +488,7 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new old_cols, old_rows, new_cols, new_rows, old_cursor.col, old_cursor.row); #endif - // Keep track of the final row that is knonw to be blank, so we know what spare space we have for + // Keep track of the final row that is known to be blank, so we know what spare space we have for // scrolling into int final_blank_row = new_rows; diff --git a/test/functional/lua/with_spec.lua b/test/functional/lua/with_spec.lua @@ -363,7 +363,7 @@ describe('vim._with', function() exec_lua, [[ _G.f = function() - error('This error should not interfer with execution', 0) + error('This error should not interfere with execution', 0) end -- Should produce error same as `_G.f()` vim._with({ emsg_silent = true }, function() diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua @@ -5953,7 +5953,7 @@ describe('LSP', function() }, }, { client_id = client_id }) - -- Checks after registering without worspaceDiagnostics support + -- Checks after registering without workspaceDiagnostics support -- Returns false check('workspace/diagnostic') diff --git a/test/unit/os/fs_spec.lua b/test/unit/os/fs_spec.lua @@ -378,7 +378,7 @@ describe('fs.c', function() end -- For some reason if length of NUL-bytes-string is the same as `char[?]` -- size luajit crashes. Though it does not do so in this test suite, better - -- be cautios and allocate more elements then needed. I only did this to + -- be cautious and allocate more elements then needed. I only did this to -- strings. local function os_read(fd, size) local buf = nil