Skip to content

Commit

Permalink
add snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
heterophyllus committed Jan 31, 2020
1 parent 4905b98 commit 193dd85
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-zemax",
"displayName": "Zemax OpticStudio ZPL language support",
"description": "Zemax OpticStudio ZPL language support for Visual Studio Code",
"version": "0.2.2",
"version": "0.3.0",
"repository": {
"type": "git",
"url": "https://github.com/heterophyllus/vscode-zemax.git"
Expand Down
4 changes: 1 addition & 3 deletions snippets/zemax.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,4 @@
"description":"Connect two ZRD"
}



}
}
38 changes: 13 additions & 25 deletions syntaxes/zemax.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
},
{
"include": "#keywords"
},
{
"include": "#constants"
}
],
"repository":{
Expand Down Expand Up @@ -90,12 +87,12 @@
{
"match": "\\b([a-zA-Z0-9_]+)(\\$)\\b",
"captures":{
"1":{
"name": "variable.string.zemax"
},
"2":{
"name": "punctuation.definition.variable.string.zemax"
}
"1":{
"name": "variable.string.zemax"
},
"2":{
"name": "punctuation.definition.variable.string.zemax"
}
}
}
]
Expand Down Expand Up @@ -145,40 +142,31 @@
"name": "keyword.language.zemax"
}
}
}
]
},
"constants":{
"patterns":[
},
{
"comment": "type code for MODIFYSETTINGS",
"comment": "MODIFYSETTINGS",
"match": "\\b((?i)LAY_RAYS|DVW_SURFACE|DVW_DETECTER|DVW_SHOW|DVW_ROWCOL|DVW_ZPLANE|DVW_SCALE|DVW_SMOOTHING|DVW_DATA|DVW_ZRD|DVW_FILTER|DVW_MAXPLOT|DVW_MINPLOT|EXD_DISPLAYSIZE|EXD_FIELD|EXD_FILESIZE|EXD_WAVE|LSF_COHERENT|LSF_TYPE|LSF_SAMP|LSF_SPREAD|LSF_WAVE|LSF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URCEFILE|POP_WIDEX|POP_WIDEY|POP_COMPUTE|POP_FIBERFILE|POP_FIBERTYPE|POP_FPARAM[1-9]|POP_IGNOREPOL|POP_POSITION|POP_TILTX|POP_TILTY|SPT_RAYS|WFM_SAMP|WFM_FIELD|WFM_WAVE|WFM_SUBSR|WFM_SUBSX|WFM_SUBSY)\\b",
"captures": {
"1":{
"name": "constant.language.zemax"
}

}
},
{
"comment": "type for PLOT",
"match": "\\b((?i)PLOT)\\s+((?i)NEW|TITLE|TITLE|BANNER|WINASPECT|COMM|RANGE[XY]|CHECK|TICK|FORMAT[XY]|DATA|LINE|LABEL)\\b",
"comment": "PLOT",
"match": "\\b((?i)NEW|TITLE|TITLE[XY]|BANNER|WINASPECT|COMM[1-6]|RANGE[XY]|CHECK|TICK|FORMAT[XY]|DATA|LINE|LABEL)\\b",
"captures": {
"1":{
"name": "keyword.language.zemax"
},
"2":{
"name": "constant.language.zemax"
}
}
},
{
"comment": "type for PLOT2D",
"match": "\\b((?i)PLOT2D)\\s+((?i)NEW|TITLE|COMM|RANGE|ASPECT|WINASPECT|DATA|ACTIVECURSOR|DISPLAYTYPE|CONTOURINTERVAL|SURFACESCALE|LOGPLOT|HIDEADDRESS|CONFIG)\\b",
"comment": "PLOT2D",
"match": "\\b((?i)NEW|TITLE|COMM[1-5]|RANGE|ASPECT|WINASPECT|DATA|ACTIVECURSOR|DISPLAYTYPE|CONTOURINTERVAL|SURFACESCALE|LOGPLOT|HIDEADDRESS|CONFIG)\\b",
"captures": {
"1":{
"name": "keyword.language.zemax"
},
"2":{
"name": "constant.language.zemax"
}
}
Expand Down

0 comments on commit 193dd85

Please sign in to comment.