idris-hackers / idris-vim

Idris mode for vim
221 stars 52 forks source link

How do you change the syntax coloring? #47

Closed danielbarter closed 7 years ago

danielbarter commented 8 years ago

Hi,

This is a dumb question, but I can't see where the syntax colors are chosen in the source and I want to change them.

How do I do that?

srenatus commented 7 years ago

Hi,

this plugin doesn't define colors, it defines syntax elements (see here), for example:

syn keyword idrisImport import

This teaches vim that import is a keyword for Idris imports, and further down we find

highlight def link idrisImport Structure

which tells vim to highlight (i.e. colour) it as a "Structure" element (see here). This is where your colorscheme comes in, defining how vim shows Structure elements.

So to change the way Idris code is coloured, you could change the mapping of syntax elements to highlight options.

HTH :)

LeifW commented 7 years ago

Is that a good enough answer? Can this issue be closed? Perhaps we should add that answer to the README or the wiki for this?

stephen-smith commented 7 years ago

Migrated to the wiki. I also vote to close the issue.