Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/deprecated.txt`
5b91827027f0f929d87559c6a50a8279e2e01908f6be40be0000000100001016
 |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()*	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
• Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use
  the "signs" key of |vim.diagnostic.config()| instead.
• vim.diagnostic functions:
  • *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: >
						local keys = vim.split(section, '.', { plain = true })
						local  vim.tbl_get(table, unpack(keys))

LUA
• *vim.loop*				Use |vim.uv| instead.
• *vim.tbl_add_reverse_lookup()*
• *vim.tbl_flatten()*			Use |Iter:flatten()| instead.
• *vim.tbl_islist()*			Use |vim.islist()| instead.

OPTIONS
• 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.

TREESITTER
• *LanguageTree:for_each_child()*	Use |LanguageTree:children()| (non-recursive) instead.


------------------------------------------------------------------------------
DEPRECATED IN 0.9					*deprecated-0.9*

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.
• The following top level Treesitter functions have been moved:
  • *vim.treesitter.inspect_language()*    -> |vim.treesitter.language.inspect()|

Title: Deprecated Features in Nvim (Continued)
Summary
This continues the list of deprecated features in Nvim, covering versions 0.9 and 0.10. It includes replacements for LSP client methods like `client.request()`, Lua functions like `vim.region()`, and Vimscript functions like `termopen()`. Additionally, it lists deprecated API functions (e.g., `nvim_buf_get_option()`), checkhealth functions (e.g., `health#report_error`), diagnostic configurations, LSP utility functions, Lua functions (e.g., `vim.loop`, `vim.tbl_islist`), and Treesitter functions. It also notes the deprecation of the 'term_background' UI option. For version 0.9 it list deprecated API functions and Treesitter functions.