windwp / nvim-autopairs

autopairs for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

autopair with luasnip python docstring

huyhoang8398 opened this issue · comments

Description

Currently Im using nvim-autopairs with Luasnip and python docstring

Screenshot 2023-08-06 at 17 29 28

When I type " it will start suggesting docstring snippet

Screenshot 2023-08-06 at 17 30 02

But i have an unwanted quote at the end as the above picture

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>.
i * <Lua 636: ~/.local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:127>
cmp.utils.keymap.set_map
Last set from Lua

Steps to reproduce

  1. Install nvim-autopair
  2. Install luasnip
  3. enable friendly snippet, snipmate
  4. edit python file to test snippet
  5. Type "

Minimal config

local npairs = require("nvim-autopairs")

npairs.setup({
	disable_filetype = { "TelescopePrompt" },
	check_ts = true,
	ts_config = {
		lua = { "string", "source" },
		javascript = { "string", "template_string" },
		java = false,
	},
})

-- If you want insert `(` after select function or method item
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

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.