feat: improve lint logic

This commit is contained in:
2025-10-26 05:49:02 +02:00
parent a4b5accc05
commit ae3d2d20ee
3 changed files with 26 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ au('VimEnter', {
au('TextYankPost', {
group = group,
callback = function()
vim.highlight.on_yank({ timeout = 400 })
vim.highlight.on_yank({ timeout = 200 })
end,
})
@@ -61,15 +61,15 @@ au({ 'WinLeave', 'InsertEnter' }, {
-- Autocompletion
au('LspAttach', {
group = group,
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
callback = function(event)
local client = vim.lsp.get_client_by_id(event.data.client_id)
if not client then
return
end
-- Enable native completion
if client:supports_method('textDocument/completion') then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
vim.lsp.completion.enable(true, client.id, event.buf, { autotrigger = true })
end
end,
})