diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-23 14:02:30 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-23 14:02:30 +0300 |
| commit | 4e1a9cad9236d5b9b9a675eab6db9d252783e3ad (patch) | |
| tree | a3bcc7b48ecfc346c52fac8b5cf6a3d4896ef8b7 /.config/nvim/lua/custom | |
| parent | 185a8b8c64aa24a64f318c1fd5dddc9593aedaec (diff) | |
feat(neovim): lazy loaded lualine and todo-comments
Diffstat (limited to '.config/nvim/lua/custom')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/statusline.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/todo-comments.lua | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/.config/nvim/lua/custom/plugins/statusline.lua b/.config/nvim/lua/custom/plugins/statusline.lua index 8dfe41f..8d3b4ac 100644 --- a/.config/nvim/lua/custom/plugins/statusline.lua +++ b/.config/nvim/lua/custom/plugins/statusline.lua @@ -1,7 +1,7 @@ return { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons', 'linrongbin16/lsp-progress.nvim' }, - event = 'BufWinEnter', + event = 'VeryLazy', config = function() require('custom.configs.statusline') end, diff --git a/.config/nvim/lua/custom/plugins/todo-comments.lua b/.config/nvim/lua/custom/plugins/todo-comments.lua index 6d8b58f..4ceb972 100644 --- a/.config/nvim/lua/custom/plugins/todo-comments.lua +++ b/.config/nvim/lua/custom/plugins/todo-comments.lua @@ -11,9 +11,14 @@ return { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, + event = "VeryLazy", + keys = { + { '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX<cr>', desc = '[S]earch [T]odos' }, + { '<leader>lt', '<cmd>TodoTrouble<cr>', desc = '[L]ist [T]odos' }, + }, config = function() require('todo-comments').setup({ - signs = true, -- show icons in the signs column + signs = false, -- show icons in the signs column sign_priority = 8, -- sign priority keywords = { @@ -44,10 +49,10 @@ return { highlight = { multiline = true, multiline_pattern = '^.', -- lua pattern to match the next multiline from the start of the matched keyword - multiline_context = 10, -- extra lines that will be re-evaluated when changing a line - before = '', -- "fg" or "bg" or empty - keyword = 'wide', -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) - after = 'fg', -- "fg" or "bg" or empty + multiline_context = 10, -- extra lines that will be re-evaluated when changing a line + before = '', -- "fg" or "bg" or empty + keyword = 'wide', -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) + after = 'fg', -- "fg" or "bg" or empty pattern = { [[.*<(KEYWORDS)\s*:]], -- [[.*<(KEYWORDS)\s*]], @@ -88,7 +93,5 @@ return { -- pattern = [[\b(KEYWORDS)\b]], }, }) - vim.keymap.set('n', '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX<cr>', { desc = '[S]earch [T]odos' }) - vim.keymap.set('n', '<leader>lt', '<cmd>TodoTrouble<cr>', { desc = '[L]ist [T]odos' }) end, } |
