0

I am currently writing a c3 syntax file for vim and I have some issues with a highlight.

I have this line: syntax match ModuleName "\<module\>\s*\zs[a-z][a-zA-Z0-9_]*\ze;" display

and this line: syntax keyword ModuleKeyword module

that are conflicting but I would like to have both of them colored is there any way that it is possible?

the should be colored like this:

/*keyword*/module /*c3name*/moduleName/*none*/;
/*keyword*/module /*c3name*/moduleName/*none*/::/*c3name*/otherName/*none*/;
/*keyword*/import /*c3name*/moduleName/*none*/;
/*keyword*/import /*c3name*/moduleName/*none*/::/*c3name*/otherName/*none*/;

the comments give the color schemes that the word after them is supposed to use for highlitghing here is a file for testing the highlitghing: main.c3

here is the complete file: c3.vim

for now the keyword module is colored properly and I can have the name colored if I remove this line: syntax keyword ModuleKeyword module but then the keyword is not colored anymore

4
  • 1
    Could you add some sample "c3" text to your question? Commented Jul 2 at 5:28
  • I added a simlple example and one of my c3 file for testing the highlitghing Commented Jul 2 at 6:01
  • main.c3 is a 404 right now and is susceptible to change or whatnot in the future. Include the relevant content of the file in the question. Commented Jul 2 at 6:37
  • sorry a little mistake on my side, main.c3 should be accessible now and the relevant part of it are the 6 first lines Commented Jul 2 at 6:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.