Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Only return InsertTextFormat.Snippet when a snippet is returned - #363

Merged
felixfbecker merged 1 commit into
sourcegraph:masterfrom
tomv564:completion-correct-inserttextformat
Oct 3, 2017
Merged

Only return InsertTextFormat.Snippet when a snippet is returned#363
felixfbecker merged 1 commit into
sourcegraph:masterfrom
tomv564:completion-correct-inserttextformat

Conversation

@tomv564

@tomv564 tomv564 commented Oct 3, 2017

Copy link
Copy Markdown
Contributor

The language server was returning InsertTextFormat.Snippet all the time when a client indicated it supported snippets.

The more correct behaviour is to only return that value when insertText is actually a snippet.
This allows clients to avoid potentially more complex completion handling when not necessary.

@codecov

codecov Bot commented Oct 3, 2017

Copy link
Copy Markdown

Codecov Report

Merging #363 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
- Coverage   74.71%   74.68%   -0.03%     
==========================================
  Files          15       15              
  Lines        1760     1758       -2     
  Branches      332      331       -1     
==========================================
- Hits         1315     1313       -2     
  Misses        294      294              
  Partials      151      151
Impacted Files Coverage Δ
src/typescript-service.ts 72.96% <100%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d047d67...3ec21c4. Read the comment docs.

@felixfbecker
felixfbecker merged commit f31e841 into sourcegraph:master Oct 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants