Skip to content

Commit 9c54d95

Browse files
committed
Updated plugins
1 parent 57ba28a commit 9c54d95

File tree

21 files changed

+201
-65
lines changed

21 files changed

+201
-65
lines changed

sources_non_forked/ale/autoload/ale/handlers/eslint.vim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,14 @@ function! s:CheckForBadConfig(buffer, lines) abort
8484
endfunction
8585

8686
function! s:parseJSON(buffer, lines) abort
87-
try
88-
let l:parsed = json_decode(a:lines[-1])
89-
catch
90-
return []
91-
endtry
87+
let l:parsed = []
88+
89+
for l:line in a:lines
90+
try
91+
let l:parsed = extend(l:parsed, json_decode(l:line))
92+
catch
93+
endtry
94+
endfor
9295

9396
if type(l:parsed) != v:t_list || empty(l:parsed)
9497
return []

sources_non_forked/nerdtree/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
in an unordered list. The format is:
88
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
99
-->
10-
10+
#### 6.3
11+
- **.0**: Add new command that behaves like NERDTreeToggle but defaults to the root of a VCS repository. (willfindlay) [#1060](https://github.com/scrooloose/nerdtree/pull/1060)
1112
#### 6.2
1213
- **.1**: Menu option, 'copy path to clipboard' is aware of VIM clipboard option (jhzn) [#1056](https://github.com/scrooloose/nerdtree/pull/1056)
1314
- **.0**: Support tab-specific CWDs (PhilRunninger) [#1032](https://github.com/scrooloose/nerdtree/pull/1032)

sources_non_forked/nerdtree/doc/NERDTree.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ The following features and functionality are provided by the NERDTree:
125125
again. If no NERDTree exists for this tab then this command acts the
126126
same as the |:NERDTree| command.
127127

128+
:NERDTreeToggleVCS [<start-directory> | <bookmark>] *:NERDTreeToggleVCS*
129+
Like |:NERDTreeToggle|, but searches up the directory tree to find the top of
130+
the version control system repository, and roots the NERDTree there. It
131+
works with Git, Subversion, Mercurial, Bazaar, and Darcs repositories. A
132+
couple of examples: >
133+
:NERDTreeToggleVCS /home/marty/nerdtree/doc (opens /home/marty/nerdtree)
134+
:NERDTreeToggleVCS (opens root of repository containing CWD)
135+
128136
:NERDTreeFocus *:NERDTreeFocus*
129137
Opens (or reopens) the NERDTree if it is not currently visible;
130138
otherwise, the cursor is moved to the already-open NERDTree.

sources_non_forked/nerdtree/nerdtree_plugin/vcs.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"
1212
" ============================================================================
1313
command! -n=? -complete=dir -bar NERDTreeVCS :call <SID>CreateTabTreeVCS('<args>')
14+
command! -n=? -complete=dir -bar NERDTreeToggleVCS :call <SID>ToggleTabTreeVCS('<args>')
1415

1516
" FUNCTION: s:CreateTabTreeVCS(a:name) {{{1
1617
function! s:CreateTabTreeVCS(name)
@@ -19,6 +20,14 @@ function! s:CreateTabTreeVCS(name)
1920
call g:NERDTreeCreator.createTabTree(empty(l:path) ? "" : l:path._str())
2021
endfunction
2122

23+
" FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1
24+
" Behaves the same as ToggleTabTree except roots directory at VCS root
25+
function! s:ToggleTabTreeVCS(name)
26+
let l:path = g:NERDTreeCreator._pathForString(a:name)
27+
let l:path = s:FindParentVCSRoot(l:path)
28+
call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? "" : l:path._str())
29+
endfunction
30+
2231
" FUNCTION: s:FindParentVCSRoot(a:path) {{{1
2332
" Finds the root version control system folder of the given path. If a:path is
2433
" not part of a repository, return the original path.

sources_non_forked/rust.vim/autoload/cargo.vim

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ function! cargo#Load()
33
endfunction
44

55
function! cargo#cmd(args)
6-
execute "! cargo" a:args
6+
" Trim trailing spaces. This is necessary since :terminal command parses
7+
" trailing spaces as an empty argument.
8+
let args = substitute(a:args, '\s\+$', '', '')
9+
if has('terminal')
10+
let cmd = 'terminal'
11+
elseif has('nvim')
12+
let cmd = 'noautocmd new | terminal'
13+
else
14+
let cmd = '!'
15+
endif
16+
execute cmd 'cargo' args
717
endfunction
818

919
function! s:nearest_cargo(...) abort

sources_non_forked/rust.vim/autoload/rust.vim

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
" Author: Kevin Ballard
21
" Description: Helper functions for Rust commands/mappings
32
" Last Modified: May 27, 2014
43
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
@@ -508,16 +507,23 @@ function! s:SearchTestFunctionNameUnderCursor() abort
508507
return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')
509508
endfunction
510509

511-
function! rust#Test(all, options) abort
510+
function! rust#Test(mods, winsize, all, options) abort
512511
let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')
513512
if manifest ==# ''
514513
return rust#Run(1, '--test ' . a:options)
515514
endif
516515

516+
" <count> defaults to 0, but we prefer an empty string
517+
let winsize = a:winsize ? a:winsize : ''
518+
517519
if has('terminal')
518-
let cmd = 'terminal '
520+
if has('patch-8.0.910')
521+
let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize)
522+
else
523+
let cmd = printf('%s terminal ', a:mods)
524+
endif
519525
elseif has('nvim')
520-
let cmd = 'noautocmd new | terminal '
526+
let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize)
521527
else
522528
let cmd = '!'
523529
let manifest = shellescape(manifest)

sources_non_forked/rust.vim/doc/rust.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,15 @@ functionality from other plugins.
426426
Running test(s)
427427
---------------
428428

429-
:RustTest[!] [options] *:RustTest*
429+
:[N]RustTest[!] [options] *:RustTest*
430430
Runs a test under the cursor when the current buffer is in a
431431
cargo project with "cargo test" command. If the command did
432432
not find any test function under the cursor, it stops with an
433433
error message.
434434

435+
When N is given, adjust the size of the new window to N lines
436+
or columns.
437+
435438
When ! is given, runs all tests regardless of current cursor
436439
position.
437440

@@ -444,7 +447,11 @@ Running test(s)
444447
is no way to run specific test function with rustc. [options]
445448
is passed to "rustc" command arguments in the case.
446449

447-
450+
Takes optional modifiers (see |<mods>|): >
451+
:tab RustTest
452+
:belowright 16RustTest
453+
:leftabove vert 80RustTest
454+
<
448455
rust.vim Debugging
449456
------------------
450457

sources_non_forked/rust.vim/ftplugin/rust.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
" Language: Rust
22
" Description: Vim ftplugin for Rust
33
" Maintainer: Chris Morgan <me@chrismorgan.info>
4-
" Maintainer: Kevin Ballard <kevin@sb.org>
54
" Last Change: June 08, 2016
65
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
76

@@ -137,7 +136,7 @@ command! -bar RustInfoToClipboard call rust#debugging#InfoToClipboard()
137136
command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile(<f-args>)
138137

139138
" See |:RustTest| for docs
140-
command! -buffer -nargs=* -bang RustTest call rust#Test(<bang>0, <q-args>)
139+
command! -buffer -nargs=* -count -bang RustTest call rust#Test(<q-mods>, <count>, <bang>0, <q-args>)
141140

142141
if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args")
143142
let b:rust_last_rustc_args = []

sources_non_forked/rust.vim/indent/rust.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ function GetRustIndent(lnum)
191191
" A line that ends with '.<expr>;' is probably an end of a long list
192192
" of method operations.
193193
if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';'
194-
return indent(prevlinenum) - s:shiftwidth()
194+
call cursor(a:lnum - 1, 1)
195+
let l:scope_start = searchpair('{\|(', '', '}\|)', 'nbW',
196+
\ 's:is_string_comment(line("."), col("."))')
197+
if l:scope_start != 0 && l:scope_start < a:lnum
198+
return indent(l:scope_start) + 4
199+
endif
195200
endif
196201

197202
if l:last_prevline_character ==# ","

sources_non_forked/rust.vim/syntax/rust.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipe
5353
syn keyword rustStorage move mut ref static const
5454
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
5555
syn keyword rustAwait await
56+
syn match rustKeyword /\<try\>!\@!/ display
5657

5758
syn keyword rustPubScopeCrate crate contained
5859
syn match rustPubScopeDelim /[()]/ contained

0 commit comments

Comments
 (0)