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 ,
@@ -193,14 +192,10 @@ class ClientWorkspace {
193
192
return this . makeRlsProcess ( ) ;
194
193
} ;
195
194
196
- // FIXME: vscode-languageserver-node internally uses `pattern` here as
197
- // `vscode.GlobPattern` but only types it out as `string` type. We use
198
- // `RelativePattern` to reliably match files relative to a workspace folder
199
- // in a way that's supported in a cross-platform fashion.
200
- const pattern = ( new RelativePattern (
201
- this . folder ,
202
- '**' ,
203
- ) as unknown ) as string ;
195
+ // This accepts `vscode.GlobPattern` under the hood, which requires only
196
+ // forward slashes. It's worth mentioning that RelativePattern does *NOT*
197
+ // work in remote scenarios (?), so rely on normalized fs path from VSCode URIs.
198
+ const pattern = `${ this . folder . uri . fsPath . replace ( path . sep , '/' ) } /**` ;
204
199
205
200
const clientOptions : LanguageClientOptions = {
206
201
// Register the server for Rust files
You can’t perform that action at this time.
0 commit comments