Comments (11)
Since there are a lot of projects that are taking a dependency (thru git submodule or otherwise), I think it's better to stick with the current format to avoid any additional cross-project coordination. I know that some of them support both json and yaml, but I'm not sure about the original TextMate for example.
For local development, people can easily convert back and forth between the xml and their preferred format.
from editorsyntax.
Damn, I didn't realize they had done this, that's awesome! Thanks for bringing it to our attention. I'm sure @vors and others would certainly be interested in doing something similar.
from editorsyntax.
This is nice, I'll take a look into this, if it's ok @daviwil :)
from editorsyntax.
Go for it!
from editorsyntax.
For your information, v2 of the EditorSyntax package will generate grammar files in the following formats:
- plist (.tmLanguage)
- JSON
- CSON
- YAML
Editing the grammars are done using the YAML-version, and the build task will generate the other formats.
from editorsyntax.
I am not married to .tmLanguage as the base from which grammars are built but I am opposed to yaml. Would prefer to use json if we want to switch.
from editorsyntax.
For local development, people can easily convert back and forth between the xml and their preferred format.
I would actually take that as an argument in the opposite direction. We should pick the format easiest to develop in and generate the others.
For a consumer, things like ordering and line indentation aren't important, but generating an XML to check in based on working in JSON is likely to cause unnecessary diffs.
The plist format is not very well documented and I'm finding it difficult to work with, compared to the JSON I've seen generated.
from editorsyntax.
I purposely created PowerShell scripts to convert between XML and JSON. I work in the JSON file, and convert to XML for the purpose of making PR's to this repo. JSON isn't the best, but its a lot easier than XML.
from editorsyntax.
toml ftw
from editorsyntax.
I purposely created PowerShell scripts to convert between XML and JSON. I work in the JSON file, and convert to XML for the purpose of making PR's to this repo. JSON isn't the best, but its a lot easier than XML
Yeah JSON would be my preference after looking at the alternatives. TOML would be nice, but it's not as well documented or supported as a TM format as JSON. The VSCode TM grammar extension supports pretty seamless conversion.
@msftrncs have you experienced any issues with the XML -> JSON -> XML rearranging the XML and causing bad diffs (e.g. moving sections around so changes are harder to identify)? I've had this in other automated JSON manipulation scenarios because JSON keys are unordered, and presume that transforming through formats would only exacerbate it.
from editorsyntax.
@rjmholt, if I didn't use [ordered]
, yes. 😄
https://github.com/msftrncs/PwshReadXmlPList
https://github.com/msftrncs/PwshJSONtoPList
https://github.com/msftrncs/PwshOutCSON
https://github.com/msftrncs/PowerShell.tmLanguage/blob/argumentmode_2ndtry/build-plistGrammar.ps1
https://github.com/msftrncs/EditorSyntax/blob/build_grammar.ps1/tools/build-grammar.ps1
https://github.com/msftrncs/EditorSyntax/blob/build_grammar.ps1/tools/build-atomGrammar.ps1
from editorsyntax.
Related Issues (20)
- its possible to implement empty coallesing operator HOT 3
- Comment Based Help Keywords and Their Parameters Not Highlighting Correctly HOT 2
- FTLOG Don't use light gray on a white background
- Powershell syntax highlighting disrupted by single quotes in HTML
- Function without arguments not colorized HOT 2
- foreach not scoped correctly after curly brace
- Asterisk is not recognized as valid function/cmdlet name character HOT 1
- Export-Member color coding issue
- Parameters are shown using variables-color HOT 7
- Version v2021.5.1 Semantic Textmate Scope is incorrect for negative numeric literals, when used as a parameter HOT 4
- No Syntax Highlighting for `enum` declarations HOT 2
- #Requires syntax highlighting bug HOT 2
- Syntax Highlighting doesn't recognize ? as part of a variable name
- Generic method type parameter support
- Syntax Highlighting: region incorrectly highlighted when defined as part of a hashtable
- Function name not recognized in definition when on different line
- word_wrap settings does not obey the global settings in sublime text HOT 1
- Attributes not attached to parameters aren't recognized as attributes but as a generic type
- Code thinks ArgumentCompleter attribute on parameter is the parameter's type
- Variables that are built-in constants are not highlighted, like `$Error` and `$PSVersionTable`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editorsyntax.