mirror of
https://github.com/mqttr/dotfiles.git
synced 2025-12-16 04:35:51 -06:00
Many changes lol
This commit is contained in:
@@ -1 +1,2 @@
|
||||
require 'config.lsp'
|
||||
require 'config.colorful_indent'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user