Home Explore Blog CI



neovim

4th chunk of `runtime/doc/deprecated.txt`
a3fbe1236f3c8c173615bfab6891ba823e772f96252f3ea00000000100000cc4
 at startup (after |v:servername| is initialized). Can be explicitly
    provided to |terminal| and |jobstart()| 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.

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()*          Use |vim.diagnostic.enable()| instead.
• *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.count()| 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()*

Title: Deprecated Features in Nvim (Continued): Events, Keycodes, Highlights, LSP Diagnostics, and LSP Functions
Summary
This section continues the list of deprecated features in Nvim. It covers deprecated events (BufCreate, EncodingChanged, etc.), keycodes (<MouseDown>, <MouseUp>), and highlight groups (hl-VertSplit). It also details deprecated functions within the LSP diagnostics API, all of which are replaced by functions in `vim.diagnostic` or internal functions. Also, it provides information about deprecated LSP functions like `vim.lsp.buf.server_ready()` now better addressed by other features.