Compare commits

..

No commits in common. "e4de3f2670efe11c25913d5d884c0269ff2dff62" and "3e49c39e53d1cc8fe65a4f47278bc99e8cbd5149" have entirely different histories.

3 changed files with 14 additions and 17 deletions

View file

@ -18,9 +18,6 @@ vim.o.list = true
vim.o.relativenumber = true
vim.o.number = true
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.keymap.set("n", "\\q", "<cmd>wincmd q<cr>", { silent = true })
vim.keymap.set("n", "zh", "<cmd>wincmd h<cr>", { silent = true })
vim.keymap.set("n", "zj", "<cmd>wincmd j<cr>", { silent = true })
@ -38,6 +35,9 @@ vim.keymap.set("n", "zx", "<cmd>bdelete<cr>", { silent = true })
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Load custom config
custom = {
full_feature = false,

View file

@ -12,13 +12,13 @@ return {
vim.keymap.set(mode, l, r, opts)
end
m("n", "<leader>hn", function()
m("n", "<leader>hj", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, {expr=true})
m("n", "<leader>hp", function()
m("n", "<leader>hk", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
@ -31,7 +31,7 @@ return {
m("n", "<leader>hS", gs.stage_buffer)
m("n", "<leader>hu", gs.undo_stage_hunk)
m("n", "<leader>hR", gs.reset_buffer)
m("n", "<leader>hv", gs.preview_hunk)
m("n", "<leader>hp", gs.preview_hunk)
m("n", "<leader>hb", function() gs.blame_line{full=true} end)
m("n", "<leader>htb", gs.toggle_current_line_blame)
m("n", "<leader>hd", gs.diffthis)

View file

@ -15,7 +15,6 @@ function setup_keymap_lsp()
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set("n", "gt", vim.lsp.buf.type_definition, opts)
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
@ -27,9 +26,10 @@ function setup_keymap_lsp()
vim.keymap.set("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set("n", "gR", vim.lsp.buf.rename, opts)
vim.keymap.set({ "n", "v" }, "ga", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "g=", function()
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>f", function()
vim.lsp.buf.format { async = true }
end, opts)
end,
@ -92,13 +92,10 @@ return {
setup_keymap_lsp()
end,
keys = {
{ "gs", "<cmd>LspStart<cr>", mode = "n" },
{ "gS", "<cmd>LspStop<cr>", mode = "n" },
{ "gI", "<cmd>LspInfo<cr>", mode = "n" },
{ "ge", vim.diagnostic.open_float, mode = "n" },
{ "gp", vim.diagnostic.goto_prev, mode = "n" },
{ "gn", vim.diagnostic.goto_next, mode = "n" },
{ "gq", vim.diagnostic.setloclist, mode = "n" }
{ "<leader>e", vim.diagnostic.open_float, mode = "n" },
{ "[d", vim.diagnostic.goto_prev, mode = "n" },
{ "]d", vim.diagnostic.goto_next, mode = "n" },
{ "<leader>q", vim.diagnostic.setloclist, mode = "n" }
},
},
}