Merge branch 'nvim-tweaks'

This commit is contained in:
Vaclav Uruba 2025-06-16 05:10:37 -06:00
commit 01186952d5
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C
4 changed files with 21 additions and 7 deletions

View File

@ -325,21 +325,27 @@ return {
{
"gd",
function()
Snacks.picker.lsp_definitions()
Snacks.picker.lsp_definitions({
auto_confirm = false,
})
end,
desc = "Goto Definition",
},
{
"gD",
function()
Snacks.picker.lsp_declarations()
Snacks.picker.lsp_declarations({
auto_confirm = false,
})
end,
desc = "Goto Declaration",
},
{
"gr",
function()
Snacks.picker.lsp_references()
Snacks.picker.lsp_references({
auto_confirm = false,
})
end,
nowait = true,
desc = "References",
@ -347,14 +353,18 @@ return {
{
"gI",
function()
Snacks.picker.lsp_implementations()
Snacks.picker.lsp_implementations({
auto_confirm = false,
})
end,
desc = "Goto Implementation",
},
{
"gy",
function()
Snacks.picker.lsp_type_definitions()
Snacks.picker.lsp_type_definitions({
auto_confirm = false,
})
end,
desc = "Goto T[y]pe Definition",
},

View File

@ -106,14 +106,14 @@ return {
desc = "Run Last",
},
{
"<leader>do",
"<leader>dO",
function()
require("dap").step_out()
end,
desc = "Step Out",
},
{
"<leader>dO",
"<leader>do",
function()
require("dap").step_over()
end,

View File

@ -30,11 +30,13 @@ return {
map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")
map("n", "<leader>hp", gs.preview_hunk, "Preview hunk")
map("n", "<leader>hi", gs.preview_hunk_inline, "Preview hunk inline")
map("n", "<leader>hb", function()
gs.blame_line({ full = true })
end, "Blame line")
map("n", "<leader>hB", gs.toggle_current_line_blame, "Toggle line blame")
map("n", "<leader>hv", gs.blame, "Show blame buffer")
map("n", "<leader>hd", gs.diffthis, "Diff this")
map("n", "<leader>hD", function()

View File

@ -2,6 +2,7 @@ return {
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp-signature-help", -- source for LSP signatures
"hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", -- source for file system paths
{
@ -44,6 +45,7 @@ return {
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" }, -- LSP signatures
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths