Skip to content

Commit

Permalink
force pair to work with pyright (#404)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam-programs <None>
  • Loading branch information
Sam-programs committed Oct 15, 2023
1 parent 748e72c commit 4c21ec0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/nvim-autopairs/completion/cmp.lua
Expand Up @@ -14,6 +14,12 @@ M.filetypes = {
handler = handlers["*"]
}
},
python = {
["("] = {
kind = { Kind.Function, Kind.Method },
handler = handlers.python
}
},
clojure = {
["("] = {
kind = { Kind.Function, Kind.Method },
Expand Down
5 changes: 5 additions & 0 deletions lua/nvim-autopairs/completion/handlers.lua
Expand Up @@ -81,4 +81,9 @@ M.lisp = function (char, item, bufnr, _, _)
utils.feed("<Space>")
end

M.python = function(char, item, bufnr, rules, _)
item.data.funcParensDisabled = false
M["*"](char,item,bufnr,rules)
end

return M

0 comments on commit 4c21ec0

Please sign in to comment.