🔧 Added space+e for floating window diagnostics
This commit is contained in:
parent
49200c3bc6
commit
65a2690d60
1 changed files with 26 additions and 17 deletions
|
|
@ -51,26 +51,35 @@ end
|
||||||
SetAutoCmp(Mode)
|
SetAutoCmp(Mode)
|
||||||
lsp.setup()
|
lsp.setup()
|
||||||
|
|
||||||
|
-- configure diagnostic lsp err msgs
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
|
underline = true,
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
|
float = {
|
||||||
|
source = "always",
|
||||||
|
focusable = false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- toggles floating error messages
|
||||||
|
vim.keymap.set("n", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>")
|
||||||
|
|
||||||
-- LSP Specific Settings
|
-- LSP Specific Settings
|
||||||
-- Volar TypeScript Config (turn off for Vue with Vanilla JS)
|
-- Volar TypeScript Config (turn off for Vue with Vanilla JS)
|
||||||
-- require("mason-lspconfig").setup_handlers({
|
require("mason-lspconfig").setup_handlers({
|
||||||
-- function(server_name)
|
function(server_name)
|
||||||
-- local server_config = {}
|
local server_config = {}
|
||||||
-- if server_name == "volar" then
|
if server_name == "volar" then
|
||||||
-- server_config.filetypes = { "vue", "typescript", "javascript" }
|
server_config.filetypes = { "vue", "typescript", "javascript" }
|
||||||
-- lspconfig.tsserver.setup({
|
lspconfig.tsserver.setup({
|
||||||
-- ["disabled"] = true,
|
["disabled"] = true,
|
||||||
-- })
|
})
|
||||||
-- lspconfig.volar.setup({
|
lspconfig.volar.setup({
|
||||||
-- settings = {
|
settings = {
|
||||||
-- ["volar.takeOverMode.enabled"] = true,
|
["volar.takeOverMode.enabled"] = true,
|
||||||
-- },
|
},
|
||||||
-- })
|
})
|
||||||
-- end
|
end
|
||||||
-- lspconfig[server_name].setup(server_config)
|
lspconfig[server_name].setup(server_config)
|
||||||
-- end,
|
end,
|
||||||
-- })
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue