Julian / lean.nvim

neovim support for the Lean theorem prover
MIT License
248 stars 25 forks source link

fix(abbr): don't stop abbr on `{}()` #338

Closed MithicSpirit closed 3 months ago

MithicSpirit commented 3 months ago

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

Julian commented 3 months ago

Thanks. I honestly don't recall why we special cased these, but this seems OK to me (and the tests pass after a rebase). Merging, appreciated.