aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt15
-rw-r--r--runtime/doc/change.txt11
-rw-r--r--runtime/doc/digraph.txt8
-rw-r--r--runtime/doc/eval.txt12
-rw-r--r--runtime/doc/gui.txt6
-rw-r--r--runtime/doc/helphelp.txt1
-rw-r--r--runtime/doc/if_ruby.txt4
-rw-r--r--runtime/doc/index.txt3
-rw-r--r--runtime/doc/lsp.txt25
-rw-r--r--runtime/doc/nvim_terminal_emulator.txt6
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--runtime/doc/print.txt11
-rw-r--r--runtime/doc/remote.txt189
-rw-r--r--runtime/doc/repeat.txt6
-rw-r--r--runtime/doc/russian.txt4
-rw-r--r--runtime/doc/starting.txt1
-rw-r--r--runtime/doc/syntax.txt9
-rw-r--r--runtime/doc/tagsrch.txt13
-rw-r--r--runtime/doc/testing.txt3
-rw-r--r--runtime/doc/usr_45.txt7
-rw-r--r--runtime/lua/vim/lsp/diagnostic.lua55
-rw-r--r--runtime/lua/vim/lsp/handlers.lua9
-rw-r--r--runtime/lua/vim/lsp/protocol.lua7
-rw-r--r--runtime/lua/vim/lsp/util.lua14
24 files changed, 135 insertions, 290 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 07c45c9298..4dcf5b7bbc 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1104,7 +1104,7 @@ nvim_input_mouse({button}, {action}, {modifier}, {grid}, {row}, {col})
intermediate mouse positions will be ignored. It should be
used to implement real-time mouse input in a GUI. The
deprecated pseudokey form ("<LeftMouse><col,row>") of
- |nvim_input()| has the same limitiation.
+ |nvim_input()| has the same limitation.
Attributes: ~
{fast}
@@ -1183,7 +1183,7 @@ nvim_notify({msg}, {log_level}, {opts}) *nvim_notify()*
Notify the user with a message
Relays the call to vim.notify . By default forwards your
- message in the echo area but can be overriden to trigger
+ message in the echo area but can be overridden to trigger
desktop notifications.
Parameters: ~
@@ -1197,7 +1197,7 @@ nvim_open_term({buffer}, {opts}) *nvim_open_term()*
By default (and currently the only option) the terminal will
not be connected to an external process. Instead, input send
on the channel will be echoed directly by the terminal. This
- is useful to disply ANSI terminal sequences returned as part
+ is useful to display ANSI terminal sequences returned as part
of a rpc message, or similar.
Note: to directly initiate the terminal using the right size,
@@ -1419,8 +1419,9 @@ nvim_parse_expression({expr}, {flags}, {highlight})
• "len": Amount of bytes successfully parsed. With flags
equal to "" that should be equal to the length of expr
- string. (“Sucessfully parsed” here means “participated
- in AST creation”, not “till the first error”.)
+ string. (“Successfully parsed” here means
+ “participated in AST creation”, not “till the first
+ error”.)
• "ast": AST, either nil or a dictionary with these
keys:
• "type": node type, one of the value names from
@@ -1681,7 +1682,7 @@ nvim_set_decoration_provider({ns_id}, {opts})
Note: this function should not be called often. Rather, the
callbacks themselves can be used to throttle unneeded
callbacks. the `on_start` callback can return `false` to
- disable the provider until the next redraw. Similarily, return
+ disable the provider until the next redraw. Similarly, return
`false` in `on_win` will skip the `on_lines` calls for that
window (but any extmarks set in `on_win` will still be used).
A plugin managing multiple sources of decoration should
@@ -1721,7 +1722,7 @@ nvim_set_hl({ns_id}, {name}, {val}) *nvim_set_hl()*
Parameters: ~
{ns_id} number of namespace for this highlight
{name} highlight group name, like ErrorMsg
- {val} highlight definiton map, like
+ {val} highlight definition map, like
|nvim_get_hl_by_name|. in addition the following
keys are also recognized: `default` : don't
override existing definition, like `hi default`
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 7a63a89986..6be87af8a9 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -568,9 +568,7 @@ with ".". Vim does not recognize a comment (starting with '"') after the
option is empty (this is the default), use the
internal formatting function |C-indenting| and
|'lisp'|. But when 'indentexpr' is not empty, it will
- be used instead |indent-expression|. When Vim was
- compiled without internal formatting then the "indent"
- program is used as a last resort.
+ be used instead |indent-expression|.
*==*
== Filter [count] lines like with ={motion}.
@@ -1011,9 +1009,7 @@ inside of strings can change! Also see 'softtabstop' option. >
with `zp`. (for {Visual} see |Visual-mode|)
*:y* *:yank* *E850*
-:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
- "* or "+ registers is possible only when the
- |+clipboard| feature is included.
+:[range]y[ank] [x] Yank [range] lines [into register x].
:[range]y[ank] [x] {count}
Yank {count} lines, starting with last line number
@@ -1802,8 +1798,7 @@ found here: |sort()|, |uniq()|.
With [f] sorting is done on the Float in the line.
The value of Float is determined similar to passing
the text (after or inside a {pattern} match) to
- str2float() function. This option is available only
- if Vim was compiled with Floating point support.
+ str2float() function.
With [x] sorting is done on the first hexadecimal
number in the line (after or inside a {pattern}
diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt
index b7dc16341d..dd7e9a331a 100644
--- a/runtime/doc/digraph.txt
+++ b/runtime/doc/digraph.txt
@@ -165,7 +165,7 @@ ROUBLE
The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and
=P for this. Note that R= and P= are other characters.
- *digraph-table*
+ *digraph-table* *digraph-table-mbyte*
char digraph hex dec official name ~
^@ NU 0x00 0 NULL (NUL)
^A SH 0x01 1 START OF HEADING (SOH)
@@ -341,12 +341,6 @@ $ DO 0x24 36 DOLLAR SIGN
ý y' 0xfd 253 LATIN SMALL LETTER Y WITH ACUTE
þ th 0xfe 254 LATIN SMALL LETTER THORN (Icelandic)
ÿ y: 0xff 255 LATIN SMALL LETTER Y WITH DIAERESIS
-
-If your Vim is compiled with |multibyte| support and you are using a multibyte
-'encoding', Vim provides this enhanced set of additional digraphs:
-
- *digraph-table-mbyte*
-char digraph hex dec official name ~
Ā A- 0100 0256 LATIN CAPITAL LETTER A WITH MACRON
ā a- 0101 0257 LATIN SMALL LETTER A WITH MACRON
Ă A( 0102 0258 LATIN CAPITAL LETTER A WITH BREVE
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index bf7f2b21de..9e9b828c5a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3252,8 +3252,7 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()*
cscope_connection([{num} , {dbpath} [, {prepend}]])
Checks for the existence of a |cscope| connection. If no
parameters are specified, then the function returns:
- 0, if cscope was not available (not compiled in), or
- if there are no cscope connections;
+ 0, if there are no cscope connections;
1, if there is at least one cscope connection.
If parameters are specified, then the value of {num}
@@ -5299,9 +5298,6 @@ iconv({expr}, {from}, {to}) *iconv()*
are replaced with "?".
The encoding names are whatever the iconv() library function
can accept, see ":!man 3 iconv".
- Most conversions require Vim to be compiled with the |+iconv|
- feature. Otherwise only UTF-8 to latin1 conversion and back
- can be done.
Note that Vim uses UTF-8 for all Unicode encodings, conversion
from/to UCS-2 is automatically changed to use UTF-8. You
cannot use UCS-2 in a string anyway, because of the NUL bytes.
@@ -5830,8 +5826,7 @@ lispindent({lnum}) *lispindent()*
indenting rules, as with 'lisp'.
The indent is counted in spaces, the value of 'tabstop' is
relevant. {lnum} is used just like in |getline()|.
- When {lnum} is invalid or Vim was not compiled the
- |+lispindent| feature, -1 is returned.
+ When {lnum} is invalid, -1 is returned.
list2str({list} [, {utf8}]) *list2str()*
Convert each number in {list} to a character string can
@@ -7150,7 +7145,6 @@ rubyeval({expr}) *rubyeval()*
Hashes are represented as Vim |Dictionary| type.
Other objects are represented as strings resulted from their
"Object#to_s" method.
- {only available when compiled with the |+ruby| feature}
screenattr({row}, {col}) *screenattr()*
Like |screenchar()|, but return the attribute. This is a rather
@@ -9139,8 +9133,6 @@ undofile({name}) *undofile()*
If {name} is empty undofile() returns an empty string, since a
buffer without a file name will not write an undo file.
Useful in combination with |:wundo| and |:rundo|.
- When compiled without the |+persistent_undo| option this always
- returns an empty string.
undotree() *undotree()*
Return the current state of the undo tree in a dictionary with
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 0f1fa2b7a7..812259741f 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -175,7 +175,6 @@ system. To do this, put these commands in your vimrc file: >
:map <F4> :emenu <C-Z>
Pressing <F4> will start the menu. You can now use the cursor keys to select
a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
-This does require the |+menu| feature enabled at compile time.
Creating New Menus *creating-menus*
@@ -473,9 +472,8 @@ Executing Menus *execute-menus*
insert-mode menu Eg: >
:emenu File.Exit
-If the console-mode vim has been compiled with WANT_MENU defined, you can
-use :emenu to access useful menu items you may have got used to from GUI
-mode. See 'wildmenu' for an option that works well with this. See
+You can use :emenu to access useful menu items you may have got used to from
+GUI mode. See 'wildmenu' for an option that works well with this. See
|console-menus| for an example.
When using a range, if the lines match with '<,'>, then the menu is executed
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 7643d84017..4a94701b2e 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -249,7 +249,6 @@ command: >
It is possible to add translated help files, next to the original English help
files. Vim will search for all help in "doc" directories in 'runtimepath'.
-This is only available when compiled with the |+multi_lang| feature.
At this moment translations are available for:
Chinese - multiple authors
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
index 02edd50ae8..47305c65fb 100644
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -32,10 +32,6 @@ downloading Ruby there.
This form of the |:ruby| command is mainly useful for
including ruby code in vim scripts.
- Note: This command doesn't work when the Ruby feature
- wasn't compiled in. To avoid errors, see
- |script-here|.
-
Example Vim script: >
function! RedGem()
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 2aafc075a6..69a13557d1 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -699,8 +699,7 @@ tag char note action in Normal mode ~
tag char note action in Normal mode ~
------------------------------------------------------------------------------
-|g_CTRL-A| g CTRL-A only when compiled with MEM_PROFILE
- defined: dump a memory profile
+|g_CTRL-A| g CTRL-A dump a memory profile
|g_CTRL-G| g CTRL-G show information about current cursor
position
|g_CTRL-H| g CTRL-H start Select block mode
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d6ef761bcb..3c878374ca 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -528,6 +528,15 @@ LspCodeLens
Used to color the virtual text of the codelens. See
|nvim_buf_set_virtual_text()|.
+ *lsp-highlight-signature*
+
+Highlight groups related to |vim.lsp.handlers.signature_help()|.
+
+ *hl-LspSignatureActiveParameter*
+LspSignatureActiveParameter
+ Used to highlight the active parameter in the signature help. See
+ |vim.lsp.handlers.signature_help()|.
+
==============================================================================
AUTOCOMMANDS *lsp-autocommands*
@@ -1418,6 +1427,11 @@ reset({client_id}, {buffer_client_map}) *vim.lsp.diagnostic.reset()*
{buffer_client_map} table map of buffers to active
clients
+ *vim.lsp.diagnostic.restore_extmarks()*
+restore_extmarks({bufnr}, {last})
+ Parameters: ~
+ {last} number last line that was changed
+
save({diagnostics}, {bufnr}, {client_id}) *vim.lsp.diagnostic.save()*
Save diagnostics to the current buffer.
@@ -1429,6 +1443,10 @@ save({diagnostics}, {bufnr}, {client_id}) *vim.lsp.diagnostic.save()*
{bufnr} number
{client_id} number
+ *vim.lsp.diagnostic.save_extmarks()*
+save_extmarks({bufnr}, {client_id})
+ TODO: Documentation
+
set_loclist({opts}) *vim.lsp.diagnostic.set_loclist()*
Sets the location list
@@ -1623,7 +1641,9 @@ signature_help({_}, {method}, {result}, {_}, {bufnr}, {config})
• See |vim.api.nvim_open_win()|
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_declaration@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_typeDefinition@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_implementation|lsp-handler| for the method "textDocument/signatureHelp">
+ https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_declaration@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_typeDefinition@seehttps://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_implementation|lsp-handler| for the method "textDocument/signatureHelp"
+ The active parameter is highlighted with
+ |hl-LspSignatureActiveParameter|>
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
@@ -1834,6 +1854,9 @@ get_lines({uri}, {rows}) *vim.lsp.util.get_lines()*
Return: ~
table<number string> a table mapping rows to lines
+get_markdown_fences() *vim.lsp.util.get_markdown_fences()*
+ TODO: Documentation
+
get_progress_messages() *vim.lsp.util.get_progress_messages()*
TODO: Documentation
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt
index 5885b20ab7..6dbc54463c 100644
--- a/runtime/doc/nvim_terminal_emulator.txt
+++ b/runtime/doc/nvim_terminal_emulator.txt
@@ -324,12 +324,10 @@ This works slightly differently:
mode with <Esc>, then you can move around in the buffer, copy/paste, etc.
Go back to editing the gdb command with any command that starts Insert mode,
such as `a` or `i`.
-- The program being debugged will run in a separate window. On MS-Windows
- this is a new console window. On Unix, if the |+terminal| feature is
- available a Terminal window will be opened to run the debugged program in.
+- A separate :terminal window will be opened to run the debugged program in.
*termdebug_use_prompt*
-Prompt mode can be used even when the |+terminal| feature is present with: >
+Prompt mode can be used with: >
let g:termdebug_use_prompt = 1
<
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 791fb8664e..6aa508956b 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2138,8 +2138,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to buffer |global-local|
External program to use for "=" command. When this option is empty
the internal formatting functions are used; either 'lisp', 'cindent'
- or 'indentexpr'. When Vim was compiled without internal formatting,
- the "indent" program is used.
+ or 'indentexpr'.
Environment variables are expanded |:set_env|. See |option-backslash|
about including spaces and backslashes.
This option cannot be set from a |modeline| or in the |sandbox|, for
@@ -7093,8 +7092,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Allows writing to any file with no need for "!" override.
*'writebackup'* *'wb'* *'nowritebackup'* *'nowb'*
-'writebackup' 'wb' boolean (default on with |+writebackup| feature, off
- otherwise)
+'writebackup' 'wb' boolean (default on)
global
Make a backup before overwriting a file. The backup is removed after
the file was successfully written, unless the 'backup' option is
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
index e7de5b9ee3..d9320ad315 100644
--- a/runtime/doc/print.txt
+++ b/runtime/doc/print.txt
@@ -103,10 +103,9 @@ will use the "latin1" print character encoding file.
When 'encoding' is set to a multibyte encoding, Vim will try to convert
characters to the printing encoding for printing (if 'printencoding' is empty
-then the conversion will be to latin1). Conversion to a printing encoding
-other than latin1 will require Vim to be compiled with the |+iconv| feature.
-If no conversion is possible then printing will fail. Any characters that
-cannot be converted will be replaced with upside down question marks.
+then the conversion will be to latin1). If no conversion is possible then
+printing will fail. Any characters that cannot be converted will be replaced
+with upside down question marks.
Two print character encoding files are provided to support default Mac and
HPUX character encodings and are used by default on these platforms. Code page
@@ -176,9 +175,7 @@ the font. When omitted, the point size is 10.
'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
global
This defines the format of the header produced in |:hardcopy| output. The
-option is defined in the same way as the 'statusline' option. If Vim has not
-been compiled with the |+statusline| feature, this option has no effect and a
-simple default header is used, which shows the page number. The same simple
+option is defined in the same way as the 'statusline' option. The same simple
header is used when this option is empty.
*pmbcs-option*
diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt
deleted file mode 100644
index 6c2ceb45be..0000000000
--- a/runtime/doc/remote.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-*remote.txt* Nvim
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-
-
-Vim client-server communication *client-server*
-
- Type |gO| to see the table of contents.
-
-==============================================================================
-1. Common functionality *clientserver*
-
-When compiled with the |+clientserver| option, Vim can act as a command
-server. It accepts messages from a client and executes them. At the same
-time, Vim can function as a client and send commands to a Vim server.
-
-The following command line arguments are available:
-
- argument meaning ~
-
- --remote [+{cmd}] {file} ... *--remote*
- Open the file list in a remote Vim. When
- there is no Vim server, execute locally.
- There is one optional init command: +{cmd}.
- This must be an Ex command that can be
- followed by "|".
- The rest of the command line is taken as the
- file list. Thus any non-file arguments must
- come before this.
- You cannot edit stdin this way |--|.
- The remote Vim is raised. If you don't want
- this use >
- vim --remote-send "<C-\><C-N>:n filename<CR>"
-<
- --remote-silent [+{cmd}] {file} ... *--remote-silent*
- As above, but don't complain if there is no
- server and the file is edited locally.
- --remote-wait [+{cmd}] {file} ... *--remote-wait*
- As --remote, but wait for files to complete
- (unload) in remote Vim.
- --remote-wait-silent [+{cmd}] {file} ... *--remote-wait-silent*
- As --remote-wait, but don't complain if there
- is no server.
- *--remote-tab*
- --remote-tab Like --remote but open each file in a new
- tabpage.
- *--remote-tab-silent*
- --remote-tab-silent Like --remote-silent but open each file in a
- new tabpage.
- *--remote-tab-wait*
- --remote-tab-wait Like --remote-wait but open each file in a new
- tabpage.
-
- *--remote-tab-wait-silent*
- --remote-tab-wait-silent Like --remote-wait-silent but open each file
- in a new tabpage.
- *--remote-send*
- --remote-send {keys} Send {keys} to server and exit. The {keys}
- are not mapped. Special key names are
- recognized, e.g., "<CR>" results in a CR
- character.
- *--remote-expr*
- --remote-expr {expr} Evaluate {expr} in server and print the result
- on stdout.
-
-Examples ~
-
-Edit "file.txt" in an already running GVIM server: >
- gvim --remote file.txt
-
-Edit "file.txt" in an already running server called FOOBAR: >
- gvim --servername FOOBAR --remote file.txt
-
-Edit "file.txt" in server "FILES" if it exists, become server "FILES"
-otherwise: >
- gvim --servername FILES --remote-silent file.txt
-
-This doesn't work, all arguments after --remote will be used as file names: >
- gvim --remote --servername FOOBAR file.txt
-
-Edit file "+foo" in a remote server (note the use of "./" to avoid the special
-meaning of the leading plus): >
- vim --remote ./+foo
-
-Tell the remote server "BLA" to write all files and exit: >
- vim --servername BLA --remote-send '<C-\><C-N>:wqa<CR>'
-
-
-SERVER NAME *client-server-name*
-
-By default Vim will try to register the name under which it was invoked (gvim,
-egvim ...). This can be overridden with the --servername argument. If the
-specified name is not available, a postfix is applied until a free name is
-encountered, i.e. "gvim1" for the second invocation of gvim on a particular
-X-server. The resulting name is available in the servername builtin variable
-|v:servername|. The case of the server name is ignored, thus "gvim" and
-"GVIM" are considered equal.
-
-When Vim is invoked with --remote, --remote-wait or --remote-send it will try
-to locate the server name determined by the invocation name and --servername
-argument as described above. If an exact match is not available, the first
-server with the number postfix will be used. If a name with the number
-postfix is specified with the --servername argument, it must match exactly.
-
-If no server can be located and --remote or --remote-wait was used, Vim will
-start up according to the rest of the command line and do the editing by
-itself. This way it is not necessary to know whether gvim is already started
-when sending command to it.
-
-The --serverlist argument will cause Vim to print a list of registered command
-servers on the standard output (stdout) and exit.
-
-Win32 Note: Making the Vim server go to the foreground doesn't always work,
-because MS-Windows doesn't allow it. The client will move the server to the
-foreground when using the --remote or --remote-wait argument and the server
-name starts with "g".
-
-
-REMOTE EDITING
-
-The --remote argument will cause a |:drop| command to be constructed from the
-rest of the command line and sent as described above.
-The --remote-wait argument does the same thing and additionally sets up to
-wait for each of the files to have been edited. This uses the BufUnload
-event, thus as soon as a file has been unloaded, Vim assumes you are done
-editing it.
-Note that the --remote and --remote-wait arguments will consume the rest of
-the command line. I.e. all remaining arguments will be regarded as filenames.
-You can not put options there!
-
-
-FUNCTIONS
- *E240* *E573*
-There are a number of Vim functions for scripting the command server. See
-the description in |eval.txt| or use CTRL-] on the function name to jump to
-the full explanation.
-
- synopsis explanation ~
- remote_startserver( name) run a server
- remote_expr( server, string, idvar) send expression
- remote_send( server, string, idvar) send key sequence
- serverlist() get a list of available servers
- remote_peek( serverid, retvar) check for reply string
- remote_read( serverid) read reply string
- server2client( serverid, string) send reply string
- remote_foreground( server) bring server to the front
-
-See also the explanation of |CTRL-\_CTRL-N|. Very useful as a leading key
-sequence.
-The {serverid} for server2client() can be obtained with expand("<client>")
-
-==============================================================================
-2. X11 specific items *x11-clientserver*
- *E247* *E248* *E251* *E258* *E277*
-
-The communication between client and server goes through the X server. The
-display of the Vim server must be specified. The usual protection of the X
-server is used, you must be able to open a window on the X server for the
-communication to work. It is possible to communicate between different
-systems.
-
-By default, a GUI Vim will register a name on the X-server by which it can be
-addressed for subsequent execution of injected strings. Vim can also act as
-a client and send strings to other instances of Vim on the same X11 display.
-
-When an X11 GUI Vim (gvim) is started, it will try to register a send-server
-name on the 'VimRegistry' property on the root window.
-
-An empty --servername argument will cause the command server to be disabled.
-
-To send commands to a Vim server from another application, read the source
-file src/if_xcmdsrv.c, it contains some hints about the protocol used.
-
-==============================================================================
-3. Win32 specific items *w32-clientserver*
-
-Every Win32 Vim can work as a server, also in the console. You do not need a
-version compiled with OLE. Windows messages are used, this works on any
-version of MS-Windows. But only communication within one system is possible.
-
-Since MS-Windows messages are used, any other application should be able to
-communicate with a Vim server.
-
-When using gvim, the --remote-wait only works properly this way: >
-
- start /w gvim --remote-wait file.txt
-<
- vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 9add4d6460..a91aa4d2a0 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -903,11 +903,9 @@ OBSCURE
Profiling *profile* *profiling*
Profiling means that Vim measures the time that is spent on executing
-functions and/or scripts. The |+profile| feature is required for this.
-It is only included when Vim was compiled with "huge" features.
+functions and/or scripts.
-You can also use the |reltime()| function to measure time. This only requires
-the |+reltime| feature, which is present more often.
+You can also use the |reltime()| function to measure time.
For profiling syntax highlighting see |:syntime|.
diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt
index 776630a52b..a2bc9f3b5e 100644
--- a/runtime/doc/russian.txt
+++ b/runtime/doc/russian.txt
@@ -47,10 +47,6 @@ different codepages from
http://www.sourceforge.net/projects/ruvim/
-Make sure that your Vim is at least 6.2.506 and use ruvim 0.5 or later for
-automatic installs. Vim also needs to be compiled with |+gettext| feature for
-user interface items translations to work.
-
After downloading an archive from RuVim project, unpack it into your
$VIMRUNTIME directory. We recommend using UTF-8 archive.
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 1b6291f279..80b8dd52ea 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -480,7 +480,6 @@ accordingly. Vim proceeds in this order:
- The |--noplugin| command line argument is used.
- The |--clean| command line argument is used.
- The "-u NONE" command line argument is used |-u|.
- - When Vim was compiled without the |+eval| feature.
Note that using "-c 'set noloadplugins'" doesn't work, because the
commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" or "--cmd 'set loadplugins'" |--cmd|.
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index bf649b5940..6c51f37ae5 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -371,9 +371,6 @@ the desired value, or restored to their default by removing the variable using
Remarks:
- Some truly ancient browsers may not show the background colors.
- From most browsers you can also print the file (in color)!
-- The latest TOhtml may actually work with older versions of Vim, but some
- features such as conceal support will not function, and the colors may be
- incorrect for an old Vim without GUI support compiled in.
Here is an example how to run the script over all .c and .h files from a
Unix shell: >
@@ -4745,8 +4742,7 @@ in their own color.
This is basically the same as >
:echo g:colors_name
< In case g:colors_name has not been defined :colo will
- output "default". When compiled without the |+eval|
- feature it will output "unknown".
+ output "default".
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.(vim|lua)". The first one that
@@ -5404,9 +5400,6 @@ If your syntax causes redrawing to be slow, here are a few hints on making it
faster. To see slowness switch on some features that usually interfere, such
as 'relativenumber' and |folding|.
-Note: this is only available when compiled with the |+profile| feature.
-You many need to build Vim with "huge" features.
-
To find out what patterns are consuming most time, get an overview with this
sequence: >
:syntime on
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index 2c1b927e5a..4d938c4a23 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -367,11 +367,11 @@ be a bug. If you really want the old Vi behavior, set the 't' flag in
'cpoptions'.
*tag-binary-search*
-Vim uses binary searching in the tags file to find the desired tag quickly
-(when enabled at compile time |+tag_binary|). But this only works if the
-tags file was sorted on ASCII byte value. Therefore, if no match was found,
-another try is done with a linear search. If you only want the linear search,
-reset the 'tagbsearch' option. Or better: Sort the tags file!
+Vim uses binary searching in the tags file to find the desired tag quickly.
+But this only works if the tags file was sorted on ASCII byte value.
+Therefore, if no match was found, another try is done with a linear search.
+If you only want the linear search, reset the 'tagbsearch' option. Or better:
+Sort the tags file!
Note that the binary searching is disabled when not looking for a tag with a
specific name. This happens when ignoring case and when a regular expression
@@ -666,9 +666,6 @@ included files (recursively). This can be used to find the definition of a
variable, function or macro. If you only want to search in the current
buffer, use the commands listed at |pattern-searches|.
-These commands are not available when the |+find_in_path| feature was disabled
-at compile time.
-
When a line is encountered that includes another file, that file is searched
before continuing in the current buffer. Files included by included files are
also searched. When an include file could not be found it is silently
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index b2ce6d670d..ef8d6b5ea9 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -30,8 +30,7 @@ New tests should be added as new style tests. These use functions such as
|assert_equal()| to keep the test commands and the expected result in one
place.
*old-style-testing*
-In some cases an old style test needs to be used. E.g. when testing Vim
-without the |+eval| feature.
+In some cases an old style test needs to be used.
Find more information in the file src/testdir/README.txt.
diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt
index bc95f3405e..3199c4d8ea 100644
--- a/runtime/doc/usr_45.txt
+++ b/runtime/doc/usr_45.txt
@@ -31,13 +31,6 @@ this command: >
If it replies with "C", this means the default is being used, which is
English.
- Note:
- Using different languages only works when Vim was compiled to handle
- it. To find out if it works, use the ":version" command and check the
- output for "+gettext" and "+multi_lang". If they are there, you are
- OK. If you see "-gettext" or "-multi_lang" you will have to find
- another Vim.
-
What if you would like your messages in a different language? There are
several ways. Which one you should use depends on the capabilities of your
system.
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
index 64dde78f17..c83e29aa64 100644
--- a/runtime/lua/vim/lsp/diagnostic.lua
+++ b/runtime/lua/vim/lsp/diagnostic.lua
@@ -203,8 +203,10 @@ local bufnr_and_client_cacher_mt = {
-- Diagnostic Saving & Caching {{{
local _diagnostic_cleanup = setmetatable({}, bufnr_and_client_cacher_mt)
local diagnostic_cache = setmetatable({}, bufnr_and_client_cacher_mt)
+local diagnostic_cache_extmarks = setmetatable({}, bufnr_and_client_cacher_mt)
local diagnostic_cache_lines = setmetatable({}, bufnr_and_client_cacher_mt)
local diagnostic_cache_counts = setmetatable({}, bufnr_and_client_cacher_mt)
+local diagnostic_attached_buffers = {}
local _bufs_waiting_to_update = setmetatable({}, bufnr_and_client_cacher_mt)
@@ -826,6 +828,7 @@ function M.clear(bufnr, client_id, diagnostic_ns, sign_ns)
diagnostic_ns = diagnostic_ns or M._get_diagnostic_namespace(client_id)
sign_ns = sign_ns or M._get_sign_namespace(client_id)
+ diagnostic_cache_extmarks[bufnr][client_id] = {}
assert(bufnr, "bufnr is required")
assert(diagnostic_ns, "Need diagnostic_ns, got nil")
@@ -1038,6 +1041,54 @@ function M.on_publish_diagnostics(_, _, params, client_id, _, config)
M.display(diagnostics, bufnr, client_id, config)
end
+-- restores the extmarks set by M.display
+--- @param last number last line that was changed
+-- @private
+local function restore_extmarks(bufnr, last)
+ for client_id, extmarks in pairs(diagnostic_cache_extmarks[bufnr]) do
+ local ns = M._get_diagnostic_namespace(client_id)
+ local extmarks_current = api.nvim_buf_get_extmarks(bufnr, ns, 0, -1, {details = true})
+ local found = {}
+ for _, extmark in ipairs(extmarks_current) do
+ -- nvim_buf_set_lines will move any extmark to the line after the last
+ -- nvim_buf_set_text will move any extmark to the last line
+ if extmark[2] ~= last + 1 then
+ found[extmark[1]] = true
+ end
+ end
+ for _, extmark in ipairs(extmarks) do
+ if not found[extmark[1]] then
+ local opts = extmark[4]
+ opts.id = extmark[1]
+ -- HACK: end_row should be end_line
+ if opts.end_row then
+ opts.end_line = opts.end_row
+ opts.end_row = nil
+ end
+ pcall(api.nvim_buf_set_extmark, bufnr, ns, extmark[2], extmark[3], opts)
+ end
+ end
+ end
+end
+
+-- caches the extmarks set by M.display
+-- @private
+local function save_extmarks(bufnr, client_id)
+ bufnr = bufnr == 0 and api.nvim_get_current_buf() or bufnr
+ if not diagnostic_attached_buffers[bufnr] then
+ api.nvim_buf_attach(bufnr, false, {
+ on_lines = function(_, _, _, _, _, last)
+ restore_extmarks(bufnr, last - 1)
+ end,
+ on_detach = function()
+ diagnostic_cache_extmarks[bufnr] = nil
+ end})
+ diagnostic_attached_buffers[bufnr] = true
+ end
+ local ns = M._get_diagnostic_namespace(client_id)
+ diagnostic_cache_extmarks[bufnr][client_id] = api.nvim_buf_get_extmarks(bufnr, ns, 0, -1, {details = true})
+end
+
--@private
--- Display diagnostics for the buffer, given a configuration.
function M.display(diagnostics, bufnr, client_id, config)
@@ -1108,7 +1159,11 @@ function M.display(diagnostics, bufnr, client_id, config)
if signs_opts then
M.set_signs(diagnostics, bufnr, client_id, nil, signs_opts)
end
+
+ -- cache extmarks
+ save_extmarks(bufnr, client_id)
end
+
-- }}}
-- Diagnostic User Functions {{{
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 41852b9d88..7da24d8c43 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -316,6 +316,7 @@ M['textDocument/typeDefinition'] = location_handler
M['textDocument/implementation'] = location_handler
--- |lsp-handler| for the method "textDocument/signatureHelp"
+--- The active parameter is highlighted with |hl-LspSignatureActiveParameter|
--- <pre>
--- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
--- vim.lsp.handlers.signature_help, {
@@ -338,13 +339,17 @@ function M.signature_help(_, method, result, _, bufnr, config)
return
end
local ft = api.nvim_buf_get_option(bufnr, 'filetype')
- local lines = util.convert_signature_help_to_markdown_lines(result, ft)
+ local lines, hl = util.convert_signature_help_to_markdown_lines(result, ft)
lines = util.trim_empty_lines(lines)
if vim.tbl_isempty(lines) then
print('No signature help available')
return
end
- return util.open_floating_preview(lines, "markdown", config)
+ local fbuf, fwin = util.open_floating_preview(lines, "markdown", config)
+ if hl then
+ api.nvim_buf_add_highlight(fbuf, -1, "LspSignatureActiveParameter", 0, unpack(hl))
+ end
+ return fbuf, fwin
end
--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 7e43eb84de..6d02b9ba74 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -691,10 +691,11 @@ function protocol.make_client_capabilities()
signatureHelp = {
dynamicRegistration = false;
signatureInformation = {
+ activeParameterSupport = true;
documentationFormat = { protocol.MarkupKind.Markdown; protocol.MarkupKind.PlainText };
- -- parameterInformation = {
- -- labelOffsetSupport = false;
- -- };
+ parameterInformation = {
+ labelOffsetSupport = true;
+ };
};
};
references = {
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 06afc2c5e2..17440ca1b5 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -856,6 +856,7 @@ function M.convert_signature_help_to_markdown_lines(signature_help, ft)
--=== 0`. Whenever possible implementors should make an active decision about
--the active signature and shouldn't rely on a default value.
local contents = {}
+ local active_hl
local active_signature = signature_help.activeSignature or 0
-- If the activeSignature is not inside the valid range, then clip it.
if active_signature >= #signature_help.signatures then
@@ -875,7 +876,7 @@ function M.convert_signature_help_to_markdown_lines(signature_help, ft)
M.convert_input_to_markdown_lines(signature.documentation, contents)
end
if signature.parameters and #signature.parameters > 0 then
- local active_parameter = signature_help.activeParameter or 0
+ local active_parameter = (signature.activeParameter or signature_help.activeParameter or 0)
-- If the activeParameter is not inside the valid range, then clip it.
if active_parameter >= #signature.parameters then
active_parameter = 0
@@ -900,13 +901,20 @@ function M.convert_signature_help_to_markdown_lines(signature_help, ft)
documentation?: string | MarkupContent;
}
--]=]
- -- TODO highlight parameter
+ if parameter.label then
+ if type(parameter.label) == "table" then
+ active_hl = parameter.label
+ else
+ local i = signature.label:find(parameter.label)
+ if i then active_hl = {i - 1, i + #parameter.label - 1} end
+ end
+ end
if parameter.documentation then
M.convert_input_to_markdown_lines(parameter.documentation, contents)
end
end
end
- return contents
+ return contents, active_hl
end
--- Creates a table with sensible default options for a floating window. The