mini.pairs: auto-insert semicolons? #956
-
I'd like to auto-insert semicolons in Nix code, e.g. when the code is like {
some_thing =
} when I type a {
some_thing = { | };
} I tried this in a local mp = require('mini.pairs')
mp.map_buf(0, 'i', '{', { action = 'open', pair = '{};', register = { cr = false } })
mp.map_buf(0, 'i', '}', { action = 'close', pair = '{};', register = { cr = false } }) If possible, I'd also like to not insert the semicolon if the {
things = [
# since this is inside square brackets, don't add the ;
{ }
];
} |
Beta Was this translation helpful? Give feedback.
Answered by
echasnovski
Jun 11, 2024
Replies: 1 comment
-
I am afraid, this is not possible with 'mini.pairs':
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
echasnovski
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am afraid, this is not possible with 'mini.pairs':