aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
Commit message (Collapse)AuthorAgeFilesLines
* feat: remove `:Lsp*` commands for nvim 0.12 #4234Olivia Kinnear2025-12-161-0/+4
|
* fix: LspRestart/LspStop with arguments #4159Olivia Kinnear2025-10-271-14/+26
|
* feat: force-stop server with :LspStop! (bang) #4140Olivia Kinnear2025-10-231-18/+16
| | | | | | | | | | | | | | Problem: Some servers don't stop properly. Calling `:LspStop` _twice_ will induce a force-stop, but that is not easy to discover: https://github.com/neovim/neovim/blob/b67eff38fe19876ab228007897224ec04b58aa40/runtime/lua/vim/lsp/client.lua#L864-L866 > By default, it will just request the server to shutdown without force. If > you request to stop a client which has previously been requested to > shutdown, it will automatically escalate and force shutdown. Solution: Nvim should automatically force-stop after X seconds, but until that is supported, adding a bang "!" variant is reasonable.
* refactor!: deprecate old framework/configs, Nvim 0.10 #4077Justin M. Keyes2025-09-171-0/+4
|
* perf: use has() instead of vim.version #4053altermo2025-09-031-1/+1
|
* refactor(lsp): vim.lsp.get_log_path() -> vim.lsp.log.get_filename() #3997Sebastian Lyng Johansen2025-08-141-1/+1
|
* fix!: drop support for multiple args in :LspStop/:LspRestart #3896Markus Koller2025-06-131-4/+4
| | | | | | | | | | Problem: :LspStop/:LspRestart support multiple args, which is unlikely to be used for interactive usage. These commands are intended for interactive usage, not scripts. Scripts should use the vim.lsp API. Solution: It is unlikely that users specify multiple args, so let's drop it to simplify the code and interface.
* fix: support :LspRestart without arguments #3895v2.3.0Markus Koller2025-06-101-4/+16
| | | | | | | | | Problem: After the refactoring in e4d1c8b for Neovim 0.11.2 this command now requires an argument. Solution: Restore the previous behaviour where `:LspRestart` defaults to restarting all active servers.
* fix: support :LspStart/LspStop without arguments #3890Markus Koller2025-06-071-7/+29
| | | | | | | | | | | Problem: After the refactoring in e4d1c8b for Neovim 0.11.2 these commands now require an argument. Solution: Restore the previous behaviour where `:LspStart` defaults to enabling all servers matching the filetype of the current buffer, and `:LspStop` defaults to disabling all servers attached to the current buffer.
* fix: enable :LspLog command in Nvim 0.11.2 #3883Steve Vermeulen2025-06-021-6/+6
|
* feat: support :LspStart/LspRestart in Nvim 0.11.2+ #3734Lorenzo Bellina2025-05-041-0/+76
|
* refactor: replace vim.loop with vim.uv #3703v2.0.0Chris Bandy2025-04-101-1/+1
| | | | | | The former is deprecated in neovim 0.10. Remove the check added in 9b89ba5f158f73779cd58d0bb2783dfb40b28b0e. See: https://github.com/neovim/neovim/blob/v0.10.0/runtime/doc/deprecated.txt#L55
* refactor: deprecate util.get_lsp_clients #3694Justin M. Keyes2025-04-051-1/+1
|
* feat: alias :LspInfo to `:checkhealth vim.lsp` #3663Justin M. Keyes2025-03-261-1/+1
| | | | | | | | | Problem: `:checkhealth lspconfig` has no benefits vs `:checkhealth vim.lsp`. Solution: - on Nvim 0.11+, `:LspInfo` is an alias to `:checkhealth vim.lsp` instead of `:checkhealth lspconfig`. - `lua/lspconfig/health.lua` will be removed in a few months.
* revert: "refactor!: make available_servers function private" #3589dundargoc2025-01-271-1/+1
| | | | | | | | This reverts commit e118ce58dab72c17216292eef7df4cee3cf60885. It turns out `util.available_servers` is used more than anticipated, so we revert the privatization for the time being. Closes https://github.com/neovim/nvim-lspconfig/issues/3588
* refactor: silence luals warningsdundargoc2025-01-221-0/+4
|
* refactor!: make available_servers function privatedundargoc2025-01-211-1/+1
| | | | Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
* refactor: fix luals warningsv1.2.0dundargoc2024-12-191-1/+1
|
* refactor: remove outdated codedundargoc2024-12-081-11/+0
| | | | | Lspconfig requires neovim version 0.9 at the time of writing this, so discard any version checks and code for older versions.
* refactor: replace all instances of vim.uv with vim.loopdundargoc2024-12-021-1/+1
| | | | | We still support neovim 0.9 currently, so we can't use vim.uv. Also add a check so we don't accidentally reintroduce it.
* feat: accept multiple clients/configs in LspRestart, LspStop #3438Guilherme Soares2024-11-171-43/+46
| | | | | | | | | | | | | | | | ## Problems: - `:LspStop` doesn't support list of client ids or config names. - `:LspRestart` doesn't support config names although supports list of client ids - Command completion uses ids and names, not allowing the user to hit enter immediately after finding the desired server ## Solution: - Unify `LspStop` and `LspRestart` implementation supporting lists of client ids and config names - Command completion only returns config names - Modify docs
* fix: fmt client id with name in complete of LspStop (#3436)glepnir2024-11-151-2/+2
| | | | Problem: client id and name are separated by spaces, which may cause misunderstanding. Solution: use colon combine as one thing.
* refactor: minor cleanup #3379Justin M. Keyes2024-10-181-5/+6
|
* fix(LspStop): correctly stop servers and notify user #3378Guilherme Soares2024-10-181-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Problem The current `LspStop` behavior is confusing and wrong: **Server name:** - If the server with the given `server_name` is **not attached**: - No notification is shown, and **all** LSP servers are stopped. - If the server with the given `server_name` is **attached**: - **Incorrectly** closes all LSP servers. - If no servers are attached: - `server_name` is notified as missing. **Server ID:** - If the server with the given `server_id` is **not attached**: - Uses `get_managed_clients()` function https://github.com/neovim/nvim-lspconfig/blob/541f3a2781de481bb84883889e4d9f0904250a56/plugin/lspconfig.lua#L45-L47 Which doesn't return all servers (e.g., `null-ls`), so it doesn't close all LSP clients. - If the server with the given `server_id` is **attached**: - The correct LSP server is stopped (including `null-ls`). **No arguments:** - If servers are **attached**: - Stops all servers. - If no servers are attached: - **Incorrectly** notifies the user with: `config "" not found`. ## Solution **Server name:** - If the server with the given `server_name` is **not attached**: - Notify the user, but **do not close** any servers. - If the server with the given `server_name` is **attached**: - Close the specified server. **Server ID:** - If the server with the given `server_id` is **not attached**: - Notify the user, but **do not close** any servers. - If the server with the given `server_id` is **attached**: - Close the specified server. **No arguments:** - If servers are **attached**: - Stops all servers. - If no servers are attached: - No-op.
* fix: command LspStop can receive server name (#3367)glepnir2024-10-141-2/+10
|
* feat(lspinfo): replace :LspInfo with :checkhealth #3339Justin M. Keyes2024-10-021-15/+1
| | | | | | | | | | | | Problem: :LspInfo has its own "inner platlform" of highlights, mappings etc. And it doesn't integrate with :checkhealth. Solution: - Move the lspinfo code to a healthcheck. - LspInfo features such as highlights, "floating window" presentation, etc., should be added to :checkhealth in Nvim core, if they are really needed. - Define a "q" mapping until Nvim stable has that in :checkhealth.
* refactor: replace deprecated vim.loop with vim.uvdundargoc2024-10-021-1/+1
|
* refactor: move all old get_clients to new compatible (#3159)glepnir2024-05-171-1/+1
|
* fix(command): check server config exist in lspconfig (#3131)glepnir2024-04-291-5/+7
|
* fix(command): get attached buffers list by using api (#3130)glepnir2024-04-291-1/+1
| | | | | Problem: buffers id as key in attached_buffers. Solution: use api to get buffers list for later restart and attach
* refactor: improve get_clients_from_cmd_args (#2943)Daiki Noda2024-01-311-3/+3
| | | | | | | improve the get_clients_from_cmd_args for better readability and consistency. - replace unnecessary dictionary-based approaches with array-based ones. - use the '#' to improve code readability. - use the '#' for an empty check.
* chore: move loading status check to the top (#2942)Daiki Noda2023-12-211-2/+2
| | | loading status check should be on the top
* chore: check version 0.8+ (#2940)Daiki Noda2023-12-201-2/+2
| | | | | | | As documented in README.md(after 5a871409199d585b52b69952532e3fb435e64566), nvim-lspconfig now supports version 0.8 or later. Update code to perform this version check. Co-authored-by: Daiki Noda <sys9kdr@noreply.github.com>
* perf: reduce an unnecessary function call #2913Daiki Noda2023-11-261-1/+1
|
* fix(LspRestart): check client attched_buffers count by using tbl_count (#2725)Raphael2023-07-181-1/+1
|
* fix(command): LspRestart should attached before buffers (#2674)Raphael2023-06-141-3/+6
|
* fix: lsprestart only restart client which have attached buffer (#2669)Raphael2023-06-121-1/+3
|
* fix(commands): Strange `LspStop` arguments, not matching doc (#2486)Rational-Curiosity2023-03-011-6/+5
| | | fix LspStop command receive params bug.
* fix: wrong param in get_active_clients (#2362)Raphael2022-12-271-1/+1
|
* fix: run all matched client in LspStart (#2314)Raphael2022-12-131-2/+2
|
* fix: improve client stop logic in LspStop (#2296)Raphael2022-12-071-2/+1
|
* feat: support force stop language server (#2294)Raphael2022-12-071-3/+12
| | | | | | | * feat: support force stop language server * feat: use vim syntax * feat: update doc
* fix: restart client after client is stopped after LspRestart (#2290)Raphael2022-12-051-3/+19
| | | | | * fix: restart client after client is stopped after LspRestart * fix: format
* perf: use alias api variable (#2260)Raphael2022-11-261-4/+4
|
* fix: lspstop should close the client by given client (#2101)Raphael2022-08-281-3/+12
|
* feat: improve LspInfo (#2081)Raphael2022-08-261-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: improve LspInfo * feat: update README for highlight * fix: wrong typo * fix: ci failed * fix: remove unnecessary block * fix: stylua format * fix: set default border to none * fix: update the doc * fix: define names in if statement * fix: use default_options to set border * fix: use available servers list * fix: fixup * fix: format by stylua * fix: use bufdelete event * fix: format * fix: add tips * fix: stylua format * fix: use wrap * fix: add 122 to luacheck ignore * fix: reset the default options * fix: merge master * fix: remove unecessary code * feat: update the highlight group * feat: update doc for highlight * fix: remove highlig from README * fix: remae highlight group in doc
* fix: lspstart should be work without arg (#2090)Raphael2022-08-261-6/+7
|
* fix: add lsplog command (#2088)Raphael2022-08-251-0/+6
|
* fix: LspStop should be only stop the current buffer servers by default (#2082)Raphael2022-08-251-1/+5
| | | | | * fix: LspStop should be only stop the current buffer server by default * fix: check filetypes in if statement
* feat: sort autocompletion items alphabetically (#2084)William Boman2022-08-251-4/+9
| | | | | | | | | * feat: sort autocompletion items alphabetically * Update plugin/lspconfig.lua Co-authored-by: ii14 <59243201+ii14@users.noreply.github.com> Co-authored-by: ii14 <59243201+ii14@users.noreply.github.com>