liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.9k stars 87 forks source link

Error detected while processing function <SNR>170_on_exit[6].., with neovim in ubuntu 18.04 #66

Closed leoatchina closed 5 years ago

leoatchina commented 5 years ago

Describe the bug As the title, an error raised when use neovim in Ubuntu18.04

Error detected while processing function <SNR>170_on_exit[6]..<SNR>170_ApplyExtracted[14]..vista#viewer#Display[1]..<SNR>176_Render[2]..vista#renderer#default#Render[5]..<SNR>178_Re
nder[1]..303:
line    3:
E716: Key not present in Dictionary: sro
Press ENTER or type command to continue
Error detected while processing function <SNR>170_on_exit[6]..<SNR>170_ApplyExtracted[14]..vista#viewer#Display[1]..<SNR>176_Render[2]..vista#renderer#default#Render[5]..<SNR>178_Re
nder[1]..303:
line    3:
E15: Invalid expression: g:vista#types#uctags#{filetype}#['sro']
Press ENTER or type command to continue
Error detected while processing function <SNR>170_on_exit[6]..<SNR>170_ApplyExtracted[14]..vista#viewer#Display[1]..<SNR>176_Render:
line    2:
E171: Missing :endif
Press ENTER or type command to continue
Error detected while processing function <SNR>170_on_exit[6]..<SNR>170_ApplyExtracted:
line   14:
E171: Missing :endif

Environment:



<!-- If this issue is related to ctags, please also provide the source file you run Vista on. -->

**Vista info**

<!-- Paste the output of :Vista info here, or try :Vista info+. -->

Current FileType: vim
Avaliable Executives: ['ctags']
Global Variables:
let g:vista#executives = ['coc', 'ctags', 'lcn', 'vim_lsp']
let g:vista#renderer#enable_icon = 0
let g:vista_default_executive = 'ctags'
let g:vista_echo_cursor = 0
let g:vista_icon_indent = ['╰─ ', '├─ ']
let g:vista_sidebar_position = 'vertical topleft'
let g:vista_stay_on_open = 0
~

**Steps to reproduce given the above info**
<!-- short descriptions of actions, which lead towards the issue -->
just run `:Vista`

**Expected behavior**
This is the screenshot of Vim8, the same OS, the same config
![image](https://user-images.githubusercontent.com/4470821/56739878-55998c80-67a2-11e9-999e-8b31c93a13e5.png)

Neovim 0.3.4 in macOS 10.13.6
![image](https://user-images.githubusercontent.com/4470821/56740600-d7d68080-67a3-11e9-8881-dcff61ce4660.png)

**Actual behavior**
See below

**Screenshot or gif** (if possible)
![image](https://user-images.githubusercontent.com/4470821/56739665-d3a96380-67a1-11e9-88aa-7ded54f0560f.png)
liuchengxu commented 5 years ago

What does :echo g:vista#types#uctags#vim# and :echo g:vista#types#uctags#vim#['sro'] say?

In addition, have you copied the complete output from :Vista info? The Global Variables section should contain let g:vista#executive#ctags#support_json_format = 1/0.

leoatchina commented 5 years ago

Just open README in vista.vim

echo g:vista#types#uctags#vim#

{'lang': 'vim', 'kinds': {'a': {'long': 'autocommand groups', 'fold': 1, 'stl': 1}, 'c': {'long': 'commands', 'fold': 0, 'stl': 0}, 'f': {'long': 'functions', 'fold': 0, 'stl': 1},
'v': {'long': 'variables', 'fold': 1, 'stl': 0}, 'm': {'long': 'maps', 'fold': 1, 'stl': 0}, 'n': {'long': 'vimball filenames', 'fold': 0, 'stl': 1}}}

echo g:vista#types#uctags#vim#['sro']

E716: Key not present in Dictionary: sro
E15: Invalid expression: g:vista#types#uctags#vim#['sro']

Vista info

    Current FileType: markdown
Avaliable Executives: ['ctags']
    Global Variables:
    let g:vista#executive#ctags#support_json_format = 1
    let g:vista#executives = ['coc', 'ctags', 'lcn', 'vim_lsp']
    let g:vista#renderer#ctags = 'default'
    let g:vista#renderer#enable_icon = 0
    let g:vista#renderer#icons = {'subroutine': '洛', 'method': '', 'func': '', 'variables': '', 'namespace': '', 'field': '綠', 'interface': '禍', 'type': '', 'packages': '',
 'property': '襁', 'implementation': '', 'default': '', 'augroup': 'פּ', 'macro': '', 'enumerator': '', 'const': '', 'macros': '', 'map': 'פּ', 'fields': '綠', 'functions': '' ,
 'enum': '', 'function': '', 'target': '', 'typedef': '', 'variable': '', 'modules': '', 'constant': '', 'struct': 'פּ', 'types': '', 'module': '', 'typeParameter': '', 'pa
ckage': '', 'class': '', 'member': '', 'var': '', 'union': '鬒'}
    let g:vista_default_executive = 'ctags'
    let g:vista_echo_cursor = 0
    let g:vista_icon_indent = ['╰─ ', '├─ ']
    let g:vista_sidebar_position = 'vertical topleft'
    let g:vista_stay_on_open = 0
leoatchina commented 5 years ago

Sorry, it's my mistake. I have tried neovim again , and found the errors happend with vim markdown css and js(but different dict key error). Worked well with php, python. I will try some other type of source files.

liuchengxu commented 5 years ago

:Vista and then :echo t:vista.source.scope_seperator(), see if any errors, both in vim and neovim.

leoatchina commented 5 years ago

Just read markdown file The results of vim is just a single . ? when neovim image

liuchengxu commented 5 years ago

https://github.com/liuchengxu/vista.vim/blob/268a88df5a62fa35b5f4794df5ee60a0be9ba1f7/autoload/vista/source.vim#L48-L52

Then I think neovim should be blamed for not catching the exception.

liuchengxu commented 5 years ago

Please pull the latest version to see if the error persists.

leoatchina commented 5 years ago

ok, that works