Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(telescope): Save position into jumplist before 'edit' action #340

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

toh995
Copy link
Contributor

@toh995 toh995 commented Jan 24, 2024

NOTE: This PR is DIFFERENT from #305 - this PR touches the telescope extension.

Suppose my cursor is on line 24, and then I open the aerial telescope window.

Then I select a symbol and jump to it.

If I press Ctrl + o, then I want to jump back to line 24.

This PR implements this feature.

Tested locally, and it works well for me!

@@ -128,6 +128,7 @@ local function aerial_picker(opts)
default_selection_index = default_selection_index,
sorter = conf.generic_sorter(opts),
previewer = conf.qflist_previewer(opts),
push_cursor_on_edit = true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm really just copying telescope's built-in picker lsp_document_symbols().

See the PR on the telescope repo here: https://github.com/nvim-telescope/telescope.nvim/pull/1234/files#diff-e706c69d9b98d70266879375b7a75301f9a48fde0fdb99fa85449972df202c16R155

@toh995 toh995 marked this pull request as ready for review January 24, 2024 07:51
@stevearc
Copy link
Owner

stevearc commented Feb 3, 2024

LGTM thanks!

Test failure unrelated. Looks like a treesitter update :/

@stevearc stevearc merged commit 9523ebc into stevearc:master Feb 3, 2024
7 of 9 checks passed
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.

None yet

2 participants