Cannot get R Markdown (*.Rmd) working with document-outline!
Good Morning Sir or Madam,
I have a tried to get the document-outline working for R Markdown (*.Rmd) files for a few hours now, but I could net get it working. Everything else, like spell checking, is working fine. Where am I supposed to add the grammar (text.knitr?) ?
Any hints would be greatly appreciated, Stefan from Germany
I am facing the same problem. I overcome this by setting the Grammar to GitHub Markdown but I think it would make sense to include Rmd files in the list of types supported.
Anyway, thanks for this very helpful package!
A temporary solution is to manually add the source.gfm.rmd grammar to the package.
This can be done by adding it in the lib/ > document-outline.js file, as shown in the following code chunk (to bring up the package files, go to Settings in Atom > Packages > Document outline and click on View code).
const MODEL_CLASS_FOR_SCOPES = {
'source.gfm': MarkdownModel,
'text.md': MarkdownModel,
'source.gfm.rmd': MarkdownModel,
'source.weave.md': MarkdownModel,
'text.tex.latex': LatexModel,
'text.tex.latex.beamer': LatexModel,
'text.tex.latex.knitr': LatexModel,
'text.knitr': LatexModel,
'text.restructuredtext': ReStructuredTextModel,
'source.asciidoc': AsciiDocModel
};
This fix gets overwritten when updating the package.