aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/lua
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-08-17 03:30:07 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-08-17 03:30:07 -0400
commitc840e6608751f1e15a2cd6347924186b27fbe842 (patch)
tree6db407743e9d41a635db17720c7f82128146325f /nvim/lua
parent0089c3d186cd54de4827b58e43f3ae9e0255d55f (diff)
improved Trouble.nvim config, ensure Go treesitter parser
Diffstat (limited to 'nvim/lua')
-rw-r--r--nvim/lua/plugins/colorscheme.lua1
-rw-r--r--nvim/lua/plugins/diagnostics.lua17
-rw-r--r--nvim/lua/plugins/treesitter.lua2
3 files changed, 14 insertions, 6 deletions
diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua
index fb5815e..df87e12 100644
--- a/nvim/lua/plugins/colorscheme.lua
+++ b/nvim/lua/plugins/colorscheme.lua
@@ -35,6 +35,7 @@ local colorschemes = {
transparent_background_level = 2
})
vim.cmd[[highlight! link TroubleNormal Normal]]
+ vim.cmd[[highlight! link TroubleNormalNC Normal]]
vim.cmd[[colorscheme everforest"]]
end
},
diff --git a/nvim/lua/plugins/diagnostics.lua b/nvim/lua/plugins/diagnostics.lua
index 78c3f02..7865470 100644
--- a/nvim/lua/plugins/diagnostics.lua
+++ b/nvim/lua/plugins/diagnostics.lua
@@ -13,7 +13,11 @@ return {
follow = false
}
if trouble.is_open(opts) then
- trouble.close(opts)
+ if vim.o.ft == "trouble" then
+ trouble.close(opts)
+ else
+ trouble.focus()
+ end
else
trouble.open(opts)
end
@@ -30,11 +34,14 @@ return {
follow = false,
filter = { buf = 0 }
}
- if not trouble.is_open(opts) then
- trouble.open(opts)
- trouble.focus(opts)
+ if trouble.is_open(opts) then
+ if vim.o.ft == "trouble" then
+ trouble.close(opts)
+ else
+ trouble.focus()
+ end
else
- trouble.close(opts)
+ trouble.open(opts)
end
end,
desc = "Buffer Diagnostics (Trouble)",
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
index 88e47ca..4062d14 100644
--- a/nvim/lua/plugins/treesitter.lua
+++ b/nvim/lua/plugins/treesitter.lua
@@ -2,7 +2,7 @@ return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
- ensure_installed = { "help", "lua", "python", "java", "javascript", "typescript", "c", "latex", "vim" },
+ ensure_installed = { "help", "lua", "python", "java", "javascript", "typescript", "c", "latex", "vim", "go" },
auto_install = true,
highlight = {
enable = true,