feat(language-server): @use document links, @use export completion and document highlights #264
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!264
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lsp-links-highlights"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR 1 of the DX plan (phase 1A), in
packages/language-server, for every LSP client:textDocument/documentLink): the path of every@use "…"links to the module the graph resolved it to (aliases included). No link forMODULE_NOT_FOUND; a module that does not parse keeps its link.@useexport completion: afteras &the default export's name, insideas { … }the exported sections not bound yet (multi-word names inserted asname{}), nothing on a local name. Read from the live line prefix and from the module through the LSP module host (computeExports), so it works while the line does not parse yet;@usepath completion now also works in a document that does not parse.textDocument/documentHighlight): ingredients grouped byslugifyid (alternatives, composite parent,@&targets), intermediates (->&and@usebindings as Write,&refand&targets as Read). Names only, never the whole mention.Tests: new
document-links.test.tsanddocument-highlight.test.ts;completions-imports.test.ts,capabilities.test.tsandgeneric-client.test.ts(views: false, end to end on a two-file project) extended. Language server: 314 pass, typecheck and biome clean, docs build OK.Docs (en + fr):
language-server.mdx(Document Highlight, Document Link, Completion), a Navigation column in theeditors.mdxmatrix, language server README. Changesetminoron@gram-lang/language-server.