Skip to content

Commit

Permalink
Updated plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Oct 28, 2021
1 parent e13b2a1 commit b39d6ca
Show file tree
Hide file tree
Showing 27 changed files with 348 additions and 120 deletions.
2 changes: 1 addition & 1 deletion sources_non_forked/ale/ale_linters/clojure/clj_kondo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endfunction
function! ale_linters#clojure#clj_kondo#HandleCljKondoFormat(buffer, lines) abort
" output format
" <filename>:<line>:<column>: <issue type>: <message>
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):? ((Exception|error|warning): ?(.+))$'
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+)?:(\d+)?:? ((Exception|error|warning): ?(.+))$'
let l:output = []

for l:match in ale#util#GetMatches(a:lines, l:pattern)
Expand Down
10 changes: 8 additions & 2 deletions sources_non_forked/ale/ale_linters/dockerfile/hadolint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,19 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
let l:detail = 'hadolint could not parse the file because of a syntax error.'
endif

call add(l:output, {
let l:line_output = {
\ 'lnum': l:lnum,
\ 'col': l:colnum,
\ 'type': l:type,
\ 'text': l:text,
\ 'detail': l:detail
\})
\}

if l:code isnot# ''
let l:line_output['code'] = l:code
endif

call add(l:output, l:line_output)
endfor

return l:output
Expand Down
2 changes: 1 addition & 1 deletion sources_non_forked/ale/ale_linters/ruby/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ call ale#Set('ruby_ruby_executable', 'ruby')
call ale#linter#Define('ruby', {
\ 'name': 'ruby',
\ 'executable': {b -> ale#Var(b, 'ruby_ruby_executable')},
\ 'command': '%e -w -c -T1 %t',
\ 'command': '%e -w -c %t',
\ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
\})
22 changes: 22 additions & 0 deletions sources_non_forked/ale/ale_linters/zeek/zeek.vim
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,
\})
5 changes: 5 additions & 0 deletions sources_non_forked/ale/autoload/ale/fix/registry.vim
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ let s:default_registry = {
\ 'suggested_filetypes': ['nim'],
\ 'description': 'Apply nimpretty to a file.',
\ },
\ 'erblint': {
\ 'function': 'ale#fixers#erblint#Fix',
\ 'suggested_filetypes': ['eruby'],
\ 'description': 'Apply erblint --autocorrect to a file.',
\ },
\ 'eslint': {
\ 'function': 'ale#fixers#eslint#Fix',
\ 'suggested_filetypes': ['javascript', 'typescript'],
Expand Down
40 changes: 40 additions & 0 deletions sources_non_forked/ale/autoload/ale/fixers/erblint.vim
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
31 changes: 28 additions & 3 deletions sources_non_forked/ale/autoload/ale/fixers/isort.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,28 @@ function! ale#fixers#isort#GetExecutable(buffer) abort
return ale#python#FindExecutable(a:buffer, 'python_isort', ['isort'])
endfunction

function! ale#fixers#isort#Fix(buffer) abort
function! ale#fixers#isort#GetCmd(buffer) abort
let l:executable = ale#fixers#isort#GetExecutable(a:buffer)
let l:cmd = [ale#Escape(l:executable)]

if l:executable =~? 'pipenv\|poetry$'
call extend(l:cmd, ['run', 'isort'])
endif

return join(l:cmd, ' ')
endfunction

function! ale#fixers#isort#FixForVersion(buffer, version) abort
let l:executable = ale#fixers#isort#GetExecutable(a:buffer)
let l:cmd = [ale#Escape(l:executable)]

if l:executable =~? 'pipenv\|poetry$'
call extend(l:cmd, ['run', 'isort'])
endif

call add(l:cmd, '--filename %s')
if ale#semver#GTE(a:version, [5, 7, 0])
call add(l:cmd, '--filename %s')
endif

let l:options = ale#Var(a:buffer, 'python_isort_options')

Expand All @@ -41,6 +54,18 @@ function! ale#fixers#isort#Fix(buffer) abort

return {
\ 'cwd': '%s:h',
\ 'command': join(l:cmd, ' ')
\ 'command': join(l:cmd, ' '),
\}
endfunction

function! ale#fixers#isort#Fix(buffer) abort
let l:executable = ale#fixers#isort#GetExecutable(a:buffer)
let l:command = ale#fixers#isort#GetCmd(a:buffer) . ale#Pad('--version')

return ale#semver#RunWithVersionCheck(
\ a:buffer,
\ l:executable,
\ l:command,
\ function('ale#fixers#isort#FixForVersion'),
\)
endfunction
19 changes: 12 additions & 7 deletions sources_non_forked/ale/autoload/ale/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function! ale#lsp#Register(executable_or_address, project, init_options) abort
\ 'typeDefinition': 0,
\ 'symbol_search': 0,
\ 'code_actions': 0,
\ 'did_save': 0,
\ 'includeText': 0,
\ },
\}
Expand Down Expand Up @@ -265,15 +266,19 @@ function! s:UpdateCapabilities(conn, capabilities) abort
let a:conn.capabilities.symbol_search = 1
endif

if has_key(a:capabilities, 'textDocumentSync')
if type(a:capabilities.textDocumentSync) is v:t_dict
let l:save = get(a:capabilities.textDocumentSync, 'save', v:false)
if type(get(a:capabilities, 'textDocumentSync')) is v:t_dict
let l:syncOptions = get(a:capabilities, 'textDocumentSync')

if type(l:save) is v:true
let a:conn.capabilities.includeText = 1
endif
if get(l:syncOptions, 'save') is v:true
let a:conn.capabilities.did_save = 1
endif

if type(get(l:syncOptions, 'save')) is v:t_dict
let a:conn.capabilities.did_save = 1

let l:saveOptions = get(l:syncOptions, 'save')

if type(l:save) is v:t_dict && get(a:capabilities.textDocumentSync.save, 'includeText', v:false) is v:true
if get(l:saveOptions, 'includeText') is v:true
let a:conn.capabilities.includeText = 1
endif
endif
Expand Down
1 change: 1 addition & 0 deletions sources_non_forked/ale/autoload/ale/lsp_linter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ function! s:CheckWithLSP(linter, details) abort
" If this was a file save event, also notify the server of that.
if a:linter.lsp isnot# 'tsserver'
\&& getbufvar(l:buffer, 'ale_save_event_fired', 0)
\&& ale#lsp#HasCapability(l:buffer, 'did_save')
let l:include_text = ale#lsp#HasCapability(l:buffer, 'includeText')
let l:save_message = ale#lsp#message#DidSave(l:buffer, l:include_text)
let l:notified = ale#lsp#Send(l:id, l:save_message) != 0
Expand Down
5 changes: 3 additions & 2 deletions sources_non_forked/ale/autoload/ale/virtualtext.vim
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ function! ale#virtualtext#ShowMessage(message, hl_group) abort
let l:line = line('.')
let l:buffer = bufnr('')
let l:prefix = get(g:, 'ale_virtualtext_prefix', '> ')
let l:msg = l:prefix.trim(substitute(a:message, '\n', ' ', 'g'))

if has('nvim')
call nvim_buf_set_virtual_text(l:buffer, s:ns_id, l:line-1, [[l:prefix.a:message, a:hl_group]], {})
call nvim_buf_set_virtual_text(l:buffer, s:ns_id, l:line-1, [[l:msg, a:hl_group]], {})
else
let l:left_pad = col('$')
call prop_add(l:line, l:left_pad, {
\ 'type': 'ale',
\})
let s:last_popup = popup_create(l:prefix.a:message, {
let s:last_popup = popup_create(l:msg, {
\ 'line': -1,
\ 'padding': [0, 0, 0, 1],
\ 'mask': [[1, 1, 1, 1]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ Notes:
* `yamllint`
* YANG
* `yang-lsp`
* Zeek
* `zeek`!!
* Zig
* `zls`

Expand Down
23 changes: 23 additions & 0 deletions sources_non_forked/ale/doc/ale-zeek.txt
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:

2 changes: 2 additions & 0 deletions sources_non_forked/ale/doc/ale.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3114,6 +3114,8 @@ documented in additional help files.
yamllint..............................|ale-yaml-yamllint|
yang....................................|ale-yang-options|
yang-lsp..............................|ale-yang-lsp|
zeek....................................|ale-zeek-options|
zeek..................................|ale-zeek-zeek|
zig.....................................|ale-zig-options|
zls...................................|ale-zig-zls|

Expand Down
2 changes: 2 additions & 0 deletions sources_non_forked/ale/supported-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,5 +610,7 @@ formatting.
* [yamllint](https://yamllint.readthedocs.io/)
* YANG
* [yang-lsp](https://github.com/theia-ide/yang-lsp)
* Zeek
* [zeek](http://zeek.org) :floppy_disk:
* Zig
* [zls](https://github.com/zigtools/zls)
1 change: 1 addition & 0 deletions sources_non_forked/ctrlp.vim/autoload/ctrlp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@ fu! s:MarkToOpen()
en
en
sil! cal ctrlp#statusline()
redr
endf

fu! s:OpenMulti(...)
Expand Down
18 changes: 13 additions & 5 deletions sources_non_forked/ctrlp.vim/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Full path fuzzy __file__, __buffer__, __mru__, __tag__, __...__ finder for Vim.

![ctrlp][1]

## Install

vim 8+ manages packages all on its own. Installing `ctrlp` is this simple:

```bash
mkdir -p ~/.vim/pack/plugins/start
git clone --depth=1 https://github.com/ctrlpvim/ctrlp.vim.git ~/.vim/pack/plugins/start/ctrlp
```

Of course you can use your favorite plugin manager or check the [quick installation guide][3] for a primitive installation method.

## Basic Usage
* Run `:CtrlP` or `:CtrlP [starting-directory]` to invoke CtrlP in find file mode.
* Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in find buffer or find MRU file mode.
Expand Down Expand Up @@ -97,13 +108,10 @@ Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 fi
Check `:help ctrlp-options` for other options.
## Installation
Use your favorite method or check the homepage for a [quick installation guide][3].
## License
CtrlP is distributed under Vim's [license][4].
[1]: http://i.imgur.com/aOcwHwt.png
[1]: https://i.imgur.com/aOcwHwt.png
[2]: https://github.com/ctrlpvim/ctrlp.vim/tree/extensions
[3]: http://ctrlpvim.github.io/ctrlp.vim#installation
[3]: https://ctrlpvim.github.io/ctrlp.vim#installation
[4]: http://vimdoc.sourceforge.net/htmldoc/uganda.html
15 changes: 12 additions & 3 deletions sources_non_forked/dracula/colors/dracula.vim
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ if !exists('g:dracula_undercurl')
let g:dracula_undercurl = g:dracula_underline
endif

if !exists('g:dracula_full_special_attrs_support')
let g:dracula_full_special_attrs_support = has('gui_running')
endif

if !exists('g:dracula_inverse')
let g:dracula_inverse = 1
endif
Expand All @@ -111,10 +115,15 @@ function! s:h(scope, fg, ...) " bg, attr_list, special
let l:attr_list = filter(get(a:, 2, ['NONE']), 'type(v:val) == 1')
let l:attrs = len(l:attr_list) > 0 ? join(l:attr_list, ',') : 'NONE'

" Falls back to coloring foreground group on terminals because
" nearly all do not support undercurl
" If the UI does not have full support for special attributes (like underline and
" undercurl) and the highlight does not explicitly set the foreground color,
" make the foreground the same as the attribute color to ensure the user will
" get some highlight if the attribute is not supported. The default behavior
" is to assume that terminals do not have full support, but the user can set
" the global variable `g:dracula_full_special_attrs_support` explicitly if the
" default behavior is not desirable.
let l:special = get(a:, 3, ['NONE', 'NONE'])
if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !has('gui_running')
if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !g:dracula_full_special_attrs_support
let l:fg[0] = l:special[0]
let l:fg[1] = l:special[1]
endif
Expand Down
9 changes: 8 additions & 1 deletion sources_non_forked/dracula/doc/dracula.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*dracula.txt* For Vim version 8 Last change: 2018 May 08
*dracula.txt* For Vim version 8 Last change: 2021 Oct 22
*dracula* *vim-dracula*

|\ ,, ~
Expand Down Expand Up @@ -86,6 +86,13 @@ Include underline attributes in highlighting >
Include undercurl attributes in highlighting (only if underline enabled) >
let g:dracula_undercurl = 1
* *g:dracula_full_special_attrs_support*
Explicitly declare full support for special attributes. By default it is 1
for graphical applications and 0 for terminals and terminal emulators. On
terminal emulators, set to 1 to allow underline/undercurl highlights without
changing the foreground color. >
let g:dracula_full_special_attrs_support = 1
* *g:dracula_inverse*
Include inverse attributes in highlighting >
let g:dracula_inverse = 1
Expand Down
Loading

0 comments on commit b39d6ca

Please sign in to comment.