Refactor neovim config #2

Merged
FunctionalHacker merged 40 commits from nvim-lua into master 2021-08-08 07:33:26 -05:00
Showing only changes of commit 12dc145d06 - Show all commits

View file

@ -1,6 +1,7 @@
local map = function(type, key, value) local function map(mode, lhs, rhs, opts)
vim.fn.nvim_buf_set_keymap(0, type, key, value, local options = {noremap = true}
{noremap = true, silent = true}) if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end end
-- Open/close nerdtree -- Open/close nerdtree
@ -11,5 +12,5 @@ map('n', '<C-f>', '<cmd>Files<CR>')
map('n', '<C-g>', '<cmd>Rg<CR>') map('n', '<C-g>', '<cmd>Rg<CR>')
-- Completion -- Completion
map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"') map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<S-Tab>"') map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {expr = true})