altermo / ultimate-autopair.nvim

A treesitter supported autopairing plugin with extensions, and much more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug?] Incorrect handling of lisp syntax in fennel files

alexmozaidze opened this issue · comments

I am rewriting my configs in fennel, and I found a peculiar bug(?) that messes up the structure.

Reproduction Steps

| represents the cursor

(
 |)

Pressing (

(
 (|)

The first parenthesis now doesn't have a match.

Currently, multiline auto-pairing detection is not supported (planned for future release).

Nice to hear, but before it is implemented, is it possible to use a simpler method of pairing, e.g. to just close off any opening parenthesis without watching for surroundings?

Technically yes, by creating an extension that sets the o.line to '' (NOTE: this will disable all line detections.), but if you want simple pairing then I would recommend using other auto-pairing plugins.

Okay, with the release of v0.6.0, multiline support was added.
(Note: To update to v0.6.0, remove the plugin totally and reinstall)

After the update, I experience crashes. Whenever I try to input (, NeoVim crashes with exit code 139 (aka segfault).

OS: Void Linux
NeoVim version: NVIM v0.10.0-dev-551+ge27377e33-dirty
LuaJIT version: LuaJIT 2.1.0-beta3

EDIT: sometimes it doesn't happen instantly, you need to input any opening pair several times for the bug to occur.

There was a bug in neovim development (#24783) which caused TSTree to crash neovim, please update to the latest version.

Yep, seems to be fixed. Thank you!

Update: I refactored the code so that the crash doesn't happen anymore on older neovim versions.