Repository navigation
css.experimental.customData - #66228
Conversation
| dataPaths = []; | ||
| } else { | ||
| try { | ||
| const workspaceRoot = workspace.workspaceFolders[0].uri.fsPath; |
There was a problem hiding this comment.
Workspace folders can also have other schemes than file:// (in combination with contributed filesystem providers)
There was a problem hiding this comment.
Yeah, I need to handle that. Have never tried custom filesystem providers though. Tracked in #66307.
|
|
||
| let documentSelector = ['css', 'scss', 'less']; | ||
|
|
||
| let dataPaths: string[] = workspace.getConfiguration('css').get('experimental.customData', []); |
There was a problem hiding this comment.
I suspect this is just for teting purposes, but I assume in the end, these files will not be located in the workspace but part of a extension, correct?
There was a problem hiding this comment.
They'll, see an example for HTML: https://github.com/octref/web-components-examples
Don't think we can assume everyone wants to publish extensions for enhancing their CSS.
| let foldingRangeLimit = Number.MAX_VALUE; | ||
| let workspaceFolders: WorkspaceFolder[]; | ||
|
|
||
| const languageServices: { [id: string]: LanguageService } = {}; |
There was a problem hiding this comment.
I guess that's not really a necessary change.
There was a problem hiding this comment.
Doing this so I can locally scope the data variables. I don't want the customData to be on top level.
There was a problem hiding this comment.
So you say vs code can complete css variables by setting this setting
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| export function parseCSSData(source: string) { |
There was a problem hiding this comment.
I'd suggest to move that to util
|
Re the workspace custom data reading, I'll need to redo that for HTML too. Here's the plan:
This will result in project B getting project A's customData, when you have multi workspace setup of Project A and B. But until we change our structure of CSS features to spawn a LS for each workspace folder, this can't be solved. |
For #64164.
Related: microsoft/vscode-css-languageservice#142.