Merge branch 'nvim-tweaks'
This commit is contained in:
commit
01186952d5
@ -325,21 +325,27 @@ return {
|
|||||||
{
|
{
|
||||||
"gd",
|
"gd",
|
||||||
function()
|
function()
|
||||||
Snacks.picker.lsp_definitions()
|
Snacks.picker.lsp_definitions({
|
||||||
|
auto_confirm = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Goto Definition",
|
desc = "Goto Definition",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gD",
|
"gD",
|
||||||
function()
|
function()
|
||||||
Snacks.picker.lsp_declarations()
|
Snacks.picker.lsp_declarations({
|
||||||
|
auto_confirm = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Goto Declaration",
|
desc = "Goto Declaration",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gr",
|
"gr",
|
||||||
function()
|
function()
|
||||||
Snacks.picker.lsp_references()
|
Snacks.picker.lsp_references({
|
||||||
|
auto_confirm = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
nowait = true,
|
nowait = true,
|
||||||
desc = "References",
|
desc = "References",
|
||||||
@ -347,14 +353,18 @@ return {
|
|||||||
{
|
{
|
||||||
"gI",
|
"gI",
|
||||||
function()
|
function()
|
||||||
Snacks.picker.lsp_implementations()
|
Snacks.picker.lsp_implementations({
|
||||||
|
auto_confirm = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Goto Implementation",
|
desc = "Goto Implementation",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gy",
|
"gy",
|
||||||
function()
|
function()
|
||||||
Snacks.picker.lsp_type_definitions()
|
Snacks.picker.lsp_type_definitions({
|
||||||
|
auto_confirm = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Goto T[y]pe Definition",
|
desc = "Goto T[y]pe Definition",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -106,14 +106,14 @@ return {
|
|||||||
desc = "Run Last",
|
desc = "Run Last",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>do",
|
"<leader>dO",
|
||||||
function()
|
function()
|
||||||
require("dap").step_out()
|
require("dap").step_out()
|
||||||
end,
|
end,
|
||||||
desc = "Step Out",
|
desc = "Step Out",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>dO",
|
"<leader>do",
|
||||||
function()
|
function()
|
||||||
require("dap").step_over()
|
require("dap").step_over()
|
||||||
end,
|
end,
|
||||||
|
|||||||
@ -30,11 +30,13 @@ return {
|
|||||||
map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")
|
map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")
|
||||||
|
|
||||||
map("n", "<leader>hp", gs.preview_hunk, "Preview 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()
|
map("n", "<leader>hb", function()
|
||||||
gs.blame_line({ full = true })
|
gs.blame_line({ full = true })
|
||||||
end, "Blame line")
|
end, "Blame line")
|
||||||
map("n", "<leader>hB", gs.toggle_current_line_blame, "Toggle line blame")
|
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", gs.diffthis, "Diff this")
|
||||||
map("n", "<leader>hD", function()
|
map("n", "<leader>hD", function()
|
||||||
|
|||||||
@ -2,6 +2,7 @@ return {
|
|||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp-signature-help", -- source for LSP signatures
|
||||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||||
"hrsh7th/cmp-path", -- source for file system paths
|
"hrsh7th/cmp-path", -- source for file system paths
|
||||||
{
|
{
|
||||||
@ -44,6 +45,7 @@ return {
|
|||||||
-- sources for autocompletion
|
-- sources for autocompletion
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "nvim_lsp_signature_help" }, -- LSP signatures
|
||||||
{ name = "luasnip" }, -- snippets
|
{ name = "luasnip" }, -- snippets
|
||||||
{ name = "buffer" }, -- text within current buffer
|
{ name = "buffer" }, -- text within current buffer
|
||||||
{ name = "path" }, -- file system paths
|
{ name = "path" }, -- file system paths
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user