IDFK
This commit is contained in:
parent
ac6ba45b85
commit
b053b742ab
11 changed files with 195 additions and 178 deletions
|
@ -1,18 +1,19 @@
|
|||
local wk = require("which-key")
|
||||
|
||||
local keys = {
|
||||
a = {"<cmd>Copilot suggestion accept<cr>", "Accept Copilot"},
|
||||
e = {
|
||||
name = "Toggle",
|
||||
e = {"<cmd>NeoTreeFloatToggle<CR>", "NeoTree"},
|
||||
w = {vim.cmd.Ex, "netrw"},
|
||||
s = {"<cmd>NeoTreeShowToggle<CR>", "neotree sidebar"},
|
||||
g = {"<cmd>NeoTreeFloatToggle git_status<CR>", "Git Status"},
|
||||
b = {"<cmd>NeoTreeFloatToggle buffers<CR>", "Buffers"},
|
||||
-- b = {"<cmd>NeoTreeFloatToggle buffers<CR>", "Buffers"},
|
||||
c = {"<cmd>NeoTreeClose<CR>" , "Close"},
|
||||
u = {vim.cmd.UndotreeToggle, "UndoTree"},
|
||||
},
|
||||
c = {
|
||||
name = "LSP",
|
||||
f = {function () vim.lsp.buf.format() end, "Format"},
|
||||
w = {function () vim.lsp.buf.workspace_symbol("") end, "workspace symbol"},
|
||||
d = {function () vim.diagnostic.open_float() end, "diagnostic"},
|
||||
a = {function () vim.lsp.buf.code_action() end, "code actions"},
|
||||
|
@ -28,15 +29,6 @@ local keys = {
|
|||
s = {"<cmd>LspStart<cr>", "Start"},
|
||||
r = {"<cmd>LspRestart<cr>", "Restart"},
|
||||
},
|
||||
c = {
|
||||
name = "Copilot",
|
||||
a = {"<cmd>Copilot suggestion accept<cr>", "Accept"},
|
||||
d = {"<cmd>Copilot suggestion dismiss<cr>", "Dismiss"},
|
||||
l = {"<cmd>Copilot suggestion accept_line<cr>", "Line"},
|
||||
w = {"<cmd>Copilot suggestion accept_word<cr>", "Word"},
|
||||
n = {"<cmd>Copilot suggestion next<cr>", "Next"},
|
||||
p = {"<cmd>Copilot suggestion prev<cr>", "Previous"},
|
||||
}
|
||||
},
|
||||
b = {
|
||||
name = "Buffer",
|
||||
|
@ -46,6 +38,11 @@ local keys = {
|
|||
L = {vim.cmd.blast, "Last"},
|
||||
b = {require("telescope.builtin").buffers, "Picker"},
|
||||
c = {"<cmd>:bp | sp | bn | bd<cr>", "Close"},
|
||||
C = {"<cmd>:bp | sp | bn | bd!<cr>", "Close Force"},
|
||||
d = {function() vim.cmd("bd") end, "Delete buffer"},
|
||||
D = {function() vim.cmd("bd!") end, "Delete buffer Force"},
|
||||
o = {function() vim.cmd("BDelete other") end, "Delete other buffers"},
|
||||
m = {function() vim.cmd("BDelete select") end, "Select buffer to delete"},
|
||||
},
|
||||
f = {
|
||||
name = "Telescope & fzf",
|
||||
|
@ -71,12 +68,6 @@ local keys = {
|
|||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
end, "Fix number and relative numbers"},
|
||||
m = {function ()
|
||||
vim.cmd[[
|
||||
highlight CursorColumn guibg=none ctermbg=none
|
||||
highlight link CursorColumn CursorLine
|
||||
]]
|
||||
end, "Fix cursor highlight"},
|
||||
},
|
||||
h = {
|
||||
name = "Hop",
|
||||
|
@ -106,8 +97,8 @@ local keys = {
|
|||
q = {
|
||||
name = "Quick nav",
|
||||
q = {require("harpoon.ui").toggle_quick_menu, "Menu"},
|
||||
a = {require("harpoon.mark").add_file, "Add file"},
|
||||
r = {require("harpoon.mark").rm_file, "Remove File"},
|
||||
a = {function () require("harpoon"):list():append() end, "Add file"},
|
||||
r = {function () require("harpoon"):list():remove() end, "Remove File"},
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -162,7 +153,7 @@ end, {desc = "fuzzy find"})
|
|||
vim.keymap.set('i', '<C-Space>f?', require('telescope.builtin').oldfiles, { desc = 'Find recently opened files' })
|
||||
|
||||
for i = 9, 1, -1 do
|
||||
vim.keymap.set("n", "<M-" .. i .. ">", function() require("harpoon.ui").nav_file(i) end, {desc = ""})
|
||||
vim.keymap.set("i", "<M-" .. i .. ">", function() require("harpoon.ui").nav_file(i) end, {desc = ""})
|
||||
vim.keymap.set("v", "<M-" .. i .. ">", function() require("harpoon.ui").nav_file(i) end, {desc = ""})
|
||||
vim.keymap.set("n", "<M-" .. i .. ">", function() require("harpoon"):list():select(i) end, {desc = ""})
|
||||
vim.keymap.set("i", "<M-" .. i .. ">", function() require("harpoon"):list():select(i) end, {desc = ""})
|
||||
vim.keymap.set("v", "<M-" .. i .. ">", function() require("harpoon"):list():select(i) end, {desc = ""})
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue