KamasamaK / vscode-cfml

An extension for Visual Studio Code to assist in development with CFML.
MIT License
77 stars 23 forks source link

Outdent on autoclose not working in cfml #35

Open WebVeteran opened 5 years ago

WebVeteran commented 5 years ago

Related to https://github.com/KamasamaK/vscode-cfml/issues/23

When autoclosing tags, the closing tag does out-dented as it should. Documents in HTML mode work.

For example: image

Then if you enter </ on line 27 </cfform> should get out dented. But instead it stays at the same level as "sdfsf". image

The proper outcome should be: image

It doesn't seem to matter if using html or cfml tags. It's just the language mode that matters. In html mode to outdent happens as expected.

KamasamaK commented 5 years ago

The patterns in LanguageConfiguration.indentationRules are what determine this. I was having trouble reproducing this, but then I remembered you're using Auto Close Tag with Sublime Text 3 Mode. For some reason, the pattern is not working when closing the tag that way. But it works fine when closing it manually. I'm not sure that I can do anything with the pattern to fix this. It seems like it's probably either a bug in Auto Close Tag or VS Code.

KamasamaK commented 5 years ago

I've opened Microsoft/vscode#71617 for this.