neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

plugins.txt (12815B)


      1 *plugins.txt*  Nvim
      2 
      3 
      4                            NVIM REFERENCE MANUAL
      5 
      6                                       Type |gO| to see the table of contents.
      7 
      8 ==============================================================================
      9 Plugins and modules included with Nvim                               *plugins*
     10 
     11 Nvim includes various Lua and Vim plugins or modules which may provide
     12 commands (such as :TOhtml) or modules that you can optionally require() or
     13 :packadd. The Lua ones are not part of the |lua-stdlib|, that is, they are not
     14 available from the global `vim` module namespace. Some of the plugins are
     15 loaded by default while others are not loaded until requested by |:packadd|.
     16 
     17 ==============================================================================
     18 Standard plugins                                        *standard-plugin-list*
     19 
     20 Help-link		Loaded	Short description ~
     21 |difftool|		No	Compares two directories or files side-by-side
     22 |editorconfig|		Yes	Detect and interpret editorconfig
     23 |ft-shada|		Yes	Allows editing binary |shada| files
     24 |man.lua|		Yes	View manpages in Nvim
     25 |matchit|		Yes	Extended |%| matching
     26 |matchparen|		Yes	Highlight matching pairs
     27 |netrw|			Yes	Reading and writing files over a network
     28 |package-cfilter|	No	Filtering quickfix/location list
     29 |package-justify|	No	Justify text
     30 |package-nohlsearch|	No	Automatically run :nohlsearch
     31 |package-termdebug|	No	Debug inside Nvim with gdb
     32 |pi_gzip.txt|		Yes	Reading and writing compressed files
     33 |pi_msgpack.txt|	No	msgpack utilities
     34 |pi_paren.txt|		Yes	Highlight matching parens
     35 |pi_spec.txt|		Yes	Filetype plugin to work with rpm spec files
     36 |pi_swapmouse|		No	Swap meaning of left and right mouse buttons
     37 |pi_tar.txt|		Yes	Tar file explorer
     38 |pi_tutor.txt|		Yes	Interactive tutorial
     39 |pi_zip.txt|		Yes	Zip archive explorer
     40 |spellfile.lua|		Yes	Install spellfile if missing
     41 |tohtml|		Yes	Convert buffer to html, syntax included
     42 |undotree-plugin|	No	Interactive textual undotree
     43 
     44 ==============================================================================
     45 Builtin plugin: difftool                                            *difftool*
     46 
     47 
     48 :DiffTool {left} {right}                                           *:DiffTool*
     49 Compares two directories or files side-by-side.
     50 Supports directory diffing, rename detection, and highlights changes
     51 in quickfix list. Replaces the built-in `nvim -d` diff mode with this interface.
     52 
     53 The plugin is not loaded by default; use `:packadd nvim.difftool` before
     54 invoking `:DiffTool`.
     55 
     56 Example `git difftool -d` integration using `nvim -d` replacement: >ini
     57    [difftool "nvim_difftool"]
     58      cmd = nvim -c \"packadd nvim.difftool\" -d \"$LOCAL\" \"$REMOTE\"
     59    [diff]
     60      tool = nvim_difftool
     61 <
     62 
     63 
     64 open({left}, {right}, {opt})                                 *difftool.open()*
     65    Diff two files or directories
     66 
     67    Parameters: ~
     68      • {left}   (`string`)
     69      • {right}  (`string`)
     70      • {opt}    (`table?`)
     71                 • {rename.detect} (`boolean`, default: `false`) Whether to
     72                   detect renames
     73                 • {rename.similarity} (`number`, default: `0.5`) Minimum
     74                   similarity for rename detection (0 to 1)
     75                 • {rename.chunk_size} (`number`, default: `4096`) Maximum
     76                   chunk size to read from files for similarity calculation
     77                 • {method} (`'auto'|'builtin'|'diffr'`, default: `auto`) Diff
     78                   method to use
     79                 • {ignore} (`string[]`, default: `{}`) List of file patterns
     80                   to ignore (for example: `'.git', '*.log'`)
     81                 • {rename} (`table`) Controls rename detection
     82 
     83 
     84 ==============================================================================
     85 Builtin plugin: editorconfig                                    *editorconfig*
     86 
     87 EditorConfig is like 'modeline' for an entire (recursive) directory. When a
     88 file is opened, after running |ftplugin|s and |FileType| autocommands, the
     89 EditorConfig feature searches all parent directories of that file for
     90 `.editorconfig` files, parses them, and applies their properties. For more
     91 information see https://editorconfig.org/.
     92 
     93 Example `.editorconfig` file: >ini
     94    root = true
     95 
     96    [*]
     97    charset = utf-8
     98    end_of_line = lf
     99    indent_size = 4
    100    indent_style = space
    101    max_line_length = 42
    102    trim_trailing_whitespace = true
    103 
    104    [*.{diff,md}]
    105    trim_trailing_whitespace = false
    106 <
    107 
    108                                               *g:editorconfig* *b:editorconfig*
    109 
    110 EditorConfig is enabled by default. To disable it, add to your config: >lua
    111    vim.g.editorconfig = false
    112 <
    113 
    114 (Vimscript: `let g:editorconfig = v:false`). It can also be disabled
    115 per-buffer by setting the |b:editorconfig| buffer-local variable to `false`.
    116 
    117 Nvim stores the applied properties in |b:editorconfig| if it is not `false`.
    118 
    119                                              *editorconfig-custom-properties*
    120 
    121 New properties can be added by adding a new entry to the "properties" table.
    122 The table key is a property name and the value is a callback function which
    123 accepts the number of the buffer to be modified, the value of the property in
    124 the `.editorconfig` file, and (optionally) a table containing all of the other
    125 properties and their values (useful for properties which depend on other
    126 properties). The value is always a string and must be coerced if necessary.
    127 Example: >lua
    128 
    129    require('editorconfig').properties.foo = function(bufnr, val, opts)
    130      if opts.charset and opts.charset ~= "utf-8" then
    131        error("foo can only be set when charset is utf-8", 0)
    132      end
    133      vim.b[bufnr].foo = val
    134    end
    135 <
    136 
    137                                                     *editorconfig-properties*
    138 
    139 The following properties are supported by default:
    140 
    141 
    142 charset                                                 *editorconfig.charset*
    143    One of `"utf-8"`, `"utf-8-bom"`, `"latin1"`, `"utf-16be"`, or
    144    `"utf-16le"`. Sets the 'fileencoding' and 'bomb' options.
    145 
    146 end_of_line                                         *editorconfig.end_of_line*
    147    One of `"lf"`, `"crlf"`, or `"cr"`. These correspond to setting
    148    'fileformat' to "unix", "dos", or "mac", respectively.
    149 
    150 indent_size                                         *editorconfig.indent_size*
    151    A number indicating the size of a single indent. Alternatively, use the
    152    value "tab" to use the value of the tab_width property. Sets the
    153    'shiftwidth' and 'softtabstop' options. If this value is not "tab" and the
    154    tab_width property is not set, 'tabstop' is also set to this value.
    155 
    156 indent_style                                       *editorconfig.indent_style*
    157    One of `"tab"` or `"space"`. Sets the 'expandtab' option.
    158 
    159 insert_final_newline                       *editorconfig.insert_final_newline*
    160    `"true"` or `"false"` to ensure the file always has a trailing newline as
    161    its last byte. Sets the 'fixendofline' and 'endofline' options.
    162 
    163 max_line_length                                 *editorconfig.max_line_length*
    164    A number indicating the maximum length of a single line. Sets the
    165    'textwidth' option.
    166 
    167 root                                                       *editorconfig.root*
    168    If "true", then stop searching for `.editorconfig` files in parent
    169    directories. This property must be at the top-level of the `.editorconfig`
    170    file (i.e. it must not be within a glob section).
    171 
    172 spelling_language                             *editorconfig.spelling_language*
    173    A code of the format ss or ss-TT, where ss is an ISO 639 language code and
    174    TT is an ISO 3166 territory identifier. Sets the 'spelllang' option.
    175 
    176 tab_width                                             *editorconfig.tab_width*
    177    The display size of a single tab character. Sets the 'tabstop' option.
    178 
    179 trim_trailing_whitespace               *editorconfig.trim_trailing_whitespace*
    180    When `"true"`, trailing whitespace is automatically removed when the
    181    buffer is written.
    182 
    183 
    184 ==============================================================================
    185 Builtin plugin: spellfile                                      *spellfile.lua*
    186 
    187 Asks the user to download missing spellfiles. The spellfile is written to
    188 `stdpath('data') .. 'site/spell'` or the first writable directory in the
    189 'runtimepath'.
    190 
    191 The plugin can be disabled by setting `g:loaded_spellfile_plugin = 1`.
    192 
    193 
    194 *nvim.spellfile.Opts*
    195    A table with the following fields:
    196 
    197    Fields: ~
    198      • {url}         (`string`) The base URL from where the spellfiles are
    199                      downloaded. Uses `g:spellfile_URL` if it's set,
    200                      otherwise https://ftp.nluug.nl/pub/vim/runtime/spell.
    201      • {timeout_ms}  (`integer`, default: 15000) Number of milliseconds after
    202                      which the |vim.net.request()| times out.
    203      • {confirm}     (`boolean`, default: `true`) Whether to ask user to
    204                      confirm download.
    205 
    206 
    207 config({opts})                                            *spellfile.config()*
    208    Configure spellfile download options. For example: >lua
    209        require('nvim.spellfile').config({ url = '...' })
    210 <
    211 
    212    Parameters: ~
    213      • {opts}  (`nvim.spellfile.Opts?`) When omitted or `nil`, retrieve the
    214                current configuration. Otherwise, a configuration table.
    215 
    216    Return: ~
    217        (`nvim.spellfile.Opts?`) Current config if {opts} is omitted.
    218 
    219 get({lang})                                                  *spellfile.get()*
    220    Download spellfiles for language {lang} if available.
    221 
    222    Parameters: ~
    223      • {lang}  (`string`) Language code.
    224 
    225    Return: ~
    226        (`table?`) A table with the following fields:
    227        • {files} (`string[]`)
    228        • {key} (`string`)
    229        • {lang} (`string`)
    230        • {encoding} (`string`)
    231        • {dir} (`string`)
    232 
    233 
    234 ==============================================================================
    235 Builtin plugin: tohtml                                                *tohtml*
    236 
    237 
    238 :[range]TOhtml {file}                                                *:TOhtml*
    239 Converts the buffer shown in the current window to HTML, opens the generated
    240 HTML in a new split window, and saves its contents to {file}. If {file} is not
    241 given, a temporary file (created by |tempname()|) is used.
    242 
    243 
    244 tohtml({winid}, {opt})                                       *tohtml.tohtml()*
    245    Converts the buffer shown in the window {winid} to HTML and returns the
    246    output as a list of string.
    247 
    248    Parameters: ~
    249      • {winid}  (`integer?`) Window to convert (defaults to current window)
    250      • {opt}    (`table?`) Optional parameters.
    251                 • {title}? (`string|false`, default: buffer name) Title tag
    252                   to set in the generated HTML code.
    253                 • {number_lines}? (`boolean`, default: `false`) Show line
    254                   numbers.
    255                 • {font}? (`string[]|string`, default: `guifont`) Fonts to
    256                   use.
    257                 • {width}? (`integer`, default: 'textwidth' if non-zero or
    258                   window width otherwise) Width used for items which are
    259                   either right aligned or repeat a character infinitely.
    260                 • {range}? (`integer[]`, default: entire buffer) Range of
    261                   rows to use.
    262 
    263    Return: ~
    264        (`string[]`)
    265 
    266 
    267 ==============================================================================
    268 Builtin plugin: undotree                                     *undotree-plugin*
    269 
    270 open({opts})                                                 *undotree.open()*
    271    Open a window that displays a textual representation of the |undo-tree|.
    272 
    273    While in the window, moving the cursor changes the undo.
    274 
    275    Closes the window if it is already open
    276 
    277    Load the plugin with this command: >
    278                packadd nvim.undotree
    279 <
    280 
    281    Can also be shown with `:Undotree`.                            *:Undotree*
    282 
    283    Parameters: ~
    284      • {opts}  (`table?`) A table with the following fields:
    285                • {bufnr} (`integer?`) Buffer to draw the tree into. If
    286                  omitted, a new buffer is created.
    287                • {winid} (`integer?`) Window id to display the tree buffer
    288                  in. If omitted, a new window is created with {command}.
    289                • {command} (`string?`) Vimscript command to create the
    290                  window. Default value is "30vnew". Only used when {winid} is
    291                  nil.
    292                • {title} (`(string|fun(bufnr:integer):string?)?`) Title of
    293                  the window. If a function, it accepts the buffer number of
    294                  the source buffer as its only argument and should return a
    295                  string.
    296 
    297    Return: ~
    298        (`boolean?`) Returns true if the window was already open, nil
    299        otherwise
    300 
    301 
    302 vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl: