magit-todos
magit-todos copied to clipboard
Feature request: make hl-todo an optional dependency
I often need to switch between desktop sessions to work on different projects on daily basis. hl-todo adds noticeable delays to desktop-read
when restoring sessions, in particular large ones with, for example, hundreds of buffers.
See tarsius/hl-todo#22
Hm, I'm not sure about this. You don't need to have hl-todo-mode
enabled to use magit-todos
. Simply having it installed is all that's necessary. Without it, we'd either have no keyword fontification, or we'd have to invent something, and I don't want to reimplement that.
It seems like the problem you're having is that hl-todo-mode
is slow, and I think the solution is to simply disable that mode in your config. You can still use magit-todos
.
You're right. I must have forgotten the case where the hl-todo package is installed but not enabled. Now I have tested it. Restoring sessions isn't affected.
As for fontifying the keywords listed in the TODOs section, a face defined within magit-todos should work. Before seeing your reply, I implemented it in a branch to not use hl-todo-keyword-faces. If you are interested, it's zhaojiangbin/magit-todos/todo-face.
Pressed the wrong key in previous comment.
It's zhaojiangbin/magit-todos@4e5b94edbf5f5ad9421ed579fb1be04fcf31be0c.
Also, feel free to close this issue as it's working fine for me without any code change.
Hmm, there is actually another case, minor albeit. Now that I don't enable hl-todo. I customize magit-todos-keywords
as a list of strings. If I have a new keyword that's not in the default hl-todo-keyword-faces
, this keyword is not highlighted in the TODOs section, unless I customize the hl-todo package and add the keyword in hl-todo-keyword-faces
.
Same if I want to change the colors for the fontification.
Perhaps just a documentation matter.
As for fontifying the keywords listed in the TODOs section, a face defined within magit-todos should work. Before seeing your reply, I implemented it in a branch to not use hl-todo-keyword-faces. If you are interested, it's zhaojiangbin/magit-todos/todo-face.
Thanks. The issue is that hl-todos gives us highlighting of several keywords. I don't want every keyword to be highlighted with the same face.
I customize magit-todos-keywords as a list of strings. If I have a new keyword that's not in the default hl-todo-keyword-faces, this keyword is not highlighted in the TODOs section, unless I customize the hl-todo package and add the keyword in hl-todo-keyword-faces.
Yeah, that's because the list of strings doesn't have colors associated. I guess we could change the customization to a list of cons cells with keyword and color in each, just like in hl-todos.
I'm not interested in working on this, but maybe someone else will be.