Skip to content

Commit

Permalink
Add tagbar type for rust
Browse files Browse the repository at this point in the history
- fix typo in go layer
  • Loading branch information
liuchengxu committed Mar 11, 2018
1 parent 5dbd395 commit 313a895
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/autoload/spacevim/lang/go.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function s:ctagsbin()
if !exists('#go#pathCheckBinPath')
if !exists('*go#path#CheckBinPath')
call plug#load('vim-go')
endif
return go#path#CheckBinPath(get(g:, 'go_gotags_bin', 'gotags'))
Expand Down
13 changes: 13 additions & 0 deletions core/autoload/spacevim/lang/rust.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
let g:spacevim#lang#rust#tagbar_type = {
\ 'ctagstype' : 'rust',
\ 'kinds' : [
\'T:types,type definitions',
\'f:functions,function definitions',
\'g:enum,enumeration names',
\'s:structure names',
\'m:modules,module names',
\'c:consts,static constants',
\'t:traits',
\'i:impls,trait implementations',
\]
\}
function! spacevim#lang#rust#Run()
if has_key(g:plugs, 'asyncrun.vim')
AsyncRun cargo run
Expand Down
4 changes: 4 additions & 0 deletions layers/+distributions/better-defaults/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,7 @@ Key Binding | Mode | Description
<kbd>SPC x d</kbd> | Normal | delete trailing whitespace, 去掉行尾多余空格 (te**x**t **d**elete)
<kbd>SPC f R</kbd> | Normal | reload .vimrc, 重新加载 .vimrc (**f**ile **R**esource)
<kbd>SPC b h</kbd> | Normal | **b**uffer **h**ome, 主 buffer

## Related Projects

- [vim-easyclip](https://github.com/svermeulen/vim-easyclip)
2 changes: 2 additions & 0 deletions layers/+lang/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This layer adds support for the Rust language.

To use this configuration layer, add it to your `~/.spacevim`.

- tagbar: https://github.com/majutsushi/tagbar/wiki#rust

## Key Bindings

Key Binding | Mode | Description
Expand Down

0 comments on commit 313a895

Please sign in to comment.