Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 220:60229a0ea17d
Fix indenting.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 03 Nov 2018 23:56:28 -0700 |
parents | 011d855724bf |
children | 93c492ed3d62 |
comparison
equal
deleted
inserted
replaced
219:91dfeaac488c | 220:60229a0ea17d |
---|---|
29 echohl None | 29 echohl None |
30 endfunction | 30 endfunction |
31 | 31 |
32 " Prints a message if debug tracing is enabled. | 32 " Prints a message if debug tracing is enabled. |
33 function! gutentags#trace(message, ...) | 33 function! gutentags#trace(message, ...) |
34 if g:gutentags_trace || (a:0 && a:1) | 34 if g:gutentags_trace || (a:0 && a:1) |
35 let l:message = "gutentags: " . a:message | 35 let l:message = "gutentags: " . a:message |
36 echom l:message | 36 echom l:message |
37 endif | 37 endif |
38 endfunction | 38 endfunction |
39 | 39 |
40 " Strips the ending slash in a path. | 40 " Strips the ending slash in a path. |
41 function! gutentags#stripslash(path) | 41 function! gutentags#stripslash(path) |
42 return fnamemodify(a:path, ':s?[/\\]$??') | 42 return fnamemodify(a:path, ':s?[/\\]$??') |
547 endif | 547 endif |
548 echom "" | 548 echom "" |
549 endfunction | 549 endfunction |
550 | 550 |
551 function! gutentags#default_io_cb(chan, msg) abort | 551 function! gutentags#default_io_cb(chan, msg) abort |
552 call gutentags#trace(string(a:msg)) | 552 call gutentags#trace(string(a:msg)) |
553 endfunction | 553 endfunction |
554 | 554 |
555 if has('nvim') | 555 if has('nvim') |
556 " Neovim job API. | 556 " Neovim job API. |
557 function! s:nvim_job_exit_wrapper(real_cb, job, exit_code, event_type) abort | 557 function! s:nvim_job_exit_wrapper(real_cb, job, exit_code, event_type) abort |
599 endif | 599 endif |
600 | 600 |
601 " Returns which modules are currently generating something for the | 601 " Returns which modules are currently generating something for the |
602 " current buffer. | 602 " current buffer. |
603 function! gutentags#inprogress() | 603 function! gutentags#inprogress() |
604 " Does this buffer have gutentags enabled? | 604 " Does this buffer have gutentags enabled? |
605 if !exists('b:gutentags_files') | 605 if !exists('b:gutentags_files') |
606 return [] | 606 return [] |
607 endif | 607 endif |
608 | 608 |
609 " Find any module that has a job in progress for any of this buffer's | 609 " Find any module that has a job in progress for any of this buffer's |
610 " tags files. | 610 " tags files. |
611 let l:modules_in_progress = [] | 611 let l:modules_in_progress = [] |
612 for [module, tags_file] in items(b:gutentags_files) | 612 for [module, tags_file] in items(b:gutentags_files) |
613 let l:jobidx = gutentags#find_job_index_by_tags_file(module, tags_file) | 613 let l:jobidx = gutentags#find_job_index_by_tags_file(module, tags_file) |
614 if l:jobidx >= 0 | 614 if l:jobidx >= 0 |
615 call add(l:modules_in_progress, module) | 615 call add(l:modules_in_progress, module) |
616 endif | 616 endif |
617 endfor | 617 endfor |
618 return l:modules_in_progress | 618 return l:modules_in_progress |
619 endfunction | 619 endfunction |
620 | 620 |
621 " }}} | 621 " }}} |
622 | 622 |
623 " Statusline Functions {{{ | 623 " Statusline Functions {{{ |