Skip to content

Commit 679d978

Browse files
committedOct 18, 2024
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.
1 parent 6f0ec89 commit 679d978

File tree

5 files changed

+1
-30
lines changed

5 files changed

+1
-30
lines changed
 

‎.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
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).
8+
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).
99
1010
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).
1111
- type: textarea

‎doc/configs.md

-4
Original file line numberDiff line numberDiff line change
@@ -5592,10 +5592,6 @@ require'lspconfig'.hls.setup{}
55925592
```lua
55935593
{ "haskell", "lhaskell" }
55945594
```
5595-
- `lspinfo` :
5596-
```lua
5597-
see source file
5598-
```
55995595
- `root_dir` :
56005596
```lua
56015597
root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")

‎doc/configs.txt

-4
Original file line numberDiff line numberDiff line change
@@ -5592,10 +5592,6 @@ require'lspconfig'.hls.setup{}
55925592
```lua
55935593
{ "haskell", "lhaskell" }
55945594
```
5595-
- `lspinfo` :
5596-
```lua
5597-
see source file
5598-
```
55995595
- `root_dir` :
56005596
```lua
56015597
root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")

‎lua/lspconfig/configs/hls.lua

-16
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,6 @@ return {
1212
cabalFormattingProvider = 'cabalfmt',
1313
},
1414
},
15-
lspinfo = function(cfg)
16-
local extra = {}
17-
local function on_stdout(_, data, _)
18-
local version = data[1]
19-
table.insert(extra, 'version: ' .. version)
20-
end
21-
22-
local opts = {
23-
cwd = cfg.cwd,
24-
stdout_buffered = true,
25-
on_stdout = on_stdout,
26-
}
27-
local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts)
28-
vim.fn.jobwait { chanid }
29-
return extra
30-
end,
3115
},
3216

3317
docs = {

‎lua/lspconfig/health.lua

-5
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,6 @@ local function make_client_info(client, fname)
174174
'autostart: ' .. client_info.autostart,
175175
}
176176

177-
if client.config.lspinfo then
178-
local server_specific_info = client.config.lspinfo(client.config)
179-
info_lines = vim.list_extend(info_lines, server_specific_info)
180-
end
181-
182177
vim.list_extend(lines, info_lines)
183178

184179
return table.concat(lines, '\n')

0 commit comments

Comments
 (0)