Open barrett-ruth opened 1 year ago
Sorry, I don't understand, please elaborate a bit more.
dial.nvim uses an augend group named "default"
when not configured with on_filetype()
function.
Is there any problem with this usage?
not default i guess.
What I meant was "fallback". So fallback to
dial.nvim supports all the features provided built-in <C-a>
/<C-x>
, so no fallback function is provided at this time.
If requested, I would consider adding a function like require("dial.status").manipulatable()
.
This function would allow fallback to the default if there is no manipulatable augend:
vim.keymap.set("n", "<C-a>", function()
if require("dial.inspect").manipulatable() then
-- use dial.nvim's <C-a>
return "<Plug>(dial-increment)"
else
-- fallback to built-in
return "<C-a>"
end
end, { expr = true })
@monaqa That would actually be quite nice to have. I believe I found myself in similar situation as reported by OP.
Sorry @gegoune, but I can't reproduce what OP said, could you provide the reproduction steps? For me, it just works as expected when opening a.txt
For simple case such 1
it does work, as @monaqa states in their comment. I can't think of/remember situation I mean in my previous comment, so perhaps it is not relevant or factual at all.
I love this plugin but this missing (and easy to implement feature) has really been bugging me.
If I open up a new file
a.txt
:I can increment the 1 normally with
<c-a>
. However, that doesn't work with dial because dial doesn't have any groups associated with a random text file.How can I configure dial to default to the builtin mapping if dial doesn't do anything? Should this be a default?
Thanks for the awesome plugin.