mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-16 12:24:36 +02:00
Merge 3c7f2798dc
into 25abbf546d
This commit is contained in:
commit
0b2df96fc6
3 changed files with 14 additions and 1 deletions
|
@ -6,6 +6,13 @@ M._keys = nil
|
|||
---@alias LazyKeysLspSpec LazyKeysSpec|{has?:string|string[], cond?:fun():boolean}
|
||||
---@alias LazyKeysLsp LazyKeys|{has?:string|string[], cond?:fun():boolean}
|
||||
|
||||
---@param buffer integer
|
||||
---@return boolean
|
||||
function M.is_ignored(buffer)
|
||||
local ft = vim.bo[buffer].filetype
|
||||
return vim.tbl_contains(vim.g.keymaps_lsp_ignore_ft or {}, ft)
|
||||
end
|
||||
|
||||
---@return LazyKeysLspSpec[]
|
||||
function M.get()
|
||||
if M._keys then
|
||||
|
@ -64,7 +71,7 @@ end
|
|||
---@return LazyKeysLsp[]
|
||||
function M.resolve(buffer)
|
||||
local Keys = require("lazy.core.handler.keys")
|
||||
if not Keys.resolve then
|
||||
if M.is_ignored(buffer) or not Keys.resolve then
|
||||
return {}
|
||||
end
|
||||
local spec = vim.tbl_extend("force", {}, M.get())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue