2017-03-21 09:08:19 -07:00
|
|
|
*deprecated.txt* Nvim
|
2016-09-24 06:07:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
NVIM REFERENCE MANUAL
|
|
|
|
|
|
|
|
|
|
|
|
Nvim *deprecated*
|
|
|
|
|
2022-05-03 06:08:35 -07:00
|
|
|
The items listed below are deprecated: they will be removed in the future.
|
|
|
|
They should not be used in new scripts, and old scripts should be updated.
|
2016-10-15 18:54:22 -07:00
|
|
|
|
2016-09-24 06:07:49 -07:00
|
|
|
==============================================================================
|
2022-10-09 05:21:52 -07:00
|
|
|
Deprecated features
|
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
DEPRECATED IN 0.11 *deprecated-0.11*
|
|
|
|
|
|
|
|
API
|
|
|
|
- nvim_subscribe() Plugins must maintain their own "multicast" channels list.
|
|
|
|
- nvim_unsubscribe() Plugins must maintain their own "multicast" channels list.
|
2024-05-16 06:28:27 -07:00
|
|
|
|
2024-05-28 03:07:13 -07:00
|
|
|
LUA
|
|
|
|
- vim.region() Use |getregionpos()| instead.
|
2024-10-17 02:16:16 -07:00
|
|
|
- *vim.highlight* Renamed to |vim.hl|.
|
2024-10-18 03:33:12 -07:00
|
|
|
- vim.validate(opts: table) Use form 1. See |vim.validate()|.
|
2024-05-16 06:28:27 -07:00
|
|
|
|
2024-05-28 06:51:44 -07:00
|
|
|
DIAGNOSTICS
|
2024-07-09 12:08:12 -07:00
|
|
|
- *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count=1, float=true}` instead.
|
|
|
|
- *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count=-1, float=true}` instead.
|
2024-05-28 06:51:44 -07:00
|
|
|
- *vim.diagnostic.get_next_pos()*
|
|
|
|
Use the "lnum" and "col" fields from the return value of
|
|
|
|
|vim.diagnostic.get_next()| instead.
|
|
|
|
- *vim.diagnostic.get_prev_pos()*
|
|
|
|
Use the "lnum" and "col" fields from the return value of
|
|
|
|
|vim.diagnostic.get_prev()| instead.
|
|
|
|
- The "win_id" parameter used by various functions is deprecated in favor of
|
|
|
|
"winid" |winid|
|
|
|
|
- The "cursor_position" parameter of |vim.diagnostic.JumpOpts| is renamed to
|
|
|
|
"pos"
|
|
|
|
|
2024-10-02 10:34:14 -07:00
|
|
|
TREESITTER
|
|
|
|
• *TSNode:child_containing_descendant()* Use
|
|
|
|
|TSNode:child_with_descendant()| instead; it is identical except that it can
|
|
|
|
return the descendant itself.
|
|
|
|
|
2024-10-20 14:40:44 -07:00
|
|
|
LSP
|
2024-10-26 14:06:15 -07:00
|
|
|
• *vim.lsp.util.jump_to_location* Use |vim.lsp.util.show_document()| with
|
|
|
|
`{focus=true}` instead.
|
2024-10-24 04:11:27 -07:00
|
|
|
• *vim.lsp.buf.execute_command* Use |Client:exec_cmd()| instead.
|
2024-10-24 07:43:38 -07:00
|
|
|
• *vim.lsp.buf.completion* Use |vim.lsp.completion.trigger()| instead.
|
2024-10-24 08:47:41 -07:00
|
|
|
• vim.lsp.buf_request_all The `error` key has been renamed to `err` inside
|
|
|
|
the result parameter of the handler.
|
2024-10-29 02:36:02 -07:00
|
|
|
• *vim.lsp.with()* Pass configuration to equivalent
|
2024-11-20 15:50:30 -07:00
|
|
|
functions in `vim.lsp.buf.*`.
|
2024-10-29 02:36:02 -07:00
|
|
|
• |vim.lsp.handlers|
|
|
|
|
No longer support client to server response handlers. Only server to
|
|
|
|
client requests/notification handlers are supported.
|
|
|
|
• *vim.lsp.handlers.signature_help()* Use |vim.lsp.buf.signature_help()| instead.
|
2024-11-14 04:53:20 -07:00
|
|
|
• `client.request()` Use |Client:request()| instead.
|
|
|
|
• `client.request_sync()` Use |Client:request_sync()| instead.
|
|
|
|
• `client.notify()` Use |Client:notify()| instead.
|
|
|
|
• `client.cancel_request()` Use |Client:cancel_request()| instead.
|
|
|
|
• `client.stop()` Use |Client:stop()| instead.
|
|
|
|
• `client.is_stopped()` Use |Client:is_stopped()| instead.
|
|
|
|
• `client.supports_method()` Use |Client:supports_method()| instead.
|
|
|
|
• `client.on_attach()` Use |Client:on_attach()| instead.
|
2024-12-04 06:14:47 -07:00
|
|
|
• `vim.lsp.start_client()` Use |vim.lsp.start()| instead.
|
2024-10-20 14:40:44 -07:00
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
DEPRECATED IN 0.10 *deprecated-0.10*
|
2024-05-03 08:17:13 -07:00
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
API
|
|
|
|
• *nvim_buf_get_option()* Use |nvim_get_option_value()| instead.
|
|
|
|
• *nvim_buf_set_option()* Use |nvim_set_option_value()| instead.
|
|
|
|
• *nvim_call_atomic()* Use |nvim_exec_lua()| instead.
|
|
|
|
• *nvim_get_option()* Use |nvim_get_option_value()| instead.
|
|
|
|
• *nvim_set_option()* Use |nvim_set_option_value()| instead.
|
|
|
|
• *nvim_win_get_option()* Use |nvim_get_option_value()| instead.
|
|
|
|
• *nvim_win_set_option()* Use |nvim_set_option_value()| instead.
|
|
|
|
|
|
|
|
CHECKHEALTH
|
|
|
|
• *health#report_error* *vim.health.report_error()* Use |vim.health.error()| instead.
|
|
|
|
• *health#report_info* *vim.health.report_info()* Use |vim.health.info()| instead.
|
|
|
|
• *health#report_ok* *vim.health.report_ok()* Use |vim.health.ok()| instead.
|
|
|
|
• *health#report_start* *vim.health.report_start()* Use |vim.health.start()| instead.
|
|
|
|
• *health#report_warn* *vim.health.report_warn()* Use |vim.health.warn()| instead.
|
|
|
|
|
|
|
|
DIAGNOSTICS
|
2024-05-03 08:17:13 -07:00
|
|
|
• Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use
|
|
|
|
the "signs" key of |vim.diagnostic.config()| instead.
|
|
|
|
• vim.diagnostic functions:
|
2024-05-17 07:37:39 -07:00
|
|
|
• *vim.diagnostic.disable()* Use |vim.diagnostic.enable()|
|
|
|
|
• *vim.diagnostic.is_disabled()* Use |vim.diagnostic.is_enabled()|
|
|
|
|
• Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)`
|
|
|
|
|
|
|
|
LSP
|
|
|
|
• *vim.lsp.util.get_progress_messages()* Use |vim.lsp.status()| instead.
|
|
|
|
• *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()| instead.
|
|
|
|
• *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()| instead.
|
|
|
|
• *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead.
|
|
|
|
• *vim.lsp.util.try_trim_markdown_code_blocks()*
|
|
|
|
• *vim.lsp.util.set_lines()*
|
|
|
|
• *vim.lsp.util.extract_completion_items()*
|
|
|
|
• *vim.lsp.util.parse_snippet()*
|
|
|
|
• *vim.lsp.util.text_document_completion_list_to_complete_items()*
|
|
|
|
• *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| instead: >
|
2024-05-03 08:17:13 -07:00
|
|
|
local keys = vim.split(section, '.', { plain = true })
|
|
|
|
local vim.tbl_get(table, unpack(keys))
|
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
LUA
|
2024-05-03 08:17:13 -07:00
|
|
|
• *vim.loop* Use |vim.uv| instead.
|
2024-05-17 07:37:39 -07:00
|
|
|
• *vim.tbl_add_reverse_lookup()*
|
|
|
|
• *vim.tbl_flatten()* Use |Iter:flatten()| instead.
|
|
|
|
• *vim.tbl_islist()* Use |vim.islist()| instead.
|
2024-05-03 08:17:13 -07:00
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
OPTIONS
|
2024-05-03 08:17:13 -07:00
|
|
|
• The "term_background" UI option |ui-ext-options| is deprecated and no longer
|
|
|
|
populated. Background color detection is now performed in Lua by the Nvim
|
|
|
|
core, not the TUI.
|
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
TREESITTER
|
|
|
|
• *LanguageTree:for_each_child()* Use |LanguageTree:children()| (non-recursive) instead.
|
2024-05-03 08:17:13 -07:00
|
|
|
|
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
DEPRECATED IN 0.9 *deprecated-0.9*
|
2024-05-03 08:17:13 -07:00
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
API
|
|
|
|
- *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead.
|
|
|
|
- *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead.
|
|
|
|
|
|
|
|
TREESITTER
|
|
|
|
- *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()| instead.
|
|
|
|
- *vim.treesitter.get_node_at_pos()* Use |vim.treesitter.get_node()| instead.
|
|
|
|
- *vim.treesitter.get_node_at_cursor()* Use |vim.treesitter.get_node()|
|
|
|
|
and |TSNode:type()| instead.
|
2024-05-03 08:17:13 -07:00
|
|
|
• The following top level Treesitter functions have been moved:
|
2024-05-02 06:57:21 -07:00
|
|
|
- *vim.treesitter.inspect_language()* -> |vim.treesitter.language.inspect()|
|
|
|
|
- *vim.treesitter.get_query_files()* -> |vim.treesitter.query.get_files()|
|
|
|
|
- *vim.treesitter.set_query()* -> |vim.treesitter.query.set()|
|
|
|
|
- *vim.treesitter.query.set_query()* -> |vim.treesitter.query.set()|
|
|
|
|
- *vim.treesitter.get_query()* -> |vim.treesitter.query.get()|
|
|
|
|
- *vim.treesitter.query.get_query()* -> |vim.treesitter.query.get()|
|
|
|
|
- *vim.treesitter.parse_query()* -> |vim.treesitter.query.parse()|
|
|
|
|
- *vim.treesitter.query.parse_query()* -> |vim.treesitter.query.parse()|
|
|
|
|
- *vim.treesitter.add_predicate()* -> |vim.treesitter.query.add_predicate()|
|
|
|
|
- *vim.treesitter.add_directive()* -> |vim.treesitter.query.add_directive()|
|
|
|
|
- *vim.treesitter.list_predicates()* -> |vim.treesitter.query.list_predicates()|
|
|
|
|
- *vim.treesitter.list_directives()* -> |vim.treesitter.query.list_directives()|
|
|
|
|
- *vim.treesitter.query.get_range()* -> |vim.treesitter.get_range()|
|
|
|
|
- *vim.treesitter.query.get_node_text()* -> |vim.treesitter.get_node_text()|
|
2024-05-03 08:17:13 -07:00
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
LUA
|
2024-05-03 08:17:13 -07:00
|
|
|
- *nvim_exec()* Use |nvim_exec2()| instead.
|
|
|
|
- *vim.pretty_print()* Use |vim.print()| instead.
|
|
|
|
|
2024-05-17 07:37:39 -07:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2024-05-03 08:17:13 -07:00
|
|
|
DEPRECATED IN 0.8 OR EARLIER
|
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
API
|
|
|
|
- *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead.
|
|
|
|
- *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead.
|
2023-03-25 09:58:48 -07:00
|
|
|
- *nvim_command_output()* Use |nvim_exec2()| instead.
|
2022-10-09 05:21:52 -07:00
|
|
|
- *nvim_execute_lua()* Use |nvim_exec_lua()| instead.
|
2023-03-29 00:59:01 -07:00
|
|
|
- *nvim_get_option_info()* Use |nvim_get_option_info2()| instead.
|
2022-10-09 05:21:52 -07:00
|
|
|
|
|
|
|
COMMANDS
|
|
|
|
- *:rv* *:rviminfo* Deprecated alias to |:rshada| command.
|
|
|
|
- *:wv* *:wviminfo* Deprecated alias to |:wshada| command.
|
|
|
|
|
|
|
|
ENVIRONMENT VARIABLES
|
|
|
|
- *$NVIM_LISTEN_ADDRESS*
|
|
|
|
- Deprecated way to:
|
|
|
|
- set the server name (use |--listen| or |serverstart()| instead)
|
|
|
|
- get the server name (use |v:servername| instead)
|
|
|
|
- detect a parent Nvim (use |$NVIM| instead)
|
|
|
|
- Ignored if --listen is given.
|
|
|
|
- Unset by |terminal| and |jobstart()| unless explicitly given by the "env"
|
2022-11-22 10:41:00 -07:00
|
|
|
option. Example: >vim
|
2022-10-09 05:21:52 -07:00
|
|
|
call jobstart(['foo'], { 'env': { 'NVIM_LISTEN_ADDRESS': v:servername } })
|
|
|
|
<
|
|
|
|
|
|
|
|
EVENTS
|
|
|
|
- *BufCreate* Use |BufAdd| instead.
|
|
|
|
- *EncodingChanged* Never fired; 'encoding' is always "utf-8".
|
|
|
|
- *FileEncoding* Never fired; equivalent to |EncodingChanged|.
|
|
|
|
- *GUIEnter* Never fired; use |UIEnter| instead.
|
|
|
|
- *GUIFailed* Never fired.
|
|
|
|
|
|
|
|
KEYCODES
|
|
|
|
- *<MouseDown>* Use <ScrollWheelUp> instead.
|
|
|
|
- *<MouseUp>* Use <ScrollWheelDown> instead.
|
|
|
|
|
|
|
|
FUNCTIONS
|
|
|
|
- *buffer_exists()* Obsolete name for |bufexists()|.
|
|
|
|
- *buffer_name()* Obsolete name for |bufname()|.
|
|
|
|
- *buffer_number()* Obsolete name for |bufnr()|.
|
|
|
|
- *file_readable()* Obsolete name for |filereadable()|.
|
|
|
|
- *highlight_exists()* Obsolete name for |hlexists()|.
|
|
|
|
- *highlightID()* Obsolete name for |hlID()|.
|
|
|
|
- *inputdialog()* Use |input()| instead.
|
|
|
|
- *jobclose()* Obsolete name for |chanclose()|
|
|
|
|
- *jobsend()* Obsolete name for |chansend()|
|
|
|
|
- *last_buffer_nr()* Obsolete name for bufnr("$").
|
2024-10-07 05:32:49 -07:00
|
|
|
- *rpcstart()* Use |jobstart()| with `{'rpc': v:true}` instead.
|
2022-10-09 05:21:52 -07:00
|
|
|
- *rpcstop()* Use |jobstop()| instead to stop any job, or
|
|
|
|
`chanclose(id, "rpc")` to close RPC communication
|
jobstop(): close channel before process_stop() #10522
fix #9799
regression of #7081
Helped-by: Björn Linse <bjorn.linse@gmail.com>
Problem: :UpdateRemotePlugins (which calls rpcstop()) sometimes crashes:
remote/host: python3 host registered plugins []
nvim: ../src/nvim/event/wstream.c:78:
_Bool wstream_write(Stream *, WBuffer *): Assertion `!stream->closed' failed.
Aborted (core dumped)
Order of events (channel 163, see logs below):
1. Channel's in-stream (0x2ba86c0) is **closed** by `f_rpcstop`..`process_stop`.
2. `receive_msgpack` parses the channel out-stream (0x2ba8860)
3. Invokes "nvim_command_output" API method.
4. Writes result to the **closed** in-stream => **abort**
- af993da4351d (`receive_msgpack`) tried to hack around same/similar issue.
- Hack was removed in 5215e3205a07.
Solution: in jobstop(), close the channel before process_stop().
Log:
DEBUG 2019-07-16T20:54:12.191 25159 stream_close:96: closing Stream: 0x2b01a90
DEBUG 2019-07-16T20:54:12.210 25159 process_spawn:124: new: pid=28407 argv=[/usr/bin/python3]
DEBUG 2019-07-16T20:54:12.210 25159 rpc_start:72: rpc ch 163 in-stream=0x2ba86c0 out-stream=0x2ba8860
INFO 2019-07-16T20:54:12.210 25159 channel_create_event:199: new channel 163 (function <SNR>61_on_exit[4]..<SNR>60_job_exit_cb[101]..<SNR>60_decrement_job_count[8]..remote#host#UpdateRemotePlugins[6]..<SNR>31_RegistrationCommands[15]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll:3) : {"id": 163, "client": {}, "mode": "rpc", "stream": "job"}
DEBUG 2019-07-16T20:54:12.211 25159 log_server_msg:729: RPC ->ch 163: [request] [0, 1, "poll", []]
DEBUG 2019-07-16T20:54:12.355 25159 receive_msgpack:227: ch 163: parsing 21 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.355 25159 log_client_msg:766: RPC <-ch 163: [request] [0, 1, "vim_get_api_info", []]
DEBUG 2019-07-16T20:54:12.355 25159 RPC: <-ch 163: invoke nvim_get_api_info
DEBUG 2019-07-16T20:54:12.357 25159 log_server_msg:729: RPC ->ch 163: [response] [1, 1, nil, [163, {"version"=>{"major"=>0, "minor"=>4, }, ...
DEBUG 2019-07-16T20:54:12.377 25159 receive_msgpack:227: ch 163: parsing 85 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.377 25159 log_client_msg:766: RPC <-ch 163: [request] [0, 2, "nvim_eval", ["((&number||&relativenumber) ? &numberwidth : 0) + &foldcolumn"]]
DEBUG 2019-07-16T20:54:12.377 25159 handle_request:359: RPC: scheduled nvim_eval
DEBUG 2019-07-16T20:54:12.377 25159 log_client_msg:766: RPC <-ch 163: [response] [1, 1, nil, "ok"]
DEBUG 2019-07-16T20:54:12.378 25159 log_server_msg:729: RPC ->ch 163: [request] [0, 2, "specs", ["/home/vagrant/.config/nvim/rplugin/python3/__pycache__"]]
DEBUG 2019-07-16T20:54:12.378 25159 RPC: <-ch 163: invoke nvim_eval
DEBUG 2019-07-16T20:54:12.379 25159 log_server_msg:729: RPC ->ch 163: [response] [1, 2, nil, 0]
DEBUG 2019-07-16T20:54:12.379 25159 receive_msgpack:227: ch 163: parsing 5 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.379 25159 log_client_msg:766: RPC <-ch 163: [response] [1, 2, nil, 0]
DEBUG 2019-07-16T20:54:12.380 25159 log_server_msg:729: RPC ->ch 163: [request] [0, 3, "specs", ["/home/vagrant/.config/nvim/rplugin/python3/foo.py"]]
DEBUG 2019-07-16T20:54:12.380 25159 receive_msgpack:227: ch 163: parsing 79 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.380 25159 log_client_msg:766: RPC <-ch 163: [request] [0, 3, "nvim_command", ["redir =>a |exe "sil sign place buffer=".bufnr('')|redir end"]]
DEBUG 2019-07-16T20:54:12.381 25159 handle_request:359: RPC: scheduled nvim_command
DEBUG 2019-07-16T20:54:12.381 25159 RPC: <-ch 163: invoke nvim_command
DEBUG 2019-07-16T20:54:12.381 25159 log_server_msg:729: RPC ->ch 163: [response] [1, 3, nil, nil]
DEBUG 2019-07-16T20:54:12.381 25159 receive_msgpack:227: ch 163: parsing 5 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.381 25159 log_client_msg:766: RPC <-ch 163: [response] [1, 3, nil, 0]
DEBUG 2019-07-16T20:54:12.382 25159 stream_close:95: trace:
log_callstack at /home/vagrant/neovim/build/../src/nvim/log.c:256
stream_close at /home/vagrant/neovim/build/../src/nvim/event/stream.c:95
stream_may_close at /home/vagrant/neovim/build/../src/nvim/event/stream.c:111
process_stop at /home/vagrant/neovim/build/../src/nvim/event/process.c:230
f_jobstop at /home/vagrant/neovim/build/../src/nvim/eval.c:12231
f_rpcstop at /home/vagrant/neovim/build/../src/nvim/eval.c:14533
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6564
get_func_tv at /home/vagrant/neovim/build/../src/nvim/eval.c:6304
ex_call at /home/vagrant/neovim/build/../src/nvim/eval.c:2903
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2249
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
call_user_func at /home/vagrant/neovim/build/../src/nvim/eval.c:22666
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6550
get_func_tv at /home/vagrant/neovim/build/../src/nvim/eval.c:6304
eval7 at /home/vagrant/neovim/build/../src/nvim/eval.c:4407
eval6 at /home/vagrant/neovim/build/../src/nvim/eval.c:4104
eval5 at /home/vagrant/neovim/build/../src/nvim/eval.c:3985
eval4 at /home/vagrant/neovim/build/../src/nvim/eval.c:3688
eval3 at /home/vagrant/neovim/build/../src/nvim/eval.c:3606
eval2 at /home/vagrant/neovim/build/../src/nvim/eval.c:3537
eval1 at /home/vagrant/neovim/build/../src/nvim/eval.c:3464
eval0 at /home/vagrant/neovim/build/../src/nvim/eval.c:3424
ex_let_const at /home/vagrant/neovim/build/../src/nvim/eval.c:1604
ex_let at /home/vagrant/neovim/build/../src/nvim/eval.c:1546
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2249
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
call_user_func at /home/vagrant/neovim/build/../src/nvim/eval.c:22666
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6550
get_func_tv at /home/vagrant/neovim/build/../src/nvim/eval.c:6304
ex_call at /home/vagrant/neovim/build/../src/nvim/eval.c:2903
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2249
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
do_ucmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:5803
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2243
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
call_user_func at /home/vagrant/neovim/build/../src/nvim/eval.c:22666
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6550
get_func_tv at /home/vagrant/neovim/build/../src/nvim/eval.c:6304
ex_call at /home/vagrant/neovim/build/../src/nvim/eval.c:2903
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2249
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
call_user_func at /home/vagrant/neovim/build/../src/nvim/eval.c:22666
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6550
get_func_tv at /home/vagrant/neovim/build/../src/nvim/eval.c:6304
ex_call at /home/vagrant/neovim/build/../src/nvim/eval.c:2903
do_one_cmd at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:2249
do_cmdline at /home/vagrant/neovim/build/../src/nvim/ex_docmd.c:593
call_user_func at /home/vagrant/neovim/build/../src/nvim/eval.c:22666
call_func at /home/vagrant/neovim/build/../src/nvim/eval.c:6550
callback_call at /home/vagrant/neovim/build/../src/nvim/eval.c:17917
channel_callback_call at /home/vagrant/neovim/build/../src/nvim/channel.c:675
on_channel_event at /home/vagrant/neovim/build/../src/nvim/channel.c:581
multiqueue_process_events at /home/vagrant/neovim/build/../src/nvim/event/multiqueue.c:147
nv_event at /home/vagrant/neovim/build/../src/nvim/normal.c:7987
normal_execute at /home/vagrant/neovim/build/../src/nvim/normal.c:1133
state_enter at /home/vagrant/neovim/build/../src/nvim/state.c:73
normal_enter at /home/vagrant/neovim/build/../src/nvim/normal.c:462
main at /home/vagrant/neovim/build/../src/nvim/main.c:570
?? ??:0
_start at ??:?
DEBUG 2019-07-16T20:54:12.417 25159 stream_close:96: closing Stream: 0x2ba86c0
INFO 2019-07-16T20:54:12.417 25159 os_proc_tree_kill:96: sending SIGTERM to process group: -28407
DEBUG 2019-07-16T20:54:12.417 25159 receive_msgpack:227: ch 163: parsing 31 bytes from msgpack Stream: 0x2ba8860
DEBUG 2019-07-16T20:54:12.417 25159 log_client_msg:766: RPC <-ch 163: [request] [0, 4, "nvim_command_output", ["echo a"]]
DEBUG 2019-07-16T20:54:12.417 25159 handle_request:359: RPC: scheduled nvim_command_output
DEBUG 2019-07-16T20:54:12.424 25159 RPC: <-ch 163: invoke nvim_command_output
DEBUG 2019-07-16T20:54:12.424 25159 log_server_msg:729: RPC ->ch 163: [response] [1, 4, [0, "Vim(echo):E121: Undefined variable: a"], nil]
ERROR 2019-07-16T20:54:12.424 25159 wstream_write:78: xxx stream=0x2ba86c0
DEBUG 2019-07-16T20:54:12.425 25159 wstream_write:79: trace:
log_callstack at /home/vagrant/neovim/build/../src/nvim/log.c:256
wstream_write at /home/vagrant/neovim/build/../src/nvim/event/wstream.c:82
channel_write at /home/vagrant/neovim/build/../src/nvim/msgpack_rpc/channel.c:407
request_event at /home/vagrant/neovim/build/../src/nvim/msgpack_rpc/channel.c:383
multiqueue_process_events at /home/vagrant/neovim/build/../src/nvim/event/multiqueue.c:147
nv_event at /home/vagrant/neovim/build/../src/nvim/normal.c:7987
normal_execute at /home/vagrant/neovim/build/../src/nvim/normal.c:1133
state_enter at /home/vagrant/neovim/build/../src/nvim/state.c:73
normal_enter at /home/vagrant/neovim/build/../src/nvim/normal.c:462
main at /home/vagrant/neovim/build/../src/nvim/main.c:570
?? ??:0
_start at ??:?
2019-07-17 02:13:57 -07:00
|
|
|
without stopping the job. Use chanclose(id) to close
|
|
|
|
any socket.
|
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
HIGHLIGHTS
|
|
|
|
- *hl-VertSplit* Use |hl-WinSeparator| instead.
|
2021-09-06 19:21:18 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
LSP DIAGNOSTICS
|
2021-09-06 19:21:18 -07:00
|
|
|
For each of the functions below, use the corresponding function in
|
|
|
|
|vim.diagnostic| instead (unless otherwise noted). For example, use
|
|
|
|
|vim.diagnostic.get()| instead of |vim.lsp.diagnostic.get()|.
|
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
- *vim.lsp.diagnostic.clear()* Use |vim.diagnostic.hide()| instead.
|
2024-04-07 15:41:41 -07:00
|
|
|
- *vim.lsp.diagnostic.disable()* Use |vim.diagnostic.enable()| instead.
|
2022-10-09 05:21:52 -07:00
|
|
|
- *vim.lsp.diagnostic.display()* Use |vim.diagnostic.show()| instead.
|
|
|
|
- *vim.lsp.diagnostic.enable()*
|
|
|
|
- *vim.lsp.diagnostic.get()*
|
|
|
|
- *vim.lsp.diagnostic.get_all()* Use |vim.diagnostic.get()| instead.
|
2024-01-01 14:03:50 -07:00
|
|
|
- *vim.lsp.diagnostic.get_count()* Use |vim.diagnostic.count()| instead.
|
2022-10-09 05:21:52 -07:00
|
|
|
- *vim.lsp.diagnostic.get_line_diagnostics()* Use |vim.diagnostic.get()| instead.
|
|
|
|
- *vim.lsp.diagnostic.get_next()*
|
|
|
|
- *vim.lsp.diagnostic.get_next_pos()*
|
|
|
|
- *vim.lsp.diagnostic.get_prev()*
|
|
|
|
- *vim.lsp.diagnostic.get_prev_pos()*
|
|
|
|
- *vim.lsp.diagnostic.get_virtual_text_chunks_for_line()* No replacement. Use
|
|
|
|
options provided by |vim.diagnostic.config()| to customize virtual text.
|
|
|
|
- *vim.lsp.diagnostic.goto_next()*
|
|
|
|
- *vim.lsp.diagnostic.goto_prev()*
|
|
|
|
- *vim.lsp.diagnostic.redraw()* Use |vim.diagnostic.show()| instead.
|
|
|
|
- *vim.lsp.diagnostic.reset()*
|
|
|
|
- *vim.lsp.diagnostic.save()* Use |vim.diagnostic.set()| instead.
|
|
|
|
- *vim.lsp.diagnostic.set_loclist()* Use |vim.diagnostic.setloclist()| instead.
|
|
|
|
- *vim.lsp.diagnostic.set_qflist()* Use |vim.diagnostic.setqflist()| instead.
|
|
|
|
- *vim.lsp.diagnostic.show_line_diagnostics()* Use |vim.diagnostic.open_float()| instead.
|
|
|
|
- *vim.lsp.diagnostic.show_position_diagnostics()* Use |vim.diagnostic.open_float()| instead.
|
2021-09-06 19:21:18 -07:00
|
|
|
|
|
|
|
The following are deprecated without replacement. These functions are moved
|
|
|
|
internally and are no longer exposed as part of the API. Instead, use
|
|
|
|
|vim.diagnostic.config()| and |vim.diagnostic.show()|.
|
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
- *vim.lsp.diagnostic.set_signs()*
|
|
|
|
- *vim.lsp.diagnostic.set_underline()*
|
|
|
|
- *vim.lsp.diagnostic.set_virtual_text()*
|
|
|
|
|
|
|
|
LSP FUNCTIONS
|
2023-06-19 08:40:33 -07:00
|
|
|
- *vim.lsp.buf.server_ready()*
|
|
|
|
Use |LspAttach| instead, depending on your use-case. "Server ready" is not
|
|
|
|
part of the LSP spec, so the Nvim LSP client cannot meaningfully implement
|
|
|
|
it. "Ready" is ambiguous because:
|
|
|
|
- Language servers may finish analyzing the workspace, but edits can always
|
|
|
|
re-trigger analysis/builds.
|
|
|
|
- Language servers can serve some requests even while processing changes.
|
2023-06-09 02:32:43 -07:00
|
|
|
- *vim.lsp.buf.range_code_action()* Use |vim.lsp.buf.code_action()| with
|
|
|
|
the `range` parameter.
|
|
|
|
- *vim.lsp.util.diagnostics_to_items()* Use |vim.diagnostic.toqflist()| instead.
|
|
|
|
- *vim.lsp.util.set_qflist()* Use |setqflist()| instead.
|
|
|
|
- *vim.lsp.util.set_loclist()* Use |setloclist()| instead.
|
2023-07-17 09:27:16 -07:00
|
|
|
- *vim.lsp.buf_get_clients()* Use |vim.lsp.get_clients()| with
|
2023-06-24 04:47:10 -07:00
|
|
|
{buffer=bufnr} instead.
|
2023-06-09 02:32:43 -07:00
|
|
|
- *vim.lsp.buf.formatting()* Use |vim.lsp.buf.format()| with
|
2023-06-24 04:47:10 -07:00
|
|
|
{async=true} instead.
|
2023-06-09 02:32:43 -07:00
|
|
|
- *vim.lsp.buf.formatting_sync()* Use |vim.lsp.buf.format()| with
|
2023-06-24 04:47:10 -07:00
|
|
|
{async=false} instead.
|
2023-06-09 02:32:43 -07:00
|
|
|
- *vim.lsp.buf.range_formatting()* Use |vim.lsp.formatexpr()|
|
|
|
|
or |vim.lsp.buf.format()| instead.
|
2023-02-22 08:01:08 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
LUA
|
2023-03-15 05:56:13 -07:00
|
|
|
- vim.register_keystroke_callback() Use |vim.on_key()| instead.
|
2017-07-02 04:46:41 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
NORMAL COMMANDS
|
|
|
|
- *]f* *[f* Same as "gf".
|
2017-12-27 11:30:23 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
OPTIONS
|
|
|
|
- *cpo-<* *:menu-<special>* *:menu-special* *:map-<special>* *:map-special*
|
|
|
|
`<>` notation is always enabled.
|
|
|
|
- *'fe'* 'fenc'+'enc' before Vim 6.0; no longer used.
|
|
|
|
- *'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed.
|
|
|
|
- *'langnoremap'* Deprecated alias to 'nolangremap'.
|
|
|
|
- 'sessionoptions' Flags "unix", "slash" are ignored and always enabled.
|
|
|
|
- *'vi'*
|
|
|
|
- 'viewoptions' Flags "unix", "slash" are ignored and always enabled.
|
|
|
|
- *'viminfo'* Deprecated alias to 'shada' option.
|
|
|
|
- *'viminfofile'* Deprecated alias to 'shadafile' option.
|
2023-06-19 02:24:44 -07:00
|
|
|
- *'paste'* *'nopaste'* Just Paste It.™ The 'paste' option is obsolete:
|
|
|
|
|paste| is handled automatically when you paste text
|
|
|
|
using your terminal's or GUI's paste feature
|
|
|
|
(CTRL-SHIFT-v, CMD-v (macOS), middle-click, …).
|
2023-03-12 19:29:11 -07:00
|
|
|
Enables "paste mode":
|
2023-06-19 02:24:44 -07:00
|
|
|
- Disables mappings in Insert, Cmdline mode.
|
|
|
|
- Disables abbreviations.
|
|
|
|
- Resets 'autoindent' 'expandtab' 'revins' 'ruler'
|
|
|
|
'showmatch' 'smartindent' 'smarttab' 'softtabstop'
|
|
|
|
'textwidth' 'wrapmargin'.
|
|
|
|
- Treats 'formatoptions' as empty.
|
|
|
|
- Disables the effect of these options:
|
|
|
|
- 'cindent'
|
|
|
|
- 'indentexpr'
|
|
|
|
- 'lisp'
|
2022-10-09 05:21:52 -07:00
|
|
|
|
|
|
|
UI EXTENSIONS
|
|
|
|
- *ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled
|
2019-05-11 07:58:47 -07:00
|
|
|
by the `ext_wildmenu` |ui-option|. Emits these events:
|
2022-10-09 05:21:52 -07:00
|
|
|
- `["wildmenu_show", items]`
|
|
|
|
- `["wildmenu_select", selected]`
|
|
|
|
- `["wildmenu_hide"]`
|
2023-11-07 10:31:21 -07:00
|
|
|
- *term_background* Unused. The terminal background color is now detected
|
|
|
|
by the Nvim core directly instead of the TUI.
|
2019-03-20 15:09:53 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
VARIABLES
|
2024-04-30 04:30:21 -07:00
|
|
|
- *b:terminal_job_pid* Use `jobpid(&channel)` instead.
|
|
|
|
- *b:terminal_job_id* Use `&channel` instead. To access in non-current buffer:
|
|
|
|
- Lua: `vim.bo[bufnr].channel`
|
|
|
|
- Vimscript: `getbufvar(bufnr, '&channel')`
|
2017-12-27 11:30:23 -07:00
|
|
|
|
2022-10-09 05:21:52 -07:00
|
|
|
|
2017-07-02 04:46:41 -07:00
|
|
|
vim:noet:tw=78:ts=8:ft=help:norl:
|