-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-3985: Support for css/html via VS Code extension #7972
Conversation
Closes #3985 Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Issues:
|
@kittaakos Does #7972 (comment) break user flow or it is just error logging? |
I did not notice malfunction during the verification, the errors were "just" logged. I have seen the same |
👍 An issue for the first error would be good. |
Sure, let's merge this, and then I take care of the follow-up. |
@marcdumais-work @vince-fugnitto Could you review it please? I am stuck with FS api rewrite. This PR is much needed to move in the direction of getting rid of monaco-languageclient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is expected. Could you file an follow-up issue please? Are there any errors in logs? We have to fix it. |
I will take care of any follow-ups, once this is merged. |
Are there any additional remarks on this PR, or can I merge the changes? Right after the merge, I am going to create follow-up issues. |
I opened the follow-up issue: #7987 |
What it does
Removed the CSS/HTML integration from monaco, and uses the corresponding VS Code extensions instead.
How to test
VS Code built-in HTML support:
script
. Try<script>totoal...invalid = $Hello JavaScript!$;</script>
, you should see the error in the Problems view too. You can also check the diagnostics for invalid HTML:<html><script></scaript></html>
.'.'
,':'
,'<'
,'“'
,'='
, and'/'
chars,<
see the tag completions./Users/akos.kitta/git/theia/packages/plugin-ext/src/main/browser/webview/pre/index.html
hover overname
inmeta
tag, see the hover.Ctrl/Cmd+Shift+O
)<div><div></div></div>
, select the innerdiv
, verify that the only corresponding closingdiv
is highlighted, not all of them.script
tag if you want to verify the definitions, check bothGo to Definition
andPeek > Peek Definition
. Both should work. Here is an example:<script>const x = 'foo'; console.log(x);</script>
.'('
),script
tag, add a function, invoke itscript
tag and verify the JS references. Similar todefintions
.'textDocument/foldingRange'
and'textDocument/rangeFormatting'
. You can enable tracing for HTML via the settings.VS Code built-in CSS/SCSS/Less support:
{{}}
in the editor and see the error:at-rule or selector expected file:///Users/akos.kitta/git/theia/a.css
. Check for warnings, writep > div { }
without rulesets, see theDo not use empty rulesets
warning in the Problems view. You can disable validation by adding"css.validate": false
to yoursettings.json
.#region
and#endregion
completions in a CSS file. Also, typep > div { d<|> }
(where<|>
is the cursor position) you should seedisplay: grid|inline;
completion.'/'
and'-'
chars,url
and opening the file in an editor. For example:--theia-debug-start: url('start-inverse.svg')
.Ctrl/Cmd+Shift+O
you can see the selectors defined in the CSS file.Find All References
, theRefrences
view opens and shows your selector.packages/core/src/browser/style/menus.css
, right-click on the--theia-private-menubar-height
usesage in the.p-MenuBar-item
selector, pickGo to Definition
from the context menu.tree.css
in Theia, set the cursor after the first occurrence of.theia-Tree
in the CSS file, see that other occurrences are highlighted in the file.Source Actions...
context menu item (with the browser example) from a CSS editor. Executing it will result in aNo source actions available
in the editor.tree.css
, for example, and rename.theia-Tree
with the context menu (orF2
). You can rename the symbol in the file. It won't update other occurrences outside of the current CSS file./* #region */
and/* #endregion */
. Add"[css]": { "editor.foldingStrategy": "indentation" }
into thesettings.json
file, see in the editor, you can expand and fold rangesurl('someLink.css')
in another editor.Review checklist
Reminder for reviewers