dayzdj
V2EX  ›  问与答

vscode quickSuggestions 对 Python 无效

  •  
  •   dayzdj · Sep 17, 2022 · 665 views
    This topic created in 1352 days ago, the information mentioned may be changed or developed.

    例如有两个函数 f1 和 f2

    def f1(download_playlist):
        pass
    
    def f2(download_playlist):
        print('download_playlist')
    
    

    期望在输入 f1 之后 f2 里面的两个 download_playlist 只要输入前几个字母 在快速建议列表里面就会有 download_playlist 这样不用每次都从头到尾输一遍

    这个设置不起作用

      "editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
      },
      "editor.suggest.snippetsPreventQuickSuggestions": false,
    
    dayzdj
        1
    dayzdj  
    OP
       Sep 17, 2022
    问题已解决 需要添加下面的设置
    ```json
    "[python]": {
    "editor.wordBasedSuggestions": true,
    },

    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   947 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 22:48 · PVG 06:48 · LAX 15:48 · JFK 18:48
    ♥ Do have faith in what you're doing.