Search code examples
pygmentsphabricator

Highlighting with Pygmentize in Phabricator not working


I installed Phabricator for working with Python projects. Everything is ok, but files view present them, as plain text. I want to some highlighting provided by Pygmentize utility.

I have installed Pygments

sudo pip install Pygments

Checked from all users, pygmentize script is available, and located at /usr/local/bin. I changed

'pygments.enabled' => true,

settings in myconfig.conf.php file of phabricator. But it's not working ?! I can't find any log crashes, or something else. Have you any ideas why it can happen?


Solution

  • I received answer from Github-Issues service. The reason was that httpd user can't call this function, here is sample which extends own $PATH enviroment. I added this to myconfig.conf.php file:

    'environment.append-paths' => array('/usr/local/bin'),
    

    It is strongly recommended to add path with pygmentize to your path.