feat(sdk)!: add case_mode: smart, sensitive, insensitive option#609
Open
gustav-fff wants to merge 2 commits into
Open
feat(sdk)!: add case_mode: smart, sensitive, insensitive option#609gustav-fff wants to merge 2 commits into
gustav-fff wants to merge 2 commits into
Conversation
Adds explicit `CaseMode { Smart, Sensitive, Insensitive }` and a new
`case_mode: Option<CaseMode>` field on `GrepSearchOptions`. The legacy
`smart_case: bool` is preserved for backward compatibility — when
`case_mode` is `None`, the boolean is used (true => Smart, false =>
Sensitive). New callers that need `Insensitive` set `case_mode`
explicitly.
Co-authored-by: Marko Vejnovic <contact@markovejnovic.com>
Owner
|
@gustav-fff you need to make sure that it is getting compiled everywhere and mark |
Owner
|
@gustav-fff also make it configurable for neovim lua |
Add case_mode: None to all GrepSearchOptions construction sites across
fff-c, fff-mcp, fff-nvim, fff-python, and tests so the new field
compiles everywhere.
Expose case_mode in the neovim lua API: new optional config
grep.case_mode ("smart"|"sensitive"|"insensitive") flows through
live_grep FFI and content_search opts. smart_case remains the legacy
default; case_mode overrides it when set.
Collaborator
Author
|
[triage-bot] DIRECTED: pushed 2ecd02d.
README update for the new config option not included — flagging for @dmtrKovalenko since per CLAUDE.md new neovim config options should be documented there. Want me to add a section? Honk-Honk 🪿 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out from #561 per @dmtrKovalenko request.
What
Adds
fff::CaseMode { Smart, Sensitive, Insensitive }and a new optionalcase_mode: Option<CaseMode>field onGrepSearchOptions. AddsGrepSearchOptions::effective_case_mode()to resolve the effective mode.Non-breaking
The legacy
smart_case: boolfield is preserved. Whencase_modeisNone, the existing boolean is used (true=>Smart,false=>Sensitive) — identical behavior to before. New callers that needInsensitivesetcase_mode = Some(CaseMode::Insensitive).No public function signatures changed.
Defaultstill emitssmart_case: true, case_mode: None. Existing consumers (fff-c,fff-nvim, benches, tests) compile unchanged.Why this shape
The original PR #561 changed
smart_case: booltocase_mode: CaseModedirectly, which is a breaking field change for anyone constructingGrepSearchOptions. This PR adds the new API alongside the old one so #561 (and future consumers) can adoptcase_modewithout a major version bump.How verified
cargo check -p fff-searchpasses. Internal call sites ingrep.rsroute througheffective_case_mode()so behavior is preserved when onlysmart_caseis set.Co-authored-by: Marko Vejnovic contact@markovejnovic.com
Automated triage via Gustav. Honk-Honk 🪿