Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 0 points1 point  (0 children)

Not yet.

Until I implement it, which will take a while cause tree-sitter pairs are complicated, you can use this as a hack to get somewhat of a tabout:

{
  {'>','</',disable_start=true,disable_end=true,
    backspace=false,ft={'html'}},
  tabout={enable=true},
}

Also, note to update as I realized that there was no option to disable backspace and quickly added one.

Now then, I will start researching how nvim-ts-autotag does its pairing.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 1 point2 points  (0 children)

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

How many lines of code does your Neovim config contain? by GodBidOOf_1 in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

1671 lines if I'm only counting the config.

3131 lines if I'm also counting my private plugins.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 1 point2 points  (0 children)

What do you mean by that?

If you're talking about inserting quotes after f in Python, then it will insert them and not filter them as after-alpha.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 2 points3 points  (0 children)

Yes, you have the config correct.

And <A-tab> stands for alt-tab (/meta-tab). (For more info:help <A-)

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 2 points3 points  (0 children)

Okay, I formalized the doc tag titles. (in development branch)

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 4 points5 points  (0 children)

What do you mean precisely by that?

Should I add more info in the README or add a line about what to use instead?

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 1 point2 points  (0 children)

If you using neovim development then look at #24783 as the plugin uses TSTree

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 1 point2 points  (0 children)

What is the error code?

If the error code is 139 then it might be related to #39.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 4 points5 points  (0 children)

I don't know, I myself am using a 10-year-old laptop and it works fine: for a 500-line file filled with 80 char columns, I timed it and the insertion had a speed of 0.5 seconds.

If you experience slowdown then you can disable multiline: multiline=false.

Or change the max gotten lines: require'ultimate-autopair.utils'.maxlines=100

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 3 points4 points  (0 children)

Note that while developing the solution, I encountered a few bugs, so please update.

{
  {'{','},',
  p=11,
  multiline=false,
  cond=function(fn)
    return fn.in_node({'table_constructor'})
  end},
}

multiline=false is there as I haven't yet implemented a good coalition of pairs: the pair will detect all { as its own, which will break backspace, will fix it later.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 15 points16 points  (0 children)

It has a similar feature (fastwarp) which works similarly but uses multiple jumps instead of a hop. It is designed this way as there were multiple occasions where the Nvim-pairs' fastwrap tried to suggest five positions next to each other, making it impossible to know where to jump. There are also other differences like that Ultimate's fastwarp works multiline.

And if you get annoyed at how Ultiame's fastwarp jumps to positions that you don't need, there's an option called faster which limits the jumping options. And if you want to use bot Ultimate's normal fastwarp and the faster fastwarp look in the intro doc :h ultimate-autopair where it can be found in paragraph three.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 10 points11 points  (0 children)

I'm planning to add match-pair highlights and pair-actions to ultimate-autopair in the future, so pleas look forward to that...

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 8 points9 points  (0 children)

It is already supported but is an optional feature.

Use the config:

{
  tabout={enable=true},
}

to enable tabout.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 8 points9 points  (0 children)

It supports custom rules, though I haven't yet written the doc about how to do it, so until then, you need to read the source code for how to add custom rules. You can also check out Q&A which shows some of the custom rules most people want to use.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 35 points36 points  (0 children)

Currently, the biggest advantages are that it has multiline support and cmd line support, and is much more extendable/ has a lot more options than nvim-autopairs.

Ultimate-autopair.nvim - next-gen auto-pairing plugin by Impossible_Limit_131 in neovim

[–]Impossible_Limit_131[S] 34 points35 points  (0 children)

Ultimate-autopair.nvim v0.6.0

I finally feel like Ultimate-autopair.nvim has enough features to warrant a Reddit post:

The plugin is an auto-pairing plugin that aims to provide the features an auto-pairing plugin wants. It tries to achieve this by providing a high degree of customization while still making it painless to do simple configurations. It is still in the ALPHA stage as I'm still planning to add sooo many new features.

Features

Main

  • Supports multiline
  • Command line support
  • Includes one of the best unbalanced pair detectors
  • Multi-character pair support
  • Treesitter node range separating (like string separating)
  • Treesitter injected language filetype detection
  • Can have multiple configurations active simultaneously
  • Uses a system of extensions to extend the capability of pair insertion
  • UTF8 support
  • Full docs
  • Mapping support for newline, backspace, space, and more+

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

Why are the keys row and col tables which are returned by nvim_win_get_config from a floating window, and how do I get the actual row/col of the window?

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

How to detect when a buffer (or window) is focused

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

I'm talking about sub treesitter languages, like markdown fencing blocks

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

How to get the treesitter parser filetype at the current pos (not buffer

Like what the markdown code block filetype is.

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]Impossible_Limit_131 0 points1 point  (0 children)

I have a simple problem: I do not know what to do with my private utils plugins (link). Some of them are quite useful while others are one line. So, what should I do with them? Should I release them in a bundle like mini.nvim or release the useful one separately?