summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2015-06-11 16:52:26 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2015-06-11 16:52:26 +0200
commit7ffa793f199f457beac69fe4412734bd28dc0bbf (patch)
treef493fa7a3fd7b4ef322b99b7f422ad7c497ee2da
parent4203435c48adfec7950f5b9ab745e87c5296e486 (diff)
downloadvim-polyglot-7ffa793f199f457beac69fe4412734bd28dc0bbf.tar.gz
vim-polyglot-7ffa793f199f457beac69fe4412734bd28dc0bbf.zip
Update
-rw-r--r--after/syntax/json.vim6
-rw-r--r--autoload/rubycomplete.vim6
-rw-r--r--ftplugin/less.vim5
-rw-r--r--syntax/go.vim2
-rw-r--r--syntax/jade.vim2
-rw-r--r--syntax/typescript.vim18
6 files changed, 25 insertions, 14 deletions
diff --git a/after/syntax/json.vim b/after/syntax/json.vim
new file mode 100644
index 00000000..dfca138e
--- /dev/null
+++ b/after/syntax/json.vim
@@ -0,0 +1,6 @@
+" Language: Colorful CSS Color Preview
+" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
+
+if !( has('gui_running') || &t_Co==256 ) | finish | endif
+
+call css_color#init('css', 'none', 'jsonString')
diff --git a/autoload/rubycomplete.vim b/autoload/rubycomplete.vim
index df7ef5c9..440dfd42 100644
--- a/autoload/rubycomplete.vim
+++ b/autoload/rubycomplete.vim
@@ -704,7 +704,9 @@ class VimRubyCompletion
cv = eval("self.class.constants")
vartype = get_var_type( receiver )
dprint "vartype: %s" % vartype
- if vartype != ''
+
+ invalid_vartype = ['', "gets"]
+ if !invalid_vartype.include?(vartype)
load_buffer_class( vartype )
begin
@@ -732,7 +734,7 @@ class VimRubyCompletion
methods.concat m.instance_methods(false)
}
end
- variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0
+ variables += add_rails_columns( "#{vartype}" ) if vartype && !invalid_vartype.include?(vartype)
when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/
message = $1
diff --git a/ftplugin/less.vim b/ftplugin/less.vim
index b6eaf6a3..c4da0a58 100644
--- a/ftplugin/less.vim
+++ b/ftplugin/less.vim
@@ -13,12 +13,13 @@ let b:did_ftplugin = 1
let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<"
setlocal iskeyword+=-
-setlocal commentstring=//\ %s
+setlocal commentstring=//%s
setlocal define=^\\s*\\%(@mixin\\\|=\\)
setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')
setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.less
-setlocal comments=s1:/*,mb:*,ex:*/
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,://
+setlocal fo=jcroql
let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='
diff --git a/syntax/go.vim b/syntax/go.vim
index e9634ba6..0c606ecc 100644
--- a/syntax/go.vim
+++ b/syntax/go.vim
@@ -147,7 +147,7 @@ hi def link goEscapeError Error
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
-syn match goFormatSpecifier /%[#0\-\ \+\*]*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
+syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
hi def link goString String
hi def link goRawString String
diff --git a/syntax/jade.vim b/syntax/jade.vim
index adfe1ae0..22934396 100644
--- a/syntax/jade.vim
+++ b/syntax/jade.vim
@@ -53,7 +53,7 @@ syn region jadePipedText matchgroup=jadePipeChar start="|" end="$" contained co
syn match jadeTagBlockChar "\.$" contained nextgroup=jadeTagBlockText,jadeTagBlockEnd skipnl
syn region jadeTagBlockText start="\%(\s*\)\S" end="\ze\n" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadeTagBlockText,jadeTagBlockEnd skipnl
syn region jadeTagBlockEnd start="\s*\S" end="$" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadeBegin skipnl
-syn region jadeTextInlineJade matchgroup=jadeInlineDelimiter start="#\[" end="]" contained contains=jadeTag keepend
+syn region jadeTextInlineJade matchgroup=jadeInlineDelimiter start="#\[" end="]" contains=jadeTag keepend
syn region jadeJavascriptFilter matchgroup=jadeFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript
syn region jadeCoffeescriptFilter matchgroup=jadeFilter start="^\z(\s*\):coffeescript\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlCoffeescript
diff --git a/syntax/typescript.vim b/syntax/typescript.vim
index 2e9c0b46..469efa37 100644
--- a/syntax/typescript.vim
+++ b/syntax/typescript.vim
@@ -30,7 +30,7 @@ hi link shebang Comment
"" typescript comments"{{{
syn keyword typescriptCommentTodo TODO FIXME XXX TBD contained
syn match typescriptLineComment "\/\/.*" contains=@Spell,typescriptCommentTodo,typescriptRef
-syn match typescriptRef /\/\/\/<reference\s\+.*\/>$/ contains=typescriptRefD,typescriptRefS
+syn match typescriptRefComment /\/\/\/<\(reference\|amd-\(dependency\|module\)\)\s\+.*\/>$/ contains=typescriptRefD,typescriptRefS
syn region typescriptRefD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
syn region typescriptRefS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+
@@ -99,8 +99,8 @@ syntax keyword typescriptEventListenerKeywords contained blur click focus mouseo
syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
" }}}
"" Programm Keywords"{{{
-syntax keyword typescriptSource import export
-syntax keyword typescriptIdentifier arguments this let var void yield
+syntax keyword typescriptSource import export from as
+syntax keyword typescriptIdentifier arguments this let var void yield const
syntax keyword typescriptOperator delete new instanceof typeof
syntax keyword typescriptBoolean true false
syntax keyword typescriptNull null undefined
@@ -110,7 +110,7 @@ syntax keyword typescriptDeprecated escape unescape all applets alinkColor bgCol
"}}}
"" Statement Keywords"{{{
syntax keyword typescriptConditional if else switch
-syntax keyword typescriptRepeat do while for in
+syntax keyword typescriptRepeat do while for in of
syntax keyword typescriptBranch break continue
syntax keyword typescriptLabel case default
syntax keyword typescriptStatement return with
@@ -119,7 +119,7 @@ syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity Math
syntax keyword typescriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
-syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public type
+syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public type namespace from
"}}}
"" typescript/DOM/HTML/CSS specified things"{{{
@@ -202,9 +202,11 @@ syn match typescriptLogicSymbols "\(&&\)\|\(||\)"
" typescriptFold Function {{{
" function! typescriptFold()
-syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
-setl foldtext=FoldText()
+" skip curly braces inside RegEx's and comments
+syn region foldBraces start=/{/ skip=/\(\/\/.*\)\|\(\/.*\/\)/ end=/}/ transparent fold keepend extend
+
+" setl foldtext=FoldText()
" endfunction
" au FileType typescript call typescriptFold()
@@ -233,7 +235,7 @@ if version >= 508 || !exists("did_typescript_syn_inits")
HiLink typescriptParens Operator
HiLink typescriptComment Comment
HiLink typescriptLineComment Comment
- HiLink typescriptRef Include
+ HiLink typescriptRefComment Include
HiLink typescriptRefS String
HiLink typescriptRefD String
HiLink typescriptDocComment Comment