Closed fjrg76-com closed 9 months ago
Update:
Uninstall exuberant-ctags (if necessary) and uninstall universal-ctags Open Neovim and load any .c file Try: Vista ("Ctags must be installed", or so) With Neovim still opened, install universal-ctags Try: Vista (The tags window is opened!) Close Neovim Open Neovim and load any .c file Try: Vista ("ctags: Warning: Cannot disable fixed...") =(
I've the same issue. Something changed with vista, since I've had it working using universal-ctags. When I recently updated vista, it broke, producing only an output reading: 'ctags: Warning: Cannot disable fixed field: "P"{pattern}'
I'm on Debian 10 (buster), using universal ctags version 0.0.0, and vim 9.0.
https://github.com/liuchengxu/vista.vim/pull/466 updates the kinds option of ctags for go, which looks like the culprit of this ssue.
Can you try this patch and post the output of ctags --list-kinds=go
as well?
diff --git a/autoload/vista/types/uctags/go.vim b/autoload/vista/types/uctags/go.vim
index 826a9e8..acc255e 100644
--- a/autoload/vista/types/uctags/go.vim
+++ b/autoload/vista/types/uctags/go.vim
@@ -15,7 +15,6 @@ let type_go.kinds = {
\ 'm': {'long' : 'struct members', 'fold' : 0, 'stl' : 0},
\ 'M': {'long' : 'struct anonymous members', 'fold' : 0, 'stl' : 0},
\ 'n': {'long' : 'interface method specification', 'fold' : 0, 'stl' : 0},
- \ 'P': {'long' : 'imports', 'fold' : 0, 'stl' : 0},
\ 'a': {'long' : 'type aliases', 'fold' : 0, 'stl' : 0},
\ }
466 updates the kinds option of ctags for go, which looks like the culprit of this ssue.
Can you try this patch and post the output of
ctags --list-kinds=go
as well?diff --git a/autoload/vista/types/uctags/go.vim b/autoload/vista/types/uctags/go.vim index 826a9e8..acc255e 100644 --- a/autoload/vista/types/uctags/go.vim +++ b/autoload/vista/types/uctags/go.vim @@ -15,7 +15,6 @@ let type_go.kinds = { \ 'm': {'long' : 'struct members', 'fold' : 0, 'stl' : 0}, \ 'M': {'long' : 'struct anonymous members', 'fold' : 0, 'stl' : 0}, \ 'n': {'long' : 'interface method specification', 'fold' : 0, 'stl' : 0}, - \ 'P': {'long' : 'imports', 'fold' : 0, 'stl' : 0}, \ 'a': {'long' : 'type aliases', 'fold' : 0, 'stl' : 0}, \ }
hi liu, i tried your patch and here is the output of ctags --list-kinds=go
the Vista.vim still not work and get error "[vista.vim] ctags: Warning: Cannot disable fixed field: 'P'{pattern}"
Sorry for the persistent error, could you paste the output of :echo g:vista.ctags_cmd
when the error occurred? I can't reproduce it in my environment.
Sorry for the persistent error, could you paste the output of
:echo g:vista.ctags_cmd
when the error occurred? I can't reproduce it in my environment.
Sure, here is the output
Is there any configure that i ignored?
ctags wasn't even started :P You have to print it after the error has occurred. Try invoking :Vista
or something to see the error ctags: Warning: Cannot disable fixed field: "P"{pattern}
and then :echo g:vista.ctags_cmd
.
ctags wasn't even started :P You have to print it after the error has occurred. Try invoking
:Vista
or something to see the errorctags: Warning: Cannot disable fixed field: "P"{pattern}
and then:echo g:vista.ctags_cmd
.
Oh thanks, here is the output of your procedure:
And could you explain why the ctags was not even started? How do you get this conclusion?
You'll see the error message and g:vista
won't be unavailable if ctags did run.
Looks like the problem comes from here, but they actually remain unchanged for a long time, not sure why.
Since these are warnings instead of hard errors, we may suppress them silently. @masatake any suggestions? Thanks!
At a glance, F
in --fields=-PF
causes a trouble.
F input yes NONE s-- yes r- input file
Do you really want to disable F
, the field representing input files?
I revised my answer. You can turn off the fields P and F in the JSON output mode.
Universal Ctags 0.0.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Jan 6 2019, 23:23:29
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml
It looks old. I recommend you to get newer one like:
% ctags --options=NONE --version
ctags: Notice: No options will be read from files or environment
Universal Ctags 6.0.0, Copyright (C) 2015-2022 Universal Ctags Team
...
--fields=-PF
was inherited from tagbar if I recall correctly.
@ljxrrcj Can you try installing a newer u-ctags as suggested by masatake and see if the issue persists?
@ljxrrcj Nightly-build is available from https://github.com/universal-ctags/ctags-nightly-build/releases .
Thank you all! I tried the latest version of universal-ctags and the problem disappeared!
And I have another question now: is there a way to show the tags just by the order like Source Insight rather than by tags' types?
And I have another question now: is there a way to show the tags just by the order like Source Insight rather than by tags' types?
It's definitely possible, the request already exists actually in https://github.com/liuchengxu/vista.vim/issues/452. The idea is to add a new renderer for the ctags output (https://github.com/liuchengxu/vista.vim/blob/master/autoload/vista/renderer.vim#L83-L92), but I don't have more bandwidth for developing new features of vista.vim, we need more contributors :P.
The README has been updated with a note on newer ctags and a link to the ctags nighlty-build (thank you! @masatake), I believe this issue can be closed now.
Describe the bug As the title says, whenever I want to load the plug-in (:Vista!!) I get such error twice:
ctags: Warning: Cannot disable fixed field 'P' {pattern} ctags: Warning: Cannot disable fixed field 'F' {input}
and then nothing happens.
Environment:
OS: Linux Mint 20.3
Neovim version: 0.7.2 (the one I got with the ppa)
This plugin version: master (#466) (I downloaded the zip version)
I'm using universal-ctags: The one shipped with Linux Mint
I'm using some LSP client: I have no idea what it is.
Vista info
Steps to reproduce given the above info Just type:
:Vista
Expected behavior A window should show with the source code tags (I guess).
Actual behavior A couple of warnings show up and nothing more happens.![Captura de pantalla de 2023-09-15 21-23-51](https://github.com/liuchengxu/vista.vim/assets/11762398/e77603ab-7066-47f0-abf2-7b228f2f471e)
Screenshot or gif (if possible) If applicable, add screenshots to help explain your problem.