Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad interaction with deoplete #486

Closed
giddie opened this issue Dec 5, 2024 · 2 comments
Closed

bad interaction with deoplete #486

giddie opened this issue Dec 5, 2024 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@giddie
Copy link

giddie commented Dec 5, 2024

Description

There seems to be a bad interaction with deoplete that breaks the mapping.

When I type: fn<CR>, I expect the endwise rule to complete. However, this happens only if deoplete is not enabled. Commenting out the bottom line of the example config disables deoplete and fixes the issue.

This seems to happen because vim.fn.pumvisible() == 1 when the mapping is triggered, even though the popup menu is not displayed. If I disable the check and allow autopairs_cr() to be called directly (instead of esc("<cr>"), the mapping works.

Is there some simple way to work around this?

Mapping bug

No response

Steps to reproduce

No response

Minimal config

call plug#begin('~/.vim/vim-plug')

Plug 'windwp/nvim-autopairs'
Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}

call plug#end()

lua << EOF
local npairs = require("nvim-autopairs")
npairs.setup({})

local endwise = require('nvim-autopairs.ts-rule').endwise
npairs.add_rule(endwise("fn", "end", "elixir", nil))
EOF

let g:deoplete#enable_at_startup = 1
@giddie giddie added the bug Something isn't working label Dec 5, 2024
@giddie
Copy link
Author

giddie commented Dec 7, 2024

You know what? I think it's time I just switched to nvim-cmp 🙄 I'll leave this here in case you want to address the issue anyway.

Copy link

stale bot commented Feb 6, 2025

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.

@stale stale bot added the wontfix This will not be worked on label Feb 6, 2025
@stale stale bot closed this as completed Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant