Open osyo-manga opened 9 years ago
不具合1についてです. 今現在,プラグインがアップデートされたことで
//■ SnowdropGotoDefinition -> not fount x
x.val1 = func();
は修正されており,
X x;
の行に飛ぶようになっています.
また,
libcall(libclang, "clang_getClangVersion", "") の呼び出しの結果がおかしい これは 32 bit 版の Clang では動作する
この32bit版のClangが動作するのは32bit版のVimから呼び出した場合で, 64bit版のVimから呼び出した場合は不具合2と同様, clang_getClangVersion のライブラリ呼出に失敗します.
コメントありがとうございます。 Windows 8 と Windows 7 だとエラー内容が違っているみたいですねぇ。
現状、原因を突き止めるのは難しそうなので、どの環境(組み合わせ)だと問題なく動作するのかを探す感じになるかなぁ…。
Any progress? I have the same issue with SnowdropGotoDefinition
Error detected while processing function snowdrop#goto_definition_in_cursor[3]..snowdrop#definition_in_cursor[1]..snowdrop#definition[1]..snowdrop#context[1]..snowdrop#libclang#context[1]..<SNR>42_binding_call[1]..snowdrop#libclang#pyth
on#context[2]..provider#python#Call:
line 18:
error caught in request handler 'python_eval ('snowdrop.context(\t\tvim.eval("a:source"),\t\tvim.eval("a:filename"),\t\tvim.eval("option"),\t\tint(vim.eval("a:line")),\t\tint(vim.eval("a:col")) )\t',)':
Traceback (most recent call last):
File "/home/roxma/.local/lib/python2.7/site-packages/neovim/plugin/script_host.py", line 150, in python_eval
return eval(expr, self.module.__dict__)
File "<string>", line 1, in <module>
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/__init__.py", line 35, in context
return libclang.context(source, filename, options, line, col)
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/libclang.py", line 219, in context
result["semantic_parent"] = cursor_context(cursor.semantic_parent)
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/libclang.py", line 198, in cursor_context
"arguments_type" : cursor_arguments_type_context(cursor),
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/libclang.py", line 172, in cursor_arguments_type_context
return ([cursor_context(x)["type"] for x in cursor.get_arguments()])
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/libclang.py", line 196, in cursor_context
"type" : type_context(cursor.type),
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/libclang.py", line 149, in type_context
"kind" : type.kind.name,
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/clang/cindex.py", line 1463, in kind
return TypeKind.from_id(self._kind_id)
File "/home/roxma/dotfiles/vim/.config/nvim/plugged/vim-snowdrop/snowdrop/python/snowdrop/clang/cindex.py", line 1403, in from_id
raise ValueError,'Unknown type kind %d' % id
ValueError: Unknown type kind 114
Error detected while processing function snowdrop#goto_definition_in_cursor[3]..snowdrop#definition_in_cursor[1]..snowdrop#definition[2]..<SNR>39_get_definition:
line 1:
E121: Undefined variable: definition
E116: Invalid arguments for function empty(a:cursor.definition)
E15: Invalid expression: empty(a:cursor.definition)
Not found 'abcdfe'.
source code of test.cpp:
#include <iostream>
int main(int argc, const char *argv[])
{
int abcdfe = 5;
abcdfe = 3;
return 0;
}
minimal vimrc:
set nocompatible
syntax on
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8
call plug#begin(expand('<sfile>:h') . '/plugged/')
Plug 'osyo-manga/vim-snowdrop'
let g:snowdrop#libclang_directory = "/usr/lib"
call plug#end()
hi, Thanks for Issues. Please create new Issue.
不具合 1
再現環境
これは 32 bit 版の Clang では動作する(https://twitter.com/taki_4416/status/575642161531785216)不具合 2
再現環境
要確認
ログ
まとめ
覚書