diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 225ab6e..495f67e 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "numToStr/Comment.nvim", - lazy = true, event = "VimEnter", opts = { --ignore empty lines diff --git a/lua/plugins/context.lua b/lua/plugins/context.lua index 75aa917..8804ad4 100644 --- a/lua/plugins/context.lua +++ b/lua/plugins/context.lua @@ -1,7 +1,6 @@ ---@type LazyPluginSpec return { "wellle/context.vim", - lazy = true, event = "VimEnter", init = function() vim.g.context_enabled = true diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index c50366c..4084da0 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -10,7 +10,6 @@ end ---@type LazyPluginSpec return { "tpope/vim-fugitive", - lazy = true, event = "VimEnter", ---@type LazyKeysSpec[] keys = { diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index b7a8f94..fc3f40b 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "lewis6991/gitsigns.nvim", - lazy = true, event = "VimEnter", opts = { on_attach = function(bufnr) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index b567acb..105277f 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "nvim-lualine/lualine.nvim", - lazy = true, event = "VimEnter", config = function() local custom_moonfly = require("lualine.themes.moonfly") diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 2ba928d..8174374 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "williamboman/mason.nvim", - lazy = true, event = "VimEnter", config = true, } diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua index 1ce834a..59b985f 100644 --- a/lua/plugins/notify.lua +++ b/lua/plugins/notify.lua @@ -10,6 +10,7 @@ return { stages = "static", }, config = function(_, opts) + ---@type notify vim.notify = require("notify") vim.notify.setup(opts) end, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 576ea29..269e3f2 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "nvim-telescope/telescope.nvim", - lazy = true, event = "VimEnter", dependencies = { "nvim-lua/plenary.nvim", diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 3c3041c..b0a7d0e 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,50 +1,47 @@ -- https://github.com/nvim-treesitter/nvim-treesitter ----@type LazyPluginSpec[] +---@type LazyPluginSpec return { - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - lazy = true, - event = "VimEnter", - opts = { - ensure_installed = { - "c", -- recommended default - "lua", -- recommended default - "vim", -- recommended default - "vimdoc", -- recommended default - "query", -- recommended default - "luadoc", - "phpdoc", - "org", - "comment", - }, - auto_install = true, - highlight = { - enable = true, - disable = {}, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = { "org", "php", "python" }, - }, + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = "VimEnter", + opts = { + ensure_installed = { + "c", -- recommended default + "lua", -- recommended default + "vim", -- recommended default + "vimdoc", -- recommended default + "query", -- recommended default + "luadoc", + "phpdoc", + "org", + "comment", }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) + auto_install = true, + highlight = { + enable = true, + disable = {}, - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - vim.opt.foldenable = true - - -- Disable LSP semantic highlighting for comments because it will otherwise - -- override highlights from `comment`. - vim.api.nvim_set_hl(0, "@lsp.type.comment", {}) - - -- To set the priority of semantic highlighting lower than treesitter (100), - -- uncomment the line below: - -- vim.highlight.priorities.semantic_tokens = 99 - end, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = { "org", "php", "python" }, + }, }, + config = function(_, opts) + require("nvim-treesitter.configs").setup(opts) + + vim.opt.foldmethod = "expr" + vim.opt.foldexpr = "nvim_treesitter#foldexpr()" + vim.opt.foldenable = true + + -- Disable LSP semantic highlighting for comments because it will otherwise + -- override highlights from `comment`. + vim.api.nvim_set_hl(0, "@lsp.type.comment", {}) + + -- To set the priority of semantic highlighting lower than treesitter (100), + -- uncomment the line below: + -- vim.highlight.priorities.semantic_tokens = 99 + end, } diff --git a/lua/plugins/winresizer.lua b/lua/plugins/winresizer.lua index 61f9ac7..1cb6736 100644 --- a/lua/plugins/winresizer.lua +++ b/lua/plugins/winresizer.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "simeji/winresizer", - lazy = true, keys = { { "r", vim.cmd.WinResizerStartResize, mode = "n" }, }, diff --git a/lua/plugins/winshift.lua b/lua/plugins/winshift.lua index d67c34a..0af4e1c 100644 --- a/lua/plugins/winshift.lua +++ b/lua/plugins/winshift.lua @@ -3,7 +3,6 @@ ---@type LazyPluginSpec return { "sindrets/winshift.nvim", - lazy = true, keys = { { "m", vim.cmd.WinShift, mode = "n" }, },