-
Notifications
You must be signed in to change notification settings - Fork 0
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 basic auto-completion support #4
Conversation
d4b1402
to
cc05650
Compare
@@ -0,0 +1,641 @@ | |||
import { monacoTypes } from '@grafana/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is room for improvement here. I mainly adjusted the builtins. The rest is based on the standard SQL language config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same "Monaco" editor that I am using in the playground? If so, then we could reuse the specification in the playground too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramondeklein Yes, it's the same Monaco editor. Chances are high that the language definition is compatible 🙂 Not sure what version is used by Grafana (they embedd the component in their grafana/ui
package and export it from there).
@philhofer I had to rebase. Could you please approve again? |
github.com/grafana/grafana-plugin-sdk-go v0.159.0 | ||
github.com/patrickmn/go-cache v2.1.0+incompatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to use an unmainted Go package that hasn't been updated in 4 years?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I read, it's still a solid module. Most actively maintained caching modules (e.g. BigCache) are overkill for this simple usecase.
@@ -0,0 +1,641 @@ | |||
import { monacoTypes } from '@grafana/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same "Monaco" editor that I am using in the playground? If so, then we could reuse the specification in the playground too.
The column meta query currently uses
SELECT SNELLER_DATASHAPE(*) FROM (SELECT * FROM tbl LIMIT 1000)
which does not yield extremely good results for datasets like the GHA. We have to remember replacing this withTABLEPROBE
as soon as it's available.