diff options
Diffstat (limited to '.config/nvim/lua/mapping.lua')
-rw-r--r-- | .config/nvim/lua/mapping.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.config/nvim/lua/mapping.lua b/.config/nvim/lua/mapping.lua new file mode 100644 index 0000000..d454eec --- /dev/null +++ b/.config/nvim/lua/mapping.lua @@ -0,0 +1,23 @@ +function map(mode, lhs, rhs, opts) + local options = { noremap = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +-- Toggle line numbers +map("n", "<F4>", "<cmd>:set number!<cr>", { silent = true }) +-- Toggle IndentBlankline +map("n", "<F5>", "<cmd>:IndentBlanklineToggle<cr>", { silent = true }) +-- Toggle Undotree +map("n", "<F6>", "<cmd>:lua require('undotree').toggle()<cr>", { silent = true }) +-- Toggle Nvim Tree +map("n", "<F7>", "<cmd>NvimTreeToggle<cr> <cmd>NvimTreeRefresh<cr>", { silent = true }) +-- Toggle Tagbar +map("n", "<F8>", "<cmd>:TagbarToggle<cr>", { silent = true }) +-- Toggle Tagbar +map("n", "<F8>", "<cmd>:TagbarToggle<cr>", { silent = true }) +-- Toggle lsp_lines +vim.keymap.set("", "<F12>", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" }) + |