mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 11:40:05 +08:00
commit
ccd1b14bae
@ -2,7 +2,7 @@
|
|||||||
" @section Introduction, intro
|
" @section Introduction, intro
|
||||||
" @stylized Maktaba
|
" @stylized Maktaba
|
||||||
" @library
|
" @library
|
||||||
" @order intro version dicts functions exceptions layers autocomplete colorscheme layer_lang_java layer_lang_php layer_lang_c faq
|
" @order intro version dicts functions exceptions layers autocomplete colorscheme layer_lang_java layer_lang_php layer_lang_c layer-lang-rust faq
|
||||||
" SpaceVim is a Modular configuration, a bundle of custom settings
|
" SpaceVim is a Modular configuration, a bundle of custom settings
|
||||||
" and plugins, for Vim. It got inspired by spacemacs.
|
" and plugins, for Vim. It got inspired by spacemacs.
|
||||||
|
|
||||||
|
@ -19,13 +19,11 @@ function! SpaceVim#layers#lang#plugins() abort
|
|||||||
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
|
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
|
||||||
\ ['plasticboy/vim-markdown', { 'on_ft' : 'markdown'}],
|
\ ['plasticboy/vim-markdown', { 'on_ft' : 'markdown'}],
|
||||||
\ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}],
|
\ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}],
|
||||||
\ ['racer-rust/vim-racer', { 'on_ft' : 'rust'}],
|
|
||||||
\ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}],
|
\ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}],
|
||||||
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
||||||
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
|
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
|
||||||
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
||||||
\ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}],
|
\ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}],
|
||||||
\ ['rust-lang/rust.vim', {'merged' : 1}],
|
|
||||||
\ ]
|
\ ]
|
||||||
" python
|
" python
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
@ -37,7 +35,6 @@ function! SpaceVim#layers#lang#plugins() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#config() abort
|
function! SpaceVim#layers#lang#config() abort
|
||||||
let g:racer_cmd = $HOME.'/.cargo/bin/racer'
|
|
||||||
let g:vim_markdown_conceal = 0
|
let g:vim_markdown_conceal = 0
|
||||||
let g:vim_markdown_folding_disabled = 1
|
let g:vim_markdown_folding_disabled = 1
|
||||||
endfunction
|
endfunction
|
||||||
|
40
autoload/SpaceVim/layers/lang/rust.vim
Normal file
40
autoload/SpaceVim/layers/lang/rust.vim
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
""
|
||||||
|
" @section layer-lang-rust, layer-lang-rust
|
||||||
|
" requirement:
|
||||||
|
" 1. racer : cargo install racer
|
||||||
|
" 2. export RUST_SRC_PATH :
|
||||||
|
" you can download src by : rustup component add rust-src, and add below
|
||||||
|
" into your bashrc.
|
||||||
|
"
|
||||||
|
" export RUST_SRC_PATH=~/.multirust/toolchains/[your-toolchain]/lib/rustlib/src/rust/src
|
||||||
|
"
|
||||||
|
" configuration:
|
||||||
|
" 1. add `let g:racer_cmd = "/path/to/racer/bin"` in to custom config, if
|
||||||
|
" you has racer executable in you PATH. g:racer_cmd should be auto detect.
|
||||||
|
"
|
||||||
|
" mappings:
|
||||||
|
" >
|
||||||
|
" mode key function
|
||||||
|
" normal gd rust-definition
|
||||||
|
" normal gs rust-definition-split
|
||||||
|
" normal gx rust-definition-vertical
|
||||||
|
" normal <leader>gd rust-doc
|
||||||
|
" <
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#rust#plugins() abort
|
||||||
|
let plugins = []
|
||||||
|
call add(plugins, ['racer-rust/vim-racer', { 'on_ft' : 'rust'}])
|
||||||
|
call add(plugins, ['rust-lang/rust.vim', {'merged' : 1}])
|
||||||
|
return plugins
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#rust#config() abort
|
||||||
|
let g:racer_experimental_completer = 1
|
||||||
|
let g:racer_cmd = $HOME.'/.cargo/bin/racer'
|
||||||
|
augroup spacevim_layer_lang_rust
|
||||||
|
au FileType rust nmap <buffer><silent> gd <Plug>(rust-def)
|
||||||
|
au FileType rust nmap <buffer><silent> gs <Plug>(rust-def-split)
|
||||||
|
au FileType rust nmap <buffer><silent> gx <Plug>(rust-def-vertical)
|
||||||
|
au FileType rust nmap <buffer><silent> <leader>gd <Plug>(rust-doc)
|
||||||
|
augroup END
|
||||||
|
endfunction
|
@ -17,7 +17,7 @@ command! -range=% REPLSendSelection call REPLSend(s:GetVisual())
|
|||||||
command! REPLSendLine call REPLSend([getline('.')])
|
command! REPLSendLine call REPLSend([getline('.')])
|
||||||
" }}}
|
" }}}
|
||||||
"let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
"let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||||
"let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
|
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=2
|
||||||
"silent! let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
"silent! let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
||||||
"silent! let &t_SR = "\<Esc>]50;CursorShape=2\x7"
|
"silent! let &t_SR = "\<Esc>]50;CursorShape=2\x7"
|
||||||
"silent! let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
"silent! let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
||||||
|
@ -25,9 +25,11 @@ let g:deoplete#omni_patterns.lua = '.'
|
|||||||
let g:deoplete#ignore_sources = {}
|
let g:deoplete#ignore_sources = {}
|
||||||
let g:deoplete#ignore_sources.go = ['omni']
|
let g:deoplete#ignore_sources.go = ['omni']
|
||||||
let g:deoplete#ignore_sources.c = ['omni']
|
let g:deoplete#ignore_sources.c = ['omni']
|
||||||
|
let g:deoplete#ignore_sources.rust = ['omni']
|
||||||
let g:deoplete#ignore_sources.perl = ['omni']
|
let g:deoplete#ignore_sources.perl = ['omni']
|
||||||
call deoplete#custom#set('go', 'mark', '')
|
call deoplete#custom#set('go', 'mark', '')
|
||||||
call deoplete#custom#set('clang2', 'mark', '')
|
call deoplete#custom#set('clang2', 'mark', '')
|
||||||
|
call deoplete#custom#set('racer', 'mark', '')
|
||||||
if g:spacevim_enable_javacomplete2_py
|
if g:spacevim_enable_javacomplete2_py
|
||||||
let g:deoplete#ignore_sources.java = ['omni']
|
let g:deoplete#ignore_sources.java = ['omni']
|
||||||
call deoplete#custom#set('javacomplete2', 'mark', '')
|
call deoplete#custom#set('javacomplete2', 'mark', '')
|
||||||
|
@ -12,7 +12,8 @@ CONTENTS *SpaceVim-contents*
|
|||||||
7. Layer_lang_java................................|SpaceVim-layer_lang_java|
|
7. Layer_lang_java................................|SpaceVim-layer_lang_java|
|
||||||
8. Layer_lang_php..................................|SpaceVim-layer_lang_php|
|
8. Layer_lang_php..................................|SpaceVim-layer_lang_php|
|
||||||
9. Layer_lang_c......................................|SpaceVim-layer_lang_c|
|
9. Layer_lang_c......................................|SpaceVim-layer_lang_c|
|
||||||
10. FAQ.......................................................|SpaceVim-faq|
|
10. layer-lang-rust...............................|SpaceVim-layer-lang-rust|
|
||||||
|
11. FAQ.......................................................|SpaceVim-faq|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
INTRODUCTION *SpaceVim-intro*
|
INTRODUCTION *SpaceVim-intro*
|
||||||
@ -432,6 +433,30 @@ lang#c :
|
|||||||
|
|
||||||
requirement: clang libclang
|
requirement: clang libclang
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LAYER-LANG-RUST *SpaceVim-layer-lang-rust*
|
||||||
|
|
||||||
|
requirement:
|
||||||
|
1. racer : cargo install racer
|
||||||
|
2. export RUST_SRC_PATH : you can download src by : rustup component add
|
||||||
|
rust-src, and add below into your bashrc.
|
||||||
|
|
||||||
|
export RUST_SRC_PATH=~/.multirust/toolchains/[your-toolchain]/lib/rustlib/src/
|
||||||
|
rust/src
|
||||||
|
|
||||||
|
configuration:
|
||||||
|
1. add `let g:racer_cmd = "/path/to/racer/bin"` in to custom config, if you
|
||||||
|
has racer executable in you PATH. g:racer_cmd should be auto detect.
|
||||||
|
|
||||||
|
mappings:
|
||||||
|
>
|
||||||
|
mode key function
|
||||||
|
normal gd rust-definition
|
||||||
|
normal gs rust-definition-split
|
||||||
|
normal gx rust-definition-vertical
|
||||||
|
normal <leader>gd rust-doc
|
||||||
|
<
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
FAQ *SpaceVim-faq*
|
FAQ *SpaceVim-faq*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user