1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
*deprecated.txt* Nvim
NVIM REFERENCE MANUAL
Nvim *deprecated*
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.
==============================================================================
Deprecated features
API
- *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead.
- *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead.
- *nvim_command_output()* Use |nvim_exec2()| instead.
- *nvim_execute_lua()* Use |nvim_exec_lua()| instead.
- *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead.
- *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead.
- *nvim_exec()* Use |nvim_exec2()| instead.
- *nvim_get_option_info()* Use |nvim_get_option_info2()| instead.
- *nvim_buf_get_option()* Use |nvim_get_option_value()| instead.
- *nvim_buf_set_option()* Use |nvim_set_option_value()| 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.
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"
option. Example: >vim
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()|.
- *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.
- *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("$").
- *rpcstop()* Use |jobstop()| instead to stop any job, or
`chanclose(id, "rpc")` to close RPC communication
without stopping the job. Use chanclose(id) to close
any socket.
HIGHLIGHTS
- *hl-VertSplit* Use |hl-WinSeparator| instead.
LSP DIAGNOSTICS
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()|.
- *vim.lsp.diagnostic.clear()* Use |vim.diagnostic.hide()| instead.
- *vim.lsp.diagnostic.disable()*
- *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.
- *vim.lsp.diagnostic.get_count()* Use |vim.diagnostic.get()| instead.
- *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.
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()|.
- *vim.lsp.diagnostic.set_signs()*
- *vim.lsp.diagnostic.set_underline()*
- *vim.lsp.diagnostic.set_virtual_text()*
LSP FUNCTIONS
- *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.
- *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.
- *vim.lsp.buf_get_clients()* Use |vim.lsp.get_clients()| with
{buffer=bufnr} instead.
- *vim.lsp.buf.formatting()* Use |vim.lsp.buf.format()| with
{async=true} instead.
- *vim.lsp.buf.formatting_sync()* Use |vim.lsp.buf.format()| with
{async=false} instead.
- *vim.lsp.buf.range_formatting()* Use |vim.lsp.formatexpr()|
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.get_active_clients()* Use |vim.lsp.get_clients()|
- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()|
- *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()*
TREESITTER FUNCTIONS
- *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.
- *vim.treesitter.query.get_query()* Use |vim.treesitter.query.get()|
instead.
- *LanguageTree:for_each_child()* Use |LanguageTree:children()|
(non-recursive) instead.
LUA
- vim.register_keystroke_callback() Use |vim.on_key()| instead.
- *vim.pretty_print()* Use |vim.print()| instead.
- *vim.loop* Use |vim.uv| instead.
NORMAL COMMANDS
- *]f* *[f* Same as "gf".
OPTIONS
- *cpo-<* *:menu-<special>* *:menu-special* *:map-<special>* *:map-special*
`<>` notation is always enabled.
- 'gdefault' Enables the |:substitute| flag 'g' by default.
- *'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.
- *'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, …).
Enables "paste mode":
- 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'
UI EXTENSIONS
- *ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled
by the `ext_wildmenu` |ui-option|. Emits these events:
- `["wildmenu_show", items]`
- `["wildmenu_select", selected]`
- `["wildmenu_hide"]`
- *term_background* Unused. The terminal background color is now detected
by the Nvim core directly instead of the TUI.
VARIABLES
- *b:terminal_job_pid* PID of the top-level process in a |:terminal|.
Use `jobpid(&channel)` instead.
vim:noet:tw=78:ts=8:ft=help:norl:
|