elm-language-client-vscode
elm-language-client-vscode copied to clipboard
Externally changed exposed values are not picked up by the extension
Expected Behavior
When the exposed values of a module change outside of VSCode then the autocomplete should show the new values and there should not be an error shown when the new values are used.
Current Behavior
I have two modules A and B, and module A imports module B. When the exposed values of module B change outside of VSCode then the new exposed values do not show up in the autocomplete in module A, and when I add them manually then an error is shown that the variable can not be found. Important here is that module B is not open in VSCode, otherwise it does work correctly.
Possible Solution
The extension could watch any elm files and update the language server accordingly.
Steps to Reproduce (for bugs)
- create module
Awithimport Band a valuea = B.b1 - create module
Bwith exposed valueb1 - make sure module
Bis not open in VSCode and moduleAis - open module
Boutside VSCode and add an exposed valueb2 - go back to VSCode and try to use
B.b2in moduleA, the autocomplete will not work and an error will be shown
Context
I often run into this issue when I have generated elm code with a watch on the source file. When I change the source file then the elm module is generated with a newly exposed value. But then in the elm code where I want to use that value it is not recognized. It can help to open the generated elm module, but not always.
Your Environment
- Version used: 2.4.1
- Editor name and version (e.g. VSCode 1.36.1): VSCode 1.69.0
- Environment name and version (e.g. node.js 5.4): node.js 16.15.1
- Operating System and version: Windows 11 Home