From e7fd1c87148ddbaccf69fcedf676162ba211a6d2 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 24 Aug 2022 02:19:41 +0200 Subject: [PATCH] nvim: add todo-comments --- .config/nvim/lua/my/filetypes.lua | 12 ++++++++++++ .config/nvim/lua/my/plugins.lua | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/.config/nvim/lua/my/filetypes.lua b/.config/nvim/lua/my/filetypes.lua index 32eec69..5a46f1c 100644 --- a/.config/nvim/lua/my/filetypes.lua +++ b/.config/nvim/lua/my/filetypes.lua @@ -2,6 +2,7 @@ require('my/plugins') require 'nvim-treesitter.configs'.setup { ensure_installed = 'all', + ignore_install = { 'comment' }, sync_install = true, highlight = { enable = true, @@ -38,3 +39,14 @@ vim.api.nvim_create_autocmd({ 'BufEnter' }, { pattern = { '*.m3u8', '*.m3u' }, command = [[set textwidth=0]] }) + +require("todo-comments").setup({ + highlight = { + keyword = 'bg', + after = '' + } +}) +local map = require('my.functions').map +map('n', 'tt', + require("telescope._extensions.todo-comments").exports.todo, + 'Display TODO comments in project') diff --git a/.config/nvim/lua/my/plugins.lua b/.config/nvim/lua/my/plugins.lua index 3510727..4c94f8e 100644 --- a/.config/nvim/lua/my/plugins.lua +++ b/.config/nvim/lua/my/plugins.lua @@ -34,6 +34,10 @@ require('packer').startup(function(use) requires = 'https://github.com/nvim-treesitter/nvim-treesitter' } use { 'https://github.com/gentoo/gentoo-syntax' } + use { + 'https://github.com/folke/todo-comments.nvim', + requires = { 'https://github.com/nvim-lua/plenary.nvim' } + } -- completion use {