Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Missing variable syntax scopes #630

Closed
1 task done
pbarbiero opened this issue Nov 15, 2018 · 3 comments
Closed
1 task done

Missing variable syntax scopes #630

pbarbiero opened this issue Nov 15, 2018 · 3 comments

Comments

@pbarbiero
Copy link

Prerequisites

Description

Missing extra variable syntax wrappers when using tree-sitter

Settings > Core > Use Tree Sitter Parsers - Enabled
tree-sitter

Settings > Core > Use Tree Sitter Parsers - Disabled
non-tree-sitter

Versions

Atom : 1.32.2
Electron: 2.0.9
Chrome : 61.0.3163.100
Node : 8.9.3

Additional Information

Both examples above are without language-babel and without customFileTypes in config.cson

Workaround with tree sitter parsers enabled is to have language-babel and this in my config.cson:

    customFileTypes:
      "source.js.jsx": [
        "js"
        "jsx"
      ]

The downside to the workaround is all my .js files show up as .jsx files when using file-icons

@rsese
Copy link

rsese commented Nov 29, 2018

Thanks for the report! Looks like this is fixed in 1.34 which is currently in beta:

js-param

Going to go ahead and close but let me know if I misunderstood anything.

@rsese rsese closed this as completed Nov 29, 2018
@pbarbiero
Copy link
Author

Hi @rsese

I am testing with 1.34 and I still see some problems. I am trying to update my syntax to utilize the different scopes (and lack of nested scopes now too) and I cant figure out how to solve some situations -- are these changes by design or maybe an oversight?

scope-issues

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

Example of what happens when I disable tree-sitter:

scope-working

Notes:
line 4 lets me differentiate result from result in line 3
line 5 lets me differentiate store from param1

@rsese
Copy link

rsese commented Jan 17, 2019

Thanks @pbarbiero - since the initial example originally reported looks ok would you mind opening a new issue with template filled out and with the details from #630 (comment)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants