If you use Sublime Text 3, Atom or Vim: check pug-lint doc. It will properly support most RosaeNLG constructions. On VSCode, use the VSCode pug lint extension to lint. It should appear just below Sublime's default JavaScript syntax menu item. You may consider using VSCode as it has syntax highlighting and linter for Pug - which is 90 the same as RosaeNLG syntax. Note that if you want to match literals, you will need to write them as < > to prevent errors with the XML parser.įinally, to use this syntax file, open the target JS file and navigate to View>Syntax>JavaScript, or whatever you named it.You can refine the regular expression to fit your needs by editing the (#).*$\n? element under the match element. Create a new element at line 25 with the following template: Next, you'll need to add the regular expression to match the syntax rules for your company's legacy code. Open the JavaScript.tmLanguage file that you just copied to your User folder and edit the name on line 22 add something to distinguish this syntax from the default JavaScript syntax, such as a legacy indicator, for example: name It will open the Packages folder, and you can access the User folder from there. You can find the User Packages folder by navigating to Preferences>Browse Packages. Copy that file to your User Packages folder. sublime-package with any zip utility, and find the file named JavaScript.tmLanguage. For example, if you're on Windows and you installed it in "C:/Program Files" then the JS syntax definitions will be in "C:/Program Files/Sublime Text 3/Packages/JavaScript.sublime-package". You'll need to find the install directory for Sublime.
0 Comments
Leave a Reply. |