Movatterモバイル変換


[0]ホーム

URL:


Plugins

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


Plugins and modules included with Nvim

Nvim includes various Lua and Vim plugins or modules which may providecommands (such as :TOhtml) or modules that you can optionally require() or:packadd. The Lua ones are not part of thelua-stdlib, that is, they are notavailable from the globalvim module namespace. Some of the plugins areloaded by default while others are not loaded until requested by:packadd.

Standard plugins ~

standard-plugin-list
Help-linkLoadedShort description
difftool NoCompares two directories or files side-by-sideeditorconfig YesDetect and interpret editorconfigft-shada YesAllows editing binaryshada filesman.lua YesView manpages in Nvim|matchit|YesExtended% matchingmatchparen YesHighlight matching pairs|netrw|YesReading and writing files over a networkpackage-cfilter NoFiltering quickfix/location listpackage-justify NoJustify textpackage-nohlsearch NoAutomatically run :nohlsearchpackage-termdebug NoDebug inside Nvim with gdbpi_gzip.txt YesReading and writing compressed filespi_msgpack.txt Nomsgpack utilitiespi_paren.txt YesHighlight matching parenspi_spec.txt YesFiletype plugin to work with rpm spec filespi_swapmouse NoSwap meaning of left and right mouse buttonspi_tar.txt YesTar file explorerpi_tutor.txt YesInteractive tutorialpi_zip.txt YesZip archive explorerspellfile.lua YesInstall spellfile if missingtohtml YesConvert buffer to html, syntax includedundotree-plugin NoInteractive textual undotree

Builtin plugin: difftooldifftool

:DiffTool{left}{right}:DiffTool
Compares two directories or files side-by-side.Supports directory diffing, rename detection, and highlights changesin quickfix list.
The plugin is not loaded by default; use:packadd nvim.difftool beforeinvoking:DiffTool.
Examplegit difftool -d integration usingDiffTool command:
[difftool "nvim_difftool"]  cmd = nvim -c \"packadd nvim.difftool\" -c \"DiffTool $LOCAL $REMOTE\"[diff]  tool = nvim_difftool
open({left},{right},{opt})difftool.open()
Diff two files or directories
Parameters:
{left} (string)
{right} (string)
{opt} (table?)
{rename.detect} (boolean, default:false) Whether to detect renames
{rename.similarity} (number, default:0.5) Minimum similarity for rename detection (0 to 1)
{rename.chunk_size} (number, default:4096) Maximum chunk size to read from files for similarity calculation
{method} ('auto'|'builtin'|'diffr', default:auto) Diff method to use
{ignore} (string[], default:{}) List of file patterns to ignore (for example:'.git', '*.log')
{rename} (table) Controls rename detection

Builtin plugin: editorconfigeditorconfig

Nvim supports EditorConfig. When a file is opened, after runningftpluginsandFileType autocommands, Nvim searches all parent directories of that filefor ".editorconfig" files, parses them, and applies any properties that matchthe opened file. Think of it like'modeline' for an entire (recursive)directory. For more information seehttps://editorconfig.org/.
g:editorconfigb:editorconfig
EditorConfig is enabled by default. To disable it, add to your config:
vim.g.editorconfig = false
(Vimscript:let g:editorconfig = v:false). It can also be disabledper-buffer by setting theb:editorconfig buffer-local variable tofalse.
Nvim stores the applied properties inb:editorconfig if it is notfalse.
editorconfig-custom-properties
New properties can be added by adding a new entry to the "properties" table.The table key is a property name and the value is a callback function whichaccepts the number of the buffer to be modified, the value of the property inthe.editorconfig file, and (optionally) a table containing all of the otherproperties and their values (useful for properties which depend on otherproperties). The value is always a string and must be coerced if necessary.Example:
require('editorconfig').properties.foo = function(bufnr, val, opts)  if opts.charset and opts.charset ~= "utf-8" then    error("foo can only be set when charset is utf-8", 0)  end  vim.b[bufnr].foo = valend
editorconfig-properties
The following properties are supported by default:
charseteditorconfig.charset
One of"utf-8","utf-8-bom","latin1","utf-16be", or"utf-16le". Sets the'fileencoding' and'bomb' options.
end_of_lineeditorconfig.end_of_line
One of"lf","crlf", or"cr". These correspond to setting'fileformat' to "unix", "dos", or "mac", respectively.
indent_sizeeditorconfig.indent_size
A number indicating the size of a single indent. Alternatively, use the value "tab" to use the value of the tab_width property. Sets the'shiftwidth' and'softtabstop' options. If this value is not "tab" and the tab_width property is not set,'tabstop' is also set to this value.
indent_styleeditorconfig.indent_style
One of"tab" or"space". Sets the'expandtab' option.
insert_final_newlineeditorconfig.insert_final_newline
"true" or"false" to ensure the file always has a trailing newline as its last byte. Sets the'fixendofline' and'endofline' options.
max_line_lengtheditorconfig.max_line_length
A number indicating the maximum length of a single line. Sets the'textwidth' option.
rooteditorconfig.root
If "true", then stop searching for.editorconfig files in parent directories. This property must be at the top-level of the.editorconfig file (i.e. it must not be within a glob section).
spelling_languageeditorconfig.spelling_language
A code of the format ss or ss-TT, where ss is an ISO 639 language code and TT is an ISO 3166 territory identifier. Sets the'spelllang' option.
tab_widtheditorconfig.tab_width
The display size of a single tab character. Sets the'tabstop' option.
trim_trailing_whitespaceeditorconfig.trim_trailing_whitespace
When"true", trailing whitespace is automatically removed when the buffer is written.

Builtin plugin: spellfilespellfile.lua

Asks the user to download missing spellfiles. The spellfile is written tostdpath('data') .. 'site/spell' or the first writable directory in the'runtimepath'.
The plugin can be disabled by settingg:loaded_spellfile_plugin = 1.
nvim.spellfile.Opts A table with the following fields:
Fields:
{url} (string) The base URL from where the spellfiles are downloaded. Usesg:spellfile_URL if it's set, otherwisehttps://ftp.nluug.nl/pub/vim/runtime/spell.
{timeout_ms} (integer, default: 15000) Number of milliseconds after which thevim.net.request() times out.
config({opts})spellfile.config()
Configure spellfile download options. For example:
require('nvim.spellfile').config({ url = '...' })
Parameters:
{opts} (nvim.spellfile.Opts?) When omitted ornil, retrieve the current configuration. Otherwise, a configuration table.
Return:
(nvim.spellfile.Opts?) Current config if{opts} is omitted.
get({lang})spellfile.get()
Download spellfiles for language{lang} if available.
Parameters:
{lang} (string) Language code.
Return:
(table?) A table with the following fields:
{files} (string[])
{key} (string)
{lang} (string)
{encoding} (string)
{dir} (string)

Builtin plugin: tohtmltohtml

:[range]TOhtml{file}:TOhtml
Converts the buffer shown in the current window to HTML, opens the generatedHTML in a new split window, and saves its contents to{file}. If{file} is notgiven, a temporary file (created bytempname()) is used.
tohtml({winid},{opt})tohtml.tohtml()
Converts the buffer shown in the window{winid} to HTML and returns the output as a list of string.
Parameters:
{winid} (integer?) Window to convert (defaults to current window)
{opt} (table?) Optional parameters.
{title}? (string|false, default: buffer name) Title tag to set in the generated HTML code.
{number_lines}? (boolean, default:false) Show line numbers.
{font}? (string[]|string, default:guifont) Fonts to use.
{width}? (integer, default:'textwidth' if non-zero or window width otherwise) Width used for items which are either right aligned or repeat a character infinitely.
{range}? (integer[], default: entire buffer) Range of rows to use.
Return:
(string[])

Builtin plugin: undotreeundotree-plugin

open({opts})undotree.open()
Open a window that displays a textual representation of theundo-tree.
While in the window, moving the cursor changes the undo.
Closes the window if it is already open
Load the plugin with this command:
packadd nvim.undotree
Can also be shown with:Undotree.:Undotree
Parameters:
{opts} (table?) A table with the following fields:
{bufnr} (integer?) Buffer to draw the tree into. If omitted, a new buffer is created.
{winid} (integer?) Window id to display the tree buffer in. If omitted, a new window is created with{command}.
{command} (string?) Vimscript command to create the window. Default value is "30vnew". Only used when{winid} is nil.
{title} ((string|fun(bufnr:integer):string?)?) Title of the window. If a function, it accepts the buffer number of the source buffer as its only argument and should return a string.
Return:
(boolean?) Returns true if the window was already open, nil otherwise
Main
Commands index
Quick reference

Plugins and modules included with Nvim
Standard plugins ~
Builtin plugin: difftool
Builtin plugin: editorconfig
Builtin plugin: spellfile
Builtin plugin: tohtml
Builtin plugin: undotree

[8]ページ先頭

©2009-2025 Movatter.jp