Cudatext goto definition in C

  

 

   如下为对c 的函数,点击右键后,执行Go to definition 的配置。

1. 下载Clangd ,地址如下,下载后,解压,将clangd.exe所在的目录加入到系统环境变量path中。

    https://sourceforge.net/projects/clangd.mirror/files/20.1.0/

 

2. 下载LSP_client, 地址如下,下载后,无需解压,直接点击File --> open file ,即可安装插件。

   https://sourceforge.net/projects/cudatext/files/addons/plugins/plugin.LSP_Client.zip/download

 在cudatext 的settings 目录下,新建文件 lsp_c.json,添加内容如下

{
  "lexers": {
    "C++": "cpp",
    "C": "c"
  },
  "cmd_unix": [
      "clangd-12",
  ],
  "cmd_windows": [
      "clangd",
  ],
}

 D:\develop\cudatext-windows-amd64-1.198.2.0\settings

重新打开一个Project的目录,如下所示,在timer_task.c中,对函数点击go to definition, 就会跳转到periph_init.c 文件中的函数定义处。

 

 

posted on 2025-06-02 14:00  wallywl  阅读(49)  评论(0)    收藏  举报