xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
223 stars 55 forks source link

当workspace里面有多个目录的时候,不能够自动检测目录,打开xmake文件也不能自动激活 #242

Open kong13661 opened 7 months ago

kong13661 commented 7 months ago

Xmake 版本

2.8.5

操作系统版本和架构

ubuntu20.04

描述问题

当workspace里面有多个目录的时候,不能够自动检测目录,打开xmake文件也不能自动激活.

image

目录结构如上图。RWKV-LM里面没有xmake工程,但如果打开rwkv.c目录里面的xmake.lua文件,会提示:

image

如果不点create new project,此时就不会激活xmake的状态栏。

image

当我用2.2.6版本的xmake vscode插件,我可以点create new project激活vscode插件,尽管因为rwkv-lm目录有文件,会创建失败,此时我可以在状态栏选择project root directory目录到rwkv.c下面。但是在新版本的2.2.7插件里面,set the project root directory会一直提示create new project,不会弹出来选项,修改目录。

期待的结果

当workspace里面有多个目录的时候,如果打开第一个xmak.lua文件,能够自动激活下面的xmake状态栏,把project root directory选择到打开的目录,并且能够正常选择project root directory目录。

工程配置

add_rules("mode.debug", "mode.release")

target("hello")
    set_kind("binary")
    add_files("src/main.c")

附加信息和错误日志

2.2.7选择set project root directory会一直提示create new project

image

waruqi commented 7 months ago

不支持,你只能打开一个目录,根目录下必须有 xmake.lua 才能激活插件。。除非你根目录放置 xmake.lua 用 includes 串联这些子工程

kong13661 commented 6 months ago

不支持,你只能打开一个目录,根目录下必须有 xmake.lua 才能激活插件。。除非你根目录放置 xmake.lua 用 includes 串联这些子工程

2.2.6版本的可以通过选择set root directory选择文件夹,2.2.7就不行了,一直弹出来下面的提示:

image