Many changes lol

This commit is contained in:
mattr
2025-02-03 16:51:51 -06:00
parent 79eef026d6
commit 5718d7336a
7 changed files with 137 additions and 237 deletions

View File

@@ -1 +1,2 @@
require 'config.lsp'
require 'config.colorful_indent'

View File

@@ -1,10 +1,18 @@
-- Disable Virtual Text Warnings and Errors
vim.diagnostic.config({
virtual_text = false,
-- virtual_text = false,
signs = true,
float = { border = "single" },
})
local lsp = vim.lsp
local handlers = lsp.handlers
-- Hover doc popup
local pop_opts = { border = "rounded", max_width = 80 }
handlers["textDocument/hover"] = lsp.with(handlers.hover, pop_opts)
handlers["textDocument/signatureHelp"] = lsp.with(handlers.signature_help, pop_opts)
-- Quick Keybinds via g
vim.keymap.set('n', 'gr', "<cmd>Lspsaga rename<cr>", {silent = true, noremap = true, desc = 'Lsp Saga Rename'})
vim.keymap.set('n', 'gx', "<cmd>Lspsaga code_action<cr>", {silent = true, noremap = true, desc = 'Lsp Saga Code Action'})
@@ -23,4 +31,12 @@ vim.keymap.set('n', '<leader>da', "<cmd>Lspsaga show_workspace_diagnostics<cr>",
vim.keymap.set('n', '<leader>dd', "<cmd>Lspsaga show_line_diagnostics<cr>", { silent = true, noremap = true, desc = 'Lsp Saga Show Line Diagnostic' })
for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end