dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.74k stars 257 forks source link

Use syntax-injection for wikilink decorations #3294

Open memeplex opened 2 years ago

memeplex commented 2 years ago

Please select if your request is either something new or an enhancement

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Is your feature request related to a problem? Please describe

Decorations are heavy on resources, show some flickering, don't follow the current theme, aren't easily customizable.

Describe the solution you'd like

Use syntax-injection instead. I've contributed code to Foam and Memo which does that and both PRs have been merged months ago without complaints since then. The solution was easy to implement and got rid of a chunk of decorating code.

Additional context

See detailed description and discussion of the involved issues in:

Advantages of injection over decorations:

Also notice that https://github.com/dendronhq/dendron/issues/3292 wouldn't be an issue with injections.

jonathanyeung commented 2 years ago

@memeplex - thanks for the suggestion. By syntax injection, are you referring to this VSCode feature? https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide

I haven't personally tried that feature, but from briefly scanning the other issues you linked, I think this approach makes sense and could help perf.

The only part with respect to Dendron wiklinks that would still require decorators is with tags / user tags, which are special wikilinks that get rendered with a colored square via decorators.