I broke up with neovim....vim is my best friend now

This commit is contained in:
LinlyBoi
2023-04-30 08:14:07 +03:00
parent 0d185449c5
commit 4a4a6b1e81
5245 changed files with 468325 additions and 25 deletions

View File

@@ -0,0 +1,37 @@
function! CoffeeIndentLevel(lnum)
return indent(a:lnum) / &shiftwidth
endfunction
function! NextNonBlankLine(lnum)
let numlines = line('$')
let current = a:lnum + 1
while current <= numlines
if getline(current) =~? '\v\S'
return current
endif
let current += 1
endwhile
return -2
endfunction
function! CoffeeFolds()
if getline(v:lnum) =~ '\v^\s*$'
return '-1'
endif
let this_indent = IndentLevel(a:lnum)
let next_indent = IndentLevel(NextNonBlankLine(a:lnum))
if next_indent == this_indent
return this_indent
elseif next_indent < this_indent
return this_indent
elseif next_indent > this_indent
return '>' . next_indent
endif
endfunction
setlocal foldmethod=expr
setlocal foldexpr=CoffeeFolds()

View File

@@ -0,0 +1,16 @@
let g:ale_completion_enabled = 1
let g:ale_completion_autoimport = 1
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\ 'rust': ['rustfmt'],
\ 'dart': ['dartfmt'],
\}
let g:ale_rust_analyzer_executable = '/home/linly/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rust-analyzer'
let g:ale_linters = {'rust': ['cargo', 'analyzer']}
let g:rustfmt_autosave = 1
let g:rust_clip_command = 'xclip -selection clipboard'
let g:ale_fix_on_save = 1
let g:ale_sign_error = '>>'
let g:ale_sign_warning = '--'
let g:ale_virtualtext_cursor = 'current'