Associate `.lift` files with XML syntax highlighting in Brackets

1

Cross-posted from an old unanswered Stack Overflow question (here).

I'm using a .lift (Lexicon Interchange FormaT) file, which Brackets does not recognise, but, since it's basically an XML file, the syntax highlighting for that works just fine. The problem is that I have to manually tell Brackets to use XML syntax highlighting every time I open a .lift file. My question is, is there any way to permanently associate XML syntax highlighting with .lift files? (Note that simply changing the file extension from .lift to .xml is not really an optimal solution since the file needs to keep the extension .lift for use elsewhere.)

Miztli

Posted 2019-04-15T18:33:56.450

Reputation: 113

Answers

1

I don't use Brackets, but a bit of digging gives me these links:

https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#preferences https://github.com/adobe/brackets/wiki/Language-Support#preferences

Assuming you want to do this globally, that leads to these steps:

  1. Hit Debug > Open Preferences File
  2. You should see 2 panes. You should read the comments on the left-hand pane, but the left-hand pane should give you examples for all the supported settings. The right-hand pane should be your actual settings file.
  3. Look for the "language.fileExtensions" key in the right-hand pane. If it's not there, add it to the end. Don't forget to put a trailing comma on the previous line!
  4. Populate it with {"lift": "xml"}, to say that anything with a .lift extension is actually an .xml file.

If you've made a new entry, it should look like "language.fileExtensions": {"lift": "xml"}. If you're updating an existing one, it might look like:

"language.fileExtensions": {
  "html": "php",
  "lift": "xml"
}

That worked for me, hopefully you see the same.

ymbirtt

Posted 2019-04-15T18:33:56.450

Reputation: 140