Fork me on GitHub
#emacs
<
2024-01-11
>
pesterhazy17:01:44

Offtopic, but does anyone know how to set up eglot to properly read TSX files? I get squiggly lines for every TSX tag

2
pesterhazy17:01:11

Typescript [1005]: ')" expected

pesterhazy17:01:27

Took me way too long

jasonjckn05:01:04

@U06F82LES do you have your dotfiles posted anywhere, i wouldn't mind copying a fully working typescript implementation, incase I need it, i've heard it's non-trivial with emacs, and trivial in vim.

pesterhazy15:01:57

@U0J3J79FE https://github.com/pesterhazy/emacs.d/blob/master/init.el It's not working 100% yet though • Not sure which is the right mode for .tsx files - typescript-mode, web-mode or something else? • Indentation is borked. Sometimes something reverts to 4 spaces (rather than the desired 2) • Sometimes lsp doesn't seem to be working for whatever reason I was close to installing VSCode this week but I'm holding on for now. Kinda strange that it's so hard to configure what is arguably the most popular language today (typescript)

🙌 1
emacs-spin 1
jasonjckn03:01:52

Yah, definitely very strange , if you do go to visual studio code (I certainly am not), i've always been curious about https://github.com/BetterThanTomorrow/joyride and https://github.com/VSpaceCode/VSpaceCode and other such plugins to make it more hackable.

pesterhazy10:01:20

For the sake of posterity, I managed to get it to work much better now: • Emacs 29 • typescript-ts-mode • install grammar https://www.masteringemacs.org/article/how-to-get-started-tree-sitter#:~:text=The%20variable%20treesit%2Dlanguage%2Dsource,LANG%20and%20URL%20are%20mandatory. • reinstall elpa

pesterhazy10:01:40

typescript-ts-mode generally seems more modern and reliable than the older typescript-mode

jasonjckn08:01:08

@U06F82LES aw that makes me happy, I was going to suggest it but didn't want to send you down a rabbit hole

jasonjckn08:01:22

i try to use all the -ts- modes where possible, but some are more mature than others.