docs: small fixes

Co-authored-by: Wansmer <wansmer@gmail.com>
Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com>
Co-authored-by: David Moberg <david.moberg@mediatek.com>
This commit is contained in:
dundargoc
2023-09-15 09:43:48 +02:00
committed by dundargoc
parent fd39f5ce8c
commit c3d21ad1bc
10 changed files with 16 additions and 18 deletions

View File

@@ -27,7 +27,7 @@ ${NVIM_VERSION}
### Linux (x64) ### Linux (x64)
Minimum glibc version to run these releases is 3.31. People requring releases Minimum glibc version to run these releases is 2.31. People requiring releases
that work on older glibc versions can find them at that work on older glibc versions can find them at
https://github.com/neovim/neovim-releases. https://github.com/neovim/neovim-releases.

View File

@@ -232,11 +232,7 @@ Lua documentation lives in the source code, as docstrings on the function
definitions. The |lua-vim| :help is generated from the docstrings. definitions. The |lua-vim| :help is generated from the docstrings.
Docstring format: Docstring format:
- Use LuaLS annotations (with minor adjustments, which will be explained - Use LuaCATS annotations: https://luals.github.io/wiki/annotations/
below): https://luals.github.io/wiki/annotations/
- Lines in the main description start with `--- `
- Special tokens start with `--- @` followed by the token name: `--- @see`,
`--- @param`, `--- @returns`. Note the space between `---` and `@`.
- Limited markdown is supported. - Limited markdown is supported.
- List-items start with `-` (useful to nest or "indent") - List-items start with `-` (useful to nest or "indent")
- Use ``` for code samples. - Use ``` for code samples.

View File

@@ -462,9 +462,9 @@ useful options:
vim.keymap.set('n', '<Leader>pl1', require('plugin').action, vim.keymap.set('n', '<Leader>pl1', require('plugin').action,
{ desc = 'Execute action from plugin' }) { desc = 'Execute action from plugin' })
< <
• `remap`: By default, all mappings are nonrecursive by default (i.e., • `remap`: By default, all mappings are nonrecursive (i.e., |vim.keymap.set()|
|vim.keymap.set()| behaves like |:noremap|). If the {rhs} is itself a mapping behaves like |:noremap|). If the {rhs} is itself a mapping that should be
that should be executed, set `remap = true`: >lua executed, set `remap = true`: >lua
vim.keymap.set('n', '<Leader>ex1', '<cmd>echo "Example 1"<cr>') vim.keymap.set('n', '<Leader>ex1', '<cmd>echo "Example 1"<cr>')
-- add a shorter mapping -- add a shorter mapping
vim.keymap.set('n', 'e', '<Leader>ex1', { remap = true }) vim.keymap.set('n', 'e', '<Leader>ex1', { remap = true })
@@ -670,8 +670,8 @@ cover only the basics of this advanced topic.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Creating user commands *lua-guide-commands-create* Creating user commands *lua-guide-commands-create*
User commands can be created through with |nvim_create_user_command()|. This User commands can be created via |nvim_create_user_command()|. This function
function takes three mandatory arguments: takes three mandatory arguments:
• a string that is the name of the command (which must start with an uppercase • a string that is the name of the command (which must start with an uppercase
letter to distinguish it from builtin commands); letter to distinguish it from builtin commands);
• a string containing Vim commands or a Lua function that is executed when the • a string containing Vim commands or a Lua function that is executed when the

View File

@@ -40,8 +40,8 @@ fast as possible, even if many plugins/hosts are installed.
The best way to learn about remote plugins is with an example, so let's see The best way to learn about remote plugins is with an example, so let's see
what a Python plugin looks like. This plugin exports a command, a function, and what a Python plugin looks like. This plugin exports a command, a function, and
an autocmd. The plugin is called 'Limit', and all it does is limit the number an autocmd. The plugin is called 'Limit', and all it does is limit the number
of requests made to it. Here's the plugin source code: of requests made to it. Here's the plugin source code: >python
>
import pynvim import pynvim
@pynvim.plugin @pynvim.plugin

View File

@@ -29,6 +29,7 @@
---@field sexpr fun(self: TSNode): string ---@field sexpr fun(self: TSNode): string
---@field equal fun(self: TSNode, other: TSNode): boolean ---@field equal fun(self: TSNode, other: TSNode): boolean
---@field iter_children fun(self: TSNode): fun(): TSNode, string ---@field iter_children fun(self: TSNode): fun(): TSNode, string
---@field field fun(self: TSNode, name: string): TSNode[]
local TSNode = {} local TSNode = {}
---@param query userdata ---@param query userdata

View File

@@ -209,7 +209,8 @@ not related to TUI rendering like so:
lldb -- ./build/bin/nvim --headless --listen ~/.cache/nvim/debug-server.pipe lldb -- ./build/bin/nvim --headless --listen ~/.cache/nvim/debug-server.pipe
You can then attach to the headless process to interact with the editor like so: While in lldb, enter `run`. You can then attach to the headless process in a
new terminal window to interact with the editor like so:
./build/bin/nvim --remote-ui --server ~/.cache/nvim/debug-server.pipe ./build/bin/nvim --remote-ui --server ~/.cache/nvim/debug-server.pipe

View File

@@ -12,7 +12,7 @@
// Includes final NUL. at least 4*(MAX_MCO+1)+1 // Includes final NUL. at least 4*(MAX_MCO+1)+1
#define MAX_SCHAR_SIZE 32 #define MAX_SCHAR_SIZE 32
// if data[0] is 0xFF, then data[1..4] is a 24-bit index (in machine endianess) // if data[0] is 0xFF, then data[1..4] is a 24-bit index (in machine endianness)
// otherwise it must be a UTF-8 string of length maximum 4 (no NUL when n=4) // otherwise it must be a UTF-8 string of length maximum 4 (no NUL when n=4)
typedef uint32_t schar_T; typedef uint32_t schar_T;

View File

@@ -852,7 +852,7 @@ static void intersect_add(Intersection *x, Intersection *y)
} }
} }
// inplace assymetric difference: x &= ~y // inplace asymmetric difference: x &= ~y
static void intersect_sub(Intersection *restrict x, Intersection *restrict y) static void intersect_sub(Intersection *restrict x, Intersection *restrict y)
{ {
size_t xi = 0, yi = 0; size_t xi = 0, yi = 0;

View File

@@ -451,7 +451,7 @@ describe('mappings with <Cmd>', function()
]]) ]])
eq('s', funcs.mode(1)) eq('s', funcs.mode(1))
-- visual mapping in select mode restart selct mode after operator -- visual mapping in select mode restart select mode after operator
feed('<F5>') feed('<F5>')
eq('s', funcs.mode(1)) eq('s', funcs.mode(1))
eq({'some short l'}, funcs.getreg('a',1,1)) eq({'some short l'}, funcs.getreg('a',1,1))

View File

@@ -391,7 +391,7 @@ describe('marktree', function()
local iter = ffi.new("MarkTreeIter[1]") local iter = ffi.new("MarkTreeIter[1]")
local ids = {} local ids = {}
-- new index and old index look the same, but still have to move becase -- new index and old index look the same, but still have to move because
-- pos will get updated -- pos will get updated
table.insert(ids, put(tree, 1, 1, false, 1, 3, false)) table.insert(ids, put(tree, 1, 1, false, 1, 3, false))
table.insert(ids, put(tree, 1, 3, false, 1, 3, false)) table.insert(ids, put(tree, 1, 3, false, 1, 3, false))