Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Coloring switches off when OpenMP pragma is used #76

Open
piotrklos-tcl opened this issue Jun 21, 2019 · 0 comments
Open

Coloring switches off when OpenMP pragma is used #76

piotrklos-tcl opened this issue Jun 21, 2019 · 0 comments

Comments

@piotrklos-tcl
Copy link

piotrklos-tcl commented Jun 21, 2019

It is a common thing in C++ and C to parallelize code by stucking an openmp pragma in front of a for loop like so:

#pragma omp parallel for
for(int i=0; i < size; ++i)
{
    (...)
}

The problem is that the syntax highlighting is switched off after the pragma (the loop becomes white text on black background in my nvim). The rest of the file is colored normally, only the loop is white-on-black.

I expect it to be colored normally.

Please, note that openmp pragmas have purely additive nature, i.e. if I remove the pragma, the code will compile and give the same result. Hence, it's overly conservative to switch off the coloring after those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant