this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add Rust projectionist

+57 -29
+8
nvim/after/ftplugin/rust.vim
··· 1 + compiler cargo 2 + setlocal makeprg=cargo 3 + 1 4 setlocal iskeyword+=! 2 5 setlocal formatprg=rustfmt\ --write-mode=display 3 6 let g:rustfmt_autosave = 1 ··· 21 24 SwapList print print println 22 25 SwapList write write writeln 23 26 SwapList module mod use 27 + 28 + augroup rust_projectionist 29 + au! 30 + autocmd User ProjectionistDetect call projections#rust#detect() 31 + augroup END
+5 -2
nvim/autoload/projections/node.vim
··· 15 15 \ '</script>', 16 16 \ '', 17 17 \ '<style>', 18 - \ '</style>' 18 + \ '</style>', 19 19 \ ] 20 20 \ }, 21 21 \ 'components/*.vue': { 'type': 'component' }, ··· 29 29 \ 'export const state = () => ({open}', 30 30 \ '{close})', 31 31 \ '', 32 + \ 'export const getters = {open}', 33 + \ '{close}', 34 + \ '', 32 35 \ 'export const mutations = {open}', 33 36 \ '{close}', 34 37 \ '', 35 38 \ 'export const actions = {open}', 36 - \ '{close}' 39 + \ '{close}', 37 40 \ ] 38 41 \ }, 39 42 \ 'nuxt.config.js': { 'type': 'config' },
+19
nvim/autoload/projections/rust.vim
··· 1 + let s:projections = { 2 + \ 'src/*.rs': { 3 + \ 'type': 'src', 4 + \ }, 5 + \ 'tests/*.rs': { 6 + \ 'type': 'test', 7 + \ }, 8 + \ 'benchmarks/*.rs': { 9 + \ 'type': 'bench', 10 + \ }, 11 + \ 'Cargo.toml': { 'type': 'config' }, 12 + \ } 13 + 14 + func! projections#rust#detect() abort 15 + let l:root = projections#find_root( 16 + \ g:projectionist_file, 17 + \ {path -> filereadable(path . '/Cargo.toml')}) 18 + call projections#append(l:root, s:projections) 19 + endfunc
+25 -27
nvim/init.vim
··· 29 29 colorscheme blame 30 30 " }}} 31 31 " Ignore all automatic files and folders {{{ 32 - set wildignore=*.o,*~,*/.git,*/tmp/*,*/node_modules/*,*/_build/*,*/deps/*,*/target/* 32 + set wildignore+=*.o,*~,*/.git,*/tmp,*/node_modules,*/_build,*/deps,*/target 33 33 " }}} 34 34 " Display tabs and trailing spaces visually {{{ 35 35 set list listchars=tab:→\ ,trail:·,nbsp:␣ ··· 40 40 " }}} 41 41 " Autowrite files when possible {{{ 42 42 set nohidden autowriteall 43 - " }}} 44 - " Wrap line on movements {{{ 45 - set whichwrap+=[,] 46 43 " }}} 47 44 " Keep cursor in the middle {{{ 48 45 set scrolloff=9999 ··· 95 92 cabbrev G! Git! 96 93 " }}} 97 94 " Asynchronous commands {{{ 98 - command! -bang -nargs=* -complete=file Make exe 'AsyncDo<bang> '.&makeprg.' <args>' 99 - command! -nargs=* -complete=file Grep exe 'AsyncDo<bang> '.&grepprg.' <args>' 95 + command! -bang -nargs=* Make call asyncdo#run(<bang>0, &makeprg, <f-args>) 96 + command! -bang -nargs=* Grep call asyncdo#run(<bang>0, &grepprg, <f-args>) 97 + command! -bang -nargs=* LMake call asyncdo#lrun(<bang>0, &makeprg, <f-args>) 98 + command! -bang -nargs=* LGrep call asyncdo#lrun(<bang>0, &grepprg, <f-args>) 100 99 " }}} 101 100 " Expand abbreviations on enter {{{ 102 101 inoremap <CR> <C-]><CR> 103 102 " }}} 104 - " Smart `^` {{{ 105 - " `^` goes to the beginning of the text on first press and to the beginning 103 + " Smart `0` {{{ 104 + " `0` goes to the beginning of the text on first press and to the beginning 106 105 " of the line on second press. It alternates afterwards. 107 - nnoremap <expr> ^ virtcol('.') - 1 <= indent('.') && col('.') > 1 ? '0' : '_' 106 + nnoremap <expr> 0 virtcol('.') - 1 <= indent('.') && col('.') > 1 ? '0' : '_' 108 107 " }}} 109 108 " File closing {{{ 110 109 nnoremap ZS :wa<CR> ··· 122 121 nnoremap Y y$ 123 122 " }}} 124 123 " Folding {{{ 125 - nnoremap <expr> <CR> foldlevel('.')?'za':"\<CR>" 124 + nnoremap <expr> <CR> foldlevel('.') ? 'za' : "\<CR>" 126 125 " }}} 127 126 " Scratchpad {{{ 128 127 command! Scratchify setlocal nobuflisted buftype=nofile bufhidden=delete 129 - command! Scratch enew | Scratchify 130 - command! SScratch split | Scratchify 128 + command! Scratch enew | Scratchify 129 + command! SScratch split | Scratchify 131 130 command! VScratch vsplit | Scratchify 131 + command! TScratch tab | Scratchify 132 132 " }}} 133 133 " Format {{{ 134 134 nnoremap g= gg=Gg`` ··· 154 154 nnoremap [w gT 155 155 " }}} 156 156 " Terminal {{{ 157 - if has('nvim') 158 - nmap <C-q> <Esc> 159 - nnoremap <C-q>c :<C-u>term<CR> 160 - nnoremap <C-q>s :<C-u>split +term<CR> 161 - nnoremap <C-q>v :<C-u>vsplit +term<CR> 162 - nnoremap <C-q>t :<C-u>tabnew +term<CR> 157 + nmap <C-q> <Esc> 158 + nnoremap <C-q>c :<C-u>term<CR> 159 + nnoremap <C-q>s :<C-u>split +term<CR> 160 + nnoremap <C-q>v :<C-u>vsplit +term<CR> 161 + nnoremap <C-q>t :<C-u>tabnew +term<CR> 163 162 164 - tnoremap <C-q> <C-\><C-n> 165 - 166 - if executable('nvr') 167 - let $EDITOR = 'nvr -cc split -c "set bufhidden=delete" --remote-wait' 168 - endif 163 + tnoremap <C-q> <C-\><C-n> 169 164 170 - augroup terminal_config 171 - au! 172 - au Termopen * setlocal scrolloff=0 173 - augroup END 165 + if executable('nvr') 166 + let $EDITOR = 'nvr -cc split -c "set bufhidden=delete" --remote-wait' 174 167 endif 168 + 169 + augroup terminal_config 170 + au! 171 + au TermOpen * setlocal scrolloff=0 172 + augroup END 175 173 " }}} 176 174 " Split management {{{ 177 175 augroup align_windows