Subject: Fwd: Language grammer not working for Typescript (Emacs 30 , fedora)

From: Jostein Kjønigsen <[email-masked]>
Date: Fri, 9 Jun 2023 21:52:19 +0200

This follow-up somehow fell out of the bug-tracker thread.

Vennlig hilsen
*Jostein Kjønigsen*

[email-masked] 🍵 [email-masked]
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>

-------- Forwarded Message --------
Subject: 	Re: Language grammer not working for Typescript (Emacs 30 , 
fedora)
Date: 	Fri, 9 Jun 2023 15:40:46 +0200
From: 	Jostein Kjønigsen <[email-masked]>
Reply-To: 	[email-masked]
To: 	Rajan Paudel <[email-masked]>, [email-masked]

tsx is a different grammar and needs to be generated/compiled seperately.

Vennlig hilsen
*Jostein Kjønigsen*

[email-masked] 🍵 [email-masked]
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
On 6/9/23 15:28, Rajan Paudel wrote:
> ah it worked, problem was in that `parser.c` library, Somehow , 
> treesit didnt detected  parser.c for typescript even if i typed it,  i 
> had left default which was reason it didnt found library and gave
> Enter the subdirectory in which the parser.c file resides (default: 
> "src"):
>
> ``
> ⛔ Warning (treesit): Error encountered when installing language 
> grammar: (file-missing Setting current directory No such file or 
> directory /tmp/treesit-workdir5YrpTB/repo/src)
> ```
> I later clone https://github.com/tree-sitter/tree-sitter-typescript 
> directly and gave location to 
> `~/tree-sitter-typescript/typescript/src` where parser resides
>
> Now i have successfully generated typescript.so .
>
> I can run now `typescript-ts-mode` after enabling it
> though it still throwing error when enabling it
> ⛔ Warning (treesit): Cannot activate tree-sitter, because language 
> grammar for tsx is unavailable (not-found): (libtree-sitter-tsx 
> libtree-sitter-tsx.0 libtree-sitter-tsx.0.0 libtree-sitter-tsx.so 
> <http://libtree-sitter-tsx.so> libtree-sitter-tsx.so.0 
> libtree-sitter-tsx.so.0.0) No such file or directory
>
> ------- Original Message -------
> On Friday, June 9th, 2023 at 10:26 AM, Jostein Kjønigsen 
> <[email-masked]> wrote:
>
>> > In that directory i can find `.so` for other , but not for typescript. Because of same error was coming i tried to use I had tried to use treesit-auto, which manually install treesitter , but it also failed ,while not for other languages i tried.
>> >
>> >
>> > This error was only coming from `typescript-ts-mode` , I'm doing angular, i cant get ide features now for angular . Thank you for helping
>> Try manually installing the grammar:
>>
>>   * M-x treesit-install-language-grammar
>>   * Type "typescript"
>>   * Confirm you want an interactive install.
>>   * Use this url for language grammar:
>>     https://github.com/tree-sitter/tree-sitter-typescript
>>
>> This is what I've done and it works for me.
>>
>> --
>> Vennlig hilsen
>> *Jostein Kjønigsen*
>>
>> [email-masked] 🍵 [email-masked]
>> https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
>>
>