feat(core): add LSP-aware reference navigation keymaps and remove unused community imports
This commit is contained in:
1 parent
99ee481bfa
commit
6bef91ddcc
2 files changed
+16
-2
No files matched your search
@@ -11,7 +11,6 @@ return {
|
|||||||
{ import = "astrocommunity.editing-support.refactoring-nvim" },
|
{ import = "astrocommunity.editing-support.refactoring-nvim" },
|
||||||
{ import = "astrocommunity.editing-support.conform-nvim" },
|
{ import = "astrocommunity.editing-support.conform-nvim" },
|
||||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||||
{ import = "astrocommunity.git.octo-nvim" },
|
|
||||||
{ import = "astrocommunity.pack.mdx" },
|
{ import = "astrocommunity.pack.mdx" },
|
||||||
{ import = "astrocommunity.pack.biome" },
|
{ import = "astrocommunity.pack.biome" },
|
||||||
{ import = "astrocommunity.pack.go" },
|
{ import = "astrocommunity.pack.go" },
|
||||||
@@ -27,6 +26,5 @@ return {
|
|||||||
{ import = "astrocommunity.pack.tailwindcss" },
|
{ import = "astrocommunity.pack.tailwindcss" },
|
||||||
{ import = "astrocommunity.completion.supermaven-nvim" },
|
{ import = "astrocommunity.completion.supermaven-nvim" },
|
||||||
{ import = "astrocommunity.lsp.dev-tools-nvim" },
|
{ import = "astrocommunity.lsp.dev-tools-nvim" },
|
||||||
{ import = "astrocommunity.lsp.nvim-lsp-file-operations" },
|
|
||||||
{ import = "astrocommunity.colorscheme.cyberdream-nvim" },
|
{ import = "astrocommunity.colorscheme.cyberdream-nvim" },
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,18 @@
|
|||||||
-- This will run last in the setup process.
|
-- This will run last in the setup process.
|
||||||
-- Pure lua; anything that doesn't fit the normal config locations goes here.
|
-- Pure lua; anything that doesn't fit the normal config locations goes here.
|
||||||
|
|
||||||
|
-- Snacks.keymap: LSP-aware keymaps, only applied to buffers with a client
|
||||||
|
-- that supports the given method (which-key picks up the desc). ]] and [[
|
||||||
|
-- cycle through the LSP references that snacks.words auto-highlights,
|
||||||
|
-- complementing the core astrolsp `gd` / `gr` binds.
|
||||||
|
local ok, snacks = pcall(require, "snacks")
|
||||||
|
if ok then
|
||||||
|
snacks.keymap.set("n", "]]", function() snacks.words.jump(vim.v.count1, true) end, {
|
||||||
|
lsp = { method = "textDocument/documentHighlight" },
|
||||||
|
desc = "Next reference",
|
||||||
|
})
|
||||||
|
snacks.keymap.set("n", "[[", function() snacks.words.jump(-vim.v.count1, true) end, {
|
||||||
|
lsp = { method = "textDocument/documentHighlight" },
|
||||||
|
desc = "Previous reference",
|
||||||
|
})
|
||||||
|
end
|
||||||
Reference in new issue
Block a user