This repository was archived by the owner on Nov 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 8
8
ExtensionContext ,
9
9
IndentAction ,
10
10
languages ,
11
- RelativePattern ,
12
11
TextEditor ,
13
12
Uri ,
14
13
window ,
@@ -212,14 +211,10 @@ class ClientWorkspace {
212
211
return this . makeRlsProcess ( ) ;
213
212
} ;
214
213
215
- // FIXME: vscode-languageserver-node internally uses `pattern` here as
216
- // `vscode.GlobPattern` but only types it out as `string` type. We use
217
- // `RelativePattern` to reliably match files relative to a workspace folder
218
- // in a way that's supported in a cross-platform fashion.
219
- const pattern = ( new RelativePattern (
220
- this . folder ,
221
- '**' ,
222
- ) as unknown ) as string ;
214
+ // This accepts `vscode.GlobPattern` under the hood, which requires only
215
+ // forward slashes. It's worth mentioning that RelativePattern does *NOT*
216
+ // work in remote scenarios (?), so rely on normalized fs path from VSCode URIs.
217
+ const pattern = `${ this . folder . uri . fsPath . replace ( path . sep , '/' ) } /**` ;
223
218
224
219
const clientOptions : LanguageClientOptions = {
225
220
// Register the server for Rust files
You can’t perform that action at this time.
0 commit comments