Added diagnostic toggle

This commit is contained in:
Michael Chalupiak 2025-08-24 23:01:59 -04:00
parent 005f77cdbf
commit 449f2dc890
2 changed files with 10 additions and 1 deletions

View File

@ -47,6 +47,13 @@ setnx('grR', tele.lsp_references, 'Search lsp references')
setnx('grI', tele.lsp_incoming_calls, 'Find incoming function calls')
setnx('grO', tele.lsp_outgoing_calls, 'Find outgoing function calls')
setnx('grd', tele.diagnostics, 'Show LSP diagnostics')
setnx('grD', (function()
local diag = true
return function()
diag = not diag
vim.diagnostic.config({ update_in_insert = true, float = true, virtual_lines = diag})
end
end)(), 'Toggle LSP diagnostics')
setnx('grs', tele.lsp_workspace_symbols, 'Show workspace symbols')
setnx('grS', tele.lsp_document_symbols, 'Show document symbols')
setnx('gri', tele.lsp_implementations, 'Goto implementation')

View File

@ -67,7 +67,9 @@ vim.lsp.config('lua_ls', {
settings = {
Lua = {
workspace = {
library = vim.api.nvim_get_runtime_file("", true)
library = vim.api.nvim_get_runtime_file("", true),
maxPreload = 100000,
preloadFileSize = 100000,
}
}
}