question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Snippet completions appear inside comments.

See original GitHub issue

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.101
 Commit:    236713b0b7

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.2.101/

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  2.2.101 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version: 1.30.1 C# Extension version: 1.17.1

Steps to reproduce

Inside comments i get snippet completions, I have no C# related extensions installed other than omnisharp.

Expected behavior

In comments there shouldn’t be any completions at all or at least upon manually invoking them.

Actual behavior

Snippet completions appear inside comments.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
rchandecommented, Jan 30, 2019

@jrieken Note that I’ve also seen instances of the above but with no tokens in the list, only snippets from csharp.json.

1reaction
rchandecommented, Jan 30, 2019

@jrieken We provide snippets in the form of json files/snippets entry in our package.json (https://github.com/OmniSharp/omnisharp-vscode/blob/master/snippets/csharp.json) and (https://github.com/OmniSharp/omnisharp-vscode/blob/master/package.json#L830). They seem to show up in comments even though we don’t provide any other C# intellisense in comments. I think this is happening because

  • C# intellisense isn’t provided in comments, so VS Code provides token-based intellisense (see screenshot)
  • The snippet completion provider detects a non-empty list and provides snippets

image

What can we do to make this not happen? This basically seems like a limitation in the VS Code platform to me–I don’t see anything in the docs that allows us to control where a snippet is shown.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autocompletions kick in when in snippet mode #45716 - GitHub
This is a generic issue with auto-completion. Its only more pronounced in emmet completions as they are snippets themselves and insert more than ......
Read more >
Snippets in Visual Studio Code
Snippets in Visual Studio Code. Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements....
Read more >
Code completion | IntelliJ IDEA Documentation - JetBrains
Invoking basic code completion for the second time shows inaccessible classes and members (these can be made public by applying an intention ...
Read more >
User Manual - rust-analyzer
rust-analyzer.completion.callable.snippets (default: "fill_arguments" ) ... When enabled, rust-analyzer will highlight rust source in doc comments as well ...
Read more >
Coc.nvim completion and snippets are conflicting - Reddit
r/neovim - What appears when I select the first entry on the previous picture ... If there is no completion list opened at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found