Syntastic: sphinx unknow directive toctree

Created on 22 Nov 2016  路  6Comments  路  Source: vim-syntastic/syntastic

I've just started a sphinx configuration with sphinx-quickstart and the index.rst generated compiles and renders correctly, unfortunately I have the following from syntastic:

Unknown directive type "toctree".
source/index.rst|18 error| Unknown interpreted text role "ref".
source/index.rst|19 error| Unknown interpreted text role "ref".
source/index.rst|20 error| Unknown interpreted text role "ref".

also reported by @zh0uquan here: https://github.com/amix/vimrc/issues/176

Anything I can do to solve this?
Cheers,

Al

Most helpful comment

You can add this line to your .vimrc

let g:syntastic_rst_checkers=['sphinx']

All 6 comments

Why are you using rst2pseudoxml to check sphinx documents?

I'm sorry I'm not really familiar with the configuration steps, could you highlight what would be needed? I've searched through the documentation but I'm a bit lost.

Any help is appreciated,

Al

There really is no magic bullet:

  • Read the manual: :h syntastic
  • Set g:syntastic_rst_checkers
  • Read the docs for the sphinx checker: :h syntastic-rst-sphinx

E121: Undefined variable: g:syntastic_rst_checkers

If I set manually the following:
:SyntasticCheck sphinx

it does work, but the conf is lost as soon as I save the file or come back to the buffer.

E121: Undefined variable: g:syntastic_rst_checkers

Well, syntastic is a development tool, you must have a working understanding of VimL in order to use it. _shrug_

You can add this line to your .vimrc

let g:syntastic_rst_checkers=['sphinx']
Was this page helpful?
0 / 5 - 0 ratings

Related issues

lemeb picture lemeb  路  6Comments

bitc picture bitc  路  3Comments

ijanos picture ijanos  路  7Comments

vjsingh picture vjsingh  路  6Comments

dunatotatos picture dunatotatos  路  6Comments