-
-
Notifications
You must be signed in to change notification settings - Fork 855
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: syntactic sugar to map funcs over entries & selections #931
Conversation
I am not sure if we need the bbye action or if we should work more with the wiki and have a page with action configurations similar to what fzf does. I don't think we can continue to add super "specific" actions for a "handful" people. We might just blow up the repository. I'll need think about it and come back to you (I am super busy this week so it might take some time) |
I personally agree, though I'd be wary that lot of users wouldn't read a wiki (or something similar) and just raise another issue or reddit post (why is grepping slow on large repos? 😆) Maybe an extension that just loads all picker-specific actions appealing to the largest user base is most straightforward; users can then opt-out/remap if something doesn't suit them (and my guess is most actions would just be ignored since a user doesn't care for them).
No worries, I'll pick this up again then. |
I would prefer a good structured wiki. The users who, don't read manual will always exist, it doesn't matter if its in the docs as unmapped action, wiki as snippet or an extension as unmapped action. We just need to have a good wiki structure, with a table of content, etc and when the question/issues come we can just like into the wiki and close. Also, with a wiki, people can just setup things they actually want and maybe while copy and pasting the code, maybe they learn something :) I try to set up the wiki that way on sunday. I haven't made any decisions on on |
e7bb3fb
to
a016af5
Compare
Any idea how to fix this "flickering" on flicker-2021-06-29_17.33.35.mp4 |
Is there a more clear verdict whether #793 is something we would want in telescope? With the function actions.refine(prompt_bufnr)
local current_picker = action_state.get_current_picker(prompt_bufnr)
-- select our filter entries
actions.select_all(prompt_bufnr)
current_picker:reset_prompt()
-- invert selection
actions.toggle_all(prompt_bufnr)
-- remove inverted selection
current_picker:delete_selection(function() end)
end There is minimal flickering from intermediate highlighting (could always be made optional in Happy to add it to the PR if desired. |
I still we shouldn't do #793 because its less performant than using and from fzf-native. But tj and i talked about being able to do Also i think its out of scope for this PR, we should keep prs smaller. None the less you have the util functions twice now, once in the actions/init.lua file and once in actions/util.lua |
847a8a8
to
cd3d26b
Compare
Ok, fixed. I didn't finally clean up yet as I was waiting on feedback for vim-bbye, whether to keep the mapping or not, and whether there's something to do about the mini-flickering as shown above or would be ok as is. |
be961d8
to
45c3695
Compare
6f6a01a
to
5034678
Compare
To simplify things I've now removed the mapping and vim-bbye action. The mapping can of course be always set by the user and the action will make its way into the wiki eventually. The highlighting issue referred to above is a separate issue, which stems from removal of highlighting extmarks, and any later fix of that should not effect this PR. |
ff811fa
to
94357fb
Compare
I circled a bit around our issue of how to collect the return values, only to realize the "burden" is probably best put to the user as it's too easy to just write what he/she want's to do with the output, as opposed to solving the problem for every case. Stupidly funny side notes:
|
0b98940
to
afa89ea
Compare
3f1f4e7
to
91571fc
Compare
skip-checks: true
Thats just false. Lua always stores things in keys. So a list starts has keys 1 ... n
for a list (a table starting with the key one) for |
Maybe a bit badly phrased, that's why I said it doesn't matter. But yeah, good to have it in full detail 😆 |
This PR closes #900 and implements
vim-bbye
action from Buffer close and keep window open #906