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

make textDocument/hover smarter #6

Open
euclidianAce opened this issue Mar 11, 2021 · 0 comments
Open

make textDocument/hover smarter #6

euclidianAce opened this issue Mar 11, 2021 · 0 comments
Labels
enhancement New feature or request needs-upstream-changes Changes need to happen in the api for teal or cyan for this to be implemented

Comments

@euclidianAce
Copy link
Member

currently it only looks at the hovered token, which is fine for simple things, but for indexing in particular it gives no information at all
i.e.

local record Foo
   x: number
   record Bar
      y: string
   end
end

hovering on Foo will show the definition

but for hovering something like Foo.Bar will not show any info (except for when you hover over the Foo, but whatever)

To implement this without reimplementing the parser, we either need changes in the teal api to expose more info about nodes or bring in something like tree-sitter. While tree-sitter is nice, I'd like to avoid external deps when possible, especially one that can require some extra steps to install like tree-sitter.

@euclidianAce euclidianAce added enhancement New feature or request needs-upstream-changes Changes need to happen in the api for teal or cyan for this to be implemented labels Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-upstream-changes Changes need to happen in the api for teal or cyan for this to be implemented
Projects
None yet
Development

No branches or pull requests

1 participant