Home Explore Blog CI



neovim

1st chunk of `runtime/doc/deprecated.txt`
9537eb83f9e8e117a5998b1199ae685aaf1f2cb1098f805b0000000100001009
*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

------------------------------------------------------------------------------
DEPRECATED IN 0.12					*deprecated-0.12*

API

• todo

DIAGNOSTICS

• "float" in |vim.diagnostic.JumpOpts|.		Use "on_jump" instead.
• "float" in |vim.diagnostic.Opts.Jump|.	Use "on_jump" instead.

HIGHLIGHTS

• todo

LSP

• *vim.lsp.client_is_stopped()*		Use |vim.lsp.get_client_by_id()| instead.
• *vim.lsp.util.stylize_markdown()*	Use |vim.treesitter.start()| with
					`vim.wo.conceallevel = 2`.
• *vim.lsp.log.should_log()*		Use |vim.lsp.log.set_format_func()| instead
					and return `nil` to omit entries from the logfile.

LUA

• todo

VIMSCRIPT

• todo

------------------------------------------------------------------------------
DEPRECATED IN 0.11					*deprecated-0.11*

API
• nvim_notify()		Use |nvim_echo()| or `nvim_exec_lua("vim.notify(...)", ...)` instead.
• nvim_subscribe()	Plugins must maintain their own "multicast" channels list.
• nvim_unsubscribe()	Plugins must maintain their own "multicast" channels list.
• nvim_out_write()	Use |nvim_echo()|.
• nvim_err_write()	Use |nvim_echo()| with `{err=true}`.
• nvim_err_writeln()	Use |nvim_echo()| with `{err=true}`.
• nvim_buf_add_highlight()	Use |vim.hl.range()| or |nvim_buf_set_extmark()|

DIAGNOSTICS
• *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.
• *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|
• |vim.diagnostic.JumpOpts| renamed its "cursor_position" field to "pos".

HIGHLIGHTS
• *TermCursorNC*	Unfocused |terminal| windows do not have a cursor.

LSP
• *vim.lsp.util.jump_to_location*	Use |vim.lsp.util.show_document()| with
					`{focus=true}` instead.
• *vim.lsp.buf.execute_command*		Use |Client:exec_cmd()| instead.
• *vim.lsp.buf.completion*		Use |vim.lsp.completion.get()| instead.
• vim.lsp.buf_request_all		The `error` key has been renamed to `err` inside
					the result parameter of the handler.
• *vim.lsp.with()*			Pass configuration to equivalent
					functions in `vim.lsp.buf.*`.
• |vim.lsp.handlers| Does not support client-to-server response handlers. Only
  supports server-to-client requests/notification handlers.
• *vim.lsp.handlers.signature_help()*	Use |vim.lsp.buf.signature_help()| instead.
• `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.
• `vim.lsp.start_client()`		Use |vim.lsp.start()| instead.

LUA
• vim.region()		Use |getregionpos()| instead.
• *vim.highlight*	Renamed to |vim.hl|.
• vim.validate(opts: table) Use form 1. See |vim.validate()|.

VIMSCRIPT
• *termopen()* Use |jobstart()| with `{term: v:true}`.

------------------------------------------------------------------------------
DEPRECATED IN 0.10					*deprecated-0.10*

API
• *nvim_buf_get_option()*	Use |nvim_get_option_value()| instead.
• *nvim_buf_set_option()*

Title: Deprecated Features in Nvim
Summary
This document lists features deprecated in various Nvim versions (0.10, 0.11, and 0.12). It includes APIs, diagnostic tools, highlight configurations, LSP functions, Lua functions, and Vimscript functions that are scheduled for removal and provides alternative methods or replacements for them. The list includes functions related to buffer management, LSP client interaction, diagnostic navigation, and more.