mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
fix: Fixes filetype plugins for nvim.
This commit is contained in:
20
nvim/m-housh/after/ftplugin/markdown.lua
Normal file
20
nvim/m-housh/after/ftplugin/markdown.lua
Normal 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" })
|
||||||
@@ -28,7 +28,7 @@ return {
|
|||||||
"--stdin-filepath",
|
"--stdin-filepath",
|
||||||
util.escape_path(util.get_current_buffer_file_path()),
|
util.escape_path(util.get_current_buffer_file_path()),
|
||||||
"--print-width",
|
"--print-width",
|
||||||
"80",
|
"100",
|
||||||
"--prose-wrap",
|
"--prose-wrap",
|
||||||
"always",
|
"always",
|
||||||
"--parser",
|
"--parser",
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
local todos = require("todo-comments")
|
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>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." })
|
vim.keymap.set("n", "<leader><leader>t", "<CMD>TodoTelescope<CR>", { desc = "[T]odo telescope list." })
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ local wo = vim.wo
|
|||||||
local fn = vim.fn
|
local fn = vim.fn
|
||||||
|
|
||||||
vim.cmd.set("inccommand=split")
|
vim.cmd.set("inccommand=split")
|
||||||
|
o.filetype = "on"
|
||||||
o.updatetime = 500 -- faster completion
|
o.updatetime = 500 -- faster completion
|
||||||
o.timeoutlen = 800 -- time to wait for a mapped sequence to complete (in milliseconds)
|
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
|
o.ttimeoutlen = 300 -- Time in milliseconds to wait for a key code sequence to complete
|
||||||
|
|||||||
Reference in New Issue
Block a user