adding in trouble nvim for diagnostics
This commit is contained in:
@@ -45,6 +45,7 @@ lsp.set_preferences({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
lsp.on_attach(function(client, bufnr)
|
lsp.on_attach(function(client, bufnr)
|
||||||
local opts = { buffer = bufnr, remap = false }
|
local opts = { buffer = bufnr, remap = false }
|
||||||
|
|
||||||
@@ -61,9 +62,14 @@ lsp.on_attach(function(client, bufnr)
|
|||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
lsp.setup()
|
lsp.setup()
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true
|
virtual_text = true,
|
||||||
|
signs = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
underline = true,
|
||||||
|
severity_sort = false,
|
||||||
|
float = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+6
@@ -2,4 +2,10 @@ require("trouble").setup {
|
|||||||
-- your configuration comes here
|
-- your configuration comes here
|
||||||
-- or leave it empty to use the default settings
|
-- or leave it empty to use the default settings
|
||||||
-- refer to the configuration section below
|
-- refer to the configuration section below
|
||||||
|
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>", { silent = true, noremap = true }),
|
||||||
|
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>", { silent = true, noremap = true }),
|
||||||
|
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>", { silent = true, noremap = true }),
|
||||||
|
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>", { silent = true, noremap = true }),
|
||||||
|
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>", { silent = true, noremap = true }),
|
||||||
|
vim.keymap.set("n", "<leader>xr", "<cmd>TroubleToggle lsp_references<cr>", { silent = true, noremap = true }),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
|
["nvim-web-devicons"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
["packer.nvim"] = {
|
["packer.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
@@ -185,6 +190,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
|
["trouble.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/trouble.nvim",
|
||||||
|
url = "https://github.com/folke/trouble.nvim"
|
||||||
|
},
|
||||||
undotree = {
|
undotree = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/undotree",
|
path = "/Users/talksik/.local/share/nvim/site/pack/packer/start/undotree",
|
||||||
|
|||||||
Reference in New Issue
Block a user