Open tsanyqudsi opened 1 year ago
Could you try to use an .editorconfig
file with the following content ?
[*.{uss,uxml}]
indent_style = space
indent_size = 2
@sailro does it auto format the file ?
First you need to install the EditorConfig extension.
Then you need to add "editor.formatOnSave": true
in your project .vscode/settings.json
to enable auto-format on save.
nope, not working.
Will uxml/uss code hints be added later? :)
I think UXML intellisense has some major challenges involved. As I understand each element in UXML can have custom properties based on the underlying C# class. So the language server for UXML would need to be able to parse C# code first, generate some understanding of what properties exist and then show some completion items, e.g. for built-in classes we would need to read UnityEngine.UIElements
.
Also, methods like resource
or url
in USS need to be able to read your entire Assets
folder in order to provide completion items for your texture or font assets. As I understand Resources
folders can appear in any nested folder structure, so we have to keep some kind of index when trying to provide a completion item here.
I understand that there are challenges involved, but I second the request for Intellisense for UXML.
Describe the feature you'd like
As for now, the formatting is using 4 spaces, it would be nice if you could change it to your own preference ( for my case it's 2 ). And it would be nice if you could add intellisense as well.
Alternatives considered
No response
Environment Information