Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Can't change default languages for double-barrelled extensions "*.js.liquid" etc. #13281

Open
3 tasks done
ConduciveMammal opened this issue Apr 7, 2017 · 1 comment
Open
3 tasks done

Comments

@ConduciveMammal
Copy link

ConduciveMammal commented Apr 7, 2017

Prerequisites

  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

For more information on how to write a good bug report read here
For more information on how to contribute read here

Description

Attempting to change my default language syntax highlighting for double-barrelled file extensions.
I do a lot of Shopify development which uses it's own .liquid file extension, but when working on Liquid-powered JS/CSS/SCSS files, the extensions retain their old extension: *.js.liquid, *.css.liquid, *.scss.liquid.

So, using a plugin, *.liquid files are highlighted as Liquid files, but I want SCSS/JS/CSS-powered Liquid files to follow their original extension highlighting.

Here is everything that's in my brackets.json document.
`{
"fonts.fontSize": "14px",

"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",

"themes.theme": "brackets-material-dark-theme",

"bb.beautify.hideDialog": false,

"noDistractions": false,

"styleActiveLine": true,

"linting.collapsed": true,

"language.fileExtensions": {

    "scss.liquid": "scss"

},

"language.fileNames": {

    "js.liquid": "javascript"

    }
}`

Versions

Linux Ubuntu
Brackets 1.9

@haslam22
Copy link
Contributor

I can't reproduce. Tried mapping *.scss.liquid and *.js.liquid to scss and javascript as default, reloaded, and both files with those extensions open in scss/javascript mode as expected.

Your preferences also seem wrong, put both mappings under languages.fileExtensions instead:

"language.fileExtensions": {
    "js.liquid": "javascript",
    "scss.liquid": "scss"
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants