vim-lint

Lint plugin for vim
git clone https://git.ce9e.org/vim-lint.git

commit
2de4926b917a70e1338d8eebe2a71e256064950c
parent
9ed392057d3f999aaa9295a18d1967e424224ece
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-02-25 11:01
rm markers

reasoning:
- not essential
- they don't automatically close on cclose
- they don't update on edits

Diffstat

M autoload/lint.vim 26 --------------------------
M plugin/lint.vim 2 --

2 files changed, 0 insertions, 28 deletions


diff --git a/autoload/lint.vim b/autoload/lint.vim

@@ -1,5 +1,3 @@
    1    -1 let s:signids = []
    2    -1 
    3     1 function! s:RunLinter(prg, format)
    4     2     let l:old_makeprg = &makeprg
    5     3     let l:old_errorformat = &errorformat
@@ -24,24 +22,6 @@ function! s:RunLinter(prg, format)
   24    22     return getqflist()
   25    23 endfunction
   26    24 
   27    -1 function! s:PlaceMarkers(results)
   28    -1     execute 'sign define lint text=! texthl=Error'
   29    -1 
   30    -1     for i in s:signids
   31    -1         execute ':sign unplace '.i
   32    -1     endfor
   33    -1     let s:signids = []
   34    -1 
   35    -1     let l:id = 100
   36    -1     for result in a:results
   37    -1         if result.lnum
   38    -1             execute ':sign place '.l:id.' line='.result.lnum.' name=lint file='.expand('%:p')
   39    -1             let s:signids += [l:id]
   40    -1             let l:id += 1
   41    -1         endif
   42    -1     endfor
   43    -1 endfunction
   44    -1 
   45    25 function! lint#Lint()
   46    26     if !exists('g:lint_prg') || !exists('g:lint_format')
   47    27         echon 'No linter configured'
@@ -52,7 +32,6 @@ function! lint#Lint()
   52    32     endif
   53    33     let l:results = s:RunLinter(g:lint_prg, g:lint_format)
   54    34     call filter(l:results, 'v:val.lnum')
   55    -1     call s:PlaceMarkers(l:results)
   56    35     if l:results != []
   57    36         copen
   58    37         echon 'Lint found '.len(l:results).' issues'
@@ -61,8 +40,3 @@ function! lint#Lint()
   61    40         echon 'Lint OK'
   62    41     endif
   63    42 endfunction
   64    -1 
   65    -1 function! lint#Reset()
   66    -1     cclose
   67    -1     call s:PlaceMarkers([])
   68    -1 endfunction

diff --git a/plugin/lint.vim b/plugin/lint.vim

@@ -1,4 +1,2 @@
    1     1 command! Lint call lint#Lint()
    2    -1 command! LintReset call lint#Reset()
    3    -1 
    4     2 nnoremap <F7> :Lint<CR>