From 8a03b4415d9ab0e2118a138b16ab1c13d113d2fb Mon Sep 17 00:00:00 2001 From: Nydragon <6582485n@proton.me> Date: Sat, 6 Apr 2024 00:26:03 +0900 Subject: [PATCH] various revisions --- nvim/lua/autoclose-config.lua | 40 +++++++++++++++++------------------ nvim/lua/formatter-config.lua | 3 +++ nvim/lua/nvim-tree-config.lua | 1 - nvim/lua/plugins.lua | 1 + 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/nvim/lua/autoclose-config.lua b/nvim/lua/autoclose-config.lua index a6e0133..e443fce 100644 --- a/nvim/lua/autoclose-config.lua +++ b/nvim/lua/autoclose-config.lua @@ -1,24 +1,24 @@ return { - keys = { - ["("] = { escape = false, close = true, pair = "()" }, - ["["] = { escape = false, close = true, pair = "[]" }, - ["{"] = { escape = false, close = true, pair = "{}" }, + keys = { + ["("] = { escape = false, close = true, pair = "()" }, + ["["] = { escape = false, close = true, pair = "[]" }, + ["{"] = { escape = false, close = true, pair = "{}" }, - [">"] = { escape = true, close = false, pair = "<>" }, - [")"] = { escape = true, close = false, pair = "()" }, - ["]"] = { escape = true, close = false, pair = "[]" }, - ["}"] = { escape = true, close = false, pair = "{}" }, + [">"] = { escape = true, close = false, pair = "<>" }, + [")"] = { escape = true, close = false, pair = "()" }, + ["]"] = { escape = true, close = false, pair = "[]" }, + ["}"] = { escape = true, close = false, pair = "{}" }, - ['"'] = { escape = true, close = true, pair = '""' }, - ["'"] = { escape = true, close = true, pair = "''" }, - ["`"] = { escape = true, close = true, pair = "``" }, - }, - options = { - disabled_filetypes = { "text" }, - disable_when_touch = false, - touch_regex = "[%w(%[{]", - pair_spaces = false, - auto_indent = true, - disable_command_mode = false, - }, + ['"'] = { escape = true, close = true, pair = '""' }, + ["'"] = { escape = true, close = true, pair = "''" }, + ["`"] = { escape = true, close = true, pair = "``" }, + }, + options = { + disabled_filetypes = { "text" }, + disable_when_touch = false, + touch_regex = "[%w(%[{]", + pair_spaces = false, + auto_indent = true, + disable_command_mode = false, + }, } diff --git a/nvim/lua/formatter-config.lua b/nvim/lua/formatter-config.lua index 9d8f839..b849e3d 100644 --- a/nvim/lua/formatter-config.lua +++ b/nvim/lua/formatter-config.lua @@ -19,6 +19,9 @@ local function build() } end, }, + nix = { + require("formatter.filetypes.nix").nixfmt, + }, ["*"] = { require("formatter.filetypes.any").remove_trailing_whitespace, }, diff --git a/nvim/lua/nvim-tree-config.lua b/nvim/lua/nvim-tree-config.lua index 4245741..92fd889 100644 --- a/nvim/lua/nvim-tree-config.lua +++ b/nvim/lua/nvim-tree-config.lua @@ -1,7 +1,6 @@ vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 - local function open_nvim_tree(data) -- buffer is a real file on the disk local real_file = vim.fn.filereadable(data.file) == 1 diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 1e67856..04de7ba 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -98,6 +98,7 @@ require("lazy").setup({ "hrsh7th/cmp-cmdline", "hrsh7th/cmp-path", "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-vsnip", }, init = function() require("nvim-cmp-config")