-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
Better mappings handling #1473
base: master
Are you sure you want to change the base?
Better mappings handling #1473
Conversation
1bfc8a4
to
fe636a5
Compare
rebased branch. i hoped this would fix my problems. sadly it didnt 😭 |
Which problems didn't it fix @Conni2461 ? |
I merged #1143 and it fixed Eventually i said i cant leave it like that and reverted #1486 went to bed, realized why its broken, got up again (i know) and i think i fixed it in #1487: 9297883 I think this PR is good. Lets merge it :) |
From what I see, this indeed partially fixes the issue from As a heads up, we currently have another whacky issue with extensions. local fb_actions = require 'telescope'.extensions.file_browser.actions
local imaps = {
['<C-f>'] = { '<Right>', type = 'command' },
}
require'telescope'.setup {
extensions = {
file_browser = { mappings = { i = imaps, }, },
},
} doesn't work because telescope.nvim/lua/telescope/_extensions/init.lua Lines 7 to 24 in 1c57cc6
setups up the extension essentially in I'll make a PR to fix that eventually. |
So I can just merge as is? haha @Conni2461 you should follow my lead and take some vacation 😆 |
Ah, I found one case that is not yet fixed. Take telescope.nvim/lua/telescope/builtin/git.lua Lines 276 to 296 in 1c57cc6
Neither of the below cases seem to work: require "telescope".setup {
pickers = {
git_branches = {
-- attach_mappings = function(b, map)
-- map("i", "<C-a>", false)
-- return true
-- end,
mappings = {
i = {
["<C-a>"] = function()
print "test"
end,
["<C-a>"] = false,
},
},
},
},
} I think the cleanest solution would be to move the default mappings for an individual pickers to |
The expected case is that the mapping does not happen? |
(In the example you sent, the code wouldn't run -- so I'm just confused what part is supposed to be happening) |
fe636a5
to
09d7bbc
Compare
OK, I pushed something that should work I think @fdschmidt93 |
(Did this fix everything?) |
No, I'm afraid it doesn't seem to be the case. What I'd expect that I can unmap or map my own function onto something that is bound via
I'm also a bit confused and sorry for the late response. require "telescope".setup {
pickers = {
git_branches = {
mappings = {
i = {
-- I was maybe confusing: this is just one thing that should work
["<C-a>"] = function()
print "test"
end,
--and this another
["<C-a>"] = false,
},
},
},
},
} |
This will be a nightmare to rebase. Can we not do this again with these unrelated changes. And do smaller PRs in the future, if its possible? (I know something like fps would not be possible, in a small PR) I'll try to split it up into smaller parts and get the good stuff merged. @tjdevries Ill ping you in the smaller PR for the stuff that still needs to be resolved regarding fdschmidts last comment |
b4a6ada
to
ef2f638
Compare
@tjdevries this is rebased and the unrelated changes are cherry picked here #1850 I'll write some docs for Can you finish up this PR? (Can we even more simplify it with |
I pull out the document changes for 0.1.0 The rest will be addressed at a later point in time |
ef2f638
to
e26ba29
Compare
688d667
to
f68d0c2
Compare
No description provided.