aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/diagnostic.txt2
-rw-r--r--runtime/doc/lsp.txt4
-rw-r--r--runtime/doc/lua.txt2
-rw-r--r--runtime/doc/treesitter.txt13
-rw-r--r--runtime/lua/vim/keymap.lua2
-rw-r--r--src/nvim/api/buffer.c2
-rw-r--r--test/functional/editor/put_spec.lua4
-rw-r--r--test/functional/ui/sign_spec.lua2
9 files changed, 17 insertions, 16 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 4b8c07fde4..ab0b0cd07c 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1079,7 +1079,7 @@ WinLeave Before leaving a window. If the window to be
executes the BufLeave autocommands before the
WinLeave autocommands (but not for ":new").
Not used for ":qa" or ":q" when exiting Vim.
- After WinClosed.
+ Before WinClosed.
*WinNew*
WinNew When a new window was created. Not done for
the first window, when Vim has just started.
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 781539cfb6..e33c786482 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -74,7 +74,7 @@ Functions that take a severity as an optional parameter (e.g.
2. A table with a "min" or "max" key (or both): >
- vim.diagnostic.get(0, { severity = {min=vim.diagnostic.severity.WARN})
+ vim.diagnostic.get(0, { severity = {min=vim.diagnostic.severity.WARN} })
The latter form allows users to specify a range of severities.
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d717759444..54c648e171 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -355,8 +355,8 @@ To configure the behavior of a builtin |lsp-handler|, the convenient method
*lsp-handler-resolution*
Handlers can be set by:
-- Setting a field in |vim.lsp.handlers|. *vim.lsp.handlers*
- |vim.lsp.handlers| is a global table that contains the default mapping of
+- Setting a field in vim.lsp.handlers. *vim.lsp.handlers*
+ vim.lsp.handlers is a global table that contains the default mapping of
|lsp-method| names to |lsp-handlers|.
To override the handler for the `"textDocument/definition"` method: >
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 98af84e1cb..11629332ae 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1083,7 +1083,7 @@ from within Lua.
`vim.opt.wildignore = '*.o,*.a,__pycache__'`
However, vim.opt also supports a more elegent way of setting
- list-style options, but using lua tables:
+ list-style options by using lua tables:
`vim.opt.wildignore = { '*.o', '*.a', '__pycache__' }`
To replicate the behavior of |:set+=|, use: >
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index dbd8ec6fef..02be20c5e8 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -207,14 +207,14 @@ Here is a list of built-in predicates :
`eq?` *ts-predicate-eq?*
This predicate will check text correspondence between nodes or
- strings : >
+ strings: >
((identifier) @foo (#eq? @foo "foo"))
((node1) @left (node2) @right (#eq? @left @right))
<
`match?` *ts-predicate-match?*
`vim-match?` *ts-predicate-vim-match?*
This will match if the provided vim regex matches the text
- corresponding to a node : >
+ corresponding to a node: >
((identifier) @constant (#match? @constant "^[A-Z_]+$"))
< Note: the `^` and `$` anchors will respectively match the
start and end of the node's text.
@@ -225,17 +225,18 @@ Here is a list of built-in predicates :
`contains?` *ts-predicate-contains?*
Will check if any of the following arguments appears in the
- text corresponding to the node : >
+ text corresponding to the node: >
((identifier) @foo (#contains? @foo "foo"))
((identifier) @foo-bar (#contains @foo-bar "foo" "bar"))
<
`any-of?` *ts-predicate-any-of?*
- Will check if the text is the same as any of the following.
+ Will check if the text is the same as any of the following
+ arguments: >
+ ((identifier) @foo (#any-of? @foo "foo" "bar"))
+<
This is the recommended way to check if the node matches one
of many keywords for example, as it has been optimized for
this.
- arguments : >
- ((identifier) @foo (#any-of? @foo "foo" "bar"))
<
*lua-treesitter-not-predicate*
Each predicate has a `not-` prefixed predicate that is just the negation of
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua
index df49eff4b6..7f12372502 100644
--- a/runtime/lua/vim/keymap.lua
+++ b/runtime/lua/vim/keymap.lua
@@ -25,7 +25,7 @@ local keymap = {}
--- vim.keymap.set('n', 'asdf', require('jkl').my_fun)
--- </pre>
---
---- the require('jkl') gets evaluated during this call in order to access the function. If you want to
+--- the `require('jkl')` gets evaluated during this call in order to access the function. If you want to
--- avoid this cost at startup you can wrap it in a function, for example:
--- <pre>
--- vim.keymap.set('n', 'asdf', function() return require('jkl').my_fun() end)
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 3dd647e76f..3bddbe8fe6 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -133,7 +133,7 @@ Integer nvim_buf_line_count(Buffer buffer, Error *err)
/// - buffer handle
/// - on_reload: Lua callback invoked on reload. The entire buffer
/// content should be considered changed. Args:
-/// - the string "detach"
+/// - the string "reload"
/// - buffer handle
/// - utf_sizes: include UTF-32 and UTF-16 size of the replaced
/// region, as args to `on_lines`.
diff --git a/test/functional/editor/put_spec.lua b/test/functional/editor/put_spec.lua
index c367f8fdd0..cc9fce8f67 100644
--- a/test/functional/editor/put_spec.lua
+++ b/test/functional/editor/put_spec.lua
@@ -138,9 +138,9 @@ describe('put command', function()
end -- create_test_defs() }}}
local function find_cursor_position(expect_string) -- {{{
- -- There must only be one occurance of the character 'x' in
+ -- There must only be one occurrence of the character 'x' in
-- expect_string.
- -- This function removes that occurance, and returns the position that
+ -- This function removes that occurrence, and returns the position that
-- it was in.
-- This returns the cursor position that would leave the 'x' in that
-- place if we feed 'ix<esc>' and the string existed before it.
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua
index f718786557..dbc92ca222 100644
--- a/test/functional/ui/sign_spec.lua
+++ b/test/functional/ui/sign_spec.lua
@@ -482,7 +482,7 @@ describe('Signs', function()
]])
end)
- it('ignores signs with no icon and text when calculting the signcolumn width', function()
+ it('ignores signs with no icon and text when calculating the signcolumn width', function()
feed('ia<cr>b<cr>c<cr><esc>')
command('set number')
command('set signcolumn=auto:2')