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