diff --git a/nvim/m-housh/lua/user/plugin/cmp.lua b/nvim/m-housh/lua/user/plugin/cmp.lua index 2d2b5a1..c021534 100644 --- a/nvim/m-housh/lua/user/plugin/cmp.lua +++ b/nvim/m-housh/lua/user/plugin/cmp.lua @@ -16,6 +16,7 @@ return { -- Adds a number of user-friendly snippets 'rafamadriz/friendly-snippets', }, + event = { 'BufReadPre', 'BufNewFile' }, config = function() -- Setup nvim-cmp. local cmp = require "cmp" diff --git a/nvim/m-housh/lua/user/plugin/comment.lua b/nvim/m-housh/lua/user/plugin/comment.lua index 90e5cfb..b309b03 100644 --- a/nvim/m-housh/lua/user/plugin/comment.lua +++ b/nvim/m-housh/lua/user/plugin/comment.lua @@ -3,5 +3,5 @@ return { opts = { -- add any options here }, - lazy = false, + event = { 'BufReadPre', 'BufNewFile' }, } diff --git a/nvim/m-housh/lua/user/plugin/formatter.lua b/nvim/m-housh/lua/user/plugin/formatter.lua index 4bc9b8f..b7d55b3 100644 --- a/nvim/m-housh/lua/user/plugin/formatter.lua +++ b/nvim/m-housh/lua/user/plugin/formatter.lua @@ -1,5 +1,6 @@ return { "mhartington/formatter.nvim", + event = { 'BufReadPre', 'BufNewFile' }, config = function() local util = require("formatter.util") require("formatter").setup({ diff --git a/nvim/m-housh/lua/user/plugin/init.lua b/nvim/m-housh/lua/user/plugin/init.lua index 81501e9..cd2f9e8 100644 --- a/nvim/m-housh/lua/user/plugin/init.lua +++ b/nvim/m-housh/lua/user/plugin/init.lua @@ -4,6 +4,7 @@ return { "L3MON4D3/LuaSnip", version = "2.*", build = "make install_jsregexp", + event = { 'BufReadPre', 'BufNewFile' }, config = function() local luasnip = require('luasnip') local types = require('luasnip.util.types') diff --git a/nvim/m-housh/lua/user/plugin/swift.lua b/nvim/m-housh/lua/user/plugin/swift.lua index 2c0a844..b5265de 100644 --- a/nvim/m-housh/lua/user/plugin/swift.lua +++ b/nvim/m-housh/lua/user/plugin/swift.lua @@ -3,6 +3,7 @@ return { dependencies = { 'akinsho/toggleterm.nvim' }, + event = { 'BufReadPre', 'BufNewFile' }, config = function() require('swift').setup() local default_options = { noremap = true, silent = true } diff --git a/nvim/m-housh/lua/user/plugin/treesitter.lua b/nvim/m-housh/lua/user/plugin/treesitter.lua index e78824b..ecd97c2 100644 --- a/nvim/m-housh/lua/user/plugin/treesitter.lua +++ b/nvim/m-housh/lua/user/plugin/treesitter.lua @@ -5,6 +5,7 @@ return { 'nvim-treesitter/nvim-treesitter-textobjects', }, build = ':TSUpdate', + event = { 'BufReadPre', 'BufNewFile' }, config = function() require('nvim-treesitter.configs').setup { ensure_installed = { @@ -61,7 +62,9 @@ return { ["ib"] = "@block.inner", ["ab"] = "@block.outer", ["ir"] = "@parameter.inner", - ["ar"] = "@parameter.outer" + ["ar"] = "@parameter.outer", + ["a="] = "@assignment.outer", + ["i="] = "@assignment.inner", } } }, diff --git a/nvim/m-housh/lua/user/plugin/wrapping.lua b/nvim/m-housh/lua/user/plugin/wrapping.lua index 042cdc6..a24fc01 100644 --- a/nvim/m-housh/lua/user/plugin/wrapping.lua +++ b/nvim/m-housh/lua/user/plugin/wrapping.lua @@ -1,5 +1,6 @@ return { "andrewferrier/wrapping.nvim", + event = { 'BufReadPre', 'BufNewFile' }, opts = { auto_set_mode_filetype_allowlist = { "asciidoc", @@ -9,12 +10,8 @@ return { "tex", "text" }, + softener = { + markdown = 1.3 + }, }, - config = function() - require("wrapping").setup({ - softener = { - markdown = 1.3 - }, - }) - end }