mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-30 23:54:50 +02:00
custom whichkey entries
This commit is contained in:
parent
8c9ddc7090
commit
00bf949fe8
4 changed files with 32 additions and 56 deletions
|
@ -65,16 +65,12 @@ vim.api.nvim_set_keymap("n", "<Leader>h", ':let @/=""<CR>', { noremap = true, si
|
|||
|
||||
-- explorer
|
||||
|
||||
-- TODO this introduces some bugs unfortunately
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<Leader>e",
|
||||
":lua require'lv-nvimtree'.toggle_tree()<CR>",
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
-- vim.api.nvim_set_keymap('n', '<Leader>e',
|
||||
-- ":NvimTreeToggle<CR>",
|
||||
-- {noremap = true, silent = true})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true })
|
||||
|
||||
|
@ -88,8 +84,6 @@ vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true
|
|||
-- close buffer
|
||||
vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
|
||||
|
||||
-- TODO create entire treesitter section
|
||||
|
||||
local mappings = {
|
||||
|
||||
["/"] = "Comment",
|
||||
|
@ -128,26 +122,6 @@ local mappings = {
|
|||
s = { "<cmd>PackerSync<cr>", "Sync" },
|
||||
u = { "<cmd>PackerUpdate<cr>", "Update" },
|
||||
},
|
||||
-- diagnostics vanilla nvim
|
||||
-- -- diagnostic
|
||||
-- function lv_utils.get_all()
|
||||
-- vim.lsp.diagnostic.get_all()
|
||||
-- end
|
||||
-- function lv_utils.get_next()
|
||||
-- vim.lsp.diagnostic.get_next()
|
||||
-- end
|
||||
-- function lv_utils.get_prev()
|
||||
-- vim.lsp.diagnostic.get_prev()
|
||||
-- end
|
||||
-- function lv_utils.goto_next()
|
||||
-- vim.lsp.diagnostic.goto_next()
|
||||
-- end
|
||||
-- function lv_utils.goto_prev()
|
||||
-- vim.lsp.diagnostic.goto_prev()
|
||||
-- end
|
||||
-- function lv_utils.show_line_diagnostics()
|
||||
-- vim.lsp.diagnostic.show_line_diagnostics()
|
||||
-- end
|
||||
|
||||
-- " Available Debug Adapters:
|
||||
-- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/
|
||||
|
@ -320,5 +294,14 @@ if O.lushmode then
|
|||
}
|
||||
end
|
||||
|
||||
-- for _, v in pairs(O.user_which_key) do
|
||||
-- end
|
||||
for k, v in pairs(O.user_which_key) do
|
||||
mappings[k] = v
|
||||
-- table.insert(mappings, O.user_which_key[1])
|
||||
-- print(k)
|
||||
-- print(v)
|
||||
end
|
||||
|
||||
local wk = require "which-key"
|
||||
wk.register(mappings, opts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue