diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 15:44:43 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 15:44:43 +0200 |
commit | 664aa988f6d9cdb7b75218666fbe348c85ef8b29 (patch) | |
tree | 306173199576430e6133a1ed137bd80bbc2fb01b /autoload/rust | |
parent | 3ddca5da461ebfaa82104f82e3cbf19d1c326ade (diff) | |
download | vim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.tar.gz vim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.zip |
Update
Diffstat (limited to 'autoload/rust')
-rw-r--r-- | autoload/rust/debugging.vim | 6 | ||||
-rw-r--r-- | autoload/rust/tags.vim | 21 |
2 files changed, 25 insertions, 2 deletions
diff --git a/autoload/rust/debugging.vim b/autoload/rust/debugging.vim index caeef712..6392a024 100644 --- a/autoload/rust/debugging.vim +++ b/autoload/rust/debugging.vim @@ -5,6 +5,7 @@ endif " For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim let s:global_variable_list = [ + \ '_rustfmt_autosave_because_of_config', \ 'ftplugin_rust_source_path', \ 'loaded_syntastic_rust_cargo_checker', \ 'loaded_syntastic_rust_filetype', @@ -32,7 +33,6 @@ let s:global_variable_list = [ \ 'rustc_makeprg_no_percent', \ 'rustc_path', \ 'rustfmt_autosave', - \ 'rustfmt_autosave_because_of_config', \ 'rustfmt_autosave_if_config_present', \ 'rustfmt_command', \ 'rustfmt_emit_files', @@ -48,7 +48,9 @@ endfunction function! s:EchoGlobalVariables() abort for l:key in s:global_variable_list - call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null))) + if l:key !~# '^_' + call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null))) + endif if has_key(b:, l:key) call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key])) diff --git a/autoload/rust/tags.vim b/autoload/rust/tags.vim new file mode 100644 index 00000000..74e2f9f0 --- /dev/null +++ b/autoload/rust/tags.vim @@ -0,0 +1,21 @@ +if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rust') != -1 + finish +endif + +" Tagbar support code, for the sake of not automatically overriding its +" configuration in case Universal Ctags is detected. + +let s:ctags_is_uctags = 0 +let s:checked_ctags = 0 + +function! rust#tags#IsUCtags() abort + if s:checked_ctags == 0 + if system('ctags --version') =~? 'universal ctags' + let s:ctags_is_uctags = 1 + endif + let s:checked_ctags = 1 + endif + return s:ctags_is_uctags +endfunction + +" vim: set et sw=4 sts=4 ts=8: |