nixos-config/home/editors/init.vim

107 lines
3.2 KiB
VimL
Raw Normal View History

2020-01-23 15:11:18 +01:00
" set shell=/bin/sh
2020-03-14 04:14:18 +01:00
set termguicolors
2020-01-23 13:18:11 +01:00
colorscheme gruvbox
let g:gruvbox_number_column = 'bg1'
let g:startify_bookmarks = [
2020-02-13 18:51:39 +01:00
\ '~/dev/fitnesspilot',
2020-01-23 13:18:11 +01:00
\ '~/dev/fitnesspilot/clients/fitnesspilot-web',
2020-02-13 18:51:39 +01:00
\ '~/dev/fitnesspilot/clients/fitnesspilot-preregistration',
\ '~/dev/fitnesspilot/microservices',
\ '~/dev/fitnesspilot/microservices/usermanagement',
\ '~/dev/fitnesspilot/microservices/calendar',
\ '~/dev/fitnesspilot/microservices/activities',
2020-01-23 13:18:11 +01:00
\ '~/dev/fitnesspilot/microservices/coachtasks',
\ '~/dev/fitnesspilot/microservices/notifications',
\ '~/dev/fitnesspilot/microservices/googlefitimport',
2020-01-23 15:10:47 +01:00
\ '~/dev/fitnesspilot/microservices/devel',
2020-02-13 18:51:39 +01:00
\ '~/dev/fitnesspilot/microservices/job',
2020-01-23 15:10:47 +01:00
\ '~/dev/fitnesspilot/common/APIModel',
\ '~/dev/fitnesspilot/common/CommonModel',
\ '~/dev/fitnesspilot/common/CommonDomain',
\ '~/dev/fitnesspilot/common/CosmosDBStore',
\ '~/dev/fitnesspilot/common/IntegrationTestBase',
\ '~/dev/fitnesspilot/common/MicroserviceUtils',
\ '~/dev/fitnesspilot/common/Utils',
\ '~/dev/fitnesspilot/common/FitnesspilotMathCore',
2020-02-13 18:51:39 +01:00
\ '~/dev/fitnesspilot/ops/ops',
\ '~/dev/fitnesspilot/ops/kube-dotnet',
\ '~/dev/fitnesspilot/wiki',
\ '~/dev/fitnesspilot/templates',
\ '~/dev/fitnesspilot/tools/fitnesspilot-masterdata',
\ '~/dev/fitnesspilot/tools/fitnesspilot-load-tests',
2020-02-27 19:15:54 +01:00
\ '~/dev/carepal/carepal-app',
\ '~/dev/carepal/carepal-server',
\ '~/dev/carepal/carepal-templates',
\ '~/dev/eaccounting/eaccounting-app',
\ '~/dev/eaccounting/eaccounting-server',
\ '~/dev/eaccounting/eaccounting-validator',
2020-01-23 15:10:47 +01:00
\ '/etc/nixos',
2020-01-23 13:18:11 +01:00
\ ]
let mapleader=" "
let g:camelcasemotion_key = '<leader>'
2020-01-23 15:10:47 +01:00
let g:lightline = {
\ 'colorscheme': 'powerline',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'cocstatus', 'currentfunction', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'cocstatus': 'coc#status',
\ 'currentfunction': 'CocCurrentFunction'
\ },
\ }
2020-01-23 13:18:11 +01:00
" omnisharp-vim config:
let g:OmniSharp_server_stdio = 1
2020-05-22 18:03:28 +02:00
let g:OmniSharp_server_path = '/etc/profiles/per-user/felschr/bin/omnisharp' " TODO use nix ref instead
2020-01-23 13:18:11 +01:00
let g:OmniSharp_selector_ui = 'fzf'
let g:OmniSharp_highlight_types = 3
2020-03-04 19:03:53 +01:00
let g:OmniSharp_typeLookupInPreview = 1
2020-01-23 15:09:31 +01:00
let g:ale_linters_explicit = 1
2020-01-23 13:18:11 +01:00
let g:ale_linters = {
\ 'cs': ['OmniSharp']
\ }
set relativenumber
2020-01-23 15:11:18 +01:00
set splitbelow
2020-01-23 13:18:11 +01:00
map ; :Files<CR>
nmap <C-l> :NERDTreeToggle<CR>
2020-01-23 13:18:11 +01:00
map <Leader> <Plug>(easymotion-prefix)
2020-01-23 15:11:18 +01:00
" Terminal Function
let g:term_buf = 0
let g:term_win = 0
function! TermToggle(height)
if win_gotoid(g:term_win)
hide
else
botright new
exec "resize " . a:height
try
exec "buffer " . g:term_buf
catch
call termopen($SHELL, {"detach": 0})
let g:term_buf = bufnr("")
set nonumber
set norelativenumber
set signcolumn=no
endtry
startinsert!
let g:term_win = win_getid()
endif
endfunction
" Toggle terminal on/off (neovim)
nnoremap <A-t> :call TermToggle(12)<CR>
inoremap <A-t> <Esc>:call TermToggle(12)<CR>
tnoremap <A-t> <C-\><C-n>:call TermToggle(12)<CR>
" Terminal go back to normal mode
tnoremap :q! <C-\><C-n>:q!<CR>