aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-10-16 12:23:13 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-10-18 12:30:55 +0200
commit679d978e644778abcf7b4552f9b763c040a8f0b5 (patch)
treebce3c06c00e604d48721e72a780c15860da8455c
parentrefactor: minor cleanup #3379 (diff)
downloadnvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar.gz
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar.bz2
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar.lz
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar.xz
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.tar.zst
nvim-lspconfig-679d978e644778abcf7b4552f9b763c040a8f0b5.zip
fix(lspinfo)!: remove config.lspinfo
Problem: `config.lspinfo` is an undocumented feature that allows extending the info shown in `:LspInfo` (`:checkhealth lspconfig`). This feature is unwanted because: - it's undocumented - it adds a maintenance burden - it provides info that should be derived from the LSP protocol itself. Solution: Remove support for `config.lspinfo`. Instead, `:LspInfo` (`:checkhealth lspconfig`) should be enhanced to automatically gather this kind of extra info from the server response.
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml2
-rw-r--r--doc/configs.md4
-rw-r--r--doc/configs.txt4
-rw-r--r--lua/lspconfig/configs/hls.lua16
-rw-r--r--lua/lspconfig/health.lua5
5 files changed, 1 insertions, 30 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 951e3016..dc12ba11 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
- Do NOT file bugs in this repo. The configs in this repo are unsupported and provided only as a starting point. We depend on users (like you) to troubleshoot issues with their specific LSP setups and [send improvements](https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md).
+ The configs in this repo are UNSUPPORTED and provided only as a starting point. We depend on users (like you) to troubleshoot issues with their specific LSP setups and [send improvements](https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md).
If you have a feature request or found a bug in the core Nvim `vim.lsp` module (not this repo), [report it to Nvim](https://github.com/neovim/neovim/issues/new?assignees=&labels=bug%2Clsp&projects=&template=lsp_bug_report.yml).
- type: textarea
diff --git a/doc/configs.md b/doc/configs.md
index ec07c840..4b4a34d1 100644
--- a/doc/configs.md
+++ b/doc/configs.md
@@ -5592,10 +5592,6 @@ require'lspconfig'.hls.setup{}
```lua
{ "haskell", "lhaskell" }
```
- - `lspinfo` :
- ```lua
- see source file
- ```
- `root_dir` :
```lua
root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")
diff --git a/doc/configs.txt b/doc/configs.txt
index ec07c840..4b4a34d1 100644
--- a/doc/configs.txt
+++ b/doc/configs.txt
@@ -5592,10 +5592,6 @@ require'lspconfig'.hls.setup{}
```lua
{ "haskell", "lhaskell" }
```
- - `lspinfo` :
- ```lua
- see source file
- ```
- `root_dir` :
```lua
root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")
diff --git a/lua/lspconfig/configs/hls.lua b/lua/lspconfig/configs/hls.lua
index 4390440d..99426b5e 100644
--- a/lua/lspconfig/configs/hls.lua
+++ b/lua/lspconfig/configs/hls.lua
@@ -12,22 +12,6 @@ return {
cabalFormattingProvider = 'cabalfmt',
},
},
- lspinfo = function(cfg)
- local extra = {}
- local function on_stdout(_, data, _)
- local version = data[1]
- table.insert(extra, 'version: ' .. version)
- end
-
- local opts = {
- cwd = cfg.cwd,
- stdout_buffered = true,
- on_stdout = on_stdout,
- }
- local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts)
- vim.fn.jobwait { chanid }
- return extra
- end,
},
docs = {
diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua
index 4af923b2..d3bc93b8 100644
--- a/lua/lspconfig/health.lua
+++ b/lua/lspconfig/health.lua
@@ -174,11 +174,6 @@ local function make_client_info(client, fname)
'autostart: ' .. client_info.autostart,
}
- if client.config.lspinfo then
- local server_specific_info = client.config.lspinfo(client.config)
- info_lines = vim.list_extend(info_lines, server_specific_info)
- end
-
vim.list_extend(lines, info_lines)
return table.concat(lines, '\n')