mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-03 01:25:03 +02:00
add some useful plugins to base config and a option to enable extras
This commit is contained in:
parent
4ddcaf55a9
commit
66501fefe7
16 changed files with 271 additions and 85 deletions
|
@ -5,9 +5,9 @@ require("which-key").setup {
|
|||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||
-- No actual key bindings are created
|
||||
presets = {
|
||||
operators = true, -- adds help for operators like d, y, ...
|
||||
motions = true, -- adds help for motions
|
||||
text_objects = true, -- help for text objects triggered after entering an operator
|
||||
operators = false, -- adds help for operators like d, y, ...
|
||||
motions = false, -- adds help for motions
|
||||
text_objects = false, -- help for text objects triggered after entering an operator
|
||||
windows = true, -- default bindings on <c-w>
|
||||
nav = true, -- misc bindings to work with windows
|
||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
||||
|
@ -66,6 +66,9 @@ 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})
|
||||
|
||||
-- open projects
|
||||
vim.api.nvim_set_keymap('n', '<leader>p', ":lua require'telescope'.extensions.project.project{}<CR>",
|
||||
{noremap = true, silent = true})
|
||||
-- TODO create entire treesitter section
|
||||
|
||||
local mappings = {
|
||||
|
@ -74,7 +77,17 @@ local mappings = {
|
|||
["e"] = "Explorer",
|
||||
["f"] = "Find File",
|
||||
["h"] = "No Highlight",
|
||||
["p"] = "Projects",
|
||||
d = {
|
||||
name = "+Diagnostics",
|
||||
t = {"<cmd>TroubleToggle<cr>", "trouble"},
|
||||
w = {"<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace"},
|
||||
d = {"<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document"},
|
||||
q = {"<cmd>TroubleToggle quickfix<cr>", "quickfix"},
|
||||
l = {"<cmd>TroubleToggle loclist<cr>", "loclist"},
|
||||
r = {"<cmd>TroubleToggle lsp_references<cr>", "references"},
|
||||
},
|
||||
D = {
|
||||
name = "+Debug",
|
||||
b = {"<cmd>DebugToggleBreakpoint<cr>", "Toggle Breakpoint"},
|
||||
c = {"<cmd>DebugContinue<cr>", "Continue"},
|
||||
|
@ -115,7 +128,6 @@ local mappings = {
|
|||
s = {"<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols"},
|
||||
S = {"<cmd>Telescope lsp_workspace_symbols<cr>", "Workspace Symbols"}
|
||||
},
|
||||
|
||||
s = {
|
||||
name = "+Search",
|
||||
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
|
||||
|
@ -129,7 +141,15 @@ local mappings = {
|
|||
R = {"<cmd>Telescope registers<cr>", "Registers"},
|
||||
t = {"<cmd>Telescope live_grep<cr>", "Text"}
|
||||
},
|
||||
S = {name = "+Session", s = {"<cmd>SessionSave<cr>", "Save Session"}, l = {"<cmd>SessionLoad<cr>", "Load Session"}}
|
||||
S = {name = "+Session", s = {"<cmd>SessionSave<cr>", "Save Session"}, l = {"<cmd>SessionLoad<cr>", "Load Session"}},
|
||||
|
||||
-- extras
|
||||
z = {
|
||||
name = "+Zen",
|
||||
s = {"<cmd>TZBottom<cr>", "toggle status line"},
|
||||
t = {"<cmd>TZTop<cr>", "toggle tab bar"},
|
||||
z = {"<cmd>TZAtaraxis<cr>", "toggle zen"},
|
||||
}
|
||||
}
|
||||
|
||||
local wk = require("which-key")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue