This commit is contained in:
Adam Stankiewicz
2020-11-02 18:19:06 +01:00
parent 05e21a9e25
commit 0738ad654d
10 changed files with 430 additions and 105 deletions

View File

@@ -6,10 +6,6 @@ endif
let s:cpo_save = &cpo
set cpo&vim
function! go#config#AutodetectGopath() abort
return get(g:, 'go_autodetect_gopath', 0)
endfunction
function! go#config#ListTypeCommands() abort
return get(g:, 'go_list_type_commands', {})
endfunction

20
autoload/yats.vim Normal file
View File

@@ -0,0 +1,20 @@
if has_key(g:polyglot_is_disabled, 'typescript')
finish
endif
" Regex of syntax group names that are strings or documentation.
let s:syng_multiline = 'comment\c'
" Regex of syntax group names that are line comment.
let s:syng_linecom = 'linecomment\c'
" Check if the character at lnum:col is inside a multi-line comment.
function yats#IsInMultilineComment(lnum, col)
return !s:IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline
endfunction
" Check if the character at lnum:col is a line comment.
function yats#IsLineComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_linecom
endfunction