## 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
## 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 541f3a2781/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.
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.
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.
As documented in README.md(after 5a87140919),
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>
* 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
* 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>
* Redo installation.
Servers which want to be auto installed should specify
skeleton[name].install()
and it will be automatically added to the list of installable servers.
- Add :LspInstall and :LspInstallInfo
- Auto generate docs for servers with .install() available.
- Add util.npm_installer
- Refactor utf8 capabilities common config into a single function
- Add contribution notes.
- Also expose util.base_install_dir for other installers potentially
- Fix tsserver's arguments and add javascript filetypes