mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-03-22 00:36:19 +00:00
chore: optimize trouble launch
This commit is contained in:
@@ -27,7 +27,5 @@ require("lazy").setup({
|
|||||||
install = { colorscheme = { "rose-pine" } },
|
install = { colorscheme = { "rose-pine" } },
|
||||||
ui = { border = "rounded" },
|
ui = { border = "rounded" },
|
||||||
change_detection = { enabled = false },
|
change_detection = { enabled = false },
|
||||||
rocks = {
|
rocks = { hererocks = false },
|
||||||
hererocks = true,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ return {
|
|||||||
end
|
end
|
||||||
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = desc })
|
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = desc })
|
||||||
end
|
end
|
||||||
local trouble = require("trouble")
|
local trouble = nil
|
||||||
|
|
||||||
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||||
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
|
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
|
||||||
@@ -83,9 +83,11 @@ return {
|
|||||||
vim.diagnostic.jump({ count = -1, float = true })
|
vim.diagnostic.jump({ count = -1, float = true })
|
||||||
end, "Diagnostic Prev")
|
end, "Diagnostic Prev")
|
||||||
nmap("]d", function()
|
nmap("]d", function()
|
||||||
|
trouble = trouble or require("trouble")
|
||||||
trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
|
trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
|
||||||
end, "LSP: Trouble Next")
|
end, "LSP: Trouble Next")
|
||||||
nmap("[d", function()
|
nmap("[d", function()
|
||||||
|
trouble = trouble or require("trouble")
|
||||||
trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
|
trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
|
||||||
end, "Trouble Prev")
|
end, "Trouble Prev")
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
@@ -95,6 +97,7 @@ return {
|
|||||||
{ buffer = event.buf, desc = "LSP: Code [A]ction" }
|
{ buffer = event.buf, desc = "LSP: Code [A]ction" }
|
||||||
)
|
)
|
||||||
nmap("gr", function()
|
nmap("gr", function()
|
||||||
|
trouble = trouble or require("trouble")
|
||||||
trouble.toggle("lsp_references")
|
trouble.toggle("lsp_references")
|
||||||
end, "[G]oto [R]eferences")
|
end, "[G]oto [R]eferences")
|
||||||
nmap("gR", function()
|
nmap("gR", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user