cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Prevent language definitions from being read before they are ready

Open AndreasArvidsson opened this issue 1 year ago • 0 comments

Today we load a language definition whenever the document opens https://github.com/cursorless-dev/cursorless/blob/1bffae54938cc5702000d72812bc04ea1ac0dab8/packages/cursorless-engine/src/languages/LanguageDefinitions.ts#L86

The problem is that if they have the scope visualizer running we call the get method before the update is done and we get a error message https://github.com/cursorless-dev/cursorless/blob/1bffae54938cc5702000d72812bc04ea1ac0dab8/packages/cursorless-engine/src/languages/LanguageDefinitions.ts#L156

AndreasArvidsson avatar Jan 09 '25 16:01 AndreasArvidsson