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

Context aware autocompletion for macros #171

Closed
wants to merge 4 commits into from
Closed

Conversation

sunker
Copy link
Collaborator

@sunker sunker commented Aug 16, 2022

This PR is based on #169 so for the time being it includes its diff.

This PR adds context aware autocompletion for redshift macros. Suggestions are context aware in the sense that macros for columns, tables, filters and groups are differentiated. See example below.

macros

Part of #108
Fixes #170

@sunker sunker requested a review from a team as a code owner August 16, 2022 08:18
@sunker sunker requested review from fridgepoet, kevinwcyu and andresmgot and removed request for a team August 16, 2022 08:18
@github-actions
Copy link

Backend code coverage report for PR #171
No changes

@github-actions
Copy link

Frontend code coverage report for PR #171

Plugin Main PR Difference
src 87.67% 87.67% 0%

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, it looks cool! I couldn't test it though, I guess I am missing some piece

src/RedshiftSQLEditor/index.tsx Show resolved Hide resolved
LanguageCompletionProvider,
TableDefinition,
TableIdentifier,
// getStandardSQLCompletionProvider,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: commented code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also I am geting several errors from this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of errors? If you've previously used a locally linked version of grafana/experimental, you may have to make a hard reinstall. yarn install --force && yarn

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah that's right - need to merge this PR first :|

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think the link above is pointing to another PR. Anyway, should be working fine now!

src/language/macros.ts Show resolved Hide resolved
@sunker
Copy link
Collaborator Author

sunker commented Aug 19, 2022

Too many parallel PR now, so closing this in favor of #174

@sunker sunker closed this Aug 19, 2022
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

Successfully merging this pull request may close these issues.

Add support for context aware autocompletion for macros
2 participants