Skip to content

Conversation

@petobens
Copy link
Contributor

In my telescope config I define an insert mode <CR> mapping for the find_files picker: https://github.com/petobens/dotfiles/blob/42327e961e9112c2e5c0dea3a6bd141f7f95011a/nvim/lua/plugin-config/telescope_config.lua#L650-L654

Without the changes in this PR if I pressed enter (<CR>) on multiple selections when using the /file slash command then files would get opened (see GIF) rather than being added to the chat buffer i.e my original find_files mapping would take priority over the attach mapping function despite the docs say that this shouldn't happen https://github.com/nvim-telescope/telescope.nvim/blob/master/doc/telescope.txt#L1977.

Dunno if there is a better way of doing this. Feel free to close/recommend something else.

multi_codecompanion

@olimorris
Copy link
Owner

Does this mean that we would be overwriting <CR> for other users?

@petobens
Copy link
Contributor Author

Does this mean that we would be overwriting for other users?

Seems like it (which is obviously suboptimal). I can explore other ways of doing this but I'm running out of ideas.

@olimorris
Copy link
Owner

Is this a CodeCompanion issue or a Telescope one? I can't add anything to the plugin that will change the workflow for the majority of CodeCompanion+Telescope users.

@petobens
Copy link
Contributor Author

Probably a telescope issue. Feel free to close. I'll patch from my side.

@olimorris olimorris closed this Feb 19, 2025
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.

2 participants