Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Code completion replaces characters that are not part of identifier name #860

@tcNickolas

Description

@tcNickolas
Contributor

Describe the bug

When code completion replaces the partial variable/operation name with the autocompleted one, it replaces the characters that cannot be part of the variable name, such as closing brackets, commas or semicolons.

To Reproduce

Steps to reproduce the behavior:

  1. Autocomplete a partially typed variable name followed by , or ).

Expected behavior

Similar to C# autocomplete behavior, it makes sense to replace only the characters that can be part of the variable/operation name, leaving the closing brackets unchanged.

Screenshots

Using autocomplete in this situation:
image

produces the following replacement:
image

while the expected result would be:
image

System information

This behavior is not new, it's been around for at least half a year. My current setup is:

  • QDK extension 0.15.2101.126940
  • Windows, .NET Core 5.0.103 (also .NET Core SDK 3.1.406 installed)
  • VS 16.8.4

Activity

added
bugSomething isn't working
needs triageAn initial review by a maintainer is needed
on Feb 11, 2021
added
area: editorExtensions for Visual Studio and Visual Studio Code
and removed
needs triageAn initial review by a maintainer is needed
on Feb 12, 2021
bamarsha

bamarsha commented on Feb 12, 2021

@bamarsha
Contributor

I think this is likely a bug with Visual Studio's LSP client, so it may need to be fixed on Visual Studio's end. @ricardo-espinoza

tcNickolas

tcNickolas commented on Apr 13, 2021

@tcNickolas
ContributorAuthor

@SamarSha @ricardo-espinoza
Any updates on this issue? This behavior makes writing code somewhat frustrating, since on one hand I have to remember not to use the tempting autocomplete, but on the other hand I keep forgetting and using it and having to re-type the incorrectly replaced characters.

I found another odd autocomplete behavior that might be part of the same issue: autocompleting @Entr turns it into EntryPoint, deleting the @ symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: editorExtensions for Visual Studio and Visual Studio CodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tcNickolas@bamarsha

        Issue actions

          Code completion replaces characters that are not part of identifier name · Issue #860 · microsoft/qsharp-compiler