mirror of
https://github.com/neovim/neovim.git
synced 2026-10-26 23:50:19 -05:00
feat(lsp): attach to buftype=help buffers #38412
Problem: `vim.lsp.enable()` skips all buffers with non-empty `buftype`, including `help` buffers. LSPs targeting `filetype='help'` never auto-attach despite help buffers being real files. Solution: Expand the `buftype` guard in `lsp_enable_callback` to allow `help` alongside `""`.
This commit is contained in:
1 parent
d7e534d6b3
commit
d6a6eed4f3
1 file changed
+2
-2
@@ -520,8 +520,8 @@ end
|
||||
|
||||
--- @param bufnr integer
|
||||
local function lsp_enable_callback(bufnr)
|
||||
-- Only ever attach to buffers that represent an actual file.
|
||||
if vim.bo[bufnr].buftype ~= '' then
|
||||
-- Only ever attach to buffers (including "help") that represent an actual file.
|
||||
if vim.bo[bufnr].buftype ~= '' and vim.bo[bufnr].buftype ~= 'help' then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user