aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/msgpack.vim8
-rw-r--r--runtime/autoload/shada.vim2
-rw-r--r--runtime/doc/api.txt55
-rw-r--r--runtime/doc/autocmd.txt20
-rw-r--r--runtime/doc/builtin.txt4
-rw-r--r--runtime/doc/deprecated.txt1
-rw-r--r--runtime/doc/develop.txt6
-rw-r--r--runtime/doc/eval.txt2
-rw-r--r--runtime/doc/filetype.txt68
-rw-r--r--runtime/doc/help.txt2
-rw-r--r--runtime/doc/if_perl.txt2
-rw-r--r--runtime/doc/if_pyth.txt4
-rw-r--r--runtime/doc/intro.txt2
-rw-r--r--runtime/doc/lsp.txt245
-rw-r--r--runtime/doc/lua.txt49
-rw-r--r--runtime/doc/message.txt2
-rw-r--r--runtime/doc/news-0.9.txt8
-rw-r--r--runtime/doc/news.txt8
-rw-r--r--runtime/doc/options.txt12
-rw-r--r--runtime/doc/pattern.txt10
-rw-r--r--runtime/doc/provider.txt2
-rw-r--r--runtime/doc/starting.txt42
-rw-r--r--runtime/doc/syntax.txt92
-rw-r--r--runtime/doc/vi_diff.txt6
-rw-r--r--runtime/doc/vim_diff.txt26
-rw-r--r--runtime/lua/man.lua2
-rw-r--r--runtime/lua/vim/_editor.lua6
-rw-r--r--runtime/lua/vim/_meta.lua4
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--runtime/lua/vim/loader.lua22
-rw-r--r--runtime/lua/vim/lsp.lua91
-rw-r--r--runtime/lua/vim/lsp/_inlay_hint.lua61
-rw-r--r--runtime/lua/vim/lsp/buf.lua2
-rw-r--r--runtime/lua/vim/lsp/protocol.lua2
-rw-r--r--runtime/lua/vim/version.lua2
35 files changed, 398 insertions, 473 deletions
diff --git a/runtime/autoload/msgpack.vim b/runtime/autoload/msgpack.vim
index 7f98a5b230..18dcd1e6a6 100644
--- a/runtime/autoload/msgpack.vim
+++ b/runtime/autoload/msgpack.vim
@@ -101,8 +101,8 @@ function s:msgpack_init_python() abort
" @return Formatted timestamp.
"
" @warning Without +python or +python3 this function does not work correctly.
- " The VimL code contains “reference” implementation which does not
- " really work because of precision loss.
+ " The Vimscript code contains “reference” implementation which does
+ " not really work because of precision loss.
function s:msgpack_dict_strftime(format, timestamp)
return msgpack#strftime(a:format, +msgpack#int_dict_to_str(a:timestamp))
endfunction
@@ -541,8 +541,8 @@ let s:MSGPACK_SPECIAL_OBJECTS = {
\}
""
-" Convert msgpack object dumped by msgpack#string() to a VimL object suitable
-" for msgpackdump().
+" Convert msgpack object dumped by msgpack#string() to a Vimscript object
+" suitable for msgpackdump().
"
" @param[in] s String to evaluate.
" @param[in] special_objs Additional special objects, in the same format as
diff --git a/runtime/autoload/shada.vim b/runtime/autoload/shada.vim
index 87acc515ee..ae718ad2e7 100644
--- a/runtime/autoload/shada.vim
+++ b/runtime/autoload/shada.vim
@@ -487,7 +487,7 @@ let s:SHADA_ENTRY_OBJECT_SEQUENCE = ['type', 'timestamp', 'length', 'data']
""
" Convert list returned by msgpackparse() to a list of ShaDa objects
"
-" @param[in] mpack List of VimL objects returned by msgpackparse().
+" @param[in] mpack List of Vimscript objects returned by msgpackparse().
"
" @return List of dictionaries with keys type, timestamp, length and data. Each
" dictionary describes one ShaDa entry.
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 9adca7620f..8c79279361 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -7,7 +7,7 @@
Nvim API *API* *api*
Nvim exposes a powerful API that can be used by plugins and external processes
-via |RPC|, |Lua| and VimL (|eval-api|).
+via |RPC|, |Lua| and Vimscript (|eval-api|).
Applications can also embed libnvim to work with the C API directly.
@@ -587,7 +587,7 @@ nvim__get_runtime({pat}, {all}, {*opts}) *nvim__get_runtime()*
Parameters: ~
• {pat} pattern of files to search for
• {all} whether to return all matches or only the first
- • {opts} is_lua: only search lua subdirs
+ • {opts} is_lua: only search Lua subdirs
Return: ~
list of absolute paths to the found files
@@ -1203,7 +1203,7 @@ nvim_open_term({buffer}, {opts}) *nvim_open_term()*
Parameters: ~
• {buffer} the buffer to use (expected to be empty)
• {opts} Optional parameters.
- • on_input: lua callback for input sent, i e keypresses in
+ • on_input: Lua callback for input sent, i e keypresses in
terminal mode. Note: keypresses are sent raw as they would
be to the pty master end. For instance, a carriage return
is sent as a "\r", not as a "\n". |textlock| applies. It
@@ -1556,22 +1556,22 @@ Vimscript Functions *api-vimscript*
*nvim_call_dict_function()*
nvim_call_dict_function({dict}, {fn}, {args})
- Calls a VimL |Dictionary-function| with the given arguments.
+ Calls a Vimscript |Dictionary-function| with the given arguments.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Parameters: ~
- • {dict} Dictionary, or String evaluating to a VimL |self| dict
- • {fn} Name of the function defined on the VimL dict
+ • {dict} Dictionary, or String evaluating to a Vimscript |self| dict
+ • {fn} Name of the function defined on the Vimscript dict
• {args} Function arguments packed in an Array
Return: ~
Result of the function call
nvim_call_function({fn}, {args}) *nvim_call_function()*
- Calls a VimL function with the given arguments.
+ Calls a Vimscript function with the given arguments.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Parameters: ~
• {fn} Function to call
@@ -1583,7 +1583,7 @@ nvim_call_function({fn}, {args}) *nvim_call_function()*
nvim_command({command}) *nvim_command()*
Executes an Ex command.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Prefer using |nvim_cmd()| or |nvim_exec2()| over this. To evaluate
multiple lines of Vim script or an Ex command directly, use
@@ -1595,13 +1595,13 @@ nvim_command({command}) *nvim_command()*
• {command} Ex command string
nvim_eval({expr}) *nvim_eval()*
- Evaluates a VimL |expression|. Dictionaries and Lists are recursively
+ Evaluates a Vimscript |expression|. Dictionaries and Lists are recursively
expanded.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Parameters: ~
- • {expr} VimL expression string
+ • {expr} Vimscript expression string
Return: ~
Evaluation result or expanded object
@@ -1613,7 +1613,7 @@ nvim_exec2({src}, {*opts}) *nvim_exec2()*
Unlike |nvim_command()| this function supports heredocs, script-scope
(s:), etc.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Parameters: ~
• {src} Vimscript code
@@ -1632,7 +1632,7 @@ nvim_exec2({src}, {*opts}) *nvim_exec2()*
*nvim_parse_expression()*
nvim_parse_expression({expr}, {flags}, {highlight})
- Parse a VimL expression.
+ Parse a Vimscript expression.
Attributes: ~
|api-fast|
@@ -1760,7 +1760,7 @@ nvim_cmd({*cmd}, {*opts}) *nvim_cmd()*
example, instead of `vim.cmd.bdelete{ count = 2 }`, you may do
`vim.cmd.bdelete(2)`.
- On execution error: fails with VimL error, updates v:errmsg.
+ On execution error: fails with Vimscript error, updates v:errmsg.
Parameters: ~
• {cmd} Command to execute. Must be a Dictionary that can contain the
@@ -2055,7 +2055,7 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
• deleted_codepoints (if `utf_sizes` is true)
• deleted_codeunits (if `utf_sizes` is true)
- • on_bytes: lua callback invoked on change. This
+ • on_bytes: Lua callback invoked on change. This
callback receives more granular information about the
change compared to on_lines. Return `true` to detach. Args:
• the string "bytes"
@@ -2118,12 +2118,12 @@ nvim_buf_call({buffer}, {fun}) *nvim_buf_call()*
Parameters: ~
• {buffer} Buffer handle, or 0 for current buffer
- • {fun} Function to call inside the buffer (currently lua callable
+ • {fun} Function to call inside the buffer (currently Lua callable
only)
Return: ~
- Return value of function. NB: will deepcopy lua values currently, use
- upvalues to send lua references in and out.
+ Return value of function. NB: will deepcopy Lua values currently, use
+ upvalues to send Lua references in and out.
nvim_buf_del_keymap({buffer}, {mode}, {lhs}) *nvim_buf_del_keymap()*
Unmaps a buffer-local |mapping| for the given mode.
@@ -2630,9 +2630,10 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {*opts})
highlights of the text. Currently only affects virt_text
highlights, but might affect `hl_group` in later versions.
• "replace": only show the virt_text color. This is the
- default
- • "combine": combine with background text color
- • "blend": blend with background text color.
+ default.
+ • "combine": combine with background text color.
+ • "blend": blend with background text color. Not supported
+ for "inline" virt_text.
• virt_lines : virtual lines to add next to this mark This
should be an array over lines, where each line in turn is
@@ -2720,7 +2721,7 @@ nvim_get_namespaces() *nvim_get_namespaces()*
nvim_set_decoration_provider({ns_id}, {*opts})
Set or change decoration provider for a |namespace|
- This is a very general purpose interface for having lua callbacks being
+ This is a very general purpose interface for having Lua callbacks being
triggered during the redraw code.
The expected usage is to set |extmarks| for the currently redrawn buffer.
@@ -2776,12 +2777,12 @@ nvim_win_call({window}, {fun}) *nvim_win_call()*
Parameters: ~
• {window} Window handle, or 0 for current window
- • {fun} Function to call inside the window (currently lua callable
+ • {fun} Function to call inside the window (currently Lua callable
only)
Return: ~
- Return value of function. NB: will deepcopy lua values currently, use
- upvalues to send lua references in and out.
+ Return value of function. NB: will deepcopy Lua values currently, use
+ upvalues to send Lua references in and out.
See also: ~
• |win_execute()|
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index b64938ee9e..a782be65e7 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -16,7 +16,7 @@ For a basic explanation, see section |40.3| in the user manual.
You can specify commands to be executed automatically when reading or writing
a file, when entering or leaving a buffer or window, and when exiting Vim.
For example, you can create an autocommand to set the 'cindent' option for
-files matching *.c. You can also use autocommands to implement advanced
+files matching `*.c`. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your vimrc file.
@@ -197,7 +197,7 @@ For READING FILES there are four kinds of events possible:
Vim uses only one of these four kinds when reading a file. The "Pre" and
"Post" events are both triggered, before and after reading the file.
-Note that the autocommands for the *ReadPre events and all the Filter events
+Note that the autocommands for the "*ReadPre" events and all the Filter events
are not allowed to change the current buffer (you will get an error message if
this happens). This is to prevent the file to be read into the wrong buffer.
@@ -1001,7 +1001,7 @@ TextChangedT After a change was made to the text in the
*TextYankPost*
TextYankPost Just after a |yank| or |deleting| command, but not
if the black hole register |quote_| is used nor
- for |setreg()|. Pattern must be *.
+ for |setreg()|. Pattern must be "*".
Sets these |v:event| keys:
inclusive
operator
@@ -1417,8 +1417,8 @@ When there is a matching "*Cmd" autocommand, it is assumed it will do the
writing. No further writing is done and the other events are not triggered.
|Cmd-event|
-Note that the *WritePost commands should undo any changes to the buffer that
-were caused by the *WritePre commands; otherwise, writing the file will have
+Note that the "*WritePost" commands should undo any changes to the buffer that
+were caused by the "*WritePre" commands; otherwise, writing the file will have
the side effect of changing the buffer.
Before executing the autocommands, the buffer from which the lines are to be
@@ -1426,15 +1426,15 @@ written temporarily becomes the current buffer. Unless the autocommands
change the current buffer or delete the previously current buffer, the
previously current buffer is made the current buffer again.
-The *WritePre and *AppendPre autocommands must not delete the buffer from
+The "*WritePre" and "*AppendPre" autocommands must not delete the buffer from
which the lines are to be written.
The '[ and '] marks have a special position:
-- Before the *ReadPre event the '[ mark is set to the line just above where
+- Before the "*ReadPre" event the '[ mark is set to the line just above where
the new lines will be inserted.
-- Before the *ReadPost event the '[ mark is set to the first line that was
+- Before the "*ReadPost" event the '[ mark is set to the first line that was
just read, the '] mark to the last line.
-- Before executing the *WriteCmd, *WritePre and *AppendPre autocommands the '[
+- Before executing the "*WriteCmd", "*WritePre" and "*AppendPre" autocommands the '[
mark is set to the first line that will be written, the '] mark to the last
line.
Careful: '[ and '] change when using commands that change the buffer.
@@ -1542,7 +1542,7 @@ To read a skeleton (template) file when opening a new file: >
:autocmd BufNewFile *.h 0r ~/vim/skeleton.h
:autocmd BufNewFile *.java 0r ~/vim/skeleton.java
-To insert the current date and time in a *.html file when writing it: >
+To insert the current date and time in a "*.html" file when writing it: >
:autocmd BufWritePre,FileWritePre *.html ks|call LastMod()|'s
:fun LastMod()
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index f1c4782d1b..1989475164 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -5703,7 +5703,7 @@ mode([expr]) Return a string that indicates the current mode.
DoFull()->mode()
msgpackdump({list} [, {type}]) *msgpackdump()*
- Convert a list of VimL objects to msgpack. Returned value is a
+ Convert a list of Vimscript objects to msgpack. Returned value is a
|readfile()|-style list. When {type} contains "B", a |Blob| is
returned instead. Example: >
call writefile(msgpackdump([{}]), 'fname.mpack', 'b')
@@ -5723,7 +5723,7 @@ msgpackdump({list} [, {type}]) *msgpackdump()*
msgpackparse({data}) *msgpackparse()*
Convert a |readfile()|-style list or a |Blob| to a list of
- VimL objects.
+ Vimscript objects.
Example: >
let fname = expand('~/.config/nvim/shada/main.shada')
let mpack = readfile(fname, 'b')
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 6fb11f0987..9a622741b5 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -139,6 +139,7 @@ LSP FUNCTIONS
or |vim.lsp.buf.format()| instead.
- *vim.lsp.util.get_progress_messages()* Use |vim.lsp.status()| or access
`progress` of |vim.lsp.client|
+- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_active_clients()|
TREESITTER FUNCTIONS
- *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()|
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index be4068d8c8..db878ac304 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -99,8 +99,8 @@ Examples:
scripting is performed by an external host process implemented in ~2k lines
of Python.
-The provider framework invokes VimL from C. It is composed of two functions
-in eval.c:
+The provider framework invokes Vimscript from C. It is composed of two
+functions in eval.c:
- eval_call_provider(name, method, arguments, discard): calls
provider#{name}#Call with the method and arguments. If discard is true, any
@@ -429,7 +429,7 @@ Examples of API-client package names:
- GOOD: nvim-racket
- GOOD: pynvim
- BAD: python-client
-- BAD: neovim
+- BAD: neovim_
API client implementation guidelines ~
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5cee668b39..c1ea28c839 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -39,7 +39,7 @@ List An ordered sequence of items, see |List| for details.
Dictionary An associative, unordered array: Each entry has a key and a
value. |Dictionary|
- Examples:
+ Examples: >
{"blue": "#0000ff", "red": "#ff0000"}
#{blue: "#0000ff", red: "#ff0000"}
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 48d6aed0f2..d75820732f 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -54,9 +54,9 @@ you can either set the 'filetype' option manually, or add a modeline to your
file. Example, for an IDL file use the command: >
:set filetype=idl
-or add this |modeline| to the file:
- /* vim: set filetype=idl : */ ~
-
+or add this |modeline| to the file: >
+ /* vim: set filetype=idl : */
+<
*:filetype-plugin-on*
You can enable loading the plugin files for specific file types with: >
:filetype plugin on
@@ -136,38 +136,38 @@ what kind of file it is. This doesn't always work. A number of global
variables can be used to overrule the filetype used for certain extensions:
file name variable ~
- *.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
- *.asm g:asmsyntax |ft-asm-syntax|
- *.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
- *.bas g:filetype_bas |ft-basic-syntax|
- *.cfg g:filetype_cfg
- *.cls g:filetype_cls
- *.csh g:filetype_csh |ft-csh-syntax|
- *.dat g:filetype_dat
- *.frm g:filetype_frm |ft-form-syntax|
- *.fs g:filetype_fs |ft-forth-syntax|
- *.i g:filetype_i |ft-progress-syntax|
- *.inc g:filetype_inc
- *.lsl g:filetype_lsl
- *.m g:filetype_m |ft-mathematica-syntax|
- *.mod g:filetype_mod
- *.p g:filetype_p |ft-pascal-syntax|
- *.pl g:filetype_pl
- *.pp g:filetype_pp |ft-pascal-syntax|
- *.prg g:filetype_prg
- *.r g:filetype_r
- *.sig g:filetype_sig
- *.sql g:filetype_sql |ft-sql-syntax|
- *.src g:filetype_src
- *.sys g:filetype_sys
- *.sh g:bash_is_sh |ft-sh-syntax|
- *.tex g:tex_flavor |ft-tex-plugin|
- *.typ g:filetype_typ
- *.w g:filetype_w |ft-cweb-syntax|
+ `*.asa` g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
+ `*.asm` g:asmsyntax |ft-asm-syntax|
+ `*.asp` g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
+ `*.bas` g:filetype_bas |ft-basic-syntax|
+ `*.cfg` g:filetype_cfg
+ `*.cls` g:filetype_cls
+ `*.csh` g:filetype_csh |ft-csh-syntax|
+ `*.dat` g:filetype_dat
+ `*.frm` g:filetype_frm |ft-form-syntax|
+ `*.fs` g:filetype_fs |ft-forth-syntax|
+ `*.i` g:filetype_i |ft-progress-syntax|
+ `*.inc` g:filetype_inc
+ `*.lsl` g:filetype_lsl
+ `*.m` g:filetype_m |ft-mathematica-syntax|
+ `*.mod` g:filetype_mod
+ `*.p` g:filetype_p |ft-pascal-syntax|
+ `*.pl` g:filetype_pl
+ `*.pp` g:filetype_pp |ft-pascal-syntax|
+ `*.prg` g:filetype_prg
+ `*.r` g:filetype_r
+ `*.sig` g:filetype_sig
+ `*.sql` g:filetype_sql |ft-sql-syntax|
+ `*.src` g:filetype_src
+ `*.sys` g:filetype_sys
+ `*.sh` g:bash_is_sh |ft-sh-syntax|
+ `*.tex` g:tex_flavor |ft-tex-plugin|
+ `*.typ` g:filetype_typ
+ `*.w` g:filetype_w |ft-cweb-syntax|
For a few filetypes the global variable is used only when the filetype could
not be detected:
- *.r g:filetype_r |ft-rexx-syntax|
+ `*.r` g:filetype_r |ft-rexx-syntax|
*filetype-ignore*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
@@ -619,7 +619,7 @@ To use Nvim as a manpager: >
export MANPAGER='nvim +Man!'
Note that when running `man` from the shell and with that `MANPAGER` in your
-environment, `man` will pre-format the manpage using `groff`. Thus, Neovim
+environment, `man` will pre-format the manpage using `groff`. Thus, Nvim
will inevitably display the manual page as it was passed to it from stdin. One
of the caveats of this is that the width will _always_ be hard-wrapped and not
soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: >
@@ -881,7 +881,7 @@ file: |ft_sql.txt|.
TEX *ft-tex-plugin* *g:tex_flavor*
-If the first line of a *.tex file has the form >
+If the first line of a `*.tex` file has the form >
%&<format>
then this determined the file type: plaintex (for plain TeX), context (for
ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index aefaa0b7df..651dce08bf 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -100,7 +100,7 @@ ADVANCED EDITING
------------------------------------------------------------------------------
API (EXTENSIBILITY/SCRIPTING/PLUGINS)
-|api| Nvim API via RPC, Lua and VimL
+|api| Nvim API via RPC, Lua and Vimscript
|ui| Nvim UI protocol
|lua-guide| Nvim Lua guide
|lua| Lua API
diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
index c3b49dc5bb..1fa96e2657 100644
--- a/runtime/doc/if_perl.txt
+++ b/runtime/doc/if_perl.txt
@@ -108,7 +108,7 @@ to the next.
==============================================================================
2. The VIM module *perl-vim*
-Perl code gets all of its access to Neovim via the "VIM" module.
+Perl code gets all of its access to Nvim via the "VIM" module.
Overview >
print "Hello" # displays a message
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index a96c9fcc0a..5acc5c0e59 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -575,8 +575,8 @@ Python 3 *python3*
As Python 3 is the only supported version in Nvim, "python" is synonymous
with "python3" in the current version. However, code that aims to support older
-versions of Neovim, as well as Vim, should prefer to use "python3"
-variants explicitly if Python 3 is required.
+versions of Nvim, as well as Vim, should prefer to use "python3" variants
+explicitly if Python 3 is required.
*:py3* *:python3*
:[range]py3 {stmt}
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index 15fe3838b7..86f7832376 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -83,7 +83,7 @@ For the most recent information about sponsoring look on the Vim web site:
https://www.vim.org/sponsor/
-Neovim development is funded separately from Vim:
+Nvim development is funded separately from Vim:
https://neovim.io/#sponsor
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 3732ddf2bd..055aff2210 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -24,26 +24,23 @@ QUICKSTART *lsp-quickstart*
Nvim provides an LSP client, but the servers are provided by third parties.
Follow these steps to get LSP features:
- 1. Install language servers using your package manager or by
- following the upstream installation instruction.
+1. Install language servers using your package manager or by following the
+ upstream installation instruction. You can find language servers here:
+ https://microsoft.github.io/language-server-protocol/implementors/servers/
- A list of language servers is available at:
+2. Configure the LSP client per language server. See |vim.lsp.start()| or use
+ this minimal example as a guide: >lua
- https://microsoft.github.io/language-server-protocol/implementors/servers/
-
- 2. Configure the LSP client per language server.
- A minimal example:
->lua
vim.lsp.start({
name = 'my-server-name',
cmd = {'name-of-language-server-executable'},
root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]),
})
<
- See |vim.lsp.start()| for details.
+3. Check that the server attached to the buffer: >
+ :lua =vim.lsp.get_active_clients()
- 3. Configure keymaps and autocmds to utilize LSP features.
- See |lsp-config|.
+4. Configure keymaps and autocmds to use LSP features. See |lsp-config|.
*lsp-config*
*lsp-defaults*
@@ -103,11 +100,9 @@ calls behind capability checks:
<
To learn what capabilities are available you can run the following command in
-a buffer with a started LSP client:
+a buffer with a started LSP client: >vim
->vim
:lua =vim.lsp.get_active_clients()[1].server_capabilities
-<
Full list of features provided by default can be found in |lsp-buf|.
@@ -115,26 +110,20 @@ Full list of features provided by default can be found in |lsp-buf|.
FAQ *lsp-faq*
- Q: How to force-reload LSP?
- A: Stop all clients, then reload the buffer. >vim
-
+- A: Stop all clients, then reload the buffer. >vim
:lua vim.lsp.stop_client(vim.lsp.get_active_clients())
:edit
- Q: Why isn't completion working?
- A: In the buffer where you want to use LSP, check that 'omnifunc' is set to
- "v:lua.vim.lsp.omnifunc": >vim
-
- :verbose set omnifunc?
-
-< Some other plugin may be overriding the option. To avoid that, you could
- set the option in an |after-directory| ftplugin, e.g.
- "after/ftplugin/python.vim".
+- A: In the buffer where you want to use LSP, check that 'omnifunc' is set to
+ "v:lua.vim.lsp.omnifunc": `:verbose set omnifunc?`
+ - Some other plugin may be overriding the option. To avoid that you could
+ set the option in an |after-directory| ftplugin, e.g.
+ "after/ftplugin/python.vim".
- Q: How do I run a request synchronously (e.g. for formatting on file save)?
- A: Check if the function has an `async` parameter and set the value to
- false.
-
- E.g. code formatting: >vim
+- A: Check if the function has an `async` parameter and set the value to
+ false. E.g. code formatting: >vim
" Auto-format *.rs (rust) files prior to saving them
" (async = false is the default for format)
@@ -142,7 +131,7 @@ FAQ *lsp-faq*
<
*lsp-vs-treesitter*
- Q: How do LSP and Treesitter compare?
- A: LSP requires a client and language server. The language server uses
+- A: LSP requires a client and language server. The language server uses
semantic analysis to understand code at a project level. This provides
language servers with the ability to rename across files, find
definitions in external libraries and more.
@@ -173,124 +162,72 @@ when creating a new client. Keys are LSP method names: >vim
*lsp-method*
Methods are the names of requests and notifications as defined by the LSP
-specification. These LSP requests/notifications are defined by default:
-
- callHierarchy/incomingCalls
- callHierarchy/outgoingCalls
- textDocument/codeAction
- textDocument/completion
- textDocument/declaration*
- textDocument/definition
- textDocument/documentHighlight
- textDocument/documentSymbol
- textDocument/formatting
- textDocument/hover
- textDocument/implementation*
- textDocument/inlayHint
- textDocument/publishDiagnostics
- textDocument/rangeFormatting
- textDocument/references
- textDocument/rename
- textDocument/semanticTokens/full
- textDocument/semanticTokens/full/delta
- textDocument/signatureHelp
- textDocument/typeDefinition*
- window/logMessage
- window/showMessage
- window/showDocument
- window/showMessageRequest
- workspace/applyEdit
- workspace/inlayHint/refresh
- workspace/symbol
-
-* NOTE: These are sometimes not implemented by servers.
+specification. These LSP requests/notifications are defined by default in the
+Nvim LSP client (but depends on server support):
+
+- callHierarchy/incomingCalls
+- callHierarchy/outgoingCalls
+- textDocument/codeAction
+- textDocument/completion
+- textDocument/declaration*
+- textDocument/definition
+- textDocument/documentHighlight
+- textDocument/documentSymbol
+- textDocument/formatting
+- textDocument/hover
+- textDocument/implementation*
+- textDocument/inlayHint
+- textDocument/publishDiagnostics
+- textDocument/rangeFormatting
+- textDocument/references
+- textDocument/rename
+- textDocument/semanticTokens/full
+- textDocument/semanticTokens/full/delta
+- textDocument/signatureHelp
+- textDocument/typeDefinition*
+- window/logMessage
+- window/showMessage
+- window/showDocument
+- window/showMessageRequest
+- workspace/applyEdit
+- workspace/inlayHint/refresh
+- workspace/symbol
*lsp-handler*
+LSP handlers are functions that handle |lsp-response|s to requests made by Nvim
+to the server. (Notifications, as opposed to requests, are fire-and-forget:
+there is no response, so they can't be handled. |lsp-notification|)
-LSP handlers are functions with signatures designed to handle LSP responses
-and notifications.
-
-For |lsp-response|, each |lsp-handler| has this signature: >
+Each response handler has this signature: >
- function(err, result, ctx, config)
+ function(err, result, ctx, config)
<
Parameters: ~
- {err} (table|nil)
- When the language server is unable to complete a
- request, a table with information about the error is
- sent. Otherwise, it is `nil`. See |lsp-response|.
- {result} (Result | Params | nil)
- When the language server is able to successfully
- complete a request, this contains the `result` key of
- the response. See |lsp-response|.
- {ctx} (table)
- Context describes additional calling state associated
- with the handler. It consists of the following key,
- value pairs:
-
- {method} (string)
- The |lsp-method| name.
- {client_id} (number)
- The ID of the |vim.lsp.client|.
- {bufnr} (Buffer)
- Buffer handle, or 0 for current.
- {params} (table|nil)
- The parameters used in the original
- request which resulted in this handler
- call.
- {config} (table)
- Configuration for the handler.
-
- Each handler can define its own configuration table
- that allows users to customize the behavior of a
- particular handler.
-
- To configure a particular |lsp-handler|, see:
- |lsp-handler-configuration|
-
+ - {err} (table|nil) Error info dict, or `nil` if the request
+ completed.
+ - {result} (Result | Params | nil) `result` key of the |lsp-response| or
+ `nil` if the request failed.
+ - {ctx} (table) Table of calling state associated with the
+ handler, with these keys:
+ - {method} (string) |lsp-method| name.
+ - {client_id} (number) |vim.lsp.client| identifier.
+ - {bufnr} (Buffer) Buffer handle.
+ - {params} (table|nil) Request parameters table.
+ - {version} (number) Document version at time of
+ request. Handlers can compare this to the
+ current document version to check if the
+ response is "stale". See also |b:changedtick|.
+ - {config} (table) Handler-defined configuration table, which allows
+ users to customize handler behavior.
+ For an example, see:
+ |vim.lsp.diagnostic.on_publish_diagnostics()|
+ To configure a particular |lsp-handler|, see:
+ |lsp-handler-configuration|
Returns: ~
- The |lsp-handler| can respond by returning two values: `result, err`
- Where `err` must be shaped like an RPC error:
- `{ code, message, data? }`
-
- You can use |vim.lsp.rpc.rpc_response_error()| to create this object.
-
-For |lsp-notification|, each |lsp-handler| has this signature: >
-
- function(err, result, ctx, config)
-<
- Parameters: ~
- {err} (nil)
- This is always `nil`.
- See |lsp-notification|
- {result} (Result)
- This contains the `params` key of the notification.
- See |lsp-notification|
- {ctx} (table)
- Context describes additional calling state associated
- with the handler. It consists of the following key,
- value pairs:
-
- {method} (string)
- The |lsp-method| name.
- {client_id} (number)
- The ID of the |vim.lsp.client|.
- {config} (table)
- Configuration for the handler.
-
- Each handler can define its own configuration table
- that allows users to customize the behavior of a
- particular handler.
-
- For an example, see:
- |vim.lsp.diagnostic.on_publish_diagnostics()|
-
- To configure a particular |lsp-handler|, see:
- |lsp-handler-configuration|
-
- Returns: ~
- The |lsp-handler|'s return value will be ignored.
+ Two values `result, err` where `err` is shaped like an RPC error: >
+ { code, message, data? }
+< You can use |vim.lsp.rpc.rpc_response_error()| to create this object.
*lsp-handler-configuration*
@@ -414,12 +351,12 @@ name: >lua
<
*lsp-response*
-For the format of the response message, see:
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
+LSP response shape:
+https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
*lsp-notification*
-For the format of the notification message, see:
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#notificationMessage
+LSP notification shape:
+https://microsoft.github.io/language-server-protocol/specifications/specification-current/#notificationMessage
*lsp-on-list-handler*
@@ -814,21 +751,6 @@ client_is_stopped({client_id}) *vim.lsp.client_is_stopped()*
Return: ~
(boolean) stopped true if client is stopped, false otherwise.
- *vim.lsp.for_each_buffer_client()*
-for_each_buffer_client({bufnr}, {fn})
- Invokes a function for each LSP client attached to a buffer.
-
- Parameters: ~
- • {bufnr} (integer) Buffer number
- • {fn} (function) Function to run on each client attached to buffer
- {bufnr}. The function takes the client, client ID, and buffer
- number as arguments. Example: >lua
-
- vim.lsp.for_each_buffer_client(0, function(client, client_id, bufnr)
- print(vim.inspect(client))
- end)
-<
-
formatexpr({opts}) *vim.lsp.formatexpr()*
Provides an interface between the built-in client and a `formatexpr`
function.
@@ -1052,8 +974,8 @@ start_client({config}) *vim.lsp.start_client()*
if `capabilities.offsetEncoding` was sent to it. You can
only modify the `client.offset_encoding` here before any
notifications are sent. Most language servers expect to be
- sent client specified settings after initialization.
- Neovim does not make this assumption. A
+ sent client specified settings after initialization. Nvim
+ does not make this assumption. A
`workspace/didChangeConfiguration` notification should be
sent to the server during on_init.
• on_exit Callback (code, signal, client_id) invoked on
@@ -1254,8 +1176,7 @@ format({options}) *vim.lsp.buf.format()*
fields:
• formatting_options (table|nil): Can be used to specify
FormattingOptions. Some unspecified options will be
- automatically derived from the current Neovim options.
- See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions
+ automatically derived from the current Nvim options. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions
• timeout_ms (integer|nil, default 1000): Time in
milliseconds to block for formatting requests. No effect
if async=true
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 1110fb7fc3..c3eaf1ae39 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -34,7 +34,7 @@ Nvim ever ships with Lua 5.4+, a Lua 5.1 compatibility shim will be provided
so that old plugins continue to work transparently.
*lua-luajit*
-Neovim is built with luajit on platforms which support it, which provides
+Nvim is built with luajit on platforms which support it, which provides
extra functionality. Lua code in |init.lua| and plugins can assume its presence
on installations on common platforms. For maximum compatibility with less
common platforms, availability can be checked using the `jit` global variable: >lua
@@ -46,7 +46,7 @@ common platforms, availability can be checked using the `jit` global variable: >
<
*lua-bit*
In particular, the luajit "bit" extension module is _always_ available.
-A fallback implementation is included when nvim is built with PUC lua 5.1,
+A fallback implementation is included when nvim is built with PUC Lua 5.1,
and will be transparently used when `require("bit")` is invoked.
==============================================================================
@@ -549,7 +549,7 @@ Multithreading *lua-loop-threading*
Plugins can perform work in separate (os-level) threads using the threading
APIs in luv, for instance `vim.uv.new_thread`. Note that every thread
-gets its own separate lua interpreter state, with no access to lua globals
+gets its own separate Lua interpreter state, with no access to Lua globals
in the main thread. Neither can the state of the editor (buffers, windows,
etc) be directly accessed from threads.
@@ -557,10 +557,10 @@ A subset of the `vim.*` API is available in threads. This includes:
- `vim.uv` with a separate event loop per thread.
- `vim.mpack` and `vim.json` (useful for serializing messages between threads)
-- `require` in threads can use lua packages from the global |package.path|
+- `require` in threads can use Lua packages from the global |package.path|
- `print()` and `vim.inspect`
- `vim.diff`
-- most utility functions in `vim.*` for working with pure lua values
+- most utility functions in `vim.*` for working with pure Lua values
like `vim.split`, `vim.tbl_*`, `vim.list_*`, and so on.
- `vim.is_thread()` returns true from a non-main thread.
@@ -624,7 +624,7 @@ vim.highlight.priorities *vim.highlight.priorities*
------------------------------------------------------------------------------
VIM.REGEX *lua-regex*
-Vim regexes can be used directly from lua. Currently they only allow
+Vim regexes can be used directly from Lua. Currently they only allow
matching within a single line.
vim.regex({re}) *vim.regex()*
@@ -747,9 +747,22 @@ vim.json.encode({obj}) *vim.json.encode*
vim.json.decode({str}[, {opts}]) *vim.json.decode*
Decodes (or "unpacks") the JSON-encoded {str} to a Lua object.
- {opts} is a table with the key `luanil = { object: bool, array: bool }`
- that controls whether `null` in JSON objects or arrays should be converted
- to Lua `nil` instead of `vim.NIL`.
+ - Decodes JSON "null" as |vim.NIL| (controllable by {opts}, see below).
+ - Decodes empty object as |vim.empty_dict()|.
+ - Decodes empty array as `{}` (empty Lua table).
+
+ Example: >lua
+ :lua vim.print(vim.json.decode('{"bar":[],"foo":{},"zub":null}'))
+ --> { bar = {}, foo = vim.empty_dict(), zub = vim.NIL }
+<
+ Parameters: ~
+ • {str} Stringified JSON data.
+ • {opts} Options map keys:
+ • luanil: { object: bool, array: bool }
+ • `luanil.object=true` converts `null` in JSON objects to
+ Lua `nil` instead of `vim.NIL`.
+ • `luanil.array=true` converts `null` in JSON arrays to Lua
+ `nil` instead of `vim.NIL`.
------------------------------------------------------------------------------
VIM.SPELL *lua-spell*
@@ -920,8 +933,8 @@ vim.wait({time} [, {callback}, {interval}, {fast_only}]) *vim.wait()*
vim.ui_attach({ns}, {options}, {callback}) *vim.ui_attach()*
Attach to ui events, similar to |nvim_ui_attach()| but receive events
- as lua callback. Can be used to implement screen elements like
- popupmenu or message handling in lua.
+ as Lua callback. Can be used to implement screen elements like
+ popupmenu or message handling in Lua.
{options} should be a dictionary-like table, where `ext_...` options should
be set to true to receive events for the respective external element.
@@ -1249,7 +1262,7 @@ In any of the above examples, to replicate the behavior |:setlocal|, use
*vim.opt:get()*
Option:get()
- Returns a lua-representation of the option. Boolean, number and string
+ Returns a Lua-representation of the option. Boolean, number and string
values will be returned in exactly the same fashion.
For values that are comma-separated lists, an array will be returned with
@@ -1422,10 +1435,10 @@ keycode({str}) *vim.keycode()*
• |nvim_replace_termcodes()|
lua_omnifunc({find_start}, {_}) *vim.lua_omnifunc()*
- Omnifunc for completing lua values from the runtime lua interpreter,
+ Omnifunc for completing Lua values from the runtime Lua interpreter,
similar to the builtin completion for the `:lua` command.
- Activate using `set omnifunc=v:lua.vim.lua_omnifunc` in a lua buffer.
+ Activate using `set omnifunc=v:lua.vim.lua_omnifunc` in a Lua buffer.
notify({msg}, {level}, {opts}) *vim.notify()*
Display a notification to the user.
@@ -2217,17 +2230,17 @@ Lua module: loader *lua-loader*
disable() *vim.loader.disable()*
Disables the experimental Lua module loader:
• removes the loaders
- • adds the default Neovim loader
+ • adds the default Nvim loader
enable() *vim.loader.enable()*
Enables the experimental Lua module loader:
• overrides loadfile
- • adds the lua loader using the byte-compilation cache
+ • adds the Lua loader using the byte-compilation cache
• adds the libs loader
- • removes the default Neovim loader
+ • removes the default Nvim loader
find({modname}, {opts}) *vim.loader.find()*
- Finds lua modules for the given module name.
+ Finds Lua modules for the given module name.
Parameters: ~
• {modname} (string) Module name, or `"*"` to find the top-level
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index dffdb5950f..03f614e841 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -327,7 +327,7 @@ You can switch the 'write' option on with ":set write".
*E25* >
Nvim does not have a built-in GUI
-Neovim does not have a built in GUI, so `:gvim` and `:gui` don't work.
+Nvim does not have a built in GUI, so `:gvim` and `:gui` don't work.
*E49* >
Invalid scroll size
diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt
index c7624119e2..5546703dab 100644
--- a/runtime/doc/news-0.9.txt
+++ b/runtime/doc/news-0.9.txt
@@ -109,7 +109,7 @@ The following new APIs or features were added.
(or the Vimscript equivalent) to their |config| file.
• A new environment variable named NVIM_APPNAME enables configuring the
- directories where Neovim should find its configuration and state files. See
+ directories where Nvim should find its configuration and state files. See
`:help $NVIM_APPNAME` .
• Added support for running Lua scripts from shell using |-l|. >
@@ -117,9 +117,9 @@ The following new APIs or features were added.
< Also works with stdin: >
echo "print(42)" | nvim -l -
-• Added an omnifunc implementation for lua, |vim.lua_omnifunc()|
+• 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 |lua-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()
@@ -223,7 +223,7 @@ The following changes to existing APIs or features add new behavior.
• The `win_viewport` UI event now contains information about virtual lines,
meaning that smooth scrolling can now be implemented more consistently.
-• The `:= {expr}` syntax can be used to evaluate a lua expression, as
+• The `:= {expr}` syntax can be used to evaluate a Lua expression, as
a shorter form of `:lua ={expr}`. `:=` and `:[range]=` without argument
are unchanged. However `:=#` and similar variants using |ex-flags|
are no longer supported.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 2a25edc4eb..153441b0a5 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -43,6 +43,11 @@ The following changes may require adaptations in user config or plugins.
• Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.
+• Removed functions from the |vim.json| module:
+ • Unnecessary, undocumented functions which caused global side-effects.
+ • `vim.json.null` is redundant with `vim.NIL`.
+ • `vim.json.array_mt` (and related) is redundant with `vim.empty_dict()`.
+
==============================================================================
NEW FEATURES *news-features*
@@ -129,6 +134,8 @@ The following changes to existing APIs or features add new behavior.
• |:checkhealth| buffer now implements |folding|. The initial folding status is
defined by the 'foldenable' option.
+• |:Man| now respects 'wrapmargin'
+
==============================================================================
REMOVED FEATURES *news-removed*
@@ -160,6 +167,7 @@ release.
• vim.lsp functions:
- |vim.lsp.util.get_progress_messages()| Use |vim.lsp.status()| instead.
+ - |vim.lsp.for_each_buffer_client()| Use |vim.lsp.get_active_clients()| instead.
• `vim.loop` has been renamed to `vim.uv`.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 78d38095a8..b58ca8d094 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1449,7 +1449,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeslash'* *'csl'*
'completeslash' 'csl' string (default: "")
local to buffer
- {only for MS-Windows}
+ only for MS-Windows
When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or
@@ -3741,7 +3741,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'linespace'* *'lsp'*
'linespace' 'lsp' number (default 0)
global
- {only in the GUI}
+ only in the GUI
Number of pixel lines inserted between characters. Useful if the font
uses the full character cell height, making lines touch each other.
When non-zero there is room for underlining.
@@ -4187,7 +4187,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
'mousehide' 'mh' boolean (default on)
global
- {only works in the GUI}
+ only in the GUI
When on, the mouse pointer is hidden when characters are typed.
The mouse pointer is restored when the mouse is moved.
@@ -4426,7 +4426,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
'opendevice' 'odev' boolean (default off)
global
- {only for Windows}
+ only for Windows
Enable reading and writing from devices. This may get Vim stuck on a
device that can be opened but doesn't actually do the I/O. Therefore
it is off by default.
@@ -5323,7 +5323,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
'shellslash' 'ssl' boolean (default off)
global
- {only for MS-Windows}
+ only for MS-Windows
When set, a forward slash is used when expanding file names. This is
useful when a Unix-like shell is used instead of cmd.exe. Backward
slashes can still be typed, but they are changed to forward slashes by
@@ -7054,7 +7054,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winaltkeys'* *'wak'*
'winaltkeys' 'wak' string (default "menu")
global
- {only used in Win32}
+ only used in Win32
Some GUI versions allow the access to menu entries by using the ALT
key in combination with a character that appears underlined in the
menu. This conflicts with the use of the ALT key for mappings and
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 8437496011..7ea3b7df76 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -432,8 +432,6 @@ after: \v \m \M \V matches ~
\\ \\ \\ \\ literal backslash
\{ { { { literal curly brace
-{only Vim supports \m, \M, \v and \V}
-
If you want to you can make a pattern immune to the 'magic' option being set
or not by putting "\m" or "\M" at the start of the pattern.
@@ -455,7 +453,7 @@ More explanation and examples below, follow the links. *E64* *E871*
\{n} \{n} n exactly
\{n,} \{n,} at least n as many as possible
\{,m} \{,m} 0 to m as many as possible
- \{} \{} 0 or more as many as possible (same as *)
+ \{} \{} 0 or more as many as possible (same as "*")
|/\{-| \{-n,m} \{-n,m} n to m as few as possible
\{-n} \{-n} n exactly
@@ -633,7 +631,7 @@ overview.
\{n} Matches n of the preceding atom
\{n,} Matches at least n of the preceding atom, as many as possible
\{,m} Matches 0 to m of the preceding atom, as many as possible
-\{} Matches 0 or more of the preceding atom, as many as possible (like *)
+\{} Matches 0 or more of the preceding atom, as many as possible (like "*")
*/\{-*
\{-n,m} matches n to m of the preceding atom, as few as possible
\{-n} matches n of the preceding atom
@@ -1256,7 +1254,6 @@ letters only.
When "\c" appears anywhere in the pattern, the whole pattern is handled like
'ignorecase' is on. The actual value of 'ignorecase' and 'smartcase' is
ignored. "\C" does the opposite: Force matching case for the whole pattern.
-{only Vim supports \c and \C}
Note that 'ignorecase', "\c" and "\C" are not used for the character classes.
Examples:
@@ -1338,11 +1335,10 @@ difference between them is mostly just notation; here's a summary of where
they differ:
Capability in Vimspeak in Perlspeak ~
-----------------------------------------------------------------
force case insensitivity \c (?i)
force case sensitivity \C (?-i)
backref-less grouping \%(atom\) (?:atom)
-conservative quantifiers \{-n,m} *?, +?, ??, {}?
+conservative quantifiers \{-n,m} `*?,` +?, ??, {}?
0-width match atom\@= (?=atom)
0-width non-match atom\@! (?!atom)
0-width preceding match atom\@<= (?<=atom)
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index a476a56877..9e70ff8945 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -66,7 +66,7 @@ To disable Python 3 support: >vim
PYTHON VIRTUALENVS ~
*python-virtualenv*
If you plan to use per-project virtualenvs often, you should assign one
-virtualenv for Neovim and hard-code the interpreter path via
+virtualenv for Nvim and hard-code the interpreter path via
|g:python3_host_prog| so that the "pynvim" package is not required
for each virtualenv.
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 51cbf4c93d..28208f68d3 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -241,8 +241,8 @@ argument.
*-ll*
-ll {script} [args]
- Execute a lua script, similarly to |-l|, but the editor is not
- initialized. This gives a lua environment similar to a worker
+ Execute a Lua script, similarly to |-l|, but the editor is not
+ initialized. This gives a Lua environment similar to a worker
thread. See |lua-loop-threading|.
Unlike `-l` no prior arguments are allowed.
@@ -918,7 +918,7 @@ Shada ("shared data") file *shada* *shada-file*
If you exit Vim and later start it again, you would normally lose a lot of
information. The ShaDa file can be used to remember that information, which
enables you to continue where you left off. Its name is the abbreviation of
-SHAred DAta because it is used for sharing data between Neovim sessions.
+SHAred DAta because it is used for sharing data between Nvim sessions.
This is introduced in section |21.3| of the user manual.
@@ -1010,16 +1010,16 @@ MERGING *shada-merging*
When writing ShaDa files with |:wshada| without bang or at regular exit
information in the existing ShaDa file is merged with information from current
-Neovim instance. For this purpose ShaDa files store timestamps associated
+Nvim instance. For this purpose ShaDa files store timestamps associated
with ShaDa entries. Specifically the following is being done:
1. History lines are merged, ordered by timestamp. Maximum amount of items in
ShaDa file is defined by 'shada' option (|shada-/|, |shada-:|, |shada-@|,
etc: one suboption for each character that represents history name
(|:history|)).
-2. Local marks and changes for files that were not opened by Neovim are copied
- to new ShaDa file. Marks for files that were opened by Neovim are merged,
- changes to files opened by Neovim are ignored. |shada-'|
+2. Local marks and changes for files that were not opened by Nvim are copied
+ to new ShaDa file. Marks for files that were opened by Nvim are merged,
+ changes to files opened by Nvim are ignored. |shada-'|
3. Jump list is merged: jumps are ordered by timestamp, identical jumps
(identical position AND timestamp) are squashed.
4. Search patterns and substitute strings are not merged: search pattern or
@@ -1027,14 +1027,14 @@ with ShaDa entries. Specifically the following is being done:
to ShaDa file.
5. For each register entity with greatest timestamp is the only saved.
|shada-<|
-6. All saved variables are saved from current Neovim instance. Additionally
+6. All saved variables are saved from current Nvim instance. Additionally
existing variable values are copied, meaning that the only way to remove
variable from a ShaDa file is either removing it by hand or disabling
writing variables completely. |shada-!|
7. For each global mark entity with greatest timestamp is the only saved.
8. Buffer list and header are the only entries which are not merged in any
fashion: the only header and buffer list present are the ones from the
- Neovim instance which was last writing the file. |shada-%|
+ Nvim instance which was last writing the file. |shada-%|
COMPATIBILITY *shada-compatibility*
@@ -1059,13 +1059,13 @@ ShaDa files are forward and backward compatible. This means that
history types. |history|
6. Unknown keys found in register, local mark, global mark, change, jump and
search pattern entries are saved internally and dumped when writing.
- Entries created during Neovim session never have such additions.
+ Entries created during Nvim session never have such additions.
7. Additional elements found in replacement string and history entries are
- saved internally and dumped. Entries created during Neovim session never
+ saved internally and dumped. Entries created during Nvim session never
have such additions.
8. Additional elements found in variable entries are simply ignored when
reading. When writing new variables they will be preserved during merging,
- but that's all. Variable values dumped from current Neovim session never
+ but that's all. Variable values dumped from current Nvim session never
have additional elements, even if variables themselves were obtained by
reading ShaDa files.
@@ -1102,7 +1102,7 @@ start with an existing one to get the format right. You need to understand
MessagePack (or, more likely, find software that is able to use it) format to
do this. This can be useful in order to create a second file, say
"~/.my.shada" which could contain certain settings that you always want when
-you first start Neovim. For example, you can preload registers with
+you first start Nvim. For example, you can preload registers with
particular data, or put certain commands in the command line history. A line
in your |config| file like >
:rshada! ~/.my.shada
@@ -1112,12 +1112,12 @@ file name, using the ":autocmd" command (see |:autocmd|). More information on
ShaDa file format is contained in |shada-format| section.
*E136* *E929* *shada-error-handling*
-Some errors make Neovim leave temporary file named `{basename}.tmp.X` (X is
+Some errors make Nvim leave temporary file named `{basename}.tmp.X` (X is
any free letter from `a` to `z`) while normally it will create this file,
write to it and then rename `{basename}.tmp.X` to `{basename}`. Such errors
include:
-- Errors which make Neovim think that read file is not a ShaDa file at all:
+- Errors which make Nvim think that read file is not a ShaDa file at all:
non-ShaDa files are not overwritten for safety reasons to avoid accidentally
destroying an unrelated file. This could happen e.g. when typing "nvim -i
file" in place of "nvim -R file" (yes, somebody did that at least with Vim).
@@ -1125,26 +1125,26 @@ include:
- If writing to the temporary file failed: e.g. because of the insufficient
space left.
- If renaming file failed: e.g. because of insufficient permissions.
-- If target ShaDa file has different from the Neovim instance's owners (user
+- If target ShaDa file has different from the Nvim instance's owners (user
and group) and changing them failed. Unix-specific, applies only when
- Neovim was launched from root.
+ Nvim was launched from root.
Do not forget to remove the temporary file or replace the target file with
temporary one after getting one of the above errors or all attempts to create
a ShaDa file may fail with |E929|. If you got one of them when using
-|:wshada| (and not when exiting Neovim: i.e. when you have Neovim session
+|:wshada| (and not when exiting Nvim: i.e. when you have Nvim session
running) you have additional options:
- First thing which you should consider if you got any error, except failure
to write to the temporary file: remove existing file and replace it with the
- temporary file. Do it even if you have running Neovim instance.
+ temporary file. Do it even if you have running Nvim instance.
- Fix the permissions and/or file ownership, free some space and attempt to
write again. Do not remove the existing file.
- Use |:wshada| with bang. Does not help in case of permission error. If
target file was actually the ShaDa file some information may be lost in this
case. To make the matters slightly better use |:rshada| prior to writing,
but this still will loose buffer-local marks and change list entries for any
- file which is not opened in the current Neovim instance.
+ file which is not opened in the current Nvim instance.
- Remove the target file from shell and use |:wshada|. Consequences are not
different from using |:wshada| with bang, but "rm -f" works in some cases
when you don't have write permissions.
@@ -1211,7 +1211,7 @@ exactly four MessagePack objects:
Key Data ~
generator Binary, software used to generate ShaDa
file. Is equal to "nvim" when ShaDa file was
- written by Neovim.
+ written by Nvim.
version Binary, generator version.
encoding Binary, effective 'encoding' value.
max_kbyte Integer, effective |shada-s| limit value.
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 14f613d3fc..09c935cb9b 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -197,19 +197,19 @@ be preferred names for highlight groups that are common for many languages.
These are the suggested group names (if syntax highlighting works properly
you can see the actual color, except for "Ignore"):
- *Comment any comment
+ Comment any comment
- *Constant any constant
+ Constant any constant
String a string constant: "this is a string"
Character a character constant: 'c', '\n'
Number a number constant: 234, 0xff
Boolean a boolean constant: TRUE, false
Float a floating point constant: 2.3e10
- *Identifier any variable name
+ Identifier any variable name
Function function name (also: methods for classes)
- *Statement any statement
+ Statement any statement
Conditional if, then, else, endif, switch, etc.
Repeat for, do, while, etc.
Label case, default, etc.
@@ -217,31 +217,31 @@ you can see the actual color, except for "Ignore"):
Keyword any other keyword
Exception try, catch, throw
- *PreProc generic Preprocessor
+ PreProc generic Preprocessor
Include preprocessor #include
Define preprocessor #define
Macro same as Define
PreCondit preprocessor #if, #else, #endif, etc.
- *Type int, long, char, etc.
+ Type int, long, char, etc.
StorageClass static, register, volatile, etc.
Structure struct, union, enum, etc.
Typedef A typedef
- *Special any special symbol
+ Special any special symbol
SpecialChar special character in a constant
Tag you can use CTRL-] on this
Delimiter character that needs attention
SpecialComment special things inside a comment
Debug debugging statements
- *Underlined text that stands out, HTML links
+ Underlined text that stands out, HTML links
- *Ignore left blank, hidden |hl-Ignore|
+ Ignore left blank, hidden |hl-Ignore|
- *Error any erroneous construct
+ Error any erroneous construct
- *Todo anything that needs extra attention; mostly the
+ Todo anything that needs extra attention; mostly the
keywords TODO FIXME and XXX
The names marked with * are the preferred groups; the others are minor groups.
@@ -893,7 +893,7 @@ nasm_no_warn potentially risky syntax not as ToDo
ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax*
-*.asp and *.asa files could be either Perl or Visual Basic script. Since it's
+`*.asp` and `*.asa` files could be either Perl or Visual Basic script. Since it's
hard to detect this you can set two global variables to tell Vim what you are
using. For Perl script use: >
:let g:filetype_asa = "aspperl"
@@ -979,7 +979,7 @@ Variable Highlight ~
*c_ansi_typedefs* ... but do standard ANSI types
*c_ansi_constants* ... but do standard ANSI constants
*c_no_utf* don't highlight \u and \U in strings
-*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc
+*c_syntax_for_h* for `*.h` files use C syntax instead of C++ and use objc
syntax instead of objcpp
*c_no_if0* don't highlight "#if 0" blocks as comments
*c_no_cformat* don't highlight %-formats in strings
@@ -987,7 +987,7 @@ Variable Highlight ~
*c_no_c11* don't highlight C11 standard items
*c_no_bsd* don't highlight BSD specific types
-When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
+When 'foldmethod' is set to "syntax" then `/* */` comments and { } blocks will
become a fold. If you don't want comments to become a fold use: >
:let c_no_comment_fold = 1
"#if 0" blocks are also folded, unless: >
@@ -1034,7 +1034,7 @@ CH *ch.vim* *ft-ch-syntax*
C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
the C syntax file. See |c.vim| for all the settings that are available for C.
-By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
+By setting a variable you can tell Vim to use Ch syntax for `*.h` files, instead
of C or C++: >
:let ch_syntax_for_h = 1
@@ -1296,7 +1296,7 @@ dosbatch_colons_comment variable to anything: >
:let dosbatch_colons_comment = 1
-There is an option that covers whether *.btm files should be detected as type
+There is an option that covers whether `*.btm` files should be detected as type
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
is used by default. You may select the former with the following line: >
@@ -1427,13 +1427,13 @@ Euphoria version 3.1.1 (https://www.rapideuphoria.com/) is still necessary
for developing applications for the DOS platform, which Euphoria version 4
(https://www.openeuphoria.org/) does not support.
-The following file extensions are auto-detected as Euphoria file type:
+The following file extensions are auto-detected as Euphoria file type: >
*.e, *.eu, *.ew, *.ex, *.exu, *.exw
*.E, *.EU, *.EW, *.EX, *.EXU, *.EXW
To select syntax highlighting file for Euphoria, as well as for
-auto-detecting the *.e and *.E file extensions as Euphoria file type,
+auto-detecting the `*.e` and `*.E` file extensions as Euphoria file type,
add the following line to your startup file: >
:let g:filetype_euphoria = "euphoria3"
@@ -1442,7 +1442,7 @@ add the following line to your startup file: >
:let g:filetype_euphoria = "euphoria4"
-Elixir and Euphoria share the *.ex file extension. If the filetype is
+Elixir and Euphoria share the `*.ex` file extension. If the filetype is
specifically set as Euphoria with the g:filetype_euphoria variable, or the
file is determined to be Euphoria based on keywords in the file, then the
filetype will be set as Euphoria. Otherwise, the filetype will default to
@@ -1469,11 +1469,11 @@ ELIXIR *elixir.vim* *ft-elixir-syntax*
Elixir is a dynamic, functional language for building scalable and
maintainable applications.
-The following file extensions are auto-detected as Elixir file types:
+The following file extensions are auto-detected as Elixir file types: >
*.ex, *.exs, *.eex, *.leex, *.lock
-Elixir and Euphoria share the *.ex file extension. If the filetype is
+Elixir and Euphoria share the `*.ex` file extension. If the filetype is
specifically set as Euphoria with the g:filetype_euphoria variable, or the
file is determined to be Euphoria based on keywords in the file, then the
filetype will be set as Euphoria. Otherwise, the filetype will default to
@@ -1905,7 +1905,7 @@ IA64 *ia64.vim* *intel-itanium* *ft-ia64-syntax*
Highlighting for the Intel Itanium 64 assembly language. See |asm.vim| for
how to recognize this filetype.
-To have *.inc files be recognized as IA64, add this to your vimrc file: >
+To have `*.inc` files be recognized as IA64, add this to your vimrc file: >
:let g:filetype_inc = "ia64"
@@ -2118,7 +2118,7 @@ set "lite_minlines" to the value you desire. Example: >
LPC *lpc.vim* *ft-lpc-syntax*
LPC stands for a simple, memory-efficient language: Lars Pensjö C. The
-file name of LPC is usually *.c. Recognizing these files as LPC would bother
+file name of LPC is usually `*.c`. Recognizing these files as LPC would bother
users writing only C programs. If you want to use LPC syntax in Vim, you
should set a variable in your vimrc file: >
@@ -2153,7 +2153,7 @@ For LPC4 series of LPC: >
For uLPC series of LPC:
uLPC has been developed to Pike, so you should use Pike syntax
-instead, and the name of your source file should be *.pike
+instead, and the name of your source file should be `*.pike`
LUA *lua.vim* *ft-lua-syntax*
@@ -2230,7 +2230,7 @@ the start of a region, for example 500 lines: >
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
-Empty *.m files will automatically be presumed to be Matlab files unless you
+Empty `*.m` files will automatically be presumed to be Matlab files unless you
have the following in your vimrc: >
let filetype_m = "mma"
@@ -2437,7 +2437,7 @@ keywords, etc): >
The option pascal_symbol_operator controls whether symbol operators such as +,
-*, .., etc. are displayed using the Operator color or not. To colorize symbol
+`*`, .., etc. are displayed using the Operator color or not. To colorize symbol
operators, add the following line to your startup file: >
:let pascal_symbol_operator=1
@@ -2600,7 +2600,7 @@ x = 0 to sync from start.
PLAINTEX *plaintex.vim* *ft-plaintex-syntax*
TeX is a typesetting language, and plaintex is the file type for the "plain"
-variant of TeX. If you never want your *.tex files recognized as plain TeX,
+variant of TeX. If you never want your `*.tex` files recognized as plain TeX,
see |ft-tex-plugin|.
This syntax file has the option >
@@ -3149,7 +3149,7 @@ The syntax/sh.vim file provides several levels of syntax-based folding: >
let g:sh_fold_enabled= 1 (enable function folding)
let g:sh_fold_enabled= 2 (enable heredoc folding)
let g:sh_fold_enabled= 4 (enable if/do/for folding)
->
+
then various syntax items (ie. HereDocuments and function bodies) become
syntax-foldable (see |:syn-fold|). You also may add these together
to get multiple types of folding: >
@@ -3446,8 +3446,8 @@ has a starred form (ie. eqnarray*).
*tex-style* *b:tex_stylish*
Tex: Starting a New Style? ~
-One may use "\makeatletter" in *.tex files, thereby making the use of "@" in
-commands available. However, since the *.tex file doesn't have one of the
+One may use "\makeatletter" in `*.tex` files, thereby making the use of "@" in
+commands available. However, since the `*.tex` file doesn't have one of the
following suffices: sty cls clo dtx ltx, the syntax highlighting will flag
such use of @ as an error. To solve this: >
@@ -3491,7 +3491,7 @@ substitution will not be made.
Tex: Controlling iskeyword~
Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex
-keywords don't support the underscore - except when in *.sty files. The
+keywords don't support the underscore - except when in `*.sty` files. The
syntax highlighting script handles this with the following logic:
* If g:tex_stylish exists and is 1
@@ -3715,7 +3715,7 @@ Vim understands three types of syntax items:
Several syntax ITEMs can be put into one syntax GROUP. For a syntax group
you can give highlighting attributes. For example, you could have an item
-to define a "/* .. */" comment and another one that defines a "// .." comment,
+to define a `/* .. */` comment and another one that defines a "// .." comment,
and put them both in the "Comment" group. You can then specify that a
"Comment" will be in bold font and have a blue color. You are free to make
one highlight group for one syntax item, or put all items into one group.
@@ -4473,19 +4473,19 @@ Notes:
matched. This doesn't work: "a\nb"ms=e. You can make the highlighting
start in another line, this does work: "a\nb"hs=e.
-Example (match a comment but don't highlight the /* and */): >
+Example (match a comment but don't highlight the `/* and */`): >vim
:syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1
-<
+< >
/* this is a comment */
^^^^^^^^^^^^^^^^^^^ highlighted
-
-A more complicated Example: >
- :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1
<
+A more complicated Example: >vim
+ :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1
+< >
abcfoostringbarabc
mmmmmmmmmmm match
sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar")
-
+<
Leading context *:syn-lc* *:syn-leading* *:syn-context*
Note: This is an obsolete feature, only included for backwards compatibility
@@ -4785,7 +4785,7 @@ matches, nextgroup, etc. But there are a few differences:
- When a match with a sync pattern is found, the rest of the line (or group of
continued lines) is searched for another match. The last match is used.
This is used when a line can contain both the start end the end of a region
- (e.g., in a C-comment like /* this */, the last "*/" is used).
+ (e.g., in a C-comment like `/* this */`, the last "*/" is used).
There are two ways how a match with a sync pattern can be used:
1. Parsing for highlighting starts where redrawing starts (and where the
@@ -5481,14 +5481,14 @@ memory Vim will consume.
Only highlighting typedefs, unions and structs can be done too. For this you
must use Universal Ctags (https://ctags.io) or Exuberant ctags.
-Put these lines in your Makefile:
+Put these lines in your Makefile: >
-# Make a highlight file for types. Requires Universal/Exuberant ctags and awk
-types: types.vim
-types.vim: *.[ch]
- ctags --c-kinds=gstu -o- *.[ch] |\
- awk 'BEGIN{printf("syntax keyword Type\t")}\
- {printf("%s ", $$1)}END{print ""}' > $@
+ # Make a highlight file for types. Requires Universal/Exuberant ctags and awk
+ types: types.vim
+ types.vim: *.[ch]
+ ctags --c-kinds=gstu -o- *.[ch] |\
+ awk 'BEGIN{printf("syntax keyword Type\t")}\
+ {printf("%s ", $$1)}END{print ""}' > $@
And put these lines in your vimrc: >
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index afabddb7f9..3c1437068a 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -180,12 +180,12 @@ Command-line editing and history. |cmdline-editing|
forward/backward one character. The shifted right/left cursor keys
can be used to move forward/backward one word. CTRL-B/CTRL-E can be
used to go to the begin/end of the command-line.
- {Vi: can only alter the last character in the line}
- {Vi: when hitting <Esc> the command-line is executed. This is
+ (Vi: can only alter the last character in the line)
+ (Vi: when hitting <Esc> the command-line is executed. This is
unexpected for most people; therefore it was changed in Vim. But when
the <Esc> is part of a mapping, the command-line is executed. If you
want the Vi behaviour also when typing <Esc>, use ":cmap ^V<Esc>
- ^V^M"}
+ ^V^M")
|cmdline-history|
The command-lines are remembered. The up/down cursor keys can be used
to recall previous command-lines. The 'history' option can be set to
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index ff3e19689b..c44595f237 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -459,8 +459,8 @@ Lua interface (|lua.txt|):
- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim
that prints `a` and `b` on separate lines, exactly like
`:lua print("a\nb")` .
-- `:lua error('TEST')` emits the error “E5105: Error while calling lua chunk:
- [string "<VimL compiled string>"]:1: TEST”, whereas Vim emits only “TEST”.
+- `:lua error('TEST')` emits the error “E5105: Error while calling Lua chunk:
+ [string "<Vimscript compiled string>"]:1: TEST”, whereas Vim emits only “TEST”.
- Lua has direct access to Nvim |API| via `vim.api`.
- Lua package.path and package.cpath are automatically updated according to
'runtimepath': |lua-require|.
@@ -564,7 +564,8 @@ Aliases:
Commands:
:behave
:fixdel
- :hardcopy
+ *hardcopy* `:hardcopy` was removed. Instead, use `:TOhtml` and print the
+ resulting HTML using a web browser or other HTML viewer.
:helpfind
:mode (no longer accepts an argument)
:open
@@ -586,6 +587,11 @@ Compile-time features:
Emacs tags support
X11 integration (see |x11-selection|)
+Cscope:
+ *cscope*
+ Cscope support was removed in favour of plugin-based solutions such as:
+ https://github.com/dhananjaylatkar/cscope_maps.nvim
+
Eval:
Vim9script
*cscope_connection()*
@@ -715,6 +721,7 @@ Plugins:
- logiPat
- rrhelper
+- *vimball*
Providers:
@@ -771,18 +778,5 @@ TUI:
at how the terminal is sending CSI. Nvim does not issue such a sequence and
always uses 7-bit control sequences.
-Cscope:
- *cscope*
- Cscope support was removed in favour of plugin-based solutions such as:
- https://github.com/dhananjaylatkar/cscope_maps.nvim
-
-Hardcopy:
- *hardcopy*
- `:hardcopy` was removed. Instead, use `:TOhtml` and print the resulting HTML
- using a web browser or some other HTML viewer.
-
-Bundled plugins:
- vimball *vimball*
-
==============================================================================
vim:tw=78:ts=8:sw=2:et:ft=help:norl:
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
index 08aff20a03..f2bd79aca8 100644
--- a/runtime/lua/man.lua
+++ b/runtime/lua/man.lua
@@ -436,7 +436,7 @@ local function get_page(path, silent)
elseif vim.env.MANWIDTH then
manwidth = vim.env.MANWIDTH
else
- manwidth = api.nvim_win_get_width(0)
+ manwidth = api.nvim_win_get_width(0) - vim.o.wrapmargin
end
local cmd = localfile_arg and { 'man', '-l', path } or { 'man', path }
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index 1de2ade1a1..e2ed0d980e 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -3,7 +3,7 @@
-- Lua code lives in one of three places:
-- 1. runtime/lua/vim/ (the runtime): For "nice to have" features, e.g. the
-- `inspect` and `lpeg` modules.
--- 2. runtime/lua/vim/shared.lua: pure lua functions which always
+-- 2. runtime/lua/vim/shared.lua: pure Lua functions which always
-- are available. Used in the test runner, as well as worker threads
-- and processes launched from Nvim.
-- 3. runtime/lua/vim/_editor.lua: Code which directly interacts with
@@ -839,10 +839,10 @@ do
-- some bugs, so fake the two-step dance for now.
local matches
- --- Omnifunc for completing lua values from the runtime lua interpreter,
+ --- Omnifunc for completing Lua values from the runtime Lua interpreter,
--- similar to the builtin completion for the `:lua` command.
---
- --- Activate using `set omnifunc=v:lua.vim.lua_omnifunc` in a lua buffer.
+ --- Activate using `set omnifunc=v:lua.vim.lua_omnifunc` in a Lua buffer.
function vim.lua_omnifunc(find_start, _)
if find_start == 1 then
local line = vim.api.nvim_get_current_line()
diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua
index e3ad4d76c9..913f1fe203 100644
--- a/runtime/lua/vim/_meta.lua
+++ b/runtime/lua/vim/_meta.lua
@@ -239,7 +239,7 @@ local to_vim_value = {
end,
}
---- Convert a lua value to a vimoption_T value
+--- Convert a Lua value to a vimoption_T value
local function convert_value_to_vim(name, info, value)
if value == nil then
return vim.NIL
@@ -250,7 +250,7 @@ local function convert_value_to_vim(name, info, value)
return to_vim_value[info.metatype](info, value)
end
--- Map of OptionType to functions that take vimoption_T values and convert to lua values.
+-- Map of OptionType to functions that take vimoption_T values and convert to Lua values.
-- Each function takes (info, vim_value) -> lua_value
local to_lua_value = {
boolean = passthrough,
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 91d5dc1c62..33e80690ff 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1174,6 +1174,7 @@ local extension = {
zir = 'zir',
zu = 'zimbu',
zut = 'zimbutempl',
+ zs = 'zserio',
zsh = 'zsh',
vala = 'vala',
web = function(path, bufnr)
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua
index 9024bdb231..f340dc85b5 100644
--- a/runtime/lua/vim/loader.lua
+++ b/runtime/lua/vim/loader.lua
@@ -161,7 +161,7 @@ function Loader.read(name)
end
end
---- The `package.loaders` loader for lua files using the cache.
+--- The `package.loaders` loader for Lua files using the cache.
---@param modname string module name
---@return string|function
---@private
@@ -211,7 +211,7 @@ end
---@private
-- luacheck: ignore 312
function Loader.loadfile(filename, mode, env)
- -- ignore mode, since we byte-compile the lua source files
+ -- ignore mode, since we byte-compile the Lua source files
mode = nil
return Loader.load(normalize(filename), { mode = mode, env = env })
end
@@ -268,7 +268,7 @@ function Loader.load(modpath, opts)
return chunk, err
end
---- Finds lua modules for the given module name.
+--- Finds Lua modules for the given module name.
---@param modname string Module name, or `"*"` to find the top-level modules instead
---@param opts? ModuleFindOpts (table|nil) Options for finding a module:
--- - rtp: (boolean) Search for modname in the runtime path (defaults to `true`)
@@ -289,7 +289,7 @@ function M.find(modname, opts)
local idx = modname:find('.', 1, true)
-- HACK: fix incorrect require statements. Really not a fan of keeping this,
- -- but apparently the regular lua loader also allows this
+ -- but apparently the regular Lua loader also allows this
if idx == 1 then
modname = modname:gsub('^%.+', '')
basename = modname:gsub('%.', '/')
@@ -386,9 +386,9 @@ end
--- Enables the experimental Lua module loader:
--- * overrides loadfile
---- * adds the lua loader using the byte-compilation cache
+--- * adds the Lua loader using the byte-compilation cache
--- * adds the libs loader
---- * removes the default Neovim loader
+--- * removes the default Nvim loader
function M.enable()
if M.enabled then
return
@@ -396,11 +396,11 @@ function M.enable()
M.enabled = true
vim.fn.mkdir(vim.fn.fnamemodify(M.path, ':p'), 'p')
_G.loadfile = Loader.loadfile
- -- add lua loader
+ -- add Lua loader
table.insert(loaders, 2, Loader.loader)
-- add libs loader
table.insert(loaders, 3, Loader.loader_lib)
- -- remove Neovim loader
+ -- remove Nvim loader
for l, loader in ipairs(loaders) do
if loader == vim._load_package then
table.remove(loaders, l)
@@ -411,7 +411,7 @@ end
--- Disables the experimental Lua module loader:
--- * removes the loaders
---- * adds the default Neovim loader
+--- * adds the default Nvim loader
function M.disable()
if not M.enabled then
return
@@ -426,8 +426,8 @@ function M.disable()
table.insert(loaders, 2, vim._load_package)
end
---- Return the top-level `/lua/*` modules for this path
----@param path string path to check for top-level lua modules
+--- Return the top-level \`/lua/*` modules for this path
+---@param path string path to check for top-level Lua modules
---@private
function Loader.lsmod(path)
if not Loader._indexed[path] then
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index cb1c101c58..2c115007de 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -902,18 +902,13 @@ end
---@return string
function lsp.status()
local percentage = nil
- local groups = {}
+ local messages = {}
for _, client in ipairs(vim.lsp.get_active_clients()) do
for progress in client.progress do
local value = progress.value
if type(value) == 'table' and value.kind then
- local group = groups[progress.token]
- if not group then
- group = {}
- groups[progress.token] = group
- end
- group.title = value.title or group.title
- group.message = value.message or group.message
+ local message = value.message and (value.title .. ': ' .. value.message) or value.title
+ messages[#messages + 1] = message
if value.percentage then
percentage = math.max(percentage or 0, value.percentage)
end
@@ -922,17 +917,6 @@ function lsp.status()
-- Just ignore it as there is no sensible way to display it
end
end
- local messages = {}
- for _, group in pairs(groups) do
- if group.title then
- table.insert(
- messages,
- group.message and (group.title .. ': ' .. group.message) or group.title
- )
- elseif group.message then
- table.insert(messages, group.message)
- end
- end
local message = table.concat(messages, ', ')
if percentage then
return string.format('%3d%%: %s', percentage, message)
@@ -1092,7 +1076,7 @@ end
--- `initialize_result.offsetEncoding` if `capabilities.offsetEncoding` was
--- sent to it. You can only modify the `client.offset_encoding` here before
--- any notifications are sent. Most language servers expect to be sent client specified settings after
---- initialization. Neovim does not make this assumption. A
+--- initialization. Nvim does not make this assumption. A
--- `workspace/didChangeConfiguration` notification should be sent
--- to the server during on_init.
---
@@ -1199,7 +1183,7 @@ function lsp.start_client(config)
---
---@param code (integer) Error code
---@param err (...) Other arguments may be passed depending on the error kind
- ---@see `vim.lsp.rpc.client_errors` for possible errors. Use
+ ---@see vim.lsp.rpc.client_errors for possible errors. Use
---`vim.lsp.rpc.client_errors[code]` to get a human-friendly name.
function dispatch.on_error(code, err)
if log.error() then
@@ -1345,7 +1329,6 @@ function lsp.start_client(config)
messages = 'messages',
verbose = 'verbose',
}
- local version = vim.version()
local workspace_folders --- @type table[]?
local root_uri --- @type string?
@@ -1379,7 +1362,7 @@ function lsp.start_client(config)
-- since 3.15.0
clientInfo = {
name = 'Neovim',
- version = string.format('%s.%s.%s', version.major, version.minor, version.patch),
+ version = tostring(vim.version()),
},
-- The rootPath of the workspace. Is null if no folder is open.
--
@@ -1757,7 +1740,7 @@ local function text_document_did_save_handler(bufnr)
bufnr = resolve_bufnr(bufnr)
local uri = vim.uri_from_bufnr(bufnr)
local text = once(buf_get_full_text)
- for_each_buffer_client(bufnr, function(client)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = bufnr })) do
local name = api.nvim_buf_get_name(bufnr)
local old_name = changetracking._get_and_set_name(client, bufnr, name)
if old_name and name ~= old_name then
@@ -1789,7 +1772,7 @@ local function text_document_did_save_handler(bufnr)
text = included_text,
})
end
- end)
+ end
end
--- Implements the `textDocument/did…` notifications required to track a buffer
@@ -1825,7 +1808,7 @@ function lsp.buf_attach_client(bufnr, client_id)
buffer = bufnr,
desc = 'vim.lsp: textDocument/willSave',
callback = function(ctx)
- for_each_buffer_client(ctx.buf, function(client)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = ctx.buf })) do
local params = {
textDocument = {
uri = uri,
@@ -1844,7 +1827,7 @@ function lsp.buf_attach_client(bufnr, client_id)
log.error(vim.inspect(err))
end
end
- end)
+ end
end,
})
api.nvim_create_autocmd('BufWritePost', {
@@ -1860,23 +1843,23 @@ function lsp.buf_attach_client(bufnr, client_id)
on_lines = text_document_did_change_handler,
on_reload = function()
local params = { textDocument = { uri = uri } }
- for_each_buffer_client(bufnr, function(client, _)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = bufnr })) do
changetracking.reset_buf(client, bufnr)
if vim.tbl_get(client.server_capabilities, 'textDocumentSync', 'openClose') then
client.notify('textDocument/didClose', params)
end
text_document_did_open_handler(bufnr, client)
- end)
+ end
end,
on_detach = function()
local params = { textDocument = { uri = uri } }
- for_each_buffer_client(bufnr, function(client, _)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = bufnr })) do
changetracking.reset_buf(client, bufnr)
if vim.tbl_get(client.server_capabilities, 'textDocumentSync', 'openClose') then
client.notify('textDocument/didClose', params)
end
client.attached_buffers[bufnr] = nil
- end)
+ end
util.buf_versions[bufnr] = nil
all_buffer_active_clients[bufnr] = nil
end,
@@ -1949,7 +1932,7 @@ function lsp.buf_detach_client(bufnr, client_id)
all_buffer_active_clients[bufnr] = nil
end
- local namespace = vim.lsp.diagnostic.get_namespace(client_id)
+ local namespace = lsp.diagnostic.get_namespace(client_id)
vim.diagnostic.reset(namespace, bufnr)
vim.notify(string.format('Detached buffer (id: %d) from client (id: %d)', bufnr, client_id))
@@ -2121,34 +2104,30 @@ function lsp.buf_request(bufnr, method, params, handler)
handler = { handler, 'f', true },
})
- local supported_clients = {}
+ bufnr = resolve_bufnr(bufnr)
local method_supported = false
- for_each_buffer_client(bufnr, function(client, client_id)
+ local clients = lsp.get_active_clients({ bufnr = bufnr })
+ local client_request_ids = {}
+ for _, client in ipairs(clients) do
if client.supports_method(method, { bufnr = bufnr }) then
method_supported = true
- table.insert(supported_clients, client_id)
+
+ local request_success, request_id = client.request(method, params, handler, bufnr)
+ -- This could only fail if the client shut down in the time since we looked
+ -- it up and we did the request, which should be rare.
+ if request_success then
+ client_request_ids[client.id] = request_id
+ end
end
- end)
+ end
-- if has client but no clients support the given method, notify the user
- if
- not tbl_isempty(all_buffer_active_clients[resolve_bufnr(bufnr)] or {}) and not method_supported
- then
+ if next(clients) and not method_supported then
vim.notify(lsp._unsupported_method(method), vim.log.levels.ERROR)
nvim_command('redraw')
return {}, function() end
end
- local client_request_ids = {}
- for_each_buffer_client(bufnr, function(client, client_id, resolved_bufnr)
- local request_success, request_id = client.request(method, params, handler, resolved_bufnr)
- -- This could only fail if the client shut down in the time since we looked
- -- it up and we did the request, which should be rare.
- if request_success then
- client_request_ids[client_id] = request_id
- end
- end, supported_clients)
-
local function _cancel_all_requests()
for client_id, request_id in pairs(client_request_ids) do
local client = active_clients[client_id]
@@ -2176,11 +2155,11 @@ function lsp.buf_request_all(bufnr, method, params, handler)
local expected_result_count = 0
local set_expected_result_count = once(function()
- for_each_buffer_client(bufnr, function(client)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = bufnr })) do
if client.supports_method(method, { bufnr = bufnr }) then
expected_result_count = expected_result_count + 1
end
- end)
+ end
end)
local function _sync_handler(err, result, ctx)
@@ -2243,11 +2222,11 @@ function lsp.buf_notify(bufnr, method, params)
method = { method, 's' },
})
local resp = false
- for_each_buffer_client(bufnr, function(client, _client_id, _resolved_bufnr)
+ for _, client in ipairs(lsp.get_active_clients({ bufnr = bufnr })) do
if client.rpc.notify(method, params) then
resp = true
end
- end)
+ end
return resp
end
@@ -2387,8 +2366,8 @@ function lsp.formatexpr(opts)
}
local response =
client.request_sync('textDocument/rangeFormatting', params, timeout_ms, bufnr)
- if response.result then
- vim.lsp.util.apply_text_edits(response.result, 0, client.offset_encoding)
+ if response and response.result then
+ lsp.util.apply_text_edits(response.result, 0, client.offset_encoding)
return 0
end
end
@@ -2469,6 +2448,7 @@ function lsp.get_log_path()
return log.get_filename()
end
+---@private
--- Invokes a function for each LSP client attached to a buffer.
---
---@param bufnr integer Buffer number
@@ -2480,6 +2460,7 @@ end
--- print(vim.inspect(client))
--- end)
--- </pre>
+---@deprecated use lsp.get_active_clients({ bufnr = bufnr }) with regular loop
function lsp.for_each_buffer_client(bufnr, fn)
return for_each_buffer_client(bufnr, fn)
end
diff --git a/runtime/lua/vim/lsp/_inlay_hint.lua b/runtime/lua/vim/lsp/_inlay_hint.lua
index e7cc8ba7ae..84794841ae 100644
--- a/runtime/lua/vim/lsp/_inlay_hint.lua
+++ b/runtime/lua/vim/lsp/_inlay_hint.lua
@@ -8,6 +8,7 @@ local M = {}
---@field client_hint table<integer, table<integer, lsp.InlayHint[]>> client_id -> (lnum -> hints)
---@field enabled boolean Whether inlay hints are enabled for the buffer
---@field timer uv.uv_timer_t? Debounce timer associated with the buffer
+---@field applied table<integer, integer> Last version of hints applied to this line
---@type table<integer, lsp._inlay_hint.bufstate>
local bufstates = {}
@@ -143,6 +144,9 @@ end
---@private
local function clear(bufnr)
bufnr = resolve_bufnr(bufnr)
+ if not bufstates[bufnr] then
+ return
+ end
reset_timer(bufnr)
local bufstate = bufstates[bufnr]
local client_lens = (bufstate or {}).client_hint or {}
@@ -169,7 +173,7 @@ function M.enable(bufnr)
bufnr = resolve_bufnr(bufnr)
local bufstate = bufstates[bufnr]
if not (bufstate and bufstate.enabled) then
- bufstates[bufnr] = { enabled = true, timer = nil }
+ bufstates[bufnr] = { enabled = true, timer = nil, applied = {} }
M.refresh({ bufnr = bufnr })
api.nvim_buf_attach(bufnr, true, {
on_lines = function(_, cb_bufnr)
@@ -183,7 +187,9 @@ function M.enable(bufnr)
end,
on_reload = function(_, cb_bufnr)
clear(cb_bufnr)
- bufstates[cb_bufnr] = nil
+ if bufstates[cb_bufnr] and bufstates[cb_bufnr].enabled then
+ bufstates[cb_bufnr] = { enabled = true }
+ end
M.refresh({ bufnr = cb_bufnr })
end,
on_detach = function(_, cb_bufnr)
@@ -238,35 +244,38 @@ api.nvim_set_decoration_provider(namespace, {
return
end
local hints_by_client = bufstate.client_hint
- api.nvim_buf_clear_namespace(bufnr, namespace, 0, -1)
for lnum = topline, botline do
- for _, hints_by_lnum in pairs(hints_by_client) do
- local line_hints = hints_by_lnum[lnum] or {}
- for _, hint in pairs(line_hints) do
- local text = ''
- if type(hint.label) == 'string' then
- text = hint.label
- else
- for _, part in ipairs(hint.label) do
- text = text .. part.value
+ if bufstate.applied[lnum] ~= bufstate.version then
+ api.nvim_buf_clear_namespace(bufnr, namespace, lnum, lnum + 1)
+ for _, hints_by_lnum in pairs(hints_by_client) do
+ local line_hints = hints_by_lnum[lnum] or {}
+ for _, hint in pairs(line_hints) do
+ local text = ''
+ if type(hint.label) == 'string' then
+ text = hint.label
+ else
+ for _, part in ipairs(hint.label) do
+ text = text .. part.value
+ end
end
+ local vt = {}
+ if hint.paddingLeft then
+ vt[#vt + 1] = { ' ' }
+ end
+ vt[#vt + 1] = { text, 'LspInlayHint' }
+ if hint.paddingRight then
+ vt[#vt + 1] = { ' ' }
+ end
+ api.nvim_buf_set_extmark(bufnr, namespace, lnum, hint.position.character, {
+ virt_text_pos = 'inline',
+ ephemeral = false,
+ virt_text = vt,
+ hl_mode = 'combine',
+ })
end
- if hint.paddingLeft then
- text = ' ' .. text
- end
- if hint.paddingRight then
- text = text .. ' '
- end
- api.nvim_buf_set_extmark(bufnr, namespace, lnum, hint.position.character, {
- virt_text_pos = 'inline',
- ephemeral = false,
- virt_text = {
- { text, 'LspInlayHint' },
- },
- hl_mode = 'combine',
- })
end
+ bufstate.applied[lnum] = bufstate.version
end
end
end,
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua
index 45056cf272..17b444a6e8 100644
--- a/runtime/lua/vim/lsp/buf.lua
+++ b/runtime/lua/vim/lsp/buf.lua
@@ -159,7 +159,7 @@ end
--- @param options table|nil Optional table which holds the following optional fields:
--- - formatting_options (table|nil):
--- Can be used to specify FormattingOptions. Some unspecified options will be
---- automatically derived from the current Neovim options.
+--- automatically derived from the current Nvim options.
--- See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions
--- - timeout_ms (integer|nil, default 1000):
--- Time in milliseconds to block for formatting requests. No effect if async=true
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index b3a7903420..ea38bfe237 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -642,7 +642,7 @@ function protocol.make_client_capabilities()
},
textDocument = {
inlayHint = {
- dynamicRegistration = false,
+ dynamicRegistration = true,
resolveSupport = {
properties = {},
},
diff --git a/runtime/lua/vim/version.lua b/runtime/lua/vim/version.lua
index 92250ff1f8..cd28a9b54b 100644
--- a/runtime/lua/vim/version.lua
+++ b/runtime/lua/vim/version.lua
@@ -125,7 +125,7 @@ function Version:__tostring()
if self.prerelease then
ret = ret .. '-' .. self.prerelease
end
- if self.build then
+ if self.build and self.build ~= vim.NIL then
ret = ret .. '+' .. self.build
end
return ret