allow changing some properties of keyword completions #17

Closed
LoganDark wants to merge 1 commit from keyword-complete-options into main
LoganDark commented 2024-09-27 18:41:04 +02:00 (Migrated from github.com)

right now the keyword completions are impossible to really change in any way, and it's super annoying, because we'd like to have autocomplete sections in our app, but if we put anything in any section, that section will placed below all the hundreds of keywords. we'd love to put the keywords in a section below the other far more important stuff

right now the keyword completions are impossible to really change in any way, and it's super annoying, because we'd like to have autocomplete sections in our app, but if we put anything in any section, that section will placed below all the hundreds of keywords. we'd love to put the keywords in a section below the other far more important stuff
marijnh commented 2024-09-30 16:47:25 +02:00 (Migrated from github.com)

I think, rather than trying to make the package support all these options, it makes more sense to provide an option to disable keyword completion entirely, and have people who want something like this do that and use dialect.spec.keywords directly to build their own completion. Does that sound reasonable?

I think, rather than trying to make the package support all these options, it makes more sense to provide an option to disable keyword completion entirely, and have people who want something like this do that and use `dialect.spec.keywords` directly to build their own completion. Does that sound reasonable?
LoganDark commented 2024-09-30 16:53:35 +02:00 (Migrated from github.com)

I think that would be a lot more work for us. Generally we prefer adding options if something already does very nearly what we want, instead of cloning an entirely new implementation into our own codebase. We've already forked for this fix, so if there's any way to get something like this upstream, I'm all ears. Otherwise, this is the easiest and most time-effective solution for us right now.

I think that would be a lot more work for us. Generally we prefer adding options if something already does very nearly what we want, instead of cloning an entirely new implementation into our own codebase. We've already forked for this fix, so if there's any way to get something like this upstream, I'm all ears. Otherwise, this is the easiest and most time-effective solution for us right now.
marijnh commented 2024-10-01 09:13:16 +02:00 (Migrated from github.com)

Does attached patch, which allows you to pass in a function that builds up the keyword completions, work for you?

Does attached patch, which allows you to pass in a function that builds up the keyword completions, work for you?
LoganDark commented 2024-10-01 12:23:10 +02:00 (Migrated from github.com)

@marijnh yeah!

@marijnh yeah!
marijnh commented 2024-10-01 16:09:58 +02:00 (Migrated from github.com)

Great. I've tagged 6.8.0.

Great. I've tagged 6.8.0.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/lang-sql!17
No description provided.