jacoborus / estilo

Create color schemes for Vim, Airline and Lightline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add links syntax to docs

pwntester opened this issue · comments

Hi,

Im writing a new theme and was trying to create links as shown in the documentation:

WarningMsg: 'link Title'

My ´php´ syntax file looks like:

phpSuperglobal: 'link Identifier'
phpFunctions: 'link Function'
phpQuoteSingle: 'link StringDelimiter'
phpQuoteDouble: 'link StringDelimiter'
phpBoolean: 'link Constant'
phpNull: 'link Constant'
phpArrayPair: 'link Operator'
phpOperator: 'link Normal'
phpRelation: 'link Normal'
phpVarSelector: 'link Identifier'

However when rendering it I get an exception:

Error: wrong foreground in phpSuperglobal
    at getColorCode (/usr/local/lib/node_modules/estilo/src/compile-colorscheme.js:42:9)
    at parseStyleString (/usr/local/lib/node_modules/estilo/src/compile-colorscheme.js:94:11)
    at Object.keys.forEach.name (/usr/local/lib/node_modules/estilo/src/compile-colorscheme.js:114:19)
    at Array.forEach (native)
    at module.exports (/usr/local/lib/node_modules/estilo/src/compile-colorscheme.js:109:26)
    at colorschemes.forEach.c (/usr/local/lib/node_modules/estilo/src/render-project.js:77:10)
    at Array.forEach (native)
    at renderColorschemes (/usr/local/lib/node_modules/estilo/src/render-project.js:73:16)
    at module.exports (/usr/local/lib/node_modules/estilo/src/render-project.js:36:5)
    at getYmlsInsideFolder.then.then.then.then.then.then.then.then.then.project (/usr/local/lib/node_modules/estilo/src/load-project.js:39:22)

It seems like the link keyword is being treated as the foreground color.

Thanks

Looking at the code in src/compile-colorscheme.js, I found out that estilo is actually expecting a @ rather than the link word as stated in the documentation.

So links can be created as:

phpFunctions: '@Function'

Hi @pwntester , thanks for pointing that. I'll add that to the docs