mixuxin
V2EX  ›  Django

请教下 哪款 vscode 插件可以通过点击跳转 urls 定义

  •  
  •   mixuxin · Sep 1, 2025 · 2980 views
    This topic created in 256 days ago, the information mentioned may be changed or developed.
    path('api/v1/projects/', include('projects.urls'))
    

    例如以上代码,按着 command 点击 urls 就可以跳转到 urls 定义的地方

    4 replies    2025-09-22 15:56:53 +08:00
    Vegetable
        1
    Vegetable  
       Sep 1, 2025
    好像没见过,你可以考虑不用字符串,显式 import urls 就可以跳转了。
    当然也可以做一个 goto python-importstring 之类的插件,有 AI 帮助的话应该不会太难。
    Vegetable
        2
    Vegetable  
       Sep 1, 2025   ❤️ 1
    啊我试了一下,我的 VSCode 只装了 python 插件的时候是支持跳转 import string 的,没有额外的插件就可以。
    sunfkny
        3
    sunfkny  
       Sep 1, 2025   ❤️ 1
    Pylance 自带,不用额外的插件
    "python.analysis.gotoDefinitionInStringLiteral": true
    jiayouzl
        4
    jiayouzl  
       Sep 22, 2025
    @sunfkny 默认开启的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2845 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 12:21 · PVG 20:21 · LAX 05:21 · JFK 08:21
    ♥ Do have faith in what you're doing.