Skip to content

fix: prioritize shorter document_symbols results by default - #2811

Open
fl0wsnake wants to merge 1 commit into
ibhagwan:mainfrom
fl0wsnake:main
Open

fl0wsnake wants to merge 1 commit into
ibhagwan:mainfrom
fl0wsnake:main

Conversation

@fl0wsnake

@fl0wsnake fl0wsnake commented Sep 21, 2026

Copy link
Copy Markdown

Fix wrong document_symbols default result order.
E.g. when searching for render, results:
[ Field] renderer
[󰊕 Function] render

Fixable via config:

        lsp = {
          symbols = {
            fzf_opts = { ["--tiebreak"] = "end", } -- fix longer entries getting prio
          }
        },

Should be the default though.

Summary by CodeRabbit

  • Bug Fixes
    • Improved tie-breaking behavior when sorting and matching LSP document symbol results.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 140f2583-45a3-4959-98a3-510b77b79b08

📥 Commits

Reviewing files that changed from the base of the PR and between 13bb178 and c2baddf.

📒 Files selected for processing (1)
  • lua/fzf-lua/defaults.lua

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The LSP document symbol default changes fzf’s --tiebreak option from begin to end.

Changes

LSP document symbol matching

Layer / File(s) Summary
Document symbol tie-breaking
lua/fzf-lua/defaults.lua
The M.defaults.lsp.document_symbols configuration uses --tiebreak=end instead of --tiebreak=begin.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: ibhagwan

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: shorter LSP document_symbols results are prioritized by default.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant