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

typescript support breaks preservim / tagbar #730

Open
vitaly opened this issue Jun 28, 2021 · 1 comment
Open

typescript support breaks preservim / tagbar #730

vitaly opened this issue Jun 28, 2021 · 1 comment

Comments

@vitaly
Copy link

vitaly commented Jun 28, 2021

Does this bug happen when you install plugin without vim-polyglot?
no

Describe the bug:
The problem is with the g:tagbar_type_typescript setting set at https://github.com/sheerun/vim-polyglot/blob/master/ftplugin/typescript.vim#L109

when vim-polyglot is loaded tagbar is empty.

I tried to diagnose the issue.
first, it seems that ctags now natively supports typescript, at least mine does:

> ctags --version
Universal Ctags 0.0.0(2ebf5b1), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec  7 2019, 15:48:52
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +case-insensitive-filenames, +packcc


> ctags --list-kinds-full=typescript
#LETTER NAME       ENABLED REFONLY NROLES MASTER DESCRIPTION
C       constant   yes     no      0      NONE   constants
G       generator  yes     no      0      NONE   generators
a       alias      yes     no      0      NONE   aliases
c       class      yes     no      0      NONE   classes
e       enumerator yes     no      0      NONE   enumerators (values inside an enumeration)
f       function   yes     no      0      NONE   functions
g       enum       yes     no      0      NONE   enums
i       interface  yes     no      0      NONE   interfaces
l       local      no      no      0      NONE   local variables
m       method     yes     no      0      NONE   methods
n       namespace  yes     no      0      NONE   namespaces
p       property   yes     no      0      NONE   properties
v       variable   yes     no      0      NONE   variables
z       parameter  no      no      0      NONE   function parameters inside function definitions

This is what happens when I try to run ctags with the config file provided by vim-polyglot (same as tagbar does):

> ctags --options=/Users/vitaly/.vim/bundle/vim-polyglot/ctags/typescript.ctags
ctags: Language "typescript" already defined

If I disable provided ctags file via g:typescript_use_builtin_tagbar_defs tagbar does work, somewhat, but it way less helpfull then without g:tagbar_type_typescript completely:

This is with let g:typescript_use_builtin_tagbar_defs=0
Screenshot 2021-06-28 at 07 24 43

This is with unlet g:tagbar_type_typescript before opening tagbar:
Screenshot 2021-06-28 at 07 22 47

To Reproduce:

  • install recent universal ctags, and vim-tagbar plugin.
  • open a typescript file.
@rf-
Copy link

rf- commented Nov 7, 2021

It looks like this is actually a problem with yats.vim: HerringtonDarkholme/yats.vim#206

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