Skip to content

Commit

Permalink
feat(plugins): add the ability to disable todo-comments.nvim in zen-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhdk authored and folke committed Jul 6, 2024
1 parent 6b4acad commit 4b80230
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Install the plugin with your preferred package manager:
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
Expand Down
1 change: 1 addition & 0 deletions lua/zen-mode/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ local defaults = {
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
diagnostics = { enabled = false }, -- disables diagnostics
todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
Expand Down
11 changes: 11 additions & 0 deletions lua/zen-mode/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,15 @@ function M.diagnostics(state, disable)
end
end

function M.todo(state, disable)
if disable then
state.todo = require("todo-comments.highlight").enabled
require("todo-comments").disable()
else
if state.todo then
require("todo-comments").enable()
end
end
end

return M

0 comments on commit 4b80230

Please sign in to comment.