Closed jdelStrother closed 6 years ago
Hello, looks definitely better, but requiring a big mode just for a single(?) syntax highlighting regexp is an overkill and doesn't feel right in terms of Emacs packaging system (at least as how i see it). Is it problematic to extract just types syntax colorizing from web-mode?
I think that might be beyond my limited elisp skills. I was hoping to get away with it given it's an optional dependency - it should just fall back to plain text if web-mode isn't installed.
FWIW I tweaked the original approach - it still relies on the web-mode package being installed, but sets up the bare minimum of font-lock variables rather than invoking (web-mode)
, so is quite a bit faster.
Can I do anything to help get this merged?
Thinking about it, I think the syntax we need to deal with is actually very limited. We might be able to get away with something as simple as this 888388b21b4a8aee2a92ec351979102c5ab50c0d, where I've removed the web-mode dependency entirely.
I'm going to try running with this for a week or so and see if I find any glaring syntax omissions.
FWIW this has been working pretty well for me for locally.
Hi there, I've found colorizing the output from type-at-pos can make things a lot more readable - eg:
WDYT to this approach?
(Update: For reference, my old approach using web-mode highlighting was here: https://github.com/an-sh/flow-minor-mode/compare/master...jdelStrother:colorize-type-web-mode . I've since updated this branch to remove the web-mode dependency.)