Closed Moosieus closed 6 months ago
This PR also fixes two issues. Presently, as-you-type completions don't work with heex files, see:
This PR disables document-level completions for heex files, meaning diagnostics won't show until the file's saved. This is a preferable stop-gap until full support can be implemented, as mentioned here.
Diagnostics in eex were also resulting in LSP errors, fixed by a slight tweak to the error messaging regex.
Presently, Lexical reads file extensions to evaluate files as eex, heex, or elixir. This approach doesn't work for documents that haven't been saved to the file system. Consequently unsaved eex and heex files don't receive proper diagnostics.
This commit adds
language_id
to theDocument
struct and sets it when provided by LSP. If not available, the file extension will be used as a fallback.