-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Snippets and LanguageClient-neovim: no indent, undesired synchronized placeholder #475
Comments
A custom function I've written to work around the problem in this special case (disabling enable_completed_* neosnippet variables): function! s:format_yaml_snippet()
" Find and replace things with $0, $1, $2, etc
s/$\([0-9]\+\)/<`\1`>/g
" Expand custom yaml snippet
execute 's/\%x00 /\r'
\ . repeat(' ', indent('.'))
\ . repeat(' ', &shiftwidth)
\ . '/g'
endfunction
command! FormatYamlSnippet call s:format_yaml_snippet() |
Fixed. |
Sorry. It is feature. |
Please test the latest version of neosnippet. |
Snippets coming from the language server for YAML are doing the correct thing now, for the most part. Two minor issues that I will document soon. |
Please upload |
Python's v:completed_item: |
Yaml's v:completed_item: |
Because, LanguageClient-neovim's word is broken. 2nd problem is not bug of neosnippet. |
And sorry. I cannot test yaml-language-server. |
No worries! The python snippet problem will probably affect way more
people, so that’s the important one. I just listed the yaml issue for
completeness.
…On Sun, Oct 13, 2019 at 12:17 PM Shougo ***@***.***> wrote:
And sorry. I cannot test yaml-language-server.
So I don't want to test your problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#475?email_source=notifications&email_token=AA4NDF7ZOBWBXVJCPGG2OITQONC2XA5CNFSM4I7RU4K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCZV3Q#issuecomment-541432558>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4NDF3XQVRQKHT7GB6S6XDQONC2XANCNFSM4I7RU4KQ>
.
|
Fixed. Please test the latest version. |
I have tested and installed yaml-languege-server. Oh, it is bad. |
Haha, yeah, the latest version is broken. 0.4.1 is the most recent working version. redhat-developer/yaml-language-server#192 And I tested your fixes; they work! |
Oh... |
If you want 0.4.1 of yaml-language-server to work, you'll need to configure it according to these docs: https://github.com/autozimu/LanguageClient-neovim/wiki/yaml-language-server . It's buggy, but is the only option I could find for editing openapi specs. |
Thanks for all the help! I'm guessing that based on your fixes, neosnippet will better-support more vscode-like language-servers going forward, which will be a great user experience improvement for lsp-supported snippets in neovim. |
OK. I get it. yaml-language-server works. |
|
why?? I am confusing by the behavior. |
I don't fix the non-reproducible problems. It is my policy. |
If you create the reproducible steps, I will test it later for yaml languege-server. |
I'll open a new issue if I figure out how to describe the yaml-language-server issue clearly. I think this current issue is definitely resolved, thanks again for your help! |
Thanks for this awesome plugin! These fixes may be out of scope because they're related to language-servers that focus more on vscode. That said, maybe you'll consider it in-scope, so I'll outline the problems in case it helps you and/or others who run into similar issues.
Problems
I've run into two issues using the latest version of this plugin with the latest version of LanguageClient-neovim.
Gif
Value of v:completed_item
Environment
vimrc:
The text was updated successfully, but these errors were encountered: