From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#63944: Fwd: Language grammer not working for Typescript (Emacs 30 , fedora) Date: Fri, 9 Jun 2023 21:52:19 +0200 Message-ID: References: Reply-To: jostein@kjonigsen.net Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------JGVaSpQWo0lxXIhP89nxnsMt" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36853"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 To: 63944@debbugs.gnu.org, Rajan Paudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 09 21:53:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7iAh-0009Ks-Jl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Jun 2023 21:53:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7iAR-0006ga-W4; Fri, 09 Jun 2023 15:53:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7iAQ-0006gR-6j for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2023 15:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7iAP-0002DJ-Uu for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2023 15:53:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7iAP-0006WQ-MU for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2023 15:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jun 2023 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63944 X-GNU-PR-Package: emacs Original-Received: via spool by 63944-submit@debbugs.gnu.org id=B63944.168634035225028 (code B ref 63944); Fri, 09 Jun 2023 19:53:01 +0000 Original-Received: (at 63944) by debbugs.gnu.org; 9 Jun 2023 19:52:32 +0000 Original-Received: from localhost ([127.0.0.1]:60508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7i9v-0006Vb-IR for submit@debbugs.gnu.org; Fri, 09 Jun 2023 15:52:32 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7i9r-0006VK-Mk for 63944@debbugs.gnu.org; Fri, 09 Jun 2023 15:52:29 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 196FE5C02EA; Fri, 9 Jun 2023 15:52:22 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 09 Jun 2023 15:52:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:reply-to:sender:subject:subject:to:to; s= fm3; t=1686340342; x=1686426742; bh=7h0AIBCrtr50oMyDoCKXSAwFvmbs SaZNEKFPAsHea9U=; b=PPWQwXMDMHdT9q/j1LYKnQijMWdCJKTrmG4oJLwNzvmg DdgWVTGa7oaGjwRXxQajIJbpOIpNBtqHt3y+nkIIldCdqSYJ4BnmWTi7sa9NFKoT GG/oY2/5CrrAqVNfIHsxRuobFycuYgV/GXakOwVW3eS18S1XG9N6gGLcheJResqv prdl+re4ntgdFhLJNOqEHNLz4B1t2QOVuHSQ2T9B5DIH+/HRZTFfPR86KF7ECm9j ZB9ISDa/rhZpTa6HrFwPnWkpOtdbcA4vb/XlZAQhXKFzGDyb8ldRd018UrhupJt9 2zIqLlMEVrTjGrYS5Cct8MLrfFfX1Zx5QcWx0BFjqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1686340342; x=1686426742; bh=7 h0AIBCrtr50oMyDoCKXSAwFvmbsSaZNEKFPAsHea9U=; b=Xauxqz6WHgTRMrZI7 t81fZ39bct2yfadtbJgB/EfXzaSPzVlDXj+w+oojjtRa9DU6HThar6Lm2nUen7+z gQq7U5c9dzmlQflLqgt9duKevqdjbrWIcYHSSJ3rCSpVg3fKpOTJlC+M36c0ZZqF AiSuNwBAzxiI+lK9cmXrY3RqOZDxF+NqsbCcOtTv4Dg+OLJV4ujKrkKBNGTRq+sN zVBCDVF0nmjMMX6X1vD4NPjlhr8iQnFhCLoej/RWjJhcIwdSsESU1aBMcKFUNhgp V0/G4PICxgCySF9Ra7Z8T3fYDkOVWJ1Tih+6mU+6yytTyWAxJXvjim0X3PdJX3se fQSpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedtkedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtkfffgggfufhrfhfvhfgjsegrtderredtfeejnecuhfhrohhmpeflohhs thgvihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonh highhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeevheeitdelfedvfffhgfeggeeu feevkedvvefgfeffvdeggeegteevteejgedtkeenucffohhmrghinhepkhhjnhhighhsvg hnrdhnohdpghhithhhuhgsrdgtohhmpdhlihgsthhrvggvqdhsihhtthgvrhdqthhsgidr shhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjh hoshhtvghinhesshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Jun 2023 15:52:21 -0400 (EDT) Content-Language: en-GB, nb-NO In-Reply-To: X-Forwarded-Message-Id: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263184 Archived-At: This is a multi-part message in MIME format. --------------JGVaSpQWo0lxXIhP89nxnsMt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 -------- 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 Reply-To: jostein@kjonigsen.net To: Rajan Paudel , 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 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 > 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 > 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 >> > --------------JGVaSpQWo0lxXIhP89nxnsMt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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



-------- 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.

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 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 tr
 ied.
>
> [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:

This is what I've done and it works for me.

--


--------------JGVaSpQWo0lxXIhP89nxnsMt--