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

能否为package增加intellisense支持 #48

Closed
b1060t opened this issue Sep 30, 2020 · 2 comments
Closed

能否为package增加intellisense支持 #48

b1060t opened this issue Sep 30, 2020 · 2 comments

Comments

@b1060t
Copy link

b1060t commented Sep 30, 2020

你在什么场景下需要该功能?

add_package添加的package能够在vscode中显示intellisense信息

描述可能的解决方案

目前似乎都是在编译或者手动require时才会编译package,这样的话感觉没法实现根据xmake.lua中的package信息来支持intellisense?

@waruqi
Copy link
Member

waruqi commented Sep 30, 2020

集成了package,编译的项目里面,不是package includedirs都带进去了么。。那么安装package之后,生成的 compile_commands.json 里面应该也是有 package includedirs的。。

比如我这:-I/Users/ruki/.xmake/packages/l/luaj it/2.1.0-beta3/d31cb26efe584bfab3db002ca62988af/include/luajit

{
  "directory": "/Users/ruki/share/testdll",
  "arguments": ["/usr/local/bin/ccache", "/usr/bin/xcrun", "-sdk", "macosx", "clang", "-c", "-f
visibility=hidden", "-fvisibility-inlines-hidden", "-O3", "-I/Users/ruki/.xmake/packages/l/luaj
it/2.1.0-beta3/d31cb26efe584bfab3db002ca62988af/include/luajit", "-Qunused-arguments", "-arch",
 "x86_64", "-mmacosx-version-min=10.14", "-isysroot", "/Applications/Xcode.app/Contents/Develop
er/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", "-o", "build/.objs/testdll/macosx
/x86_64/release/src/main.cpp.o", "src/main.cpp"],
  "file": "src/main.cpp"
},

这个插件已经对接了 intellisense / compile_commands(具体见 #40 ),怎么会不支持呢?

@b1060t
Copy link
Author

b1060t commented Sep 30, 2020

确实看见includedirs了,可能是我这插件配置有问题,我再看一下看

@b1060t b1060t closed this as completed Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants