Skip to content
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

Intellisense interrupting typing in strings #110

Closed
DonJayamanne opened this issue Nov 13, 2017 · 7 comments
Closed

Intellisense interrupting typing in strings #110

DonJayamanne opened this issue Nov 13, 2017 · 7 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality
Milestone

Comments

@DonJayamanne
Copy link

From @abrakidabra on April 28, 2017 0:1

Environment data

VS Code version: 1.11.2
Python Extension version: 0.6.3
Python Version: 2.7.13
OS and version: MacOS Sierra 10.12.4

Actual behavior

When putting a full stop at the end of a line inside triple quotes the intellisense dialog pops up and suggests a bunch of options. I then hit the enter key to go to the next line but instead of going to the next line it adds the first suggestion in the intellisense dialog to the string.

Expected behavior

No intellisense inside triple quoted strings. It's very clunky to have to hit the escape key at the end of every line with a full stop on it.

Steps to reproduce:

  1. Type this code. When you get to the first full stop at the end of the line it will suggest a bunch of possible options to insert.
print """
There's somethign going on here.
With the three double-quotes.
"""

Settings

Workspace Settings:

{
    "python.pythonPath": "/Data/Development/Python/VirtualEnvironments/vscode/bin/python2.7",
    "python.linting.pylintPath": "/Data/Development/Python/VirtualEnvironments/vscode/bin/pylint",
    "python.formatting.autopep8Path": "/Data/Development/Python/VirtualEnvironments/vscode/bin/autopep8",
    "editor.detectIndentation": false,
    "editor.insertSpaces": true,
    "editor.rulers": [
        80
    ],
    "editor.renderIndentGuides": true
}

User Settings:

{
    "editor.fontFamily": "Liberation Mono",
    "editor.fontSize": 11,
    "editor.autoClosingBrackets": false,
    "editor.renderWhitespace": "boundary",
    "editor.insertSpaces": false,
    "editor.detectIndentation": true,
    "editor.renderIndentGuides": true,
    "editor.formatOnType": true,
    "editor.formatOnPaste": true,
    "editor.trimAutoWhitespace": true,
    "editor.codeLens": false,

    "terminal.integrated.fontFamily": "Liberation Mono",
    "terminal.integrated.fontSize": 10

    , // Migrated from previous "File | Auto Save" setting:
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 2000,

    "path-intellisense.showHiddenFiles": true,
    "path-intellisense.autoSlashAfterDirectory": true,

    "typescript.disableAutomaticTypeAcquisition": true,
    "window.zoomLevel": 0,
    "git.path": "/usr/local/bin/git",
    "workbench.colorTheme": "Visual Studio Dark",
    "workbench.iconTheme": "vs-nomo-dark",
    "[cpp]": {
        "editor.quickSuggestions": false
    },
    "[c]": {
        "editor.quickSuggestions": false
    }
}

screen shot 2017-04-28 at 09 56 28

Copied from original issue: DonJayamanne/pythonVSCode#921

@DonJayamanne
Copy link
Author

From @abrakidabra on April 28, 2017 6:28

After doing a little more testing today I've noticed this is happening for all strings. Any time I put a '.' character in a string I get an intellisense dialog.

@DonJayamanne
Copy link
Author

From @abrakidabra on April 28, 2017 7:28

As an extra bit of info this only happens when coding in Python. The other languages do not have this behaviour.

@DonJayamanne
Copy link
Author

Other languages too have this issue. Will check if there's a solution.
microsoft/vscode#2461

@DonJayamanne
Copy link
Author

@brettcannon brettcannon added awaiting 1-decision area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality labels Nov 14, 2017
@Gunhee-Lee
Copy link

"editor.quickSuggestions" setting seems to be not working with Python. My current workaround is temporarily setting "editor.suggestOnTriggerCharacters" to false.

@MikhailArkhipov MikhailArkhipov self-assigned this Nov 30, 2017
@MikhailArkhipov
Copy link

MikhailArkhipov commented Nov 30, 2017

May need to write simple tokenizer. Unfortunately, https://github.com/Microsoft/vscode-textmate requires oniguruma which does not build unless VS is at specific location: atom/node-oniguruma#76

@brettcannon brettcannon added this to the December 2017 milestone Dec 5, 2017
MikhailArkhipov pushed a commit that referenced this issue Dec 5, 2017
* Basic tokenizer

* Fixed property names

* Tests, round I

* Tests, round II

* tokenizer test

* Remove temorary change

* Fix merge issue

* Merge conflict

* Merge conflict

* Completion test

* Fix last line

* Fix javascript math

* Make test await for results

* Add license headers

* Rename definitions to types

* License headers
@MikhailArkhipov
Copy link

1150480

DonJayamanne added a commit that referenced this issue Dec 14, 2017
* upstream/master:
  #34, #110 - suppress Intellisense in strings and comments (#339)
  Re-factor code python execution framework  (#345)
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants