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

Mixed Language Support (HTML+CFML) #17

Closed
Joyrex opened this issue Aug 1, 2017 · 8 comments
Closed

Mixed Language Support (HTML+CFML) #17

Joyrex opened this issue Aug 1, 2017 · 8 comments
Labels
Milestone

Comments

@Joyrex
Copy link

Joyrex commented Aug 1, 2017

I'm not sure if this is something this extension should/can address, but with files being identified as CFML, Intellisense is lost for mixed languages (HTML in CFM files, JS in CFM files, SQL in CFM files, etc.).

I've tried adding the file associations to the VS Code config by associating *.cfm as html, but that breaks the syntax highlighting this extension provides.

Sublime Text seems to know the files are mixed and handles hinting and autocomplete fine - but Visual Studio Code is far more stable in my experience and better supported.

Is this something that this extension can address, or is there a way to configure VS Code to support this?

@bardware
Copy link

Mix of CFML and SQL is of importance.

@ilich
Copy link
Owner

ilich commented Sep 7, 2017

I've done some research about this. It seems to be doable using grammar injections. https://github.com/mjbvz/vscode-js-template-string-grammar-injection-example

It seems I will create new CFML/CFScript language rules to support those features.

@Joyrex
Copy link
Author

Joyrex commented Sep 7, 2017

@ilich : I don't know if it will help at all, but here's the CFML extension for Sublime Text that supports mixed CFML (CFML+HTML, CFML+CSS, CFML+JS, CFML+SQL): https://github.com/SublimeText/ColdFusion

@ilich
Copy link
Owner

ilich commented Sep 7, 2017

@Joyrex : Do you know any official CFML/CFScript language specification and/or language test kit? I found https://github.com/lucee/Lucee/tree/master/test, but I'd like to have some test cfm's as well. Lucee syntax is a bit different from CFML tags.

@alorne
Copy link

alorne commented Oct 4, 2017

I too am interested in this. SQL, Java, HTML, and CFML would be great on one page!

@Joyrex
Copy link
Author

Joyrex commented Nov 7, 2017

@ilich - sorry I missed this! Charlie Arehart's CF 411 page has a listing of CFML testing tools:
http://www.cf411.com/cfmlcodetest

@KrunchMuffin
Copy link
Contributor

is there no way to adapt this package into VSCode? https://github.com/jcberquist/sublimetext-cfml

@ilich ilich added this to the 1.0.0 milestone Nov 20, 2017
@ilich
Copy link
Owner

ilich commented Nov 20, 2017

Unfortunately VS Code does not support Sublime Syntax files that are more advanced than TextMate ones.

microsoft/vscode#5408

As I understood, there is no way now to mix languages inside VS Code. I haven't found a way to tell the editor that this code is SQL and that code is CFML.

I have updated CFML syntax highlighting with the latest version from TextMate bundle yesterday. I hope it will make our life a bit easier.

@ilich ilich closed this as completed Nov 20, 2017
@ilich ilich added the wontfix label Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants