* bug#63944: Fwd: Language grammer not working for Typescript (Emacs 30 , fedora)
[not found] <f93e0149-31be-171a-c0ca-7624d2930479@secure.kjonigsen.net>
@ 2023-06-09 19:52 ` Jostein Kjønigsen
2023-06-10 5:30 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Jostein Kjønigsen @ 2023-06-09 19:52 UTC (permalink / raw)
To: 63944, Rajan Paudel
[-- Attachment #1: Type: text/plain, Size: 2960 bytes --]
This follow-up somehow fell out of the bug-tracker thread.
Vennlig hilsen
*Jostein Kjønigsen*
jostein@kjonigsen.net 🍵 jostein@gmail.com
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 <jostein@secure.kjonigsen.net>
Reply-To: jostein@kjonigsen.net
To: Rajan Paudel <rajan99702@proton.me>, jostein@kjonigsen.net
tsx is a different grammar and needs to be generated/compiled seperately.
Vennlig hilsen
*Jostein Kjønigsen*
jostein@kjonigsen.net 🍵 jostein@gmail.com
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
> <jostein@secure.kjonigsen.net> 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.
>> >
>> > [image.png]
>> >
>> > 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*
>>
>> jostein@kjonigsen.net 🍵 jostein@gmail.com
>> https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>
>>
>
[-- Attachment #2: Type: text/html, Size: 10506 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread