neovim

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

commit 6e9b204afbe5f16c44a2697aed07aafff36bf856
parent 69d49727d7766d799aa1989bf67e763258b868e6
Author: Lewis Russell <lewis6991@gmail.com>
Date:   Mon, 17 Jul 2023 16:39:57 +0100

fix: doc errors

Diffstat:
Mruntime/doc/lua.txt | 5++---
Mruntime/doc/news-0.9.txt | 6+++---
Mruntime/doc/vim_diff.txt | 2+-
Mruntime/lua/vim/_meta/builtin.lua | 2+-
Mscripts/lua2dox.lua | 2++
5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt @@ -826,8 +826,7 @@ vim.spell.check({str}) *vim.spell.check()* • {str} (string) Return: ~ - {[1]: string, [2]: string, [3]: string}[] List of tuples with three - items: + `{[1]: string, [2]: string, [3]: string}[]` List of tuples with three items: • The badly spelled word. • The type of the spelling error: "bad" spelling mistake "rare" rare word "local" word only valid in another region "caps" word should @@ -914,7 +913,7 @@ vim.iconv({str}, {from}, {to}, {opts}) *vim.iconv()* • {str} (string) Text to convert • {from} (number) Encoding of {str} • {to} (number) Target encoding - • {opts} table<string,|nil any> + • {opts} table<string,any>|nil Return: ~ (string|nil) Converted string if conversion succeeds, `nil` otherwise. diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt @@ -119,11 +119,11 @@ The following new APIs or features were added. • Added an omnifunc implementation for Lua, |vim.lua_omnifunc()| -• Added a new experimental |lua-loader| that byte-compiles and caches Lua files. +• Added a new experimental |vim.loader| that byte-compiles and caches Lua files. To enable the new loader, add the following at the top of your |init.lua|: >lua vim.loader.enable() -• Added |lua-version| for parsing and comparing version strings conforming to +• Added |vim.version| for parsing and comparing version strings conforming to the semver specification. • When using Nvim inside tmux 3.2 or later, the default clipboard provider @@ -273,7 +273,7 @@ REMOVED FEATURES The following deprecated functions or APIs were removed. -• `filetype.vim` is removed in favor of |lua-filetype| +• `filetype.vim` is removed in favor of |vim.filetype| (Note that filetype logic and tests still align with Vim, so additions or changes need to be contributed there first.) See https://github.com/neovim/neovim/pull/20674. diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt @@ -186,7 +186,7 @@ backwards-compatibility cost. Some examples: Some features are built in that otherwise required external plugins: -- Highlighting the yanked region, see |lua-highlight|. +- Highlighting the yanked region, see |vim.highlight|. ARCHITECTURE diff --git a/runtime/lua/vim/_meta/builtin.lua b/runtime/lua/vim/_meta/builtin.lua @@ -141,7 +141,7 @@ function vim.str_utfindex(str, index) end --- @param str string Text to convert --- @param from number Encoding of {str} --- @param to number Target encoding ---- @param opts? table<string, any> +--- @param opts? table<string,any> --- @return string|nil Converted string if conversion succeeds, `nil` otherwise. function vim.iconv(str, from, to, opts) end diff --git a/scripts/lua2dox.lua b/scripts/lua2dox.lua @@ -363,6 +363,8 @@ function TLua2DoX_filter.filter(this, AppStamp, Filename) magic = magic:gsub('^return%s+.*%((' .. type .. ')%)', 'return %1') magic = magic:gsub('^return%s+.*%((' .. type .. '|nil)%)', 'return %1') end + -- handle the return of vim.spell.check + magic = magic:gsub('({.*}%[%])', '`%1`') magic_split = string_split(magic, ' ') end