diff --git a/nvim/m-housh/after/ftplugin/markdown.lua b/nvim/m-housh/after/ftplugin/markdown.lua new file mode 100644 index 0000000..92290ab --- /dev/null +++ b/nvim/m-housh/after/ftplugin/markdown.lua @@ -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", + "tw", + "Trouble todo toggle filter = {tag = {WARN, IMPORTANT}}", + { 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" }) diff --git a/nvim/m-housh/ftplugin/swift.lua b/nvim/m-housh/after/ftplugin/swift.lua similarity index 100% rename from nvim/m-housh/ftplugin/swift.lua rename to nvim/m-housh/after/ftplugin/swift.lua diff --git a/nvim/m-housh/lua/user/plugin/formatter.lua b/nvim/m-housh/lua/user/plugin/formatter.lua index 30ff6aa..881f3d1 100755 --- a/nvim/m-housh/lua/user/plugin/formatter.lua +++ b/nvim/m-housh/lua/user/plugin/formatter.lua @@ -28,7 +28,7 @@ return { "--stdin-filepath", util.escape_path(util.get_current_buffer_file_path()), "--print-width", - "80", + "100", "--prose-wrap", "always", "--parser", diff --git a/nvim/m-housh/lua/user/plugin/todo-comments.lua b/nvim/m-housh/lua/user/plugin/todo-comments.lua index 3e03127..796e1e0 100644 --- a/nvim/m-housh/lua/user/plugin/todo-comments.lua +++ b/nvim/m-housh/lua/user/plugin/todo-comments.lua @@ -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", "tq", "Trouble todo toggle", { desc = "[T]odo [Q]uick fix list." }) vim.keymap.set("n", "t", "TodoTelescope", { desc = "[T]odo telescope list." }) diff --git a/nvim/m-housh/lua/user/settings.lua b/nvim/m-housh/lua/user/settings.lua index 206fbd4..defd134 100755 --- a/nvim/m-housh/lua/user/settings.lua +++ b/nvim/m-housh/lua/user/settings.lua @@ -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