Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
In atom 1.34, I am trying to update my syntax sheet that worked with the old syntax parser to take advantage of the tree-sitter parsers. Without any other extension enabled, the examples below are just from toggling the use tree sitter parsers option. (examples below are using https://github.com/thomaslindstrom/no-caffeine-syntax)
Steps to Reproduce
Edit by @rsese to add code for copy/paste
function functionName(param1, param2, param3) {}
function functionName(param1, param2, param3 = 1) {}
functionName(param1, param2).then((result) => {});
functionName(param1, param2).then(({ result }) => {});
const newThing = calculate(param1, store.getState())
Have code like this with tree sitter parsers disabled:
Enable tree sitter parsers, and your code will look like this:
Problems seen between the two:
Line 1: No problems
Line 2: No scope present for param3
Line 3: No scope present for param1 and param2
Line 4: Same as line 3 except also no scope present for result
Line 5: No scope present for param and store
Notes:
line 4 lets me differentiate result from result in line 3
line 5 lets me differentiate store from param1
Expected behavior: All variables would have the unique scopes to target styles like we could with the old parser
Actual behavior: New parser does not target some variables with scopes to allow consistent styling with the old parser
Reproduces how often: 100%
Versions
Atom 1.34.0
Electron 2.0.16
Chrome 61.0.3163.100
Node v8.9.3
Prerequisites
Description
In atom 1.34, I am trying to update my syntax sheet that worked with the old syntax parser to take advantage of the tree-sitter parsers. Without any other extension enabled, the examples below are just from toggling the use tree sitter parsers option. (examples below are using https://github.com/thomaslindstrom/no-caffeine-syntax)
Steps to Reproduce
Edit by @rsese to add code for copy/paste
Have code like this with tree sitter parsers disabled:![old syntax parser](https://user-images.githubusercontent.com/20247733/51395859-74351b00-1b03-11e9-8380-1e93f197175c.png)
Enable tree sitter parsers, and your code will look like this:![tree sitter parser](https://user-images.githubusercontent.com/20247733/51395905-8d3dcc00-1b03-11e9-9ae2-56899d5751a9.png)
Problems seen between the two: Line 1: No problems Line 2: No scope present for param3 Line 3: No scope present for param1 and param2 Line 4: Same as line 3 except also no scope present for result Line 5: No scope present for param and store
Notes: line 4 lets me differentiate result from result in line 3 line 5 lets me differentiate store from param1
Expected behavior: All variables would have the unique scopes to target styles like we could with the old parser
Actual behavior: New parser does not target some variables with scopes to allow consistent styling with the old parser
Reproduces how often: 100%
Versions
Atom 1.34.0 Electron 2.0.16 Chrome 61.0.3163.100 Node v8.9.3
Additional
See #630