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: allow for use of fzf-lua instad of telescope #3

Merged
merged 2 commits into from
May 3, 2023
Merged

feat: allow for use of fzf-lua instad of telescope #3

merged 2 commits into from
May 3, 2023

Conversation

snelling-a
Copy link
Contributor

This PR allows for the user to input a backend param to the config. It defaults to "telescope.builtin" and keeps in inital implementation.

If the user passes "fzf-lua" as an argumen to the backend param, this will be used instead of telescope.

@0xJohnnyboy
Copy link
Owner

Thanks for your contribution !! That was fast 😂.
I asked a few questions in comments but it's probably just me not knowing Lua.

@0xJohnnyboy 0xJohnnyboy added the enhancement New feature or request label May 2, 2023
@snelling-a
Copy link
Contributor Author

Thanks for your contribution !! That was fast 😂. I asked a few questions in comments but it's probably just me not knowing Lua.

@Sonicfury, happy to help and answer any question, but I don't see any.

lua/scretch/init.lua Show resolved Hide resolved
@@ -33,30 +34,51 @@ local function new_named()
api.nvim_command(config.split_cmd .. ' ' .. scretch_name)
end

local function get_search_args(backend)
Copy link
Owner

Choose a reason for hiding this comment

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

is there speficic reason why you created another function ? couldn't we have this directly in search() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😅 no. i think i had something a little more elegant planned, but in the end, the fzf telescope apis were too different.

get_search_args(config.backend)
end

local function get_grep_args(backend, query)
Copy link
Owner

Choose a reason for hiding this comment

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

same as above

@0xJohnnyboy
Copy link
Owner

Thanks for your contribution !! That was fast 😂. I asked a few questions in comments but it's probably just me not knowing Lua.

@Sonicfury, happy to help and answer any question, but I don't see any.

heh, I have been caught in a meeting and forgot to submit, my bad

@0xJohnnyboy 0xJohnnyboy merged commit 93b05dc into 0xJohnnyboy:main May 3, 2023
@snelling-a snelling-a deleted the feat/fzf-lua-support branch May 3, 2023 19:37
snelling-a added a commit to snelling-a/nvim that referenced this pull request May 5, 2023
i found this plugin on
[reddit](https://www.reddit.com/r/neovim/comments/1346sl5/plugin_scretch_easily_manage_scratch_files/?utm_source=share&utm_medium=web2x&context=3)
and thought it looked useful.

however, i couldn't use it as it depended on telescope, which i just
migrated away from

fixed in [#3](0xJohnnyboy/scretch.nvim#3)
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