drmargarido / TodoTreeView

Todo View for https://github.com/rxi/lite
MIT License
28 stars 3 forks source link

Color style for tags #13

Closed itmitica closed 7 months ago

itmitica commented 7 months ago

Great job with the Toggle Focus! Thanks.

Would it be possible to have color style for the tags: TODO red or blue and DONE in faded gray, for example?

drmargarido commented 7 months ago

Sure, I can allow colors to be configured per user. Not sure if I will use them in the default setup

drmargarido commented 7 months ago

Ok, seems to be working. Still need to check some things but will push it shortly. Captura de ecrã de 2024-03-16 09-14-04

drmargarido commented 7 months ago

Implementation done and released in commit https://github.com/drmargarido/TodoTreeView/commit/9ca164bb5540fd67058d9cc24fd70d0d9fb54971. You can check the way to configure the colors in the README

itmitica commented 7 months ago

Working as described.

itmitica commented 7 months ago

For this code, I'm not seeing the declared colors. Is there something that I'm doing wrong?

config.tag_colors["TODO"] = {
  tag={common.color("#ff0000")},
  tag_hover={common.color("#00ff00")},
  text={common.color("#A26769")},
  text_hover={common.color("#6D2E46")},
}

image

drmargarido commented 7 months ago

With the current implementation in this mode it only uses the text color, because the tag and the text are on the same line. For the other mode it uses both because the tag is split from the description.

I will update it to consider all colors in both modes.

drmargarido commented 7 months ago

After commit https://github.com/drmargarido/TodoTreeView/commit/228bf64d4cf33a91785197f7e98562e3e7be4ef6 the tag color is also used in the file mode. Also added a new config to allow configuration of the filename color. Check the README for examples.

One extra note, I noticed an error being displayed in the logs of the lite-xl after defining colors for a tag. Updated the README with an example that prevents that, any color not specified will use the current style.text and style.accent colors.

itmitica commented 7 months ago

Confirming.

image

Great job!

drmargarido commented 7 months ago

After you have it all configured to your likening, can you send a screenshot? I'm curious with the final result

itmitica commented 7 months ago

image

image

drmargarido commented 7 months ago

Those look pretty nice! :+1:

itmitica commented 7 months ago

For my current purpose, I think of these TODOs as bookmarks. I also try to follow the TODO-DOING-DONE process in keeping up with the current state of my daily, monthly, annual or just simply ephemeral tasks.

TodoTreeView is now the single one plugin and Lite-XL is probably the best editor that has managed not to frustrate me or box me in while trying to follow this process in a simple and straightforward manner.

Thanks.