Since open braces/parentheses are almost always preceded by spaces, and
close braces/parentheses are almost always succeeded by spaces, there's
no real advantage to immediately converting an abbreviation when these
are seen. Moreover, this meant that the abbreviations \{{ and \}}
were impossible to use (and we had to resort to \c[ and \c]
instead). Overall, this change feels like a net positive (and users can
still override by just pressing <Tab> anyways.
This also makes a couple of minor changes with no noticeable effect
Passing in {syntax} to vim.lsp.util.open_floating_preview(), which is
documented as a mandatory parameter.
Not returning vim.schedule() calls in insert_char_pre(), since
returning truthy values from an autocmd callback causes the autocmd to
be deleted. vim.schedule() is documented as always returning nil, so
this doesn't really matter, but this is clearer.
Since open braces/parentheses are almost always preceded by spaces, and close braces/parentheses are almost always succeeded by spaces, there's no real advantage to immediately converting an abbreviation when these are seen. Moreover, this meant that the abbreviations
\{{
and\}}
were impossible to use (and we had to resort to\c[
and\c]
instead). Overall, this change feels like a net positive (and users can still override by just pressing<Tab>
anyways.This also makes a couple of minor changes with no noticeable effect
{syntax}
tovim.lsp.util.open_floating_preview()
, which is documented as a mandatory parameter.vim.schedule()
calls ininsert_char_pre()
, since returning truthy values from an autocmd callback causes the autocmd to be deleted.vim.schedule()
is documented as always returningnil
, so this doesn't really matter, but this is clearer.