@@ -11,8 +11,9 @@ nvim-lspconfig is a collection of community-contributed configurations for the
11
11
Nvim LSP client. See | lspconfig-all | for the complete list of provided
12
12
configurations.
13
13
14
- Note: nvim-lspconfig is just a convenience layer, it is NOT required for Nvim
15
- | LSP | support. See | lsp-quickstart | to setup LSP without nvim-lspconfig.
14
+ Note: nvim-lspconfig is just a collection of configs. It has no API or
15
+ "framework". It is not required for Nvim | LSP | support. See | lsp-quickstart |
16
+ to setup LSP without nvim-lspconfig.
16
17
17
18
==============================================================================
18
19
QUICKSTART *lspconfig-quickstart*
@@ -32,10 +33,10 @@ See also |lsp-quickstart|.
32
33
==============================================================================
33
34
USAGE *lspconfig-usage*
34
35
35
- nvim-lspconfig is of a collection of language server configurations. Each
36
- configuration provides defaults for | vim.lsp.config() | which you can use as-is
36
+ Each config provides defaults for | vim.lsp.config() | which you can use as-is
37
37
(by calling `vim .lsp .enable (…)` ) or override (by calling | vim.lsp.config() |
38
- before enable()).
38
+ before enable()). This "composability" is a central feature of vim.lsp.config,
39
+ which allows nvim-lspconfig to just provide the config "defaults".
39
40
40
41
To activate a config, call | vim.lsp.enable() | . Each config in | lspconfig-all |
41
42
is available as `vim .lsp .config (' <name>' )` and `vim .lsp .enable (' <name>' )` . For
@@ -55,19 +56,26 @@ without activating it: >lua
55
56
vim.print(vim.lsp.config['clangd' ])
56
57
<
57
58
*lspconfig-vs-vim.lsp.config*
58
- Note the these current differences/limitations of | vim.lsp.config() | compared
59
- to the legacy nvim-lspconfig interface:
59
+ Note these differences of | vim.lsp.config() | compared to the legacy
60
+ nvim-lspconfig interface:
60
61
61
62
- `single_file_support` is assumed by default. Can be disabled by specifying
62
63
`workspace_required= false` (see | vim.lsp.ClientConfig | ).
63
-
64
64
- `on_new_config` is currently missing, see https://github.com/neovim/neovim/issues/32287
65
- Function executed after a root directory is detected. Used to modify the
66
- server configuration (including `cmd` itself).
65
+ - However, defining `root_dir` as a function is very flexible and may fit
66
+ your use-case instead. https://github.com/neovim/neovim/issues/32037#issuecomment-2825599872
67
67
68
68
==============================================================================
69
69
COMMANDS *lspconfig-commands*
70
70
71
+ Any server-specific commands provided by a config are buffer-local and
72
+ prefixed with "Lsp". Thus you can see available commands (from a LSP-enabled
73
+ buffer) by typing: >vim
74
+
75
+ :Lsp<tab>
76
+
77
+ The following _global_ commands are provided by nvim-lspconfig:
78
+
71
79
:LspInfo *:LspInfo*
72
80
Alias to `:checkhealth vim.lsp`. Shows the status of active LSP clients and
73
81
servers.
@@ -95,15 +103,16 @@ See |lspconfig-all| for the list of provided LSP configurations.
95
103
If a server is missing, you can define one easily via | vim.lsp.config() |
96
104
(requires Nvim 0.11+), see | lsp-config | .
97
105
98
- ==============================================================================
99
- COMPLETION SUPPORT *lspconfig-completion *
106
+ ------------------------------------------------------------------------------
107
+ NEW CONFIGS *lspconfig-new *
100
108
101
- See | lsp-completion | .
109
+ To create a new config, see | lsp-config | (requires Nvim 0.11+).
110
+ To contribute a config to nvim-lspconfig, see ../CONTRIBUTING.md.
102
111
103
112
==============================================================================
104
- ADDING NEW SERVERS *lspconfig-new *
113
+ COMPLETION SUPPORT *lspconfig-completion *
105
114
106
- See ../CONTRIBUTING.md or | lsp-config | (requires Nvim 0.11+) .
115
+ See | lsp-completion | .
107
116
108
117
==============================================================================
109
118
DEBUGGING AND TROUBLESHOOTING *lspconfig-debugging*
0 commit comments