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

vista can not show all java field and methods #285

Closed
finviman opened this issue May 12, 2020 · 1 comment
Closed

vista can not show all java field and methods #285

finviman opened this issue May 12, 2020 · 1 comment

Comments

@finviman
Copy link

finviman commented May 12, 2020

Describe the bug
vista is beautiful and powerful with coc, but it cannot show all java fields and methods with ctags.
Environment:

  • OS: macOS
  • Neovim version: 0.4.2
  • This plugin version: 013f2d0
  • I'm using universal-ctags:
    Universal Ctags 0.0.0(3671ad7), Copyright (C) 2015 Universal Ctags Team
    Universal Ctags is derived from Exuberant Ctags.
    Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
    Compiled: May 6 2020, 19:15:11
    URL: https://ctags.io/
    Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +case-insensitive-filenames, +packcc

Vista info

Current FileType: java
Avaliable Executives: ['coc', 'ctags']
    Global Variables:
    let g:vista = {'winnr': function('8'), 'tree': {}, 'source': {'fname': 'MyWxMpService.java', 'bufnr': 1, 'get_winid': function('12'), 'winid': 1000, 'winnr': 1, 'extensi
on': function('17'), 'line': function('15'), 'get_winnr': function('11'), 'filetype': function('13'), 'lines': function('14'), 'line_trimmed': function('16'), 'scope_seperat
or': function('18'), 'fpath': '/Users/liyang/Downloads/MyWxMpService.java'}, 'without_scope': [{'name': 'com.xiaowo.service', 'vlnum': 7, 'line': 1, '_type': 'tag', 'kind':
'package'}, {'name': 'MyWxMpService', 'vlnum': 3, 'line': 19, '_type': 'tag', 'kind': 'class'}], 'get_tagline_under_cursor': function('10'), 'provider': 'ctags', 'with_scope
': [{'scopeKind': 'class', 'vlnum': 4, 'name': 'WEIXIN_ACCESS_TOKEN', 'scope': 'MyWxMpService', 'line': 31, '_type': 'tag', 'kind': 'field', 'access': 'public'}], 'functions
': [{'lnum': 31, 'text': 'WEIXIN_ACCESS_TOKEN'}], 'raw': [{'name': 'com.xiaowo.service', 'vlnum': 7, 'line': 1, '_type': 'tag', 'kind': 'package'}, {'name': 'MyWxMpService',
 'vlnum': 3, 'line': 19, '_type': 'tag', 'kind': 'class'}, {'scopeKind': 'class', 'vlnum': 4, 'name': 'WEIXIN_ACCESS_TOKEN', 'scope': 'MyWxMpService', 'line': 31, '_type': '
tag', 'kind': 'field', 'access': 'public'}], 'kinds': ['package', 'class', 'field'], 'ctags_cmd': 'ctags --format=2 --excmd=pattern --fields=nksSaf --file-scope=yes --sort=n
o --append=no --extras=  --language-force=java --java-kinds=pacefgim --output-format=json --fields=-PF -f- /var/folders/gw/gtzhj2qs4sq3z36ghw20k35w0000gn/T/b44cfae1c0ef33464
af85f4c77c611168ad46fe10e0d838ea5f258fa5b78b119.java', 'bufnr': 3, 'raw_by_kind': {'field': [{'scopeKind': 'class', 'vlnum': 4, 'name': 'WEIXIN_ACCESS_TOKEN', 'scope': 'MyWx
MpService', 'line': 31, '_type': 'tag', 'kind': 'field', 'access': 'public'}], 'package': [{'name': 'com.xiaowo.service', 'vlnum': 7, 'line': 1, '_type': 'tag', 'kind': 'pac
kage'}], 'class': [{'name': 'MyWxMpService', 'vlnum': 3, 'line': 19, '_type': 'tag', 'kind': 'class'}]}, 'pos': [{'lnum': 1, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline':
 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}, 2, '1resize 45|vert 1resize 142|2resize 45|vert 2resize 30|'], 'floating_visible': v:false, 'vlnum_cache': [{'name': 'MyWxMpSe
rvice', 'vlnum': 3, 'line': 19, '_type': 'tag', 'kind': 'class'}, {'scopeKind': 'class', 'vlnum': 4, 'name': 'WEIXIN_ACCESS_TOKEN', 'scope': 'MyWxMpService', 'line': 31, '_t
ype': 'tag', 'kind': 'field', 'access': 'public'}, '', ''], 'winid': 1002}
    let g:vista#executive#ctags#support_json_format = 1
    let g:vista#executives = ['ale', 'coc', 'ctags', 'lcn', 'nvim_lsp', 'vim_lsc', 'vim_lsp']
    let g:vista#extensions = ['markdown', 'rst']
    let g:vista#finders = ['fzf', 'skim']
    let g:vista#renderer#ctags = 'default'
    let g:vista#renderer#default#vlnum_offset = 3
    let g:vista#renderer#enable_icon = 1
    let g:vista#renderer#icons = {'subroutine': '羚', 'method': '', 'func': '', 'variables': '', 'namespace': '', 'field': '', 'interface': '', 'type': '', 'packages'
: '', 'property': '襁', 'implementation': '', 'default': '', 'augroup': 'פּ', 'macro': '', 'enumerator': '', 'const': '', 'macros': '', 'map': 'פּ', 'fields': '', 'fun
ctions': '', 'enum': '', 'function': '', 'target': '', 'typedef': '', 'variable': '', 'modules': '', 'constant': '', 'struct': '', 'types': '', 'module': '', 'typ
eParameter': '', 'package': '', 'class': '', 'member': '', 'var': '', 'union': '鬒'}
    let g:vista_blink = [2, 100]
    let g:vista_close_on_jump = 0
    let g:vista_cursor_delay = 400
    let g:vista_default_executive = 'ctags'
    let g:vista_disable_statusline = 1
    let g:vista_echo_cursor = 1
    let g:vista_executive_for = {}
    let g:vista_find_absolute_nearest_method_or_function = 0
    let g:vista_find_nearest_method_or_function_delay = 300
    let g:vista_fold_toggle_icons = ['▼', '▶']
    let g:vista_icon_indent = ['└ ', '│ ']
    let g:vista_ignore_kinds = []
    let g:vista_no_mappings = 0
    let g:vista_sidebar_position = 'vertical botright'
    let g:vista_sidebar_width = 30
    let g:vista_stay_on_open = 1
    let g:vista_top_level_blink = [2, 100]
    let g:vista_update_on_text_changed = 0

Steps to reproduce given the above info

/**
 */
@Slf4j
@Service
@PropertySource(value={"classpath:conf/weixin.properties"})
@Getter
public class MyWxMpService extends WxMpServiceImpl{


    @Value("${AppID}")
    private String appId;
    @Value("${AppSecret}")
    private String appSecret;
    @Value("${token}")
    private String token;
    @Value("${encodingAESKey}")
    private String encodingAesKey;

    public static final String WEIXIN_ACCESS_TOKEN = "WEIXIN_ACCESS_TOKEN";

    @PostConstruct
    private void init(){
        final WxMpInMemoryConfigStorage config = new WxMpInMemoryConfigStorage();
        config.setAppId(appId);
        config.setSecret(appSecret);
        config.setToken(token);
        config.setAesKey(encodingAesKey);
        super.setWxMpConfigStorage(config);
    }

}

source file for reproduce the ctags issue:
iShot2020-05-1215 09 51

minimal vimrc (neccessary when this issue is about some Vim LSP client):

set nocompatible
set runtimepath^=/path/to/vista.vim
syntax on
filetype plugin indent on

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what actually happens.

Screenshot or gif (if possible)
If applicable, add screenshots to help explain your problem.

@liuchengxu
Copy link
Owner

#320 might be related, since the ctags renderer has a fundamental flaw, I'll close this one for now.

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