Skip to content

7/11: feat(completions): add keyword completion provider#661

Merged
juleswritescode merged 3 commits intostacked/pr629-6-sanitization-fixfrom
stacked/pr629-7-keyword-completion
Jan 25, 2026
Merged

7/11: feat(completions): add keyword completion provider#661
juleswritescode merged 3 commits intostacked/pr629-6-sanitization-fixfrom
stacked/pr629-7-keyword-completion

Conversation

@juleswritescode
Copy link
Collaborator

@juleswritescode juleswritescode commented Jan 24, 2026

Summary

  • Add SqlKeyword struct with keyword list
  • Add complete_keywords function
  • Add Keyword variant to CompletionItemKind
  • Add filtering logic with speculative parsing
  • Add keyword scoring (-10 to deprioritize)
  • Update builder to pass shared tree for filtering

Part of stacked PRs for #629

This is PR 7/11 in the keyword completion feature stack.

JulesWritesCode added 2 commits January 24, 2026 14:08
@juleswritescode juleswritescode changed the title 7/8: feat(completions): add keyword completion provider 7/11: feat(completions): add keyword completion provider Jan 24, 2026
Copy link
Collaborator

@psteinroe psteinroe left a comment

Choose a reason for hiding this comment

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

Very nice integration!

}
}

pub static ALL_KEYWORDS: &[SqlKeyword] = &[
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be generated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we can generate the keywords, but we need some manual processing to mark them as "statement starters" or as "require prefix".

I'll look into that in a future PR.

@juleswritescode juleswritescode merged commit b2fa217 into stacked/pr629-6-sanitization-fix Jan 25, 2026
8 checks passed
@juleswritescode juleswritescode deleted the stacked/pr629-7-keyword-completion branch January 25, 2026 14:10
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.

2 participants