Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entity.name scopes to property definitions #54

Open
faultyserver opened this issue Oct 31, 2018 · 0 comments
Open

Add entity.name scopes to property definitions #54

faultyserver opened this issue Oct 31, 2018 · 0 comments

Comments

@faultyserver
Copy link
Contributor

See https://www.sublimetext.com/docs/3/scope_naming.html#entity. entity scopes are used to populate the symbol list and enable the "Jump to Definition" behavior.

An example:

class Foo
  property bar : String

  def baz; end
end


foo = Foo.new
foo.baz
foo.bar

Putting the cursor in the word baz in foo.baz and then pressing alt+cmnd+down will jump to the definition of baz on Foo (or if there are multiple definitions of it, it brings up a palette to jump between definitions).

However, doing the same on bar does not jump to the definition because there is no actual function definition in the source code.

I think that jumping to property definitions should be supported, and they use a scope like entity.name.property instead of entity.name.function to be semantically accurate.

I know there's some effort to do this with Scry, but it can also just be done with the symbol scoping so why not at least start there. It's not a perfect solution and doesn't address issues with jumping to things defined by macros, but it's a good step towards that and would feel more consistent overall.

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

No branches or pull requests

1 participant