Movatterモバイル変換


[0]ホーム

URL:


Deprecated

Nvim:help pages,generated fromsource using thetree-sitter-vimdoc parser.


Nvim
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.12deprecated-0.12

API

todo

DIAGNOSTICS

"float" invim.diagnostic.JumpOpts.Use "on_jump" instead.
"float" invim.diagnostic.Opts.Jump.Use "on_jump" instead.

HIGHLIGHTS

:ownsyntaxw:current_syntaxUse'winhighlight' instead.

LSP

vim.lsp.client_is_stopped()Usevim.lsp.get_client_by_id() instead.
vim.lsp.util.stylize_markdown()Usevim.treesitter.start() withvim.wo.conceallevel = 2.
vim.lsp.log.should_log()Usevim.lsp.log.set_format_func() insteadand returnnil to omit entries from the logfile.
vim.lsp.semantic_tokens.start()Usevim.lsp.semantic_tokens.enable(true) instead
vim.lsp.semantic_tokens.stop()Usevim.lsp.semantic_tokens.enable(false) instead
vim.lsp.set_log_level()Usevim.lsp.log.set_level() instead
vim.lsp.get_log_path()Usevim.lsp.log.get_filename() instead
vim.lsp.get_buffers_by_client_id()Usevim.lsp.get_client_by_id(id).attached_buffersinstead
vim.lsp.stop_client()UseClient:stop() instead

LUA

vim.diff()Renamed tovim.text.diff()

VIMSCRIPT

todo

DEPRECATED IN 0.11deprecated-0.11

API

nvim_notify()Usenvim_echo() ornvim_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()Usenvim_echo().
nvim_err_write()Usenvim_echo() with{err=true}.
nvim_err_writeln()Usenvim_echo() with{err=true}.
nvim_buf_add_highlight()Usevim.hl.range() ornvim_buf_set_extmark()

DIAGNOSTICS

vim.diagnostic.goto_next()Usevim.diagnostic.jump() with{count=1, float=true} instead.
vim.diagnostic.goto_prev()Usevim.diagnostic.jump() with{count=-1, float=true} instead.
vim.diagnostic.get_next_pos() Use the "lnum" and "col" fields from thereturn value ofvim.diagnostic.get_next() instead.
vim.diagnostic.get_prev_pos() Use the "lnum" and "col" fields from thereturn value ofvim.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

TermCursorNCUnfocusedterminal windows do not have a cursor.

LSP

vim.lsp.util.jump_to_locationUsevim.lsp.util.show_document() with{focus=true} instead.
vim.lsp.buf.execute_commandUseClient:exec_cmd() instead.
vim.lsp.buf.completionUsevim.lsp.completion.get() instead.
vim.lsp.buf_request_allTheerror key has been renamed toerr insidethe result parameter of the handler.
vim.lsp.with()Pass configuration to equivalentfunctions invim.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()Usevim.lsp.buf.signature_help() instead.
client.request()UseClient:request() instead.
client.request_sync()UseClient:request_sync() instead.
client.notify()UseClient:notify() instead.
client.cancel_request()UseClient:cancel_request() instead.
client.stop()UseClient:stop() instead.
client.is_stopped()UseClient:is_stopped() instead.
client.supports_method()UseClient:supports_method() instead.
client.on_attach()UseClient:on_attach() instead.
vim.lsp.start_client()Usevim.lsp.start() instead.

LUA

vim.region()Usegetregionpos() instead.
vim.highlightRenamed tovim.hl.
vim.validate(opts: table) Use form 1. Seevim.validate().

VIMSCRIPT

termopen() Usejobstart() with{term: v:true}.

DEPRECATED IN 0.10deprecated-0.10

API

nvim_buf_get_option()Usenvim_get_option_value() instead.
nvim_buf_set_option()Usenvim_set_option_value() instead.
nvim_call_atomic()Usenvim_exec_lua() instead.
nvim_get_option()Usenvim_get_option_value() instead.
nvim_set_option()Usenvim_set_option_value() instead.
nvim_win_get_option()Usenvim_get_option_value() instead.
nvim_win_set_option()Usenvim_set_option_value() instead.

CHECKHEALTH

health#report_errorvim.health.report_error()Usevim.health.error() instead.
health#report_infovim.health.report_info()Usevim.health.info() instead.
health#report_okvim.health.report_ok()Usevim.health.ok() instead.
health#report_startvim.health.report_start()Usevim.health.start() instead.
health#report_warnvim.health.report_warn()Usevim.health.warn() instead.

DIAGNOSTICS

Configuringdiagnostic-signs using:sign-define orsign_define(). Use the "signs" key ofvim.diagnostic.config() instead.
vim.diagnostic functions:
vim.diagnostic.disable()Usevim.diagnostic.enable()
vim.diagnostic.is_disabled()Usevim.diagnostic.is_enabled()
Legacy signature:vim.diagnostic.enable(buf:number, namespace:number)

LSP

vim.lsp.util.get_progress_messages()Usevim.lsp.status() instead.
vim.lsp.get_active_clients()Usevim.lsp.get_clients() instead.
vim.lsp.for_each_buffer_client()Usevim.lsp.get_clients() instead.
vim.lsp.util.trim_empty_lines()Usevim.split() withtrimempty 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()Usevim.tbl_get() instead:
local keys = vim.split(section, '.', { plain = true })local  vim.tbl_get(table, unpack(keys))
LUA
vim.loopUsevim.uv instead.
vim.tbl_add_reverse_lookup()
vim.tbl_flatten()UseIter:flatten() instead.
vim.tbl_islist()Usevim.islist() instead.

OPTIONS

The "term_background" UI optionui-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()UseLanguageTree:children() (non-recursive) instead.

DEPRECATED IN 0.9deprecated-0.9

API

nvim_get_hl_by_name()Usenvim_get_hl() instead.
nvim_get_hl_by_id()Usenvim_get_hl() instead.

TREESITTER

vim.treesitter.language.require_language()Usevim.treesitter.language.add() instead.
vim.treesitter.get_node_at_pos()Usevim.treesitter.get_node() instead.
vim.treesitter.get_node_at_cursor()Usevim.treesitter.get_node()andTSNode:type() instead.
The following top level Treesitter functions have been moved:
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()

LUA

nvim_exec()Usenvim_exec2() instead.
vim.pretty_print()Usevim.print() instead.

DEPRECATED IN 0.8 OR EARLIER

API

nvim_buf_clear_highlight()Usenvim_buf_clear_namespace() instead.
nvim_buf_set_virtual_text()Usenvim_buf_set_extmark() instead.
nvim_command_output()Usenvim_exec2() instead.
nvim_execute_lua()Usenvim_exec_lua() instead.
nvim_get_option_info()Usenvim_get_option_info2() instead.

COMMANDS

:rv:rviminfoDeprecated alias to:rshada command.
:wv:wviminfoDeprecated alias to:wshada command.

ENVIRONMENT VARIABLES

$NVIM_LISTEN_ADDRESS
Deprecated way to:
set the server name (use--listen orserverstart() instead)
get the server name (usev:servername instead)
detect a parent Nvim (use$NVIM instead)
Ignored if --listen is given.
Unset at startup (afterv:servername is initialized). Can be explicitly provided toterminal andjobstart() by the "env" option. Example:
call jobstart(['foo'], { 'env': { 'NVIM_LISTEN_ADDRESS': v:servername  } })

EVENTS

BufCreateUseBufAdd instead.
EncodingChangedNever fired;'encoding' is always "utf-8".
FileEncodingNever fired; equivalent toEncodingChanged.
GUIEnterNever fired; useUIEnter instead.
GUIFailedNever fired.

KEYCODES

<MouseDown>Use<ScrollWheelUp> instead.
<MouseUp>Use<ScrollWheelDown> instead.

HIGHLIGHTS

hl-VertSplitUsehl-WinSeparator instead.

LSP DIAGNOSTICS

For each of the functions below, use the corresponding function invim.diagnostic instead (unless otherwise noted). For example, usevim.diagnostic.get() instead ofvim.lsp.diagnostic.get().
vim.lsp.diagnostic.clear()Usevim.diagnostic.hide() instead.
vim.lsp.diagnostic.disable() Usevim.diagnostic.enable() instead.
vim.lsp.diagnostic.display()Usevim.diagnostic.show() instead.
vim.lsp.diagnostic.enable()
vim.lsp.diagnostic.get()
vim.lsp.diagnostic.get_all()Usevim.diagnostic.get() instead.
vim.lsp.diagnostic.get_count()Usevim.diagnostic.count() instead.
vim.lsp.diagnostic.get_line_diagnostics() Usevim.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 byvim.diagnostic.config() to customize virtual text.
vim.lsp.diagnostic.goto_next()
vim.lsp.diagnostic.goto_prev()
vim.lsp.diagnostic.redraw()Usevim.diagnostic.show() instead.
vim.lsp.diagnostic.save()Usevim.diagnostic.set() instead.
vim.lsp.diagnostic.set_loclist()Usevim.diagnostic.setloclist() instead.
vim.lsp.diagnostic.set_qflist()Usevim.diagnostic.setqflist() instead.
vim.lsp.diagnostic.show_line_diagnostics() Usevim.diagnostic.open_float() instead.
vim.lsp.diagnostic.show_position_diagnostics() Usevim.diagnostic.open_float() instead.
The following are deprecated without replacement. These functions are movedinternally and are no longer exposed as part of the API. Instead, usevim.diagnostic.config() andvim.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() UseLspAttach 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()Usevim.lsp.buf.code_action() withtherange parameter.
vim.lsp.util.diagnostics_to_items()Usevim.diagnostic.toqflist() instead.
vim.lsp.util.set_qflist()Usesetqflist() instead.
vim.lsp.util.set_loclist()Usesetloclist() instead.
vim.lsp.buf_get_clients()Usevim.lsp.get_clients() with{buffer=bufnr} instead.
vim.lsp.buf.formatting()Usevim.lsp.buf.format() with{async=true} instead.
vim.lsp.buf.formatting_sync()Usevim.lsp.buf.format() with{async=false} instead.
vim.lsp.buf.range_formatting()Usevim.lsp.formatexpr()orvim.lsp.buf.format() instead.

LUA

vim.register_keystroke_callback()Usevim.on_key() instead.

NORMAL COMMANDS

]f[fSame as "gf".

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 builtinhighlight-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 textusing 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-wildmenuUseui-cmdline withui-popupmenu instead. Enabledby theext_wildmenuui-option. Emits these events:
["wildmenu_show", items]
["wildmenu_select", selected]
["wildmenu_hide"]
term_backgroundUnused. The terminal background color is now detectedby the Nvim core directly instead of the TUI.

VIMSCRIPT

<sfile>Use<script> or<stack> instead.
b:terminal_job_pidUsejobpid(&channel) instead.
b:terminal_job_idUse&channel instead. To access in non-current buffer:
Lua:vim.bo[bufnr].channel
Vimscript:getbufvar(bufnr, '&channel')
buffer_exists()Obsolete name forbufexists().
buffer_name()Obsolete name forbufname().
buffer_number()Obsolete name forbufnr().
file_readable()Obsolete name forfilereadable().
highlight_exists()Obsolete name forhlexists().
highlightID()Obsolete name forhlID().
inputdialog()Useinput() instead.
jobclose()Obsolete name forchanclose()
jobsend()Obsolete name forchansend()
last_buffer_nr()Obsolete name for bufnr("$").
rpcstart()Usejobstart() with{'rpc': v:true} instead.
rpcstop()Usejobstop() instead to stop any job, orchanclose(id, "rpc") to close RPC communicationwithout stopping the job. Use chanclose(id) to closeany socket.
Main
Commands index
Quick reference

Deprecated features
DEPRECATED IN 0.12
API
DIAGNOSTICS
HIGHLIGHTS
LSP
LUA
VIMSCRIPT
DEPRECATED IN 0.11
API
DIAGNOSTICS
HIGHLIGHTS
LSP
LUA
VIMSCRIPT
DEPRECATED IN 0.10
API
CHECKHEALTH
DIAGNOSTICS
LSP
OPTIONS
TREESITTER
DEPRECATED IN 0.9
API
TREESITTER
LUA
DEPRECATED IN 0.8 OR EARLIER
API
COMMANDS
ENVIRONMENT VARIABLES
EVENTS
KEYCODES
HIGHLIGHTS
LSP DIAGNOSTICS
LSP FUNCTIONS
LUA
NORMAL COMMANDS
OPTIONS
UI EXTENSIONS
VIMSCRIPT

[8]ページ先頭

©2009-2025 Movatter.jp