forked from amix/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
348 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
" Author: Benjamin Bannier <[email protected]> | ||
" Description: Support for checking Zeek files. | ||
" | ||
call ale#Set('zeek_zeek_executable', 'zeek') | ||
|
||
function! ale_linters#zeek#zeek#HandleErrors(buffer, lines) abort | ||
let l:pattern = 'error in \v.*, line (\d+): (.*)$' | ||
|
||
return map(ale#util#GetMatches(a:lines, l:pattern), "{ | ||
\ 'lnum': str2nr(v:val[1]), | ||
\ 'text': v:val[2], | ||
\}") | ||
endfunction | ||
|
||
call ale#linter#Define('zeek', { | ||
\ 'name': 'zeek', | ||
\ 'executable': {b -> ale#Var(b, 'zeek_zeek_executable')}, | ||
\ 'output_stream': 'stderr', | ||
\ 'command': {-> '%e --parse-only %s'}, | ||
\ 'callback': 'ale_linters#zeek#zeek#HandleErrors', | ||
\ 'lint_file': 1, | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
" Author: Roeland Moors - https://github.com/roelandmoors | ||
" Description: ERB Lint, support for https://github.com/Shopify/erb-lint | ||
|
||
call ale#Set('eruby_erblint_executable', 'erblint') | ||
call ale#Set('eruby_erblint_options', '') | ||
|
||
|
||
" Erblint fixer outputs diagnostics first and then the fixed | ||
" output. These are delimited by something like this: | ||
" ================ /path/to/demo.html.erb ================== | ||
" We only need the output after this | ||
function! ale#fixers#erblint#PostProcess(buffer, output) abort | ||
let l:line = 0 | ||
|
||
for l:output in a:output | ||
let l:line = l:line + 1 | ||
|
||
if l:output =~# "^=\\+.*=\\+$" | ||
break | ||
endif | ||
endfor | ||
|
||
return a:output[l:line :] | ||
endfunction | ||
|
||
function! ale#fixers#erblint#GetCommand(buffer) abort | ||
let l:executable = ale#Var(a:buffer, 'eruby_erblint_executable') | ||
let l:options = ale#Var(a:buffer, 'eruby_erblint_options') | ||
|
||
return ale#ruby#EscapeExecutable(l:executable, 'erblint') | ||
\ . (!empty(l:options) ? ' ' . l:options : '') | ||
\ . ' --autocorrect --stdin %s' | ||
endfunction | ||
|
||
function! ale#fixers#erblint#Fix(buffer) abort | ||
return { | ||
\ 'command': ale#fixers#erblint#GetCommand(a:buffer), | ||
\ 'process_with': 'ale#fixers#erblint#PostProcess' | ||
\} | ||
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,6 +601,8 @@ Notes: | |
* `yamllint` | ||
* YANG | ||
* `yang-lsp` | ||
* Zeek | ||
* `zeek`!! | ||
* Zig | ||
* `zls` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
=============================================================================== | ||
ALE Zeek Integration *ale-zeek-options* | ||
*ale-integration-zeek* | ||
|
||
=============================================================================== | ||
Integration Information | ||
|
||
Currently, the only supported linter for Zeek is zeek. | ||
|
||
=============================================================================== | ||
zeek *ale-zeek-zeek* | ||
|
||
g:ale_zeek_zeek_executable *g:ale_zeek_zeek_executable* | ||
*b:ale_zeek_zeek_executable* | ||
Type: |String| | ||
Default: `'zeek'` | ||
|
||
This variable can be modified to change the executable path for `zeek`. | ||
|
||
|
||
=============================================================================== | ||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1386,6 +1386,7 @@ fu! s:MarkToOpen() | |
en | ||
en | ||
sil! cal ctrlp#statusline() | ||
redr | ||
endf | ||
|
||
fu! s:OpenMulti(...) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.