| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactor: remove single_clients and improve clients reuse
* fix: remove unused param
* chore: correct check
* fix: improve
* fix: remove debug print
* fix: add comment
* chore: don't insert workspace when single file mode
* chore: add comment
|
| |
|
|
|
|
|
| |
* fix: send the lsp method request after insert workspace folders
* fix: use client do rpc request
* fix: check client support workspace
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: support multiple workspaceFolders and show correct root in Lspinfo
* fix: add return branch
* fix: convert path before compare
* fix: improve find root dir in LspInfo
* fix: check logic
* fix: remove unnecessary code
|
| | |
|
| |
|
|
|
| |
* fix: add the new root to workspaceFolders
* fix: add the new root to workspaceFolders
|
| |
|
|
|
|
|
|
|
|
|
| |
* feat: support unnamed buffer with single_file_support
* fix: make some code simple clear
* feat: update doc
* fix: grammar
* fix: grammar
|
| | |
|
| | |
|
| |
|
| |
This reverts commit 99e0dc9937b124dee7d8107185e804ff96466279.
|
| |
|
|
|
|
|
|
|
| |
* fix: remove the config.commands
* fix: format by stylua and remove comamnds test
* fix: remove commands from doc
* fix: remove unused function
|
| |
|
|
|
|
|
|
|
|
|
| |
* switch to lua api for autocommands
* switch to nvim_create_user_command
* move to lua plugin initialization
NOTICE: Defining commands in server configurations will be deprecated in
future releases.
See `:help lspconfig.txt` to setup the same in an `on_attach` function.
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The no-argument versions of `:LspStop` and `:LspRestart` currently only apply to
buffers that have a valid root directory. It seems that these commands should stop/restart
all clients, including those associated with standalone files.
Closes #1784
|
| |
|
|
| |
module import
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capabilities #1889
Previously, vim.lsp.protocol.make_client_capabilities() was used if no
capabilities were specified in either the user-provided config or the
default config (base or server).
Now, the base default config table has a capabilities key with the value
of make_client_capabilities(). When creating the finalized configuration
for a server, it simply uses the finalized config which is the
user-provided config deep extended by the default config (which now
contains the default capabilities).
This means that users will no longer have to create their own customized
capabilities tables seeded from
vim.lsp.protocol.make_client_capabilities(). They simply need to create
the parts that are new or different from the defaults and pass that as
the capabilities. The rest of the defaults are filled in automatically.
For this to work properly, some tbl_extend calls were changed to
tbl_deep_extend. tbl_extend will not recursively update nested tables,
so using it wipes out any server provided defaults in nested config keys
(such as capabilities) and won't properly fill in the "rest" of the
capabilities if the user provided a smaller capabilities key in their
config.
Changing to tbl_deep_extend ensures server-specific configuration values
are preserved and that the finalized config at least contains defaults
for all client-supported capabilities.
For example, clangd's config default has:
```
local default_capabilities = {
textDocument = {
completion = {
editsNearCursor = true,
},
},
offsetEncoding = { 'utf-8', 'utf-16' },
}
```
Prior to this commit, this was the full
vim.lsp.protocol.make_client_capabilities() extended with those extra
values. However, if a user provided their _own_ capabilities to the
setup() function, tbl_extend wiped these extra values out and replaced
it with the users' capabilities, which was likely only
vim.lsp.protocol.make_client_capabilities() with some _other_ tweaks.
Now, clangd can simply provide the extras, and the setup() function will
normalize the config with all of user-provided, server-specific, and
base default capabilities.
|
| |
|
|
|
|
|
|
|
| |
See https://github.com/lunarmodules/luacheck/releases/tag/v0.26.0
lua/lspconfig/util.lua:225:40: used variable _make_config
lua/lspconfig/configs.lua:207:63: used variable _root_dir
lua/lspconfig/configs.lua:260:19: 'not (x == y)' can be replaced by
'x ~= y' (if neither side is a table or NaN)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This bug was introduced in #1324.
When calling `:LspStop <args>`, the current code tries to match a string
with the format "123 (blablabla)", which will result in terminating the
server with ID 123. This is fine when using autocompletion, but if doing
this programmatically (or just following the docs) something like
`:LspStop 1` will not match anything, resulting in terminating *all*
managed servers.
This should be enough to fix the bug, allow terminating multiple servers
at once and keeping the nice UX provided by the autocompletion.
|
| |
|
|
| |
* Check that a bufname begins with a filesystem root specifier such as a drive letter (Windows) or "/" (Unix)
* Unify with check that buf name is not "" or nil
|
| |
|
|
| |
* Escape paths used to autocommands
* Always normalize windows path to forward slash for internal use
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Use client.request directly instead of vim.lsp.buf_request to call methods
that are outside the official LSP specification, such as clangd's
"textDocument/switchSourceHeader".
* This avoids sending an inapplicable request to all servers, as we cannot
ahead of time validate the methods a given server supports.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
pass `cmd_cwd` instead of `cwd` in `config` to start_client
|
| |
|
|
|
|
| |
* start_client handles checking if the server is executable, it is
redundant to check this in lspconfig
* vim.fn.executable does not respect cmd_env, which can allow injecting
servers via a local PATH override
|
| | |
|
| |
|
|
|
| |
* find_git_ancestor previously only checked for `.git ` directories
* git worktrees use a `.git` file with reference to the original git
directory
|
| | |
|
| |
|
| |
* point at server_configurations.md instead of CONFIG.md
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* This adds a "single file mode" option for each language server
* Currently, if a root is not detected, a new language server is started
for each file opened.
* Root directory is set to `nil` in start_client. Some servers will
refuse to start, or otherwise panic. This is opt-in per server.
* Some servers, such as rust-analyzer, explicitly have a "single file
mode", we will not support that until it is officially part of the LSP
specification
Co-authored-by: Peter Lithammer <peter.lithammer@gmail.com>
|
| | |
|
| |
|
|
|
|
| |
Add a compatibility shim to `util.lua` adapting to change in handler signature
and use it where needed.
(Skip `rust-analyzer` and `denols` since their requests don't use handlers.)
|
| | |
|
| | |
|
| |
|
| |
This reverts commit d6e78ef013a57761226df5b842d52912f15011dd.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|