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

Telescope integration #16

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Telescope integration #16

wants to merge 10 commits into from

Conversation

teocns
Copy link

@teocns teocns commented Jul 22, 2024

Follows https://github.com/nvim-telescope/telescope.nvim/blob/master/developers.md

beware I haven't had the chance to test thoroughly, it is a freshly baked implementation

@ptdewey ptdewey self-requested a review July 22, 2024 01:33
@ptdewey ptdewey added the enhancement New feature or request label Jul 22, 2024
@ptdewey
Copy link
Owner

ptdewey commented Jul 22, 2024

Thanks for the PR! Telescope integration is something I'd be happy to merge in when its ready.

I just tested this, and it is erroring out when selecting an entry from the telescope menu:

E5108: Error executing lua: ...rojects/testing/yankbank-nvim/lua/yankbank/telescope.lua:35: attempt to call field 'tbl_index' (a nil value)
stack traceback:
        ...rojects/testing/yankbank-nvim/lua/yankbank/telescope.lua:35: in function 'run_replace_or_original'
        ...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
        ...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:253: in function <...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:252>

Taking a look at line 35, it appears that vim.tbl_index is not a valid function, but it should be pretty simple to modify the code to get the entry index (a loop would suffice as the table is quite small).

Transitioning to some minor feedback, I think it would be nice if it used the telescope split previewer when the editor window is sufficiently large, and I would like the newline display character to be set with an option as I don't personally like using glyph characters (but I'm fine with it being the default option).

Please reach out if you have any questions, and thanks again for the contributions.

@ptdewey ptdewey assigned ptdewey and unassigned ptdewey Aug 7, 2024
@ptdewey ptdewey removed their request for review September 22, 2024 19:44
@ptdewey ptdewey marked this pull request as draft September 22, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants