Skip to content

Tags and BTags for typescript? #940

Open
@divramod

Description

@divramod

Hey,

i am trying to get the two tags commands running for typescript.
Can someone give me a hint on where to start?

Currently, when i run :Tags from a typescript file, fzf shows me only the functions in the builded javascript files of the project.

I really like to use that function with typescript.

thx in advance for any hints!

edit:

my current fzf.vim settings are these:

let g:fzf_tags_command = 'ctags -R --exclude=.git --exclude=node_modules --exclude=lib --exclude=package-lock.json'
let $FZF_DEFAULT_COMMAND = 'ag -f --hidden --skip-vcs-ignores --ignore .git --ignore lib --ignore node_modules -l -g ""'
" let g:fzf_commands_expect = 'alt-enter,ctrl-x'
let g:fzf_layout = { 'down': '~80%' }
let g:fzf_command_prefix = 'Fzf'
let g:fzf_buffers_jump = 1

do i have to change them for filetype typescript?

my ctags version:

ctags --version
Universal Ctags 0.0.0(3fdf28bc), 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 22 2019, 21:51:22
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc

for tagbar i got typescript running with these settings:

" https://vi.stackexchange.com/questions/19437/ctags-works-but-not-for-tagbar
let g:tagbar_type_typescript = {
  \ 'ctagsbin' : 'tstags',
  \ 'ctagsargs' : '-f-',
  \ 'kinds': [
    \ 'e:enums:0:1',
    \ 'f:function:0:1',
    \ 't:typealias:0:1',
    \ 'M:Module:0:1',
    \ 'I:import:0:1',
    \ 'i:interface:0:1',
    \ 'C:class:0:1',
    \ 'm:method:0:1',
    \ 'p:property:0:1',
    \ 'v:variable:0:1',
    \ 'c:const:0:1',
  \ ],
  \ 'sort' : 0
\ }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions