nvim: todo-notes: Add highlight for rust safety comments

This commit is contained in:
2024-11-19 14:45:50 +01:00
parent 06257367b8
commit 06affa9723
2 changed files with 14 additions and 3 deletions

View File

@ -127,8 +127,6 @@ require('cmp').setup.filetype({ "rust" }, {
},
})
require("todo-comments").setup()
-- Format file on save
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]

View File

@ -8,6 +8,19 @@ require("lazy").setup({
{
'folke/todo-comments.nvim',
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
keywords = {
SAFETY = {
icon = "",
color = "warning",
alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
},
INVARIANT = {
icon = "🦑",
color = "hint",
},
},
},
},
{
"folke/which-key.nvim",
@ -20,7 +33,7 @@ require("lazy").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
},
},
{ 'rktjmp/fwatch.nvim' },