| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
0.10 (#3154)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* fix: util.root_pattern prioritises pattern order
Instead of traversing the filesystem upwards once and
returning the first match of all the patterns, it traverses
the filesystem upwards once for each pattern. This means
that the order of the patterns provided matters, and the
highest priority patterns should be put first. Also updated
corresponding tests.
* docs: update util.root_pattern description
|
| | |
|
| | |
|
| |
|
|
|
|
| |
- Move manager logic to own module
- Move async logic to own module
- Improve type annotations
|
| | |
|
| |
|
|
|
|
| |
* fix: check root already in workspace
---------
Co-authored-by: github-actions <github-actions@github.com>
|
| | |
|
| | |
|
| |
|
|
|
| |
Fixes https://github.com/neovim/nvim-lspconfig/commit/641a71e381e23f1d1d6a0722a8b796fda896b55b#commitcomment-102642580
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix(stylelint_lsp): update root directory pattern
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
* feat(util): add `add_package_json_to_config_files_if_field_exists` function
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
* fix(stylelint_lsp): update update root directory pattern implementation
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
* fix(eslint): update update root directory pattern implementation
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
* fix(util): update `is_windows` detection
Co-authored-by: Raphael <glephunter@gmail.com>
* fix(util): update new function name
Co-authored-by: Raphael <glephunter@gmail.com>
* fix(server_configurations): update new function name implementation
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
* fix(stylelint_lsp): fix duplicate equals
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
---------
Signed-off-by: Wuelner Martínez <wuelner.martinez@outlook.com>
Co-authored-by: Raphael <glephunter@gmail.com>
|
| | |
|
| |
|
|
|
|
|
| |
add server workspaceFolder check, if
server not have workspacefolders.supported field
will spawn a new server instance.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_workspaceFolders
|
| |
|
|
|
| |
* refactor: rewrite client reuse logic
* fix: not register workspace after new start
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* fix: generate correct workspace didchange request params
* fix: logic rewrite
* fix: logic rewrite
* fix: spell
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix: some server need restart
* fix: improve
* fix: async start client
* fix: remove session file
* fix: improve logic
* fix: improve logic
* fix: check the root already in workspace
* fix: improve check
* fix: add start_new_client into the if branch
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| | |
|