Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: make hl-todo an optional dependency #40

Open
zhaojiangbin opened this issue Jul 15, 2018 · 6 comments
Open

Feature request: make hl-todo an optional dependency #40

zhaojiangbin opened this issue Jul 15, 2018 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zhaojiangbin
Copy link

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

@alphapapa
Copy link
Owner

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.

@zhaojiangbin
Copy link
Author

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.

@zhaojiangbin
Copy link
Author

Pressed the wrong key in previous comment.

It's zhaojiangbin/magit-todos@4e5b94e.

Also, feel free to close this issue as it's working fine for me without any code change.

@zhaojiangbin
Copy link
Author

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.

@alphapapa
Copy link
Owner

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.

@alphapapa alphapapa self-assigned this Jul 16, 2018
@alphapapa alphapapa added the enhancement New feature or request label Jul 17, 2018
@alphapapa alphapapa added the help wanted Extra attention is needed label Nov 1, 2020
@alphapapa alphapapa removed their assignment Nov 1, 2020
@alphapapa
Copy link
Owner

I'm not interested in working on this, but maybe someone else will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants