Skip to content

Commit 080b38a

Browse files
authored
Merge pull request #112 from saccarosium/master
Fix load neovim highlights only on neovim
2 parents 48d4470 + 126c3f4 commit 080b38a

1 file changed

Lines changed: 72 additions & 70 deletions

File tree

colors/codedark.vim

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -245,63 +245,78 @@ call <sid>hi('SpellCap', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
245245
call <sid>hi('SpellRare', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
246246
call <sid>hi('SpellLocal', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
247247

248-
249-
" Neovim Treesitter:
250-
call <sid>hiTS('@error', 'TSError', s:cdRed, {}, 'none', {})
251-
call <sid>hiTS('@punctuation.delimiter', 'TSPunctDelimiter', s:cdFront, {}, 'none', {})
252-
call <sid>hiTS('@punctuation.bracket', 'TSPunctBracket', s:cdFront, {}, 'none', {})
253-
call <sid>hiTS('@punctuation.special', 'TSPunctSpecial', s:cdFront, {}, 'none', {})
254-
" Constant
255-
call <sid>hiTS('@constant', 'TSConstant', s:cdYellow, {}, 'none', {})
256-
call <sid>hiTS('@constant.builtin', 'TSConstBuiltin', s:cdBlue, {}, 'none', {})
257-
call <sid>hiTS('@constant.macro', 'TSConstMacro', s:cdBlueGreen, {}, 'none', {})
258-
call <sid>hiTS('@string.regex', 'TSStringRegex', s:cdOrange, {}, 'none', {})
259-
call <sid>hiTS('@string', 'TSString', s:cdOrange, {}, 'none', {})
260-
call <sid>hiTS('@string.escape', 'TSStringEscape', s:cdYellowOrange, {}, 'none', {})
261-
call <sid>hiTS('@character', 'TSCharacter', s:cdOrange, {}, 'none', {})
262-
call <sid>hiTS('@number', 'TSNumber', s:cdLightGreen, {}, 'none', {})
263-
call <sid>hiTS('@boolean', 'TSBoolean', s:cdBlue, {}, 'none', {})
264-
call <sid>hiTS('@float', 'TSFloat', s:cdLightGreen, {}, 'none', {})
265-
call <sid>hiTS('@annotation', 'TSAnnotation', s:cdYellow, {}, 'none', {})
266-
call <sid>hiTS('@attribute', 'TSAttribute', s:cdBlueGreen, {}, 'none', {})
267-
call <sid>hiTS('@namespace', 'TSNamespace', s:cdBlueGreen, {}, 'none', {})
268-
" Functions
269-
call <sid>hiTS('@function.builtin', 'TSFuncBuiltin', s:cdYellow, {}, 'none', {})
270-
call <sid>hiTS('@function', 'TSFunction', s:cdYellow, {}, 'none', {})
271-
call <sid>hiTS('@function.macro', 'TSFuncMacro', s:cdYellow, {}, 'none', {})
272-
call <sid>hiTS('@parameter', 'TSParameter', s:cdLightBlue, {}, 'none', {})
273-
call <sid>hiTS('@parameter.reference', 'TSParameterReference', s:cdLightBlue, {}, 'none', {})
274-
call <sid>hiTS('@method', 'TSMethod', s:cdYellow, {}, 'none', {})
275-
call <sid>hiTS('@field', 'TSField', s:cdLightBlue, {}, 'none', {})
276-
call <sid>hiTS('@property', 'TSProperty', s:cdLightBlue, {}, 'none', {})
277-
call <sid>hiTS('@constructor', 'TSConstructor', s:cdBlueGreen, {}, 'none', {})
278-
" Keywords
279-
call <sid>hiTS('@conditional', 'TSConditional', s:cdPink, {}, 'none', {})
280-
call <sid>hiTS('@repeat', 'TSRepeat', s:cdPink, {}, 'none', {})
281-
call <sid>hiTS('@label', 'TSLabel', s:cdLightBlue, {}, 'none', {})
282-
call <sid>hiTS('@keyword', 'TSKeyword', s:cdBlue, {}, 'none', {})
283-
call <sid>hiTS('@keyword.function', 'TSKeywordFunction', s:cdBlue, {}, 'none', {})
284-
call <sid>hiTS('@keyword.operator', 'TSKeywordOperator', s:cdBlue, {}, 'none', {})
285-
call <sid>hiTS('@operator', 'TSOperator', s:cdFront, {}, 'none', {})
286-
call <sid>hiTS('@exception', 'TSException', s:cdPink, {}, 'none', {})
287-
call <sid>hiTS('@type', 'TSType', s:cdBlueGreen, {}, 'none', {})
288-
call <sid>hiTS('@type.builtin', 'TSTypeBuiltin', s:cdBlue, {}, 'none', {})
289-
call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {})
290-
call <sid>hiTS('@include', 'TSInclude', s:cdPink, {}, 'none', {})
291-
" Variable
292-
call <sid>hiTS('@variable', 'TSVariable', s:cdLightBlue, {}, 'none', {})
293-
call <sid>hiTS('@variable.builtin', 'TSVariableBuiltin', s:cdLightBlue, {}, 'none', {})
294-
" Text
295-
call <sid>hiTS('@text', 'TSText', s:cdYellowOrange, {}, 'none', {})
296-
call <sid>hiTS('@text.strong', 'TSStrong', s:cdYellowOrange, {}, 'none', {})
297-
call <sid>hiTS('@text.emphasis', 'TSEmphasis', s:cdYellowOrange, {}, 'none', {})
298-
call <sid>hiTS('@text.underline', 'TSUnderline', s:cdYellowOrange, {}, 'none', {})
299-
call <sid>hiTS('@text.title', 'TSTitle', s:cdYellowOrange, {}, 'none', {})
300-
call <sid>hiTS('@text.literal', 'TSLiteral', s:cdYellowOrange, {}, 'none', {})
301-
call <sid>hiTS('@text.uri', 'TSURI', s:cdYellowOrange, {}, 'none', {})
302-
" Tags
303-
call <sid>hiTS('@tag', 'TSTag', s:cdBlue, {}, 'none', {})
304-
call <sid>hiTS('@tag.delimiter', 'TSTagDelimiter', s:cdGray, {}, 'none', {})
248+
" Make neovim specific groups load only on Neovim
249+
if has("nvim")
250+
" Neovim Treesitter:
251+
call <sid>hiTS('@error', 'TSError', s:cdRed, {}, 'none', {})
252+
call <sid>hiTS('@punctuation.delimiter', 'TSPunctDelimiter', s:cdFront, {}, 'none', {})
253+
call <sid>hiTS('@punctuation.bracket', 'TSPunctBracket', s:cdFront, {}, 'none', {})
254+
call <sid>hiTS('@punctuation.special', 'TSPunctSpecial', s:cdFront, {}, 'none', {})
255+
" Constant
256+
call <sid>hiTS('@constant', 'TSConstant', s:cdYellow, {}, 'none', {})
257+
call <sid>hiTS('@constant.builtin', 'TSConstBuiltin', s:cdBlue, {}, 'none', {})
258+
call <sid>hiTS('@constant.macro', 'TSConstMacro', s:cdBlueGreen, {}, 'none', {})
259+
call <sid>hiTS('@string.regex', 'TSStringRegex', s:cdOrange, {}, 'none', {})
260+
call <sid>hiTS('@string', 'TSString', s:cdOrange, {}, 'none', {})
261+
call <sid>hiTS('@string.escape', 'TSStringEscape', s:cdYellowOrange, {}, 'none', {})
262+
call <sid>hiTS('@character', 'TSCharacter', s:cdOrange, {}, 'none', {})
263+
call <sid>hiTS('@number', 'TSNumber', s:cdLightGreen, {}, 'none', {})
264+
call <sid>hiTS('@boolean', 'TSBoolean', s:cdBlue, {}, 'none', {})
265+
call <sid>hiTS('@float', 'TSFloat', s:cdLightGreen, {}, 'none', {})
266+
call <sid>hiTS('@annotation', 'TSAnnotation', s:cdYellow, {}, 'none', {})
267+
call <sid>hiTS('@attribute', 'TSAttribute', s:cdBlueGreen, {}, 'none', {})
268+
call <sid>hiTS('@namespace', 'TSNamespace', s:cdBlueGreen, {}, 'none', {})
269+
" Functions
270+
call <sid>hiTS('@function.builtin', 'TSFuncBuiltin', s:cdYellow, {}, 'none', {})
271+
call <sid>hiTS('@function', 'TSFunction', s:cdYellow, {}, 'none', {})
272+
call <sid>hiTS('@function.macro', 'TSFuncMacro', s:cdYellow, {}, 'none', {})
273+
call <sid>hiTS('@parameter', 'TSParameter', s:cdLightBlue, {}, 'none', {})
274+
call <sid>hiTS('@parameter.reference', 'TSParameterReference', s:cdLightBlue, {}, 'none', {})
275+
call <sid>hiTS('@method', 'TSMethod', s:cdYellow, {}, 'none', {})
276+
call <sid>hiTS('@field', 'TSField', s:cdLightBlue, {}, 'none', {})
277+
call <sid>hiTS('@property', 'TSProperty', s:cdLightBlue, {}, 'none', {})
278+
call <sid>hiTS('@constructor', 'TSConstructor', s:cdBlueGreen, {}, 'none', {})
279+
" Keywords
280+
call <sid>hiTS('@conditional', 'TSConditional', s:cdPink, {}, 'none', {})
281+
call <sid>hiTS('@repeat', 'TSRepeat', s:cdPink, {}, 'none', {})
282+
call <sid>hiTS('@label', 'TSLabel', s:cdLightBlue, {}, 'none', {})
283+
call <sid>hiTS('@keyword', 'TSKeyword', s:cdBlue, {}, 'none', {})
284+
call <sid>hiTS('@keyword.function', 'TSKeywordFunction', s:cdBlue, {}, 'none', {})
285+
call <sid>hiTS('@keyword.operator', 'TSKeywordOperator', s:cdBlue, {}, 'none', {})
286+
call <sid>hiTS('@operator', 'TSOperator', s:cdFront, {}, 'none', {})
287+
call <sid>hiTS('@exception', 'TSException', s:cdPink, {}, 'none', {})
288+
call <sid>hiTS('@type', 'TSType', s:cdBlueGreen, {}, 'none', {})
289+
call <sid>hiTS('@type.builtin', 'TSTypeBuiltin', s:cdBlue, {}, 'none', {})
290+
call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {})
291+
call <sid>hiTS('@include', 'TSInclude', s:cdPink, {}, 'none', {})
292+
" Variable
293+
call <sid>hiTS('@variable', 'TSVariable', s:cdLightBlue, {}, 'none', {})
294+
call <sid>hiTS('@variable.builtin', 'TSVariableBuiltin', s:cdLightBlue, {}, 'none', {})
295+
" Text
296+
call <sid>hiTS('@text', 'TSText', s:cdYellowOrange, {}, 'none', {})
297+
call <sid>hiTS('@text.strong', 'TSStrong', s:cdYellowOrange, {}, 'none', {})
298+
call <sid>hiTS('@text.emphasis', 'TSEmphasis', s:cdYellowOrange, {}, 'none', {})
299+
call <sid>hiTS('@text.underline', 'TSUnderline', s:cdYellowOrange, {}, 'none', {})
300+
call <sid>hiTS('@text.title', 'TSTitle', s:cdYellowOrange, {}, 'none', {})
301+
call <sid>hiTS('@text.literal', 'TSLiteral', s:cdYellowOrange, {}, 'none', {})
302+
call <sid>hiTS('@text.uri', 'TSURI', s:cdYellowOrange, {}, 'none', {})
303+
" Tags
304+
call <sid>hiTS('@tag', 'TSTag', s:cdBlue, {}, 'none', {})
305+
call <sid>hiTS('@tag.delimiter', 'TSTagDelimiter', s:cdGray, {}, 'none', {})
306+
307+
" nvim-cmp
308+
call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {})
309+
call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {})
310+
call <sid>hi('CmpItemAbbrMatchFuzzy', s:cdBlue, {}, 'none', {})
311+
call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})
312+
call <sid>hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {})
313+
call <sid>hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {})
314+
call <sid>hi('CmpItemKindFunction', s:cdPink, {}, 'none', {})
315+
call <sid>hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {})
316+
call <sid>hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {})
317+
call <sid>hi('CmpItemKindProperty', s:cdFront, {}, 'none', {})
318+
call <sid>hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})
319+
endif
305320

306321
" Markdown:
307322
call <sid>hi('markdownH1', s:cdBlue, {}, 'bold', {})
@@ -618,16 +633,3 @@ call <sid>hi('LspCxxHlSymNamespace', s:cdSilver, {}, 'none', {})
618633
" Coc Explorer:
619634
call <sid>hi('CocHighlightText', {}, s:cdSelection, 'none', {})
620635
call <sid>hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {})
621-
622-
" nvim-cmp
623-
call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {})
624-
call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {})
625-
call <sid>hi('CmpItemAbbrMatchFuzzy', s:cdBlue, {}, 'none', {})
626-
call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})
627-
call <sid>hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {})
628-
call <sid>hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {})
629-
call <sid>hi('CmpItemKindFunction', s:cdPink, {}, 'none', {})
630-
call <sid>hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {})
631-
call <sid>hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {})
632-
call <sid>hi('CmpItemKindProperty', s:cdFront, {}, 'none', {})
633-
call <sid>hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})

0 commit comments

Comments
 (0)