[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xref/tags/lsp possible bug
From: |
Stefan Monnier |
Subject: |
Re: Xref/tags/lsp possible bug |
Date: |
Mon, 25 Apr 2022 16:05:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> Okay, it's not a real problem, but I wonder why is it, though.
> I suppose LSP does have a sort of symbol table kept in memory, so
> I think it wouldn't be a big problem to allow the user to query it.
> I suppose it's something that can be added in a future specification.
I must say I don't know why that is, but FWIW in my local experimental
language (Typer) it makes some sense: Typer has no top-level
environment, so if a file is defined as:
fun1 x = <foo>;
fun2 y = <bar>;
...
it's really the same as if it was:
let fun1 x = <foo>
in let fun2 y = <bar>;
in ...
You can still try to cobble up some kind of "list of top-levelish
definitions" but it's inevitably a hack.
OTOH, LSP could define the set of possible choices as the set of
possible "breadcrumbs" info.
Stefan