fix: Fixes filetype plugins for nvim.

This commit is contained in:
2024-11-23 15:26:33 -05:00
parent 0a9e065b4d
commit 3badd6a046
5 changed files with 29 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
-- Markdown specific key maps.
--
local todos = require("todo-comments")
local keywords = { "WARN", "WARNING", "IMPORTANT" }
-- Show all the warnings in the quick fix list.
vim.keymap.set(
"n",
"<leader>tw",
"<CMD>Trouble todo toggle filter = {tag = {WARN, IMPORTANT}}<CR>",
{ desc = "[T]odo [W]arnings" }
)
vim.keymap.set("n", "]w", function()
todos.jump_next({ keywords = keywords })
end, { desc = "Next [W]arning" })
vim.keymap.set("n", "[w", function()
todos.jump_prev({ keywords = keywords })
end, { desc = "Previous [W]arning" })

View File

@@ -28,7 +28,7 @@ return {
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--print-width",
"80",
"100",
"--prose-wrap",
"always",
"--parser",

View File

@@ -8,7 +8,13 @@ return {
config = function()
local todos = require("todo-comments")
todos.setup({})
todos.setup({
keywords = {
-- Adds the important keyword, I primarily use this in markdown
-- documents to be able to jump and color appropriately.
FIX = { alt = { "IMPORTANT" } },
},
})
vim.keymap.set("n", "<leader>tq", "<CMD>Trouble todo toggle<CR>", { desc = "[T]odo [Q]uick fix list." })
vim.keymap.set("n", "<leader><leader>t", "<CMD>TodoTelescope<CR>", { desc = "[T]odo telescope list." })

View File

@@ -3,6 +3,7 @@ local wo = vim.wo
local fn = vim.fn
vim.cmd.set("inccommand=split")
o.filetype = "on"
o.updatetime = 500 -- faster completion
o.timeoutlen = 800 -- time to wait for a mapped sequence to complete (in milliseconds)
o.ttimeoutlen = 300 -- Time in milliseconds to wait for a key code sequence to complete