[mini.files] Bookmark interaction with mini.clue #1195
-
Love the new bookmark feature. Very nice. I need some help though. Focusing on a bookmark via |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am afraid that's to be expected and is the reason is documented in 'mini.clue': it implements its triggers as buffer-local mappings. Because As the bookmark's So I assume there is a call to local triggers_local, triggers_orig = {}, MiniClue.config.triggers
for _, tr in ipairs(MiniClue.config.triggers) do
if not (tr.keys == "'" and tr.mode == 'n') then table.insert(triggers_local, tr) end
end
MiniClue.config.triggers = triggers_local
pcall(MiniClue.enable_buf_triggers, vim.api.nvim_get_current_buf())
MiniClue.config.triggers = triggers_orig Another approach is to save and restore already present buffer-local mapping for "'", like this: local mark_goto = vim.fn.maparg("'", 'n', false, true)
pcall(MiniClue.enable_buf_triggers, vim.api.nvim_get_current_buf())
vim.fn.mapset(mark_goto) However, there is no guarantee that buffer local mappings are already created at the point when filetype plugin is executed (and I am hesitant to adding it). So this might be not the most robust approach. All in all, I'd like to think a bit more of maybe making it a smoother interaction. |
Beta Was this translation helpful? Give feedback.
-
After thinking about it over night, it does seem that the current status quo is a good compromise: 'mini.clue' is not automatically enabled in 'mini.files' buffers and if user wants it, adjusting triggers might be needed in order for So if anybody encounters similar issue, either adjust 'mini.clue' triggers before enabling them or not enable at all. |
Beta Was this translation helpful? Give feedback.
After thinking about it over night, it does seem that the current status quo is a good compromise: 'mini.clue' is not automatically enabled in 'mini.files' buffers and if user wants it, adjusting triggers might be needed in order for
'
to work (if it was defined as a trigger globally).So if anybody encounters similar issue, either adjust 'mini.clue' triggers before enabling them or not enable at all.