diff options
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/cargo.vim | 12 | ||||
| -rw-r--r-- | autoload/go/config.vim | 4 | ||||
| -rw-r--r-- | autoload/rust.vim | 14 | ||||
| -rw-r--r-- | autoload/xml/html5.vim | 4 | 
4 files changed, 29 insertions, 5 deletions
| diff --git a/autoload/cargo.vim b/autoload/cargo.vim index f24db923..ffa946da 100644 --- a/autoload/cargo.vim +++ b/autoload/cargo.vim @@ -5,7 +5,17 @@ function! cargo#Load()  endfunction  function! cargo#cmd(args) -    execute "! cargo" a:args +    " Trim trailing spaces. This is necessary since :terminal command parses +    " trailing spaces as an empty argument. +    let args = substitute(a:args, '\s\+$', '', '') +    if has('terminal') +        let cmd = 'terminal' +    elseif has('nvim') +        let cmd = 'noautocmd new | terminal' +    else +        let cmd = '!' +    endif +    execute cmd 'cargo' args  endfunction  function! s:nearest_cargo(...) abort diff --git a/autoload/go/config.vim b/autoload/go/config.vim index b70f7b75..9cd032f2 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -520,6 +520,10 @@ function! go#config#GoplsUsePlaceholders() abort    return get(g:, 'go_gopls_use_placeholders', 0)  endfunction +function! go#config#GoplsEnabled() abort +  return get(g:, 'go_gopls_enabled', 1) +endfunction +  " Set the default value. A value of "1" is a shortcut for this, for  " compatibility reasons.  if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1 diff --git a/autoload/rust.vim b/autoload/rust.vim index 658b90cc..8bb2b126 100644 --- a/autoload/rust.vim +++ b/autoload/rust.vim @@ -1,6 +1,5 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 -" Author: Kevin Ballard  " Description: Helper functions for Rust commands/mappings  " Last Modified: May 27, 2014  " For bugs, patches and license go to https://github.com/rust-lang/rust.vim @@ -510,16 +509,23 @@ function! s:SearchTestFunctionNameUnderCursor() abort      return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')  endfunction -function! rust#Test(all, options) abort +function! rust#Test(mods, winsize, all, options) abort      let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')      if manifest ==# ''          return rust#Run(1, '--test ' . a:options)      endif +    " <count> defaults to 0, but we prefer an empty string +    let winsize = a:winsize ? a:winsize : '' +      if has('terminal') -        let cmd = 'terminal ' +        if has('patch-8.0.910') +            let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize) +        else +            let cmd = printf('%s terminal ', a:mods) +        endif      elseif has('nvim') -        let cmd = 'noautocmd new | terminal ' +        let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize)      else          let cmd = '!'          let manifest = shellescape(manifest) diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim index e9e05ee8..ed523b2c 100644 --- a/autoload/xml/html5.vim +++ b/autoload/xml/html5.vim @@ -746,6 +746,10 @@ let g:xmldata_html5 = {      \ [],      \ global_attributes  \ ], +\ 'slot': [ +    \ [], +    \ extend(copy(global_attributes), {'name': []}) +\ ],  \ 'small': [      \ phrasing_elements,      \ global_attributes | 
