anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
457 stars 53 forks source link

Fix bug where highlighting is not kept when the file has a type error and imports some other file #2959

Closed janmasrovira closed 3 months ago

janmasrovira commented 3 months ago

Example file:

module error;

import empty; -- error only happens if we have at least one import

type T := t;

x : T := t t; -- type error

If one loads this file into emacs (or vscode) they'll get a type error as expected, but name colors and go-to information is lost, which is annoying. This pr fixes this. I'm not sure why, but this bug only occurs when there is at least one import.