update configs for nvimtree and autopairs

This commit is contained in:
siduck 2021-10-30 15:48:44 +05:30
parent 01eec524be
commit 4b2bbe5d1c
2 changed files with 6 additions and 7 deletions

View file

@ -12,7 +12,6 @@ vim.o.termguicolors = true
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
g.nvim_tree_git_hl = git_status
g.nvim_tree_gitignore = 0
g.nvim_tree_hide_dotfiles = 0
g.nvim_tree_highlight_opened_files = 0
g.nvim_tree_indent_markers = 1
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
@ -61,6 +60,9 @@ nvimtree.setup {
error = "",
},
},
filters = {
dotfiles = false,
},
disable_netrw = true,
hijack_netrw = true,
ignore_ft_on_setup = { "dashboard" },

View file

@ -3,7 +3,7 @@ local M = {}
local chadrc_config = require("core.utils").load_config()
M.autopairs = function()
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp")
local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
if not (present1 or present2) then
return
@ -12,11 +12,8 @@ M.autopairs = function()
autopairs.setup()
-- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs
autopairs_completion.setup {
map_complete = true, -- insert () func completion
map_cr = true,
}
local cmp = require "cmp"
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
M.better_escape = function()