fix weird errors
This commit is contained in:
parent
a621cea73b
commit
de17728410
|
@ -1,6 +1,6 @@
|
|||
local M = {}
|
||||
|
||||
---@param opts? RafiConfig
|
||||
---@param opts? PlexConfig
|
||||
function M.setup(opts)
|
||||
require('plex.config').setup(opts)
|
||||
end
|
||||
|
|
|
@ -109,7 +109,6 @@ return {
|
|||
|
||||
if vim.diagnostic.is_disabled() or vim.bo[buffer].buftype ~= '' then
|
||||
vim.diagnostic.disable(buffer)
|
||||
return
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -123,16 +123,17 @@ function M.on_attach(client, buffer)
|
|||
local Keys = require('lazy.core.handler.keys')
|
||||
local keymaps = M.resolve(buffer)
|
||||
|
||||
for _, keys in pairs(keymaps) do
|
||||
if not keys.has or M.has(buffer, keys.has) then
|
||||
local opts = Keys.opts(keys)
|
||||
---@diagnostic disable-next-line: no-unknown
|
||||
opts.has = nil
|
||||
opts.silent = opts.silent ~= false
|
||||
opts.buffer = buffer
|
||||
vim.keymap.set(keys.mode or 'n', keys[1], keys[2], opts)
|
||||
end
|
||||
end
|
||||
-- FIXME: This part causes weird errors and IDK what it does.
|
||||
-- for _, keys in pairs(keymaps) do
|
||||
-- if not keys.has or M.has(buffer, keys.has) then
|
||||
-- local opts = Keys.opts(keys)
|
||||
-- ---@diagnostic disable-next-line: no-unknown
|
||||
-- opts.has = nil
|
||||
-- opts.silent = opts.silent ~= false
|
||||
-- opts.buffer = buffer
|
||||
-- vim.keymap.set(keys.mode or 'n', keys[1], keys[2], opts)
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
-- Toggle diagnostics locally (false) or globally (true).
|
||||
|
|
Loading…
Reference in New Issue