diff options
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/csv.vim | 6 | ||||
| -rw-r--r-- | autoload/go/config.vim | 21 | ||||
| -rw-r--r-- | autoload/graphql.vim | 33 | 
3 files changed, 51 insertions, 9 deletions
| diff --git a/autoload/csv.vim b/autoload/csv.vim index a035e3d5..1fbf7c2a 100644 --- a/autoload/csv.vim +++ b/autoload/csv.vim @@ -122,7 +122,7 @@ fu! csv#Init(start, end, ...) "{{{3      " Enable vartabs for tab delimited files      if b:delimiter=="\t" && has("vartabs")&& !exists("b:csv_fixed_width_cols")          if get(b:, 'col_width', []) ==# [] -            call csv#CalculateColumnWidth(line('$')) +            call csv#CalculateColumnWidth(line('$'), 1)          endif          let &l:vts=join(b:col_width, ',')          let g:csv_no_conceal=1 @@ -636,7 +636,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3      endif      let cur=winsaveview()      " Force recalculation of Column width -    let row = exists("a:1") ? a:1 : '' +    let row = exists("a:1") ? a:1 : line('$')      if a:bang || !empty(row)          if a:bang && exists("b:col_width")            " Unarrange, so that if csv_arrange_align has changed @@ -670,7 +670,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3      endif      if !exists("b:col_width") -        call csv#CalculateColumnWidth(row) +        call csv#CalculateColumnWidth(row, 1)      endif      " abort on empty file diff --git a/autoload/go/config.vim b/autoload/go/config.vim index 3dc4422f..d4ba03e4 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -84,7 +84,18 @@ function! go#config#StatuslineDuration() abort  endfunction  function! go#config#SnippetEngine() abort -  return get(g:, 'go_snippet_engine', 'automatic') +  let l:engine = get(g:, 'go_snippet_engine', 'automatic') +  if l:engine is? "automatic" +    if get(g:, 'did_plugin_ultisnips') is 1 +      let l:engine = 'ultisnips' +    elseif get(g:, 'loaded_neosnippet') is 1 +      let l:engine = 'neosnippet' +    elseif get(g:, 'loaded_minisnip') is 1 +      let l:engine = 'minisnip' +    endif +  endif + +  return l:engine  endfunction  function! go#config#PlayBrowserCommand() abort @@ -516,6 +527,10 @@ function! go#config#GoplsFuzzyMatching() abort    return get(g:, 'go_gopls_fuzzy_matching', 1)  endfunction +function! go#config#GoplsStaticCheck() abort +  return get(g:, 'go_gopls_staticcheck', 0) +endfunction +  function! go#config#GoplsUsePlaceholders() abort    return get(g:, 'go_gopls_use_placeholders', 0)  endfunction @@ -524,6 +539,10 @@ function! go#config#GoplsEnabled() abort    return get(g:, 'go_gopls_enabled', 1)  endfunction +function! go#config#DiagnosticsEnabled() abort +  return get(g:, 'go_diagnostics_enabled', 0) +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/graphql.vim b/autoload/graphql.vim index 976e9362..820a83c3 100644 --- a/autoload/graphql.vim +++ b/autoload/graphql.vim @@ -1,13 +1,36 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 -" Vim plugin +" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org> +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. +"  " Language: GraphQL  " Maintainer: Jon Parise <jon@indelible.org> -if exists('g:autoloaded_graphql') -  finish -endif -let g:autoloaded_graphql = 1 +function! graphql#has_syntax_group(group) abort +  try +    silent execute 'silent highlight ' . a:group +  catch +    return v:false +  endtry +  return v:true +endfunction  function! graphql#javascript_tags() abort    return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL']) | 
