-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
html: Add support for autoclosing of tags #11761
Conversation
extensions/html/src/html.rs
Outdated
@@ -2,7 +2,7 @@ use std::{env, fs}; | |||
use zed_extension_api::{self as zed, Result}; | |||
|
|||
const SERVER_PATH: &str = | |||
"node_modules/vscode-langservers-extracted/bin/vscode-html-language-server"; | |||
"/Users/hiro/Projects/vscode-langservers-extracted/bin/vscode-html-language-server"; |
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.
Hardcoded path here still? (Sorry if you were already aware of it.)
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.
No worries; yeah, this PR is still WIP
Add it! |
For the record, this is not gonna work for remote participants of a pairing session, though we should be able to make it so with a new RPC call. |
Relevant repositories:
All of this should work outside of Zed. Note that I'm not a npm guru (far from it), so the way deps are wired through to make installing work via github might be a bit of an eyesore. |
Does this also apply to Vue files? |
The Vue extension should add this to its config:
|
Thanks for reporting this @mariansimecek , I'll follow up shortly with a fix. |
@osiewicz I found another problem, now inside |
Yeah, I think we should just roll back completions in TS/JS files for the time being. Bummer. |
Add config for tag autoclosing: add following to lsp section of your settings: "vscode-html-language-server": { "settings": { "html": { "tagAutoclosing": true } } } It also accepts `css`, `js/ts` and `javascript` as options. Disable HTML language server in JS/TS/TSX files for now. I decided to disable it for now as it caused excessive edits in these types of files (as reported by @mariansimecek in #11761 (comment)); it looks like HTML language server tries to track language ranges (e.g. whether a particular span is TS/HTML fragment etc) just like we do. However in plain JS/TSX files it seems like it treats the whole file as one big chunk of HTML, which is.. not right, to say the least. No release note, as HTML extension goodies are not on Preview yet. Release Notes: - N/A
Fixes #5267
TODO:
Release Notes: