From: Stefan Kangas <stefankangas@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: "Theodor Thornhill" <theo@thornhill.no>,
"62399@debbugs.gnu.org" <62399@debbugs.gnu.org>,
"牟 桐" <mou.tong@outlook.com>
Subject: bug#62399: 回复: bug#62399: 30.0.50; eglot + csharp-ts-mode, query pattern is malformed
Date: Mon, 4 Sep 2023 12:56:48 -0700 [thread overview]
Message-ID: <CADwFkmmr+-JD9LtP33mrxF_dJt7f3n_NXBsO-fac3Sfob9tGwA@mail.gmail.com> (raw)
In-Reply-To: <11ee8256-a2e0-a64c-dc33-b9dab57ad552@yandex.ru> (Dmitry Gutov's message of "Thu, 23 Mar 2023 09:57:36 +0200")
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 23/03/2023 08:25, 牟 桐 wrote:
>> Ah sorry, here it is:
>> ``` csharp-ts-mode
>> Console.WriteLine("Hello, World!");
>> ```
>> (yes, just one line...)
>
> Thanks! I guess the problem will show up with any file.
>
> And I can repro after installing the c-sharp grammar from master.
>
>> The lsp I’m using is `csharp-ls`, I guess it won’t affect this issue.
>> But just in case, the way to install `csharp-ls` is
>> dotnet tool install csharp-ls -g
>
> A language server was not necessary to reproduce this, but thanks.
>
> This is the patch that worked for me:
It doesn't seem like this was ever installed? Should it be?
> diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
> index 47cd13e7fdb..e2df08f4dae 100644
> --- a/lisp/progmodes/csharp-mode.el
> +++ b/lisp/progmodes/csharp-mode.el
> @@ -832,7 +832,7 @@ csharp-ts-mode--font-lock-settings
>
> (constructor_declaration name: (_) @font-lock-type-face)
>
> - (method_declaration type: [(identifier) (void_keyword)]
> @font-lock-type-face)
> + (method_declaration type: [(identifier) (predefined_type)]
> @font-lock-type-face)
> (method_declaration type: (generic_name (identifier)
> @font-lock-type-face))
> (method_declaration name: (_) @font-lock-function-name-face)
>
>
> Looks like a change was made to the grammar fairly recently which made
> (void_keyword) not valid in the above context:
> https://github.com/tree-sitter/tree-sitter-c-sharp/commit/18a531d4c133d9f1b3796b9bead7681ba3382fb3
>
> Cc'ing the author of that mode for a second opinion. But I guess we'll need a
> runtime check just like we added for java-ts-mode recently.
prev parent reply other threads:[~2023-09-04 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 5:59 bug#62399: 30.0.50; eglot + csharp-ts-mode, query pattern is malformed 牟 桐
2023-03-23 6:09 ` Dmitry Gutov
2023-03-23 6:25 ` bug#62399: 回复: " 牟 桐
2023-03-23 7:57 ` Dmitry Gutov
2023-03-23 16:19 ` 牟 桐
2023-09-04 19:56 ` Stefan Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmr+-JD9LtP33mrxF_dJt7f3n_NXBsO-fac3Sfob9tGwA@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=62399@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=mou.tong@outlook.com \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).