summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/keymaps.lua1
-rw-r--r--.config/nvim/lua/plugins/lsp-saga.lua1
-rw-r--r--.config/nvim/lua/plugins/telescope.lua2
-rw-r--r--.config/nvim/lua/plugins/todo.lua25
4 files changed, 19 insertions, 10 deletions
diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua
index 637ddd1..2b2dba8 100644
--- a/.config/nvim/lua/keymaps.lua
+++ b/.config/nvim/lua/keymaps.lua
@@ -3,6 +3,7 @@ vim.keymap.set({ 'n', 'i' }, '<C-a>', '<Esc>ggVG', { desc = 'Visually Highlight
vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>')
vim.keymap.set('n', '<leader>z', function()
vim.cmd('Neotree close')
+ vim.cmd('Trouble todo close')
end, { desc = '[Z]en Mode' })
-- Undo/Redo
diff --git a/.config/nvim/lua/plugins/lsp-saga.lua b/.config/nvim/lua/plugins/lsp-saga.lua
index 28480b2..35c0a3a 100644
--- a/.config/nvim/lua/plugins/lsp-saga.lua
+++ b/.config/nvim/lua/plugins/lsp-saga.lua
@@ -20,7 +20,6 @@ return {
},
})
local diagnostic = require('lspsaga.diagnostic')
- local unused = 5
vim.keymap.set('n', 'K', ':Lspsaga hover_doc<cr>', { desc = 'Display Docs' })
vim.keymap.set('n', 'R', ':Lspsaga rename<cr>', { desc = '[R]ename' })
diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua
index f62cce0..86a6cec 100644
--- a/.config/nvim/lua/plugins/telescope.lua
+++ b/.config/nvim/lua/plugins/telescope.lua
@@ -26,8 +26,6 @@ return {
vim.keymap.set('n', '<leader>ds', builtin.lsp_document_symbols, { desc = '[D]ocument [S]symbols' })
vim.keymap.set('n', '<leader>ps', builtin.lsp_workspace_symbols, { desc = '[P]roject [S]ymbols' })
- -- TODO: Add filtering to TodoTelescope so it only shows "bad" things like TODOs, fixmes etc and not notes
- vim.keymap.set('n', '<leader>st', ':TodoTelescope<cr>', { desc = '[S]earch [T]odos' })
-- TODO: Look into the following
-- builtin.git_commits
diff --git a/.config/nvim/lua/plugins/todo.lua b/.config/nvim/lua/plugins/todo.lua
index 553a20c..45b2877 100644
--- a/.config/nvim/lua/plugins/todo.lua
+++ b/.config/nvim/lua/plugins/todo.lua
@@ -1,19 +1,27 @@
return {
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
+ config = function()
+ require('todo-comments').setup()
+ vim.keymap.set('n', '<leader>st', ':TodoTelescope keywords=TODO,FIX,WARN<cr>', { desc = '[S]earch [T]odos' })
+ vim.keymap.set('n', '<leader>lt', ':TodoTrouble<cr>', { desc = '[L]ist [T]odos' })
+ end,
opts = {
- signs = false, -- show icons in the signs column
+ signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority
keywords = {
+ -- NOTE: These are "todos"
+ TODO = { icon = ' ', color = 'info', alt = { 'todo' } },
FIX = { icon = ' ', color = 'error', alt = { 'FIXME', 'BUG', 'ISSUE' } },
- TODO = { icon = ' ', color = 'info' },
- HACK = { icon = ' ', color = 'warning', alt = { 'SMELL', 'CODE SMELL', 'BAD', 'BAD PRACTICE' } },
WARN = { icon = ' ', color = 'warning', alt = { 'WARNING' } },
- PERF = { icon = ' ', color = 'performance', alt = { 'PERFORMANCE', 'OPTIMIZE' } },
+ OPTIMIZE = { icon = ' ', color = 'performance' },
+ -- NOTE: These are "notes"
+ PERF = { icon = ' ', color = 'performance', alt = { 'PERFORMANCE' } },
+ HACK = { icon = ' ', color = 'warning', alt = { 'SMELL', 'CODE SMELL', 'BAD', 'BAD PRACTICE' } },
NOTE = { icon = ' ', color = 'hint', alt = { 'INFO' } },
TEST = { icon = '⏲ ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } },
- --UNSAFE = { icon = "󰍛 ", color = "error", alt = { "SAFETY" } },
+ UNSAFE = { icon = '󰍛 ', color = 'error', alt = { 'SAFETY' } },
},
gui_style = {
@@ -34,8 +42,11 @@ return {
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*:]], -- pattern or table of patterns, used for highlighting (vim regex)
- -- pattern = [[.*<(KEYWORDS)\s*]], -- pattern or table of patterns, used for highlighting (vim regex)
+ pattern = {
+ [[.*<(KEYWORDS)\s*:]],
+ -- [[.*<(KEYWORDS)\s*]],
+ -- [[.*<(KEYWORDS)\s*!()]],
+ }, -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = false,
max_line_len = 400,
exclude = {}, -- list of excluded filetypes