tsx or javascript?
Hi,
I'm new to the tree-sitter world and I just saw this line in combobulate.el:
(add-to-list 'tree-sitter-major-mode-language-alist '(js2-mode . tsx))
Why using "tsx" as language instead of plain Javascript?
In a plain old JavaScript buffer, should I still use combobulate-setup-js-ts?
Hey Damien. Yeah that's a good catch. I need to split out support for tsx/jsx so they're totally separate.
Is it possible to distinguish between TS vs TSX, and JS vs JSX? After following combobulate's current setup, if I then open a Typescript file, not containing any TSX, the major mode is TypeScript[TSX]. It's not a huge problem, but not quite ideal either.
Yes, can you try the latest master branch? It should fix some teething issues around that.
Note that Combobulate looks at your tree sitter language to determine how to set itself up. So you can type M-x combobulate-mode in a buffer that has a javascript/typescript buffer and everything should work fine.
OK, I tried this:
- pull latest combobulate (6c36a85f2ac5c8664106cddc80c3f115ff9d0c3e) and eval
- visit Javascript file
- switch to typescript-ts-mode
- turn on combobulate-mode
I get setq: Symbol's value as variable is void: combobulate-rules-typescript.