mirror of
https://github.com/neovim/neovim.git
synced 2026-03-30 20:32:08 +00: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:
@@ -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