PeteChu 049d71cf0f * chore(defaults.lua): add expandtab and smarttab options
* chore(keymaps.lua): add silent and noremap options to NvimTreeToggle keymap
* chore(nvim-tree.lua): comment out auto open autocmd
* chore(init.lua): disable netrw and add autoformat and debug plugins
* feat(autopairs.lua): add nvim-autopairs plugin with default configuration

* feat(init.lua): add vim-go plugin
* feat(nvim-tree.lua): add custom filter to ignore .git directory in nvim-tree view
2023-03-31 12:07:39 +07:00

25 lines
690 B
Lua

local opts = { noremap = true, silent = true }
local term_opts = { silent = true }
function keymap(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
-- Navigate buffers
keymap("n", "<S-l>", ":bnext<CR>", opts)
keymap("n", "<S-h>", ":bprevious<CR>", opts)
-- Terminal
-- Better window navigation
keymap("n", "<C-h>", "<C-w>h", opts)
keymap("n", "<C-j>", "<C-w>j", opts)
keymap("n", "<C-k>", "<C-w>k", opts)
keymap("n", "<C-l>", "<C-w>l", opts)
-- Nvimtree
keymap('n', '<leader>n', ":NvimTreeToggle<cr>", {silent = true, noremap = true})