-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
[Bug] Unexpected behaviour when editting file with julia-vim. #289
Comments
Today I was working with python file, error also happens with python snippets. |
Hello, this will require some additional information. Most importantly: what do you use for the snippets, and how is it configured? Also, possibly less crucial: is this vim or neovim, and which version? What is your operating system? |
Sorry about that: Vim version:
OS: Windows 11 I'm using coc.nvim and coc-snippets for completion. coc.nvim:
I don't think this is a problem with any settings, because it just happen when I use this plugin. There is probably a conflict with autopairs. For details, look at my repo in here |
Is there any update for this issue? |
I initially blamed coc-nvim's async behavior meeting vim's input system and consequently being weird. I was wrong. The map alone actually behaves lie it should. It's when I enabled julia-vim with LaTeX expansion that stuff fell apart. Here's why: auto-pairs' julia-vim/autoload/LaTeXtoUnicode.vim Lines 643 to 645 in fca7e3e
you print what you're given, and you literally get Coc.nvim doesn't properly conflict with auto-pairs, because it still produces a And because coc.nvim's mapping ends in I believe, however, that this can be fixed. Just not easily. Ternary exists, and can be used. This does create a challenge in terms of priority, but that's honestly just a footnote in the bigger problem. I have no idea what the code for this would look like, but a check for whether or not julia-vim makes a substitution would need to be in place; if it passes, return it (or possibly blank if julia-vim's function is run first, the result stored in a variable, and that variable then gets checked for the ternary). How this works with mixed expr and non-expr is not really something I know, especially if This would be trivial if Vim had an easy way to signal the early termination of a map, but it doesn't. Everything from this point is ugly instead. The only other alternative is to not try to be compatible, and just wipe out any existing From a compatibility perspective, it sucks. It'll kill coc.nvim maps as well as auto-pairs. But it'll keep stuff functional, and realistically... these maps are already broken. Auto-pairs just happened to be the very painfully obvious actor that got in between the coc maps and the bad julia-vim maps. Or, y'know, provide an option to allow remapping the LaTeX expansion key for people who decide they like the feature, just not at the expense of other plugins. |
Without julia-vim:
bandicam.2022-04-07.09-31-01-172.mp4
With julia-vim:
bandicam.2022-04-07.09-37-52-695.mp4
In the below video, autocomplete is broken in
.jl
file, but when I switch to.vim
file the snippet is fine, and when come back to.jl
file, the snippet works miraculously.bandicam.2022-04-07.09-38-58-294.mp4
Julia settings:
The text was updated successfully, but these errors were encountered: