robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

master
27.7 KiB631 linesraw
1*pack.txt*                            Nvim
2
3                            NVIM REFERENCE MANUAL
4
5                                Extending Nvim
6
7
8                                       Type |gO| to see the table of contents.
9
10==============================================================================
11Using Vim packages                                      *packages*
12
13A Vim "package" is a directory that contains |plugin|s.  Compared to normal
14plugins, a package can...
15- be downloaded as an archive and unpacked in its own directory, so the files
16  are not mixed with files of other plugins.
17- be a git, mercurial, etc. repository, thus easy to update.
18- contain multiple plugins that depend on each other.
19- contain plugins that are automatically loaded on startup ("start" packages,
20  located in "pack/*/start/*") and ones that are only loaded when needed with
21  |:packadd| ("opt" packages, located in "pack/*/opt/*").
22
23                                                        *runtime-search-path*
24Nvim searches for |:runtime| files in:
25- 1. all paths in 'runtimepath'
26- 2. all "pack/*/start/*" dirs
27
28Note that the "pack/*/start/*" paths are not explicitly included in
29'runtimepath', so they will not be reported by ":set rtp" or "echo &rtp".
30Scripts can use |nvim_list_runtime_paths()| to list all used directories, and
31|nvim_get_runtime_file()| to query for specific files or sub-folders within
32the runtime path. Example: >
33    " List all runtime dirs and packages with Lua paths.
34    :echo nvim_get_runtime_file("lua/", v:true)
35
36Using a package and loading automatically ~
37
38Let's assume your Nvim files are in "~/.local/share/nvim/site" and you want to
39add a package from a zip archive "/tmp/foopack.zip": >
40    % mkdir -p ~/.local/share/nvim/site/pack/foo
41    % cd ~/.local/share/nvim/site/pack/foo
42    % unzip /tmp/foopack.zip
43
44The directory name "foo" is arbitrary, you can pick anything you like.
45
46You would now have these files under ~/.local/share/nvim/site: >
47    pack/foo/README.txt
48    pack/foo/start/foobar/plugin/foo.vim
49    pack/foo/start/foobar/syntax/some.vim
50    pack/foo/opt/foodebug/plugin/debugger.vim
51
52On startup after processing your |config|, Nvim scans all directories in
53'packpath' for plugins in "pack/*/start/*", then loads the plugins.
54
55To allow for calling into package functionality while parsing your |vimrc|,
56|:colorscheme| and |autoload| will both automatically search under 'packpath'
57as well in addition to 'runtimepath'.  See the documentation for each for
58details.
59
60In the example Nvim will find "pack/foo/start/foobar/plugin/foo.vim" and load
61it.
62
63If the "foobar" plugin kicks in and sets the 'filetype' to "some", Nvim will
64find the syntax/some.vim file, because its directory is in the runtime search
65path.
66
67Nvim will also load ftdetect files, if there are any.
68
69Note that the files under "pack/foo/opt" are not loaded automatically, only
70the ones under "pack/foo/start".  See |pack-add| below for how the "opt"
71directory is used.
72
73Loading packages automatically will not happen if loading plugins is disabled,
74see |load-plugins|.
75
76To load packages earlier, so that plugin/ files are sourced:
77    :packloadall
78This also works when loading plugins is disabled.  The automatic loading will
79only happen once.
80
81If the package has an "after" directory, that directory is added to the end of
82'runtimepath', so that anything there will be loaded later.
83
84
85Using a single plugin and loading it automatically ~
86
87If you don't have a package but a single plugin, you need to create the extra
88directory level: >
89    % mkdir -p ~/.local/share/nvim/site/pack/foo/start/foobar
90    % cd ~/.local/share/nvim/site/pack/foo/start/foobar
91    % unzip /tmp/someplugin.zip
92
93You would now have these files: >
94    pack/foo/start/foobar/plugin/foo.vim
95    pack/foo/start/foobar/syntax/some.vim
96
97From here it works like above.
98
99
100Optional plugins ~
101                                                        *pack-add*
102To load an optional plugin from a pack use the `:packadd` command: >
103    :packadd foodebug
104This searches for "pack/*/opt/foodebug" in 'packpath' and will find
105~/.local/share/nvim/site/pack/foo/opt/foodebug/plugin/debugger.vim and source
106it.
107
108This could be done if some conditions are met.  For example, depending on
109whether Nvim supports a feature or a dependency is missing.
110
111You can also load an optional plugin at startup, by putting this command in
112your |config|: >
113    :packadd! foodebug
114The extra "!" is so that the plugin isn't loaded if Nvim was started with
115|--noplugin|.
116
117It is perfectly normal for a package to only have files in the "opt"
118directory.  You then need to load each plugin when you want to use it.
119
120
121Where to put what ~
122
123Since color schemes, loaded with `:colorscheme`, are found below
124"pack/*/start" and "pack/*/opt", you could put them anywhere.  We recommend
125you put them below "pack/*/opt", for example
126"~/.config/nvim/pack/mycolors/opt/dark/colors/very_dark.vim".
127
128Filetype plugins should go under "pack/*/start", so that they are always
129found.  Unless you have more than one plugin for a file type and want to
130select which one to load with `:packadd`.  E.g. depending on the compiler
131version: >
132    if foo_compiler_version > 34
133      packadd foo_new
134    else
135      packadd foo_old
136    endif
137
138The "after" directory is most likely not useful in a package.  It's not
139disallowed though.
140
141==============================================================================
142Creating Vim packages                                   *package-create*
143
144This assumes you write one or more plugins that you distribute as a package.
145
146If you have two unrelated plugins you would use two packages, so that Vim
147users can choose what they include or not.  Or you can decide to use one
148package with optional plugins, and tell the user to add the preferred ones
149with `:packadd`.
150
151Decide how you want to distribute the package.  You can create an archive or
152you could use a repository.  An archive can be used by more users, but is a
153bit harder to update to a new version.  A repository can usually be kept
154up-to-date easily, but it requires a program like "git" to be available.
155You can do both, github can automatically create an archive for a release.
156
157Your directory layout would be like this: >
158   start/foobar/plugin/foo.vim          " always loaded, defines commands
159   start/foobar/plugin/bar.vim          " always loaded, defines commands
160   start/foobar/autoload/foo.vim        " loaded when foo command used
161   start/foobar/doc/foo.txt             " help for foo.vim
162   start/foobar/doc/tags                " help tags
163   opt/fooextra/plugin/extra.vim        " optional plugin, defines commands
164   opt/fooextra/autoload/extra.vim      " loaded when extra command used
165   opt/fooextra/doc/extra.txt           " help for extra.vim
166   opt/fooextra/doc/tags                " help tags
167<
168This allows for the user to do: >
169    mkdir ~/.local/share/nvim/site/pack
170    cd ~/.local/share/nvim/site/pack
171    git clone https://github.com/you/foobar.git myfoobar
172
173Here "myfoobar" is a name that the user can choose, the only condition is that
174it differs from other packages.
175
176In your documentation you explain what the plugins do, and tell the user how
177to load the optional plugin: >
178    :packadd! fooextra
179
180You could add this packadd command in one of your plugins, to be executed when
181the optional plugin is needed.
182
183Run the `:helptags` command to generate the doc/tags file.  Including this
184generated file in the package means that the user can drop the package in the
185pack directory and the help command works right away.  Don't forget to re-run
186the command after changing the plugin help: >
187    :helptags path/start/foobar/doc
188    :helptags path/opt/fooextra/doc
189
190
191Dependencies between plugins ~
192                                                        *packload-two-steps*
193Suppose you have two plugins that depend on the same functionality.  You can
194put the common functionality in an autoload directory, so that it will be
195found automatically.  Your package would have these files:
196
197pack/foo/start/one/plugin/one.vim  >
198    call foolib#getit()
199pack/foo/start/two/plugin/two.vim >
200    call foolib#getit()
201pack/foo/start/lib/autoload/foolib.vim >
202    func foolib#getit()
203
204This works, because start packages will be searched for autoload files, when
205sourcing the plugins.
206
207==============================================================================
208Plugin manager                                                      *vim.pack*
209
210Install, update, and delete external plugins. WARNING: It is still considered
211experimental, yet should be stable enough for daily use.
212
213Manages plugins only in a dedicated *vim.pack-directory* (see |packages|):
214`site/pack/core/opt` subdirectory of "data" |standard-path|. Subdirectory
215`site` of "data" standard path needs to be part of 'packpath'. It usually is,
216but might not be in cases like |--clean| or setting |$XDG_DATA_HOME| during
217startup. Plugin's subdirectory name matches plugin's name in specification. It
218is assumed that all plugins in the directory are managed exclusively by
219`vim.pack`.
220
221Uses Git to manage plugins and requires present `git` executable. Target
222plugins should be Git repositories with versions as named tags following
223semver convention `v<major>.<minor>.<patch>` (with or without `v` prefix).
224Like `v1.2.0` or `1.2.0`, but not `1.2` or `v1`.
225
226The latest state of all managed plugins is stored inside a *vim.pack-lockfile*
227located at |'packlockfile'|. It is a JSON file that is used to persistently
228track data about plugins. For a more robust config treat lockfile like its
229part: put under version control, etc. In this case all plugins from the
230lockfile will be installed at once (in alphabetical order) and at lockfile's
231revision (instead of inferring from `version`). This is done on the very first
232`vim.pack` function call to ensure that lockfile is aligned with what is
233actually on the disk. Lockfile should not be edited by hand. Corrupted data
234for installed plugins is repaired (including after deleting whole file), but
235`version` fields will be missing for not yet added plugins.
236
237                                                           *vim.pack-examples*
238
239Basic install and management ~
240• Add |vim.pack.add()| call(s) to 'init.lua': >lua
241
242    vim.pack.add({
243      -- Install "plugin1" and use default branch (usually `main` or `master`)
244      'https://github.com/user/plugin1',
245
246      -- Same as above, but using a table (allows setting other options)
247      { src = 'https://github.com/user/plugin1' },
248
249      -- Specify plugin's name (here the plugin will be called "plugin2"
250      -- instead of "generic-name")
251      { src = 'https://github.com/user/generic-name', name = 'plugin2' },
252
253      -- Specify version to follow during install and update
254      {
255        src = 'https://github.com/user/plugin3',
256        -- Version constraint, see |vim.version.range()|
257        version = vim.version.range('1.0'),
258      },
259      {
260        src = 'https://github.com/user/plugin4',
261        -- Git branch, tag, or commit hash
262        version = 'main',
263      },
264    })
265
266    -- Plugin's code can be used directly after `add()`
267    plugin1 = require('plugin1')
268<
269• Restart Nvim (for example, with |:restart|). Plugins that were not yet
270  installed will be available on disk after `add()` call. Their revision is
271  taken from |vim.pack-lockfile| (if present) or inferred from the `version`.
272• To update all plugins with new changes:
273  • Execute |:packupdate|. This will download updates from source and show
274    confirmation buffer in a separate tabpage.
275  • Review changes. To confirm all updates execute |:write|. To discard
276    updates execute |:quit|.
277  • (Optionally) |:restart| to start using code from updated plugins.
278
279Use shorter source ~
280
281Create custom Lua helpers: >lua
282
283    local gh = function(x) return 'https://github.com/' .. x end
284    local cb = function(x) return 'https://codeberg.org/' .. x end
285    vim.pack.add({ gh('user/plugin1'), cb('user/plugin2') })
286<
287
288Another approach is to utilize Git's `insteadOf` configuration:
289• `git config --global url."https://github.com/".insteadOf "gh:"`
290• `git config --global url."https://codeberg.org/".insteadOf "cb:"`
291• In 'init.lua': `vim.pack.add({ 'gh:user/plugin1', 'cb:user/plugin2' })`.
292  These sources will be used verbatim in |vim.pack-lockfile|, so reusing the
293  config on different machine will require the same Git configuration.
294
295Explore installed plugins ~
296• `:packupdate ++offline`
297• Navigate between plugins with `[[` and `]]`. List them with `gO`
298  (|vim.lsp.buf.document_symbol()|).
299
300Switch plugin's version and/or source ~
301• Update 'init.lua' for plugin to have desired `version` and/or `src`. Let's
302  say, the switch is for plugin named 'plugin1'.
303• |:restart|. The plugin's state on disk (revision and/or tracked source) is
304  not yet changed. Only plugin's `version` in |vim.pack-lockfile| is updated.
305• Execute `:packupdate plugin1`. The plugin's source is updated. If only
306  switching version, also pass the `++offline` argument.
307• Review changes and either confirm or discard them. If discarded, revert
308  `version` change in 'init.lua' as well or you will be prompted again next
309  time you run `:packupdate`.
310
311Freeze plugin from being updated ~
312• Update 'init.lua' for plugin to have `version` set to current revision. Get
313  it from |vim.pack-lockfile| (plugin's field `rev`; looks like `abc12345`).
314• |:restart|.
315
316Unfreeze plugin to start receiving updates ~
317• Update 'init.lua' for plugin to have `version` set to whichever version you
318  want it to be updated.
319• |:restart|.
320
321Revert plugin after an update ~
322• Revert the |vim.pack-lockfile| to the state before the update:
323  • If Git tracked: `git checkout HEAD -- nvim-pack-lock.json`
324  • If not tracked: examine log file ("nvim-pack.log" at "log"
325    |standard-path|), locate the revisions before the latest update, and
326    (carefully) adjust current lockfile to have those revisions.
327• |:restart|.
328• `:packupdate ++offline ++lockfile plugin`. Read and confirm.
329
330Synchronize config across machines ~
331• On main machine:
332  • Add |vim.pack-lockfile| to VCS.
333  • Push to the remote server.
334• On secondary machine:
335  • Pull from the server.
336  • |:restart|. New plugins (not present locally, but present in the lockfile)
337    are installed at proper revision. If some installation has failed but you
338    know it should not (like due to bad Internet connection), revert
339    |vim.pack-lockfile| and |:restart| again.
340  • `:packupdate ++lockfile`. Read and confirm.
341  • Manually delete outdated plugins (present locally, but were not present in
342    the lockfile prior to restart) with `:packdel plugin`. They can be located
343    by examining the VCS difference of the lockfile
344    (`git diff -- nvim-pack-lock.json` for Git).
345
346Remove plugins from disk ~
347• Remove plugin specs from |vim.pack.add()| calls in 'init.lua' or they will
348  be reinstalled later.
349• |:restart|.
350• Use |:packdel| with plugin names to remove. Use `:packdel ++all` to delete
351  all inactive plugins.
352
353Check for pending updates ~
354• Run `vim.pack.get(nil, { offline = false })` and check the output for items
355  with different `rev` and `rev_to` fields. To not download new updates from
356  source, use plain `vim.pack.get()`.
357
358Check for issues ~
359• Run `:checkhealth vim.pack` and follow recommendations in case of detected
360  issues.
361
362Commands                                             *vim.pack-commands* *E5807*
363
364                                                    *:packu* *:packupdate* *E5808*
365:packu[pdate][!] [++offline] [++lockfile] [name]
366
367    Interactively update the specified plugins. Skips confirmation when `!` is
368    given. If no plugin names are provided, update all plugins.
369
370    When `++offline` is given, skip downloading new updates.
371
372    When `++lockfile` is given, use revisions from the lockfile.
373
374                                           *:packd* *:packdel* *E5809* *E5810* *E5811*
375:packd[el][!] {name}
376
377    Remove the specified plugins. Can only remove inactive plugins unless `!`
378    is given.
379
380:packd[el][!] ++all
381
382    Remove all inactive plugins. When `!` is given, instead remove all plugins.
383
384                                                             *vim.pack-events*
385
386Performing actions via `vim.pack` functions can trigger these events:
387• *PackChangedPre* - before trying to change plugin's state.
388• *PackChanged* - after plugin's state has changed.
389
390Events are triggered in bulk respecting order of plugins in which they are
391supplied. First all `PackChangedPre`, then perform all actions, and only after
392- all `PackChanged` for successful actions. This provides more control for
393connected plugins, like by specifying dependencies before the plugin itself.
394
395The |event-data| has these keys (type: `vim.event.packchanged.data`):
396• `active` - whether plugin was added via |vim.pack.add()| to current session.
397• `kind` - one of "install" (install on disk; before loading), "update"
398  (update already installed plugin; might be not loaded), "delete" (delete
399  from disk).
400• `spec` - plugin's specification with defaults made explicit.
401• `path` - full path to plugin's directory.
402
403These events can be used to execute plugin hooks. For example: >lua
404    local hooks = function(ev)
405      -- Use available |event-data|
406      local name, kind = ev.data.spec.name, ev.data.kind
407
408      -- Run build script after plugin's code has changed
409      if name == 'plug-1' and (kind == 'install' or kind == 'update') then
410        -- Append `:wait()` if you need synchronous execution
411        vim.system({ 'make' }, { cwd = ev.data.path })
412      end
413
414      -- If action relies on code from the plugin (like user command or
415      -- Lua code), make sure to explicitly load it first
416      if name == 'plug-2' and kind == 'update' then
417        if not ev.data.active then
418          vim.cmd.packadd('plug-2')
419        end
420        vim.cmd('PlugTwoUpdate')
421        require('plug2').after_update()
422      end
423    end
424
425    -- If hooks need to run on install, run this before `vim.pack.add()`
426    -- To act on install from lockfile, run before very first `vim.pack.add()`
427    vim.api.nvim_create_autocmd('PackChanged', { callback = hooks })
428<
429
430                                                           *vim.pack-manifest*
431
432Plugins can come with a special top level `pkg.json` manifest file with extra
433information. If present, `vim.pack` uses it for improved user experience:
434• Apply |:source| for scripts after triggering corresponding
435  |vim.pack-events|. This allows plugins to define hooks that will be executed
436  during plugin's lifetime. Sourcing is done with special context:
437  • The |current-directory| is temporarily set to plugin's root (to make it
438    easier to run |vim.system()| commands).
439  • Plugin's path is temporarily ensured to be inside |'runtimepath'| (so
440    script can use |require()| with plugin's module, possibly with explicit
441    |package.loaded| reset inside `"update"` scripts).
442• Running |:checkhealth| for `vim.pack` will perform extra checks to ensure
443  healthy plugin installation.
444
445Full specification see at https://packspec.org/. See also |vim.pack.Manifest|.
446A simple example: >json
447    {
448     "name": "best-plugin.nvim",
449     "description": "The best plugin for Neovim",
450     "engines": {
451         "nvim": ">=0.13.0",
452         "vim": ">=9.1.0"
453     },
454     "scripts": {
455       "install": "scripts/install.lua",
456       "preupdate": "scripts/preupdate.vim",
457       "update": "scripts/update.vim",
458       "preuninstall": "scripts/preuninstall.lua"
459     }
460    }
461<
462
463
464*vim.pack.Manifest*
465
466    Fields: ~
467      • {description}?  (`string`) Plugin description
468      • {engines}?      (`table`) Supported engine versions. Values should be
469                        |vim.version.range()| compatible specs.
470                        • {nvim}? (`string`) Version range for Nvim.
471                        • {vim}? (`string`) Version range for Vim.
472      • {name}?         (`string`) Plugin name
473      • {scripts}?      (`table`) Script locations (relative to plugin's root)
474                        to |:source| after triggering corresponding
475                        |vim.pack-events|.
476                        • {install}? (`string`) Post install script.
477                        • {preuninstall}? (`string`) Pre delete script.
478                        • {preupdate}? (`string`) Pre update script.
479                        • {update}? (`string`) Post update script.
480
481*vim.pack.Spec*
482
483    Fields: ~
484      • {data}?     (`any`) Arbitrary data associated with a plugin.
485      • {name}?     (`string`) Name of plugin. Will be used as directory name.
486                    Default: `src` repository name.
487      • {src}       (`string`) URI from which to install and pull updates. Any
488                    format supported by `git clone` is allowed.
489      • {version}?  (`string|vim.VersionRange`) Version to use for install and
490                    updates. Can be:
491                    • `nil` (no value, default) to use repository's default
492                      branch (usually `main` or `master`).
493                    • String to use specific branch, tag, or commit hash.
494                    • Output of |vim.version.range()| to install the
495                      greatest/last semver tag inside the version constraint.
496
497
498add({specs}, {opts})                                          *vim.pack.add()*
499    Add plugin to current session
500    • For each specification check that plugin exists on disk in
501      |vim.pack-directory|:
502      • If exists, check if its `src` is the same as input. If not - delete
503        immediately to clean install from the new source. Otherwise do
504        nothing.
505      • If doesn't exist, install it by downloading from `src` into `name`
506        subdirectory (via partial blobless `git clone`) and update revision to
507        match `version` (via `git checkout`). Plugin will not be on disk if
508        any step resulted in an error.
509    • For each plugin execute |:packadd| (or customizable `load` function)
510      making it reachable by Nvim.
511
512    Notes:
513    • Installation is done in parallel, but waits for all to finish before
514      continuing next code execution.
515    • If plugin is already present on disk, there are no checks about its
516      current revision. The specified `version` can be not the one actually
517      present on disk. Execute |vim.pack.update()| to synchronize.
518    • Adding plugin second and more times during single session does nothing:
519      only the data from the first adding is registered.
520
521    Parameters: ~
522      • {specs}  (`(string|vim.pack.Spec)[]`) List of plugin specifications.
523                 String item is treated as `src`.
524      • {opts}   (`table?`) A table with the following fields:
525                 • {confirm}? (`boolean`) Whether to ask user to confirm
526                   initial install. Default `true`.
527                 • {load}?
528                   (`boolean|fun(plug_data: {spec: vim.pack.Spec, path: string})`)
529                   Load `plugin/` files and `ftdetect/` scripts. If `false`,
530                   works like `:packadd!`. If function, called with plugin
531                   data and is fully responsible for loading plugin. Default
532                   `false` during |init.lua| sourcing and `true` afterwards.
533
534del({names}, {opts})                                          *vim.pack.del()*
535    Remove plugins from disk
536
537    Parameters: ~
538      • {names}  (`string[]`) List of plugin names to remove from disk. Must
539                 be managed by |vim.pack|, not necessarily already added to
540                 current session.
541      • {opts}   (`table?`) A table with the following fields:
542                 • {force}? (`boolean`) Whether to allow deleting an active
543                   plugin. Default `false`.
544
545get({names}, {opts})                                          *vim.pack.get()*
546    Gets |vim.pack| plugin info, optionally filtered by `names`.
547
548    Parameters: ~
549      • {names}  (`string[]?`) List of plugin names. Default: all plugins
550                 managed by |vim.pack|.
551      • {opts}   (`table?`) A table with the following fields:
552                 • {info}? (`boolean`) Whether to include extra plugin info.
553                   Default `true`.
554                 • {offline}? (`boolean`) Whether to skip downloading new
555                   updates. Requires `info=true`. Default: `true`.
556
557    Return: ~
558        (`table[]`) A list of objects with the following fields:
559        • {active} (`boolean`) Whether plugin was added via |vim.pack.add()|
560          to current session.
561        • {branches}? (`string[]`) Available Git branches (first is default).
562          Missing if `info=false`.
563        • {manifest}? (`vim.pack.Manifest`) Data from the |vim.pack-manifest|.
564          Empty in case of reading error. Missing if `info=false`.
565        • {path} (`string`) Plugin's path on disk.
566        • {rev} (`string`) Current Git revision. Taken from
567          |vim.pack-lockfile| if `info=false`.
568        • {rev_to}? (`string`) Git revision of a pending update. The same as
569          used during |vim.pack.update()| and which points to a resolved
570          `spec.version`. Missing if `info=false`.
571        • {spec} (`vim.pack.SpecResolved`) A |vim.pack.Spec| with resolved
572          `name`.
573        • {tags}? (`string[]`) Available Git tags. Missing if `info=false`.
574
575update({names}, {opts})                                    *vim.pack.update()*
576    Update plugins
577    • Download new changes from source.
578    • Infer update info (current/target revisions, changelog, etc.).
579    • If `force` is `false` (default), show confirmation buffer. If `force` is
580      `true`, make updates right away.
581
582    Notes:
583    • Every actual update is logged in "nvim-pack.log" file inside "log"
584      |standard-path|.
585    • It doesn't update source's default branch if it has changed (like from
586      `master` to `main`). To have `version = nil` point to a new default
587      branch, re-install the plugin (|vim.pack.del()| + |vim.pack.add()|).
588
589    Confirmation buffer ~
590
591    The goal of the confirmation buffer is to show update details for the user
592    to read, confirm (execute |:write|) or deny (execute |:quit|) the update.
593
594    Pending changes starting with `>` will be applied while the ones starting
595    with `<` will be reverted.
596
597    There are convenience buffer-local mappings:
598    • |]]| and |[[| to navigate through plugin sections.
599
600    Some features are provided via LSP:
601    • 'textDocument/documentLink' - compute links for plugin paths, sources,
602      commits, and tags. Makes a best effort educated guess about a link
603      structure. Use |gx| to open a link to an object at cursor.
604    • 'textDocument/documentSymbol' (`gO` via |lsp-defaults| or
605      |vim.lsp.buf.document_symbol()|) - show structure of the buffer.
606    • 'textDocument/hover' (`K` via |lsp-defaults| or |vim.lsp.buf.hover()|) -
607      show more information at cursor. Like details of particular pending
608      change or newer tag.
609    • 'textDocument/codeAction' (`gra` via |lsp-defaults| or
610      |vim.lsp.buf.code_action()|) - show code actions relevant for "plugin at
611      cursor". Like "delete" (after extra confirmation for active plugins),
612      "update" or "skip updating" (if there are pending updates).
613
614    Parameters: ~
615      • {names}  (`string[]?`) List of plugin names to update. Must be managed
616                 by |vim.pack|, not necessarily already added to current
617                 session. Default: names of all plugins managed by |vim.pack|.
618      • {opts}   (`table?`) A table with the following fields:
619                 • {force}? (`boolean`) Whether to skip confirmation and make
620                   updates immediately. Default `false`.
621                 • {offline}? (`boolean`) Whether to skip downloading new
622                   updates. Default: `false`.
623                 • {target}? (`string`) How to compute a new plugin revision.
624                   One of:
625                   • "version" (default): use latest revision matching
626                     `version` from plugin specification.
627                   • "lockfile": use revision from the lockfile. For reverting
628                     or performing controlled update.
629
630
631 vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl: