Skip to content

feat(results): add option to show line numbers#97

Merged
joshmu merged 1 commit intojoshmu:masterfrom
jimeh:show-line-number
Aug 31, 2025
Merged

feat(results): add option to show line numbers#97
joshmu merged 1 commit intojoshmu:masterfrom
jimeh:show-line-number

Conversation

@jimeh
Copy link
Contributor

@jimeh jimeh commented Aug 12, 2025

  • Introduced a new configuration option periscope.showLineNumbers to control the display of line numbers alongside file paths in search results. It defaults to false to retain existing behavior.
  • Updated formatPathLabel to append line numbers when enabled.
  • Enhanced tests to verify line number functionality in various scenarios.

This is is my second ever tango with TypeScript, so feel free to criticize anything you might be unhappy with. I'm more than happy for feedback and to fix things :)

Screenshot

Screen-Capture-2025-08-12-02-51-06

@jimeh jimeh changed the title feat(results): add option to show line numbers in results feat(results): add option to show line numbers Aug 12, 2025
@jimeh jimeh force-pushed the show-line-number branch from e7b48e0 to 2962393 Compare August 12, 2025 01:59
@jimeh
Copy link
Contributor Author

jimeh commented Aug 12, 2025

Seems CI is failing on the "Update PR Status" step, but the tests did run successfully.

Copy link
Owner

@joshmu joshmu left a comment

Choose a reason for hiding this comment

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

Hey @jimeh

Ace, thanks for this!
The implementation looks good

Let's have the line numbers show by default as I think its useful info to see 👍

Also rebase on to latest master and the CI should work correctly this time

@jimeh jimeh force-pushed the show-line-number branch from 2962393 to a087cec Compare August 25, 2025 16:45
@jimeh
Copy link
Contributor Author

jimeh commented Aug 25, 2025

@joshmu Thanks for the feedback, apologies for the delay in getting back to this, been a busy couple of weeks... lol

I've made showLineNumbers enabled by default now, please let me know if there's anything else you'd like me to change :)

@jimeh jimeh requested a review from joshmu August 25, 2025 16:48
- Introduced a new configuration option `periscope.showLineNumbers` to
  control the display of line numbers alongside file paths in search
  results. It defaults to `true`.
- Updated `formatPathLabel` to append line numbers when
  `showLineNumbers` is enabled.
- Enhanced tests to verify line number functionality in various
  scenarios.
@jimeh jimeh force-pushed the show-line-number branch from a087cec to fc46707 Compare August 25, 2025 17:10
Copy link
Owner

@joshmu joshmu left a comment

Choose a reason for hiding this comment

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

thanks @jimeh looks good 👍

@joshmu joshmu merged commit 2a12c1c into joshmu:master Aug 31, 2025
3 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

joshmu added a commit that referenced this pull request Aug 31, 2025
- Integrated showLineNumbers configuration option
- Resolved conflicts by keeping new test architecture
- Line number feature now available in formatPathLabel utility
joshmu added a commit that referenced this pull request Aug 31, 2025
…ecture

Merged PR #97 line numbers feature into the new test architecture. Updated default showLineNumbers to true, added comprehensive test coverage across quickPick, search, and configuration suites, and fixed config test to use withConfiguration helper for proper cleanup.
github-actions bot pushed a commit that referenced this pull request Aug 31, 2025
# [1.15.0](v1.14.0...v1.15.0) (2025-08-31)

### Bug Fixes

* **editor:** remove unnecessary async edit in setCursorPosition ([018dce6](018dce6))
* **search:** restore dynamic --files flag detection in query ([35140f5](35140f5))
* **test:** increase Windows CI timeout multiplier to 3x for stability ([f4124e2](f4124e2))
* **test:** normalize startFile paths for cross-platform compatibility ([456d92b](456d92b))
* **test:** prevent settings.json modifications after test runs ([cfa6a61](cfa6a61))
* **test:** remove color overrides causing config test failures ([0168064](0168064))
* **test:** resolve CI race condition in file search mode test ([27283d7](27283d7))
* **test:** resolve failing escape key test with proper editor state setup ([596368c](596368c))
* **test:** resolve flaky preview tests and enhance waitForPreviewUpdate helper ([4b3518b](4b3518b))
* **test:** resolve Windows CI test failures ([5da81c2](5da81c2))
* **tests:** simplify wait time calculation for CI-aware timeouts ([e6145b0](e6145b0))

### Features

* implement file search with improved architecture ([#89](#89)) ([43ae1b2](43ae1b2))
* merge master branch with line numbers feature from PR [#97](#97) ([5ebe3cd](5ebe3cd))
* **search:** add injectable arguments for flexible ripgrep configuration ([b119b2e](b119b2e))
* **search:** integrate line numbers feature with updated test architecture ([4b4e929](4b4e929))
* **test:** add CI-aware timeout multipliers ([dbfbb3e](dbfbb3e))
* **test:** add single test execution capabilities ([d92b208](d92b208))
* **test:** fix configuration exclusion test and improve test helper ([34c3e72](34c3e72))

### Performance Improvements

* **test:** reduce test execution time by 58% with optimized timeouts ([7cae1a4](7cae1a4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants