Skip to content
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

support for *.xslt files #446

Closed
brainwasher opened this issue Mar 30, 2021 · 2 comments · Fixed by #447
Closed

support for *.xslt files #446

brainwasher opened this issue Mar 30, 2021 · 2 comments · Fixed by #447
Assignees
Labels
bug Something isn't working
Milestone

Comments

@brainwasher
Copy link

I am new to VS-Code and installed the extension because I do a lot of XSLT work. The feature I am most looking for is the auto-close. It works out of the box for *.xml but it does nto work for *xslt. In principle, an XSLT file is just another XML file. I did not find any item in the configuration to add file extensions (or languages?) to enable the extension for XSLT as well.

@angelozerr
Copy link
Contributor

It works out of the box for *.xml but it does nto work for *xslt

The problem that I see with xsl is when you type < it generates <> and it break the workflow to auto close a tag.

For instance

  • in XML if you type < and after a and after > it generates <a></a>
  • in XSL if you type < it generates <> which breaks the previous workflow.

@brainwasher is this issue that you are explaining?

@datho7561 could you see the problem if you have time (I suspect a problem with language configuration).

@datho7561
Copy link
Contributor

datho7561 commented Mar 30, 2021

@brainwasher thanks for submitting this bug!

If you add the following snippet to your settings.json (Ctrl+Shift+P > Open Settings (JSON)), it should work. This disables the built-in auto-close for .xslt and replaces it with vscode-xml's auto-close tag support.

"[xsl]": {
  "editor.autoClosingBrackets": "never"
}

I'll work on a PR that sets this setting by default.

datho7561 added a commit to datho7561/vscode-xml that referenced this issue Mar 30, 2021
Closes redhat-developer#446

Signed-off-by: David Thompson <davthomp@redhat.com>
@datho7561 datho7561 self-assigned this Mar 30, 2021
@datho7561 datho7561 added the bug Something isn't working label Mar 30, 2021
@datho7561 datho7561 added this to the 0.16.0 milestone Mar 30, 2021
datho7561 added a commit to datho7561/vscode-xml that referenced this issue Mar 30, 2021
Closes redhat-developer#446

Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr pushed a commit that referenced this issue Mar 30, 2021
Closes #446

Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants