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

Improve autocomplete #754

Open
smaspe opened this issue Jan 12, 2021 · 1 comment
Open

Improve autocomplete #754

smaspe opened this issue Jan 12, 2021 · 1 comment
Labels
feature request New issue opened using "Feature request" template ui/ux

Comments

@smaspe
Copy link
Contributor

smaspe commented Jan 12, 2021

Is your feature request related to a problem? Please describe.
Autocomplete is currently a but limited. For example, the second column in select a, b from c does not receive suggestions. Cases like with foo as (select * from bar) select * from baz the with clause column will receive suggestions from the baz table.

Describe the solution you'd like
Replacing node-sql-parser with gethue parsing library provides a better parsing context, as it correctly identifies where the cursor currently is, what suggestion types can be included (databases, tables, columns, keywords, functions), and identifies the right context (database for the tables, table(s) for the columns, ...)

Describe alternatives you've considered
I looked at other libraries, none providing the same level of insight into the query.

@smaspe smaspe added the feature request New issue opened using "Feature request" template label Jan 12, 2021
@jcro21
Copy link

jcro21 commented Oct 6, 2021

I too would love to see autocomplete working for column names.

It's currently partially working for the first column of a select statement - it suggests columns from all tables, rather than columns from tables in the FROM clause of the statement only.
Unfortunately for all subsequent columns in the SELECT statement there is not even the behaviour described above.

This is a great extension, just a couple of little things to polish off and it'd be really excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template ui/ux
Projects
None yet
Development

No branches or pull requests

3 participants