Change vim-shortcut to search for references from "gr" to "gs"

The former shortcut is simply not unique enough under certain
circumstances, therefore I change it to the new "gs" which fits good as
well.
This commit is contained in:
2026-02-03 00:33:57 +01:00
parent 2e3412c410
commit ba01bd7e72

View File

@@ -13,7 +13,7 @@ local on_attach = function(_, bufnr)
vim.keymap.set("n", "gK", vim.lsp.buf.signature_help, desc("Show signature")) vim.keymap.set("n", "gK", vim.lsp.buf.signature_help, desc("Show signature"))
vim.keymap.set("n", "gn", function() vim.diagnostic.jump({ count = 1, float = true }) end, desc("Jump to next occurence")) vim.keymap.set("n", "gn", function() vim.diagnostic.jump({ count = 1, float = true }) end, desc("Jump to next occurence"))
vim.keymap.set("n", "gN", function() vim.diagnostic.jump({ count = -1, float = true }) end, desc("Jump to previous occurence")) vim.keymap.set("n", "gN", function() vim.diagnostic.jump({ count = -1, float = true }) end, desc("Jump to previous occurence"))
vim.keymap.set("n", "gr", ts.lsp_references, desc("Search references")) vim.keymap.set("n", "gs", ts.lsp_references, desc("Search references"))
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
end end