Open LorneCash opened 4 years ago
@madskristensen Can you help me understand why I can't get a snippet to work for this language? I posted my question on Stack Overflow so maybe just leave a note there. I'm asuming I'm not wrong in that it should be possible to get snippets working for non-supported languages. I've attached the files that I believe should work here. Any help would be greatly appreciated. mq4.zip
I would be more than willing to do any laborious work myself and create a pull request if I could understand how to get snippets working.
Those snippets i think are VS Code snippets and not Textmate syntax. See this example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleUUID</key>
<string>465b9420-4438-4dfc-9c97-4939c581ef3c</string>
<key>content</key>
<string>; Replace "JavaScript" with any of the supported languages
; Languages: "Basic", "C/C++", "CSharp", "CSS", "HTML", "JavaScript", "SQL_SSDT", "XML"
[\$RootKey\$\\Languages\\CodeExpansions\\JavaScript\\Paths]
"Awesome"="\$PackageFolder\$\\Awesome"$0
</string>
<key>tabTrigger</key>
<string>lisa</string>
<key>name</key>
<string>Comment Heading</string>
<key>scope</key>
<string>source.pkgdef</string>
<key>uuid</key>
<string>3ed0c5d5-fad7-4bae-a8a1-889969c56ba9</string>
</dict>
</plist>
Make sure the scope name match with your .tmLanguage
@madskristensen Still having trouble. I created a file called MyTest.plist in C:\Users\<user>\.vs\Extensions\mq4\Snippets\
. Here's the snippet I'm trying:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleUUID</key>
<string>2e4df8f9-23a2-4202-8bf2-646d03c86ef1</string>
<key>content</key>
<string>ObjectSet( ${1:str name}, ${2:int index}, ${3:dbl value} )${0}</string>
<key>tabTrigger</key>
<string>objectset</string>
<key>name</key>
<string>ObjectSet</string>
<key>scope</key>
<string>source.mq4</string>
<key>uuid</key>
<string>b927e440-7ee4-479d-b7eb-8d575cf197b9</string>
</dict>
</plist>
In my .tmLanguage file I have this so I believe my scope does match: (.tmLanguage file is included in zip file from my previous post) `
<string>source.mq4</string>
`
I generated new GUIDs for bundleUUID and uuid and
I'm having trouble finding documentation specific to Visual Studio and textMate. If you have any resources please share the link.
This is the best link I found but it's for Mac not Visual Studio so I'm not sure what differences might apply. https://macromates.com/manual/en/
I also found another of your extensions "Textmate Grammar Template" which contained a link to this github project: https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/TextmateGrammar but no help with snippets there either
File Types: should include .mq4, .mql4, .mq5, and .mqh MetaTrader 4 is the largest forex trading platform in the world. It's language is very similar to C++. MQL4 Documentation - https://docs.mql4.com/ MQL5 Documentation - https://www.mql5.com/en/docs Parent Company - https://www.metaquotes.net/
Someone on GitHub made an MQL4.tmLanguage file here however, I found few problems with this.
To Resolve these issues: