[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eglot's interface for major modes
From: |
Stephen Leake |
Subject: |
Re: eglot's interface for major modes |
Date: |
Sat, 08 Apr 2023 03:30:40 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Sebastian Poeplau <sebastian.poeplau@mailbox.org> writes:
> And then there's one more thing I'm exploring with this major mode. The
> Language Server Protocol has a concept of "semantic tokens" [1] -
> essentially server-provided fontification. The VS Code plugin for Ada
> uses it, and I've been able to make it work in Emacs with lsp-mode.
> (eglot support for semantic tokens seems to be work in progress [2].)
That will be supported by ada-mode when eglot supports it. I was also
working on a patch for eglot for that
(https://github.com/stephe-ada-guru/eglot), but decided to work on
tree-sitter first, partly because of bugs in ada_language_server, mostly
because ada_language_server is not very good for indenting, because the error
recovery is poor.
> The approach is probably inferior to the tree-sitter support for Ada
> that you and others are working on,
Why do you think that? ada_language_server does some semantic analysis
(mostly name resolution), so the results are more precise than a syntax
parser like wisitoken or tree-sitter can provide. ada_language_server is
not incremental, but it's _very_ fast, so you have to have _very_ large
files to notice a delay while editing.
--
-- Stephe
Re: eglot's interface for major modes, Sebastian Poeplau, 2023/04/08