windwp / nvim-autopairs

autopairs for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autopair with cmp not working on python file

RoRep1ay opened this issue · comments

Description

The autopairing is not working on completion on Python file. I've tried on go / js file, and both are working normally.

Mapping bug

1.If you report a bug about indent. Please remember that plugin doesn't do anything about indent.
It just trigger the indent of your vim config so if you have wrong indent config then it will do wrong indent.
You can check by select a block of code and press ==
2. provide result of command :verbose imap <cr>.

Steps to reproduce

Open a python file, insert print -> <CR> Only print is outputted
It should output print() with cursor inside the parenthesis.

Minimal config

local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on(
  'confirm_done',
  cmp_autopairs.on_confirm_done()
)

Did some little digging and realized it failed to do so because of this line:
https://github.com/windwp/nvim-autopairs/blob/master/lua/nvim-autopairs/completion/handlers.lua#L17

Seems like this is LSP server related. Right now, I'm using pyright, checking their source code, looks like they're setting this funcParensDisabled to true.

Save issue here, pretty annoying.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.