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

This commit is contained in:
2024-11-19 14:45:50 +01:00
parent d377f00905
commit d3ddf13024
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 -- Format file on save
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]

View File

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