feat(neo-tree): Added a diagnostics source to neo-tree

This commit is contained in:
kalmenn 2024-02-27 21:11:26 +01:00
parent bd862c5b92
commit 7d5d239c13
Signed by: kalmenn
GPG key ID: F500055C44BC3834
2 changed files with 16 additions and 0 deletions

View file

@ -13,6 +13,7 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
"mason-null-ls.nvim": { "branch": "main", "commit": "a1e19bf9baa86e8a43dd86cf9689ca9f71b4d1da" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3941c57ec85d7bdb44fa53fd858fd80f159018f" },
"none-ls.nvim": { "branch": "main", "commit": "c10b7be7751aee820a02f2d1fafe76bc316fe223" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },

View file

@ -6,9 +6,16 @@ return {
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
"mrbjarksen/neo-tree-diagnostics.nvim",
},
lazy = false,
opts = {
sources = {
"filesystem",
"buffers",
"git_status",
"diagnostics",
},
filesystem = {
filtered_items = {
visible = true,
@ -31,9 +38,16 @@ return {
window = {
position = "right",
width = 30,
auto_expand_width = true,
},
source_selector = {
winbar = true,
sources = {
{ source = "filesystem" },
{ source = "buffers" },
{ source = "git_status" },
{ source = "diagnostics"},
},
},
},
keys = {
@ -41,5 +55,6 @@ return {
{ "<C-N>f", "<cmd>Neotree filesystem focus<cr>", "Focus filesystem in Neotree" },
{ "<C-N>b", "<cmd>Neotree buffers focus<cr>", "Focus buffers in Neotree" },
{ "<C-N>g", "<cmd>Neotree git_status focus<cr>", "Focus git status in Neotree" },
{ "<C-N>b", "<cmd>Neotree diagnostics focus<cr>", "Focus diagnostics in Neotree" },
},
}