mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 05:20:38 +00:00
update configs for nvimtree and autopairs
This commit is contained in:
parent
01eec524be
commit
4b2bbe5d1c
2 changed files with 6 additions and 7 deletions
|
@ -12,7 +12,6 @@ vim.o.termguicolors = true
|
||||||
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
|
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
|
||||||
g.nvim_tree_git_hl = git_status
|
g.nvim_tree_git_hl = git_status
|
||||||
g.nvim_tree_gitignore = 0
|
g.nvim_tree_gitignore = 0
|
||||||
g.nvim_tree_hide_dotfiles = 0
|
|
||||||
g.nvim_tree_highlight_opened_files = 0
|
g.nvim_tree_highlight_opened_files = 0
|
||||||
g.nvim_tree_indent_markers = 1
|
g.nvim_tree_indent_markers = 1
|
||||||
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
|
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
|
||||||
|
@ -61,6 +60,9 @@ nvimtree.setup {
|
||||||
error = "",
|
error = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
},
|
||||||
disable_netrw = true,
|
disable_netrw = true,
|
||||||
hijack_netrw = true,
|
hijack_netrw = true,
|
||||||
ignore_ft_on_setup = { "dashboard" },
|
ignore_ft_on_setup = { "dashboard" },
|
||||||
|
|
|
@ -3,7 +3,7 @@ local M = {}
|
||||||
local chadrc_config = require("core.utils").load_config()
|
local chadrc_config = require("core.utils").load_config()
|
||||||
M.autopairs = function()
|
M.autopairs = function()
|
||||||
local present1, autopairs = pcall(require, "nvim-autopairs")
|
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
|
if not (present1 or present2) then
|
||||||
return
|
return
|
||||||
|
@ -12,11 +12,8 @@ M.autopairs = function()
|
||||||
autopairs.setup()
|
autopairs.setup()
|
||||||
|
|
||||||
-- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs
|
-- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs
|
||||||
|
local cmp = require "cmp"
|
||||||
autopairs_completion.setup {
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
map_complete = true, -- insert () func completion
|
|
||||||
map_cr = true,
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.better_escape = function()
|
M.better_escape = function()
|
||||||
|
|
Loading…
Reference in a new issue