atom-community / atom-languageclient

Provide integration support for adding Language Server Protocol servers to Atom.
https://www.npmjs.com/package/atom-languageclient
MIT License
45 stars 13 forks source link

fix: set the correct fallback for Snippet completion #148

Closed ayame113 closed 3 years ago

ayame113 commented 3 years ago

Currently, Snippets without insertText are not completed (empty strings are inserted). According to the lsp CompletionItem spec, Implementation should fall back to label. This pull request fixes it.

https://microsoft.github.io/language-server-protocol/specification#textDocument_completion A string that should be inserted into a document when selecting this completion. When falsy the label is used as the insert text for this item.

ayame113 commented 3 years ago

Thank you for review. Added a test. However, I'm new to writing tests so I don't know if this is correct ...

UziTech commented 3 years ago

Looks great! :100: Thanks for the PR!

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.8.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

ayame113 commented 3 years ago

Thank you!