Language server host for typescript using vscode's sync-api in the browser
MIT License
Language server host for typescript using vscode's sync-api in the browser
scheme
to determine some features (hasCapabilityForResource) (also getWorkspaceRootForResource)isWeb
, so I had to change place(s) it's used toomessages received by extension AND host use paths like ^/memfs/ts-nul-authority/sample-folder/file.ts
question: where is the population of sample-folder with a bunch of files happening?
question: Is that location writable while it's running?
but readFile is getting called with things like memfs:/sample-folder/memfs:/typesMap.json directoryExists with /sample-folder/node_modules/@types and /node_modules/@types same for watchDirectory watchDirectory with /sample-folder/^ and directoryExists with /sample-folder/^/memfs/ts-nul-authority/sample-folder/workspaces/ watchFile with /sample-folder/memfs:/sample-folder/memfs:/lib.es2020.full.d.ts
OK, so the paths that tsserver has look like this: ^/scheme/mount/whatever.ts but the paths the filesystem has look like this: scheme:/whatever.ts (not sure about 'mount', that's only when cloning from the fs) so you have to shave off the scheme that the host combined with the path and put on the scheme that the vfs is using.
Some commands ask for getExecutingFilePath or getCurrentDirectory and cons up a path themselves. This works, because URI.from({ scheme, path }) matches what the fs has in it Problem: In some messages (all?), vscode then refers to /x.ts and ^/vscode-test-web/mount/x.ts (or ^/memfs/ts-nul-authority/x.ts)