kitech/qt.go

vscode does not show function annotations on hover

Opened this issue · 6 comments

I'm using vscode for go/php programming. Auto-complete is working, but function annotations tip and goto definition is not work.

default

1

env

:: qt.go
set QT_GO_PROJECT_PATH=/path/to/project/
set C_INCLUDE_PATH=%C_INCLUDE_PATH%;%QT_GO_PROJECT_PATH%include;D:\TOOL\msys2\mingw32\lib\libffi-3.2.1\include
set LIBRARY_PATH=%LIBRARY_PATH%;%QT_GO_PROJECT_PATH%lib

gorun.bat

@cd /d %1\..
@sh -c 'GOPATH=`cygpath $GOPATH`:$(dirname `dirname $PWD`) go install' && ..\..\bin\main.exe %*

what's the problem really is?
i think that out of scope. i don't know how make vscode happy

godef can not find defination, but gocode can.

godef.exe -t -i -f src\main\main.go -o 190
godef: no declaration found for qtwidgets.NewQPushButton_1

It's seems that godef is not maintained anymore.

with your information, i use -debug got that problem finally.
the reason is that godef seem's not support go1.9's type alias syntax.

2018/03/06 10:18:52 member Type{package "" *ast.ImportSpec "github.com/kitech/qt.go/qtwidgets"} 'NewQPushButton_1' {
2018/03/06 10:18:57     /home/me/oss/src/github.com/kitech/qt.go/qtwidgets/qstyleoptiontitlebar.go:94:44: expected type, found '='
2018/03/06 10:18:57     /home/me/oss/src/github.com/kitech/qt.go/qtwidgets/qstyleoptiontitlebar.go:98:47: expected type, found '='
2018/03/06 10:18:57 } -> <nil>
2018/03/06 10:18:57 ] -> 0x0, Type{bad "" <nil> }