liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags

Home Page:https://liuchengxu.github.io/vista.vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass --extras parameter to c or cpp

SunJun8 opened this issue · comments

Environment:

OS: x86_64 Linux 5.10.93.2-microsoft-standard-WSL2
Neovim version:NVIM v0.6.1
This plugin version: a0469c6
I'm using nvim-lsp:

plugin config

 nmap <silent> <F2> :Vista finder nvim_lsp<CR>
 let g:vista_default_executive = 'nvim_lsp'
 let g:vista_executive_for = {
   \ 'c': 'nvim_lsp',
   \ 'cpp': 'nvim_lsp',
   \ 'php': 'nvim_lsp',
   \ 'python': 'nvim_lsp',
   \ }
 let g:vista_fzf_preview = ['right:50%']
 let g:vista#renderer#enable_icon = 1

let common_opt = '--format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no'

let common_opt .= ' --extras= '

我对vim语法不是很了解,对我来说这里实际情况是目标文件为.c时,仍然传递了--extras=+F参数。删除--extras=+F即可正常工作,但这貌似并不是个通用方案

[vista.vim] Fail to run ctags: ctags --format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no --language-force=c --c-kinds=pfsdevghtmu -f- /home/jokeo/.cache/nvim/vista/1b81cc248f7dd7679e3566
3224593fdc67b61d9b0260ef3e825a8fc18626eafc.c
Error detected while processing function vista#[36]..<SNR>105_HandleArguments[28]..vista#finder#Dispatch[10]..vista#finder#fzf#Run[8]..vista#finder#GetSymbols[38]..<SNR>108_TryAlternatives[16]..vista#executive#ct
ags#Run[1]..<SNR>114_Dispatch[11]..<SNR>114_Run:
line    8:
E121: Undefined variable: s:data
Error detected while processing function vista#[36]..<SNR>105_HandleArguments[28]..vista#finder#Dispatch[10]..vista#finder#fzf#Run:
line    8:
E714: List required
Press ENTER or type command to continue