2022-06-14 14:06:07 +00:00
|
|
|
colorscheme industry
|
|
|
|
|
|
|
|
set cb=unnamed,unnamedplus
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set cmdheight=1
|
|
|
|
set bg=light
|
|
|
|
set number relativenumber
|
|
|
|
set completeopt=menu
|
|
|
|
set smartindent
|
|
|
|
set sta
|
|
|
|
set cpt=.,w,b,i,d
|
|
|
|
set tf
|
|
|
|
set foldmethod=syntax
|
|
|
|
set path+=**
|
|
|
|
set nocompatible
|
|
|
|
set sc
|
|
|
|
set nosmd
|
|
|
|
set list listchars=trail:·,eol:,tab:\
|
|
|
|
set directory=$HOME/.vim/swap//
|
|
|
|
set shm=asTIt
|
|
|
|
set fo=ron
|
|
|
|
set is hls
|
|
|
|
set lbr
|
|
|
|
set lz
|
|
|
|
set fcl=all fml=4 fdn=4 nofen
|
|
|
|
|
2020-08-27 14:51:00 +00:00
|
|
|
filetype plugin indent on
|
2019-12-08 11:49:54 +00:00
|
|
|
syntax on
|
2019-12-31 21:01:00 +00:00
|
|
|
|
2024-10-28 13:51:00 +00:00
|
|
|
let g:ale_fixers = {
|
|
|
|
\ 'go': ['gofmt'],
|
|
|
|
\ 'c': ['clang-format'],
|
|
|
|
\ 'cpp': ['clang-format'],
|
|
|
|
\ 'rust': ['rustfmt'],
|
|
|
|
\}
|
|
|
|
|
|
|
|
let g:ale_linters = {
|
|
|
|
\ 'go': ['gopls'],
|
|
|
|
\ 'c': ['clangd'],
|
|
|
|
\ 'cpp': ['clangd'],
|
|
|
|
\ 'py': ['pyright-langserver'],
|
|
|
|
\ 'rust': ['analyzer'],
|
|
|
|
\}
|
2022-03-30 19:21:01 +00:00
|
|
|
let g:ale_completion_enabled = 1
|
|
|
|
let g:ale_fix_on_save = 1
|
2022-04-08 08:19:33 +00:00
|
|
|
let g:ale_hover_to_preview = 1
|
2023-07-17 21:09:20 +00:00
|
|
|
let g:ale_cpp_clangcheck_options = '--analyzer-output text'
|
2024-10-08 09:31:12 +00:00
|
|
|
let g:ale_rust_cargo_check_all_targets = 1
|
|
|
|
let g:ale_rust_cargo_check_tests = 1
|
|
|
|
let g:ale_rust_cargo_use_clippy = executable('cargo-clippy')
|
2022-04-08 08:19:33 +00:00
|
|
|
let g:ale_sign_error = 'E>'
|
|
|
|
let g:ale_sign_warning = 'W>'
|
|
|
|
let g:ale_sign_info = 'I>'
|
|
|
|
let g:ale_floating_window_border = ''
|
|
|
|
let g:ale_floating_preview = 1
|
|
|
|
let g:ale_detail_to_floating_preview = 1
|
|
|
|
let g:ale_hover_to_preview = 1
|
|
|
|
let g:ale_hover_to_floating_preview = 1
|
|
|
|
highlight SignColumn ctermbg=none
|
2022-03-30 19:21:01 +00:00
|
|
|
let g:airline#extensions#ale#enabled = 1
|
2020-03-15 13:29:11 +00:00
|
|
|
|
2022-04-08 08:19:33 +00:00
|
|
|
function BufferSettings()
|
|
|
|
let lsp_found=0
|
|
|
|
for linter in ale#linter#Get(&filetype)
|
|
|
|
if !empty(linter.lsp) && ale#lsp_linter#CheckWithLSP(bufnr(''), linter)
|
|
|
|
let lsp_found=1
|
|
|
|
endif
|
|
|
|
endfor
|
|
|
|
if (lsp_found)
|
|
|
|
nnoremap <buffer> K :ALEDocumentation<cr>
|
|
|
|
nnoremap <buffer> gr :ALEFindReferences<cr>
|
|
|
|
nnoremap <buffer> gd :ALEGoToDefinition<cr>
|
|
|
|
nnoremap <buffer> gy :ALEGoToTypeDefinition<cr>
|
|
|
|
nnoremap <buffer> gh :ALEHover<cr>
|
|
|
|
|
|
|
|
setlocal omnifunc=ale#completion#OmniFunc
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
autocmd BufRead,FileType * call BufferSettings()
|
|
|
|
|
2020-05-10 20:00:09 +00:00
|
|
|
let g:netrw_banner = 0
|
|
|
|
let g:netrw_liststile = 3
|
2020-03-22 13:35:12 +00:00
|
|
|
|
2020-05-10 23:47:18 +00:00
|
|
|
let g:airline_powerline_fonts = v:true
|
|
|
|
let g:airline#extensions#tabline#enabled = v:true
|
|
|
|
let g:airline_skip_empty_sections = v:true
|
2020-05-17 13:11:05 +00:00
|
|
|
let g:airline_theme='term'
|
2020-05-10 20:00:09 +00:00
|
|
|
|
2022-03-30 19:21:01 +00:00
|
|
|
cnoremap w!! execute 'silent! write !doas tee % >/dev/null' <bar> edit! <CR>
|
|
|
|
|
2022-04-08 08:19:33 +00:00
|
|
|
function! CleverTab()
|
|
|
|
if &omnifunc != ''
|
|
|
|
return "\<C-X>\<C-O>"
|
|
|
|
elseif &spell
|
|
|
|
return "\<C-X>\<C-S>"
|
|
|
|
else
|
|
|
|
return "\<C-X>\<C-P>"
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
inoremap <silent><tab> <c-r>=CleverTab()<cr>
|
|
|
|
inoremap <silent><s-tab> <Tab>
|
|
|
|
|
2022-03-30 19:21:01 +00:00
|
|
|
autocmd FileType yaml setlocal sw=8 sts=8 expandtab
|
|
|
|
|
2022-04-08 08:19:33 +00:00
|
|
|
packloadall
|
|
|
|
silent! helptags ALL
|