Commit 8e191f71 authored by Yohanan Santana's avatar Yohanan Santana

Made the themes now responsible for the coloring.

A syntax plugin changing the colors is not a good idea, since there are
many themes out there and none of them would work.

Because of that, I've removed the massive chunk of color-related code
and instead linked the plugin keywords to theme keywords.

I'm not sure if the keywords I used are the correct ones, though, so
that's a thing that might need to be adjusted.
parent 29e346b6
......@@ -14,11 +14,11 @@ syn match variable "$[a-zA-Z0-9_]\+"
syn region process start="$(" end=")" transparent
syn region process start="@(" end=")" transparent
syn match ionNumber '[+-]\?\([0-9]*[.]\)\?[0-9]\+'
syn match comment '[#].*$'
syn match operator '&'
syn match operator '&&'
syn match operator '||'
syn match operator '[|<>&]'
syn match Comment '[#].*$'
syn match Operator '&'
syn match Operator '&&'
syn match Operator '||'
syn match Operator '[|<>&]'
syn match flag '[ ]\([-]\)\w\+'
syntax keyword ionKeyword .
......@@ -72,54 +72,10 @@ syntax keyword ionKeyword unalias
syntax keyword ionKeyword wait
syntax keyword ionKeyword while
" Get current BackgroundTheme of terminal (xterm)
let g:background = system('./gettheme.sh')
let g:theme = strpart(g:background, 7, 10)
if g:theme ==# 'LightTheme'
hi Operator cterm=bold ctermfg=black
hi Array cterm=bold ctermfg=darkblue
hi String cterm=bold ctermfg=darkgreen
hi DoubleQuote ctermfg=darkgreen
hi SingleQuote ctermfg=darkgreen
hi Numbers ctermfg=darkyellow
hi! Comment ctermfg=darkgrey cterm=italic
hi Keywords ctermfg=magenta cterm=bold
hi Flag cterm=bold ctermfg=darkyellow
hi def link ionKeyword Keywords
hi def link arrayVar Array
hi def link variable String
hi def link ionNumber Numbers
hi def link doubleQuote DoubleQuote
hi def link singleQuote SingleQuote
hi def link process PreProc
hi def link comment Comment
hi def link operator Operator
hi def link flag Flag
else
" Dark Theme
hi Operator cterm=bold ctermfg=white
hi Array cterm=bold ctermfg=lightblue
hi String cterm=bold ctermfg=lightmagenta
hi DoubleQuote ctermfg=green
hi SingleQuote ctermfg=lightgreen
hi Numbers ctermfg=cyan
hi! Comment ctermfg=grey cterm=italic
hi Keywords ctermfg=magenta cterm=bold
hi Flag cterm=bold ctermfg=darkyellow
hi def link ionKeyword Keywords
hi def link arrayVar Array
hi def link variable String
hi def link ionNumber Numbers
hi def link doubleQuote DoubleQuote
hi def link singleQuote SingleQuote
hi def link process PreProc
hi def link comment Comment
hi def link operator Operator
hi def link flag Flag
endif
let b:current_syntax = "ion"
hi def link ionKeyword Keyword
hi def link variable String
hi def link doubleQuote String
hi def link singleQuote Character
hi def link ionNumber Number
hi def link arrayVar Type
hi def link flag Structure
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment