diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-11-02 18:19:06 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-11-02 18:19:15 +0100 |
commit | 0738ad654d4f2f89b77dcb4197011a293e4dfcf3 (patch) | |
tree | 25de763b5adbc53b997085bcf8f49d6b09a45cd0 /autoload | |
parent | 05e21a9e252b283b2d71568ad3b671d7f28fe0bc (diff) | |
download | vim-polyglot-0738ad654d4f2f89b77dcb4197011a293e4dfcf3.tar.gz vim-polyglot-0738ad654d4f2f89b77dcb4197011a293e4dfcf3.zip |
Update
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/go/config.vim | 4 | ||||
-rw-r--r-- | autoload/yats.vim | 20 |
2 files changed, 20 insertions, 4 deletions
diff --git a/autoload/go/config.vim b/autoload/go/config.vim index e3e3dcff..0c48a1f7 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -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 diff --git a/autoload/yats.vim b/autoload/yats.vim new file mode 100644 index 00000000..8f5fe2d0 --- /dev/null +++ b/autoload/yats.vim @@ -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 + |