lexical-lsp / vscode-lexical

VSCode extension for Lexical, the modern Elixir language server
Apache License 2.0
34 stars 5 forks source link

Avoid depending on the `vscode` module as much as possible #50

Open Blond11516 opened 8 months ago

Blond11516 commented 8 months ago

We should avoid depending on the vscode typescript module as much as possible because it's only available when the extension is run within vscode itself.

This is fine for using the extension normally, but it complicates tests a lot because we have to create manual mocks for anything we import from vscode that has a runtime component (ie not types).

The worst offender is Uri, for which there is a partial replacement through the vscode-uri package, but it's not a perfect match. Some tedious manual mocking is still required.

The ultimate goal would be to have no dependencies on vscode outside of the extension.ts entrypoint.

Blond11516 commented 2 months ago

This should probably also extend to vscode-languageclient/node, which has some transitive dependencies on vscode