wkirschbaum / heex-ts-mode

Emacs Heex major mode using Treesitter for fontification, navigation and indentation
GNU General Public License v3.0
20 stars 3 forks source link

`heex-ts-mode` does not derive from `prog-mode` #4

Open KaranAhlawat opened 6 months ago

KaranAhlawat commented 6 months ago

The derivation chain goes heex-ts-mode <- html-mode <- sgml-mode <- text-mode <- nil. Which means users may trigger (and conversely not trigger) behavior they have setup in text-mode (and conversely prog-mode).

For a concrete example, the default completion-at-point keybinding is taken over by ispell in text-mode. This was unexpected since heex-ts-mode, is primarily a programming buffer, even if you're just mostly writing templates.

What are your thoughts on making it derive from prog-mode or web-mode rather than html-mode?

wkirschbaum commented 6 months ago

html-mode was just the simplest to start with. you are welcome to create a PR or maybe suggest some specific changes.

KaranAhlawat commented 6 months ago

I'll see if just swapping out html-mode for prog-mode is sufficient. Will open a PR if it is

wkirschbaum commented 6 months ago

@KaranAhlawat it will be a bit more than that, but check the behaviour with other packages. It might also be worth while to have a look how other templating modes work and where they derive from.

KaranAhlawat commented 6 months ago

vue-ts-mode derives from prog-mode, while astro-ts-mode derives from html-mode. Couldn't find other examples of templating languages modes.