lukas-reineke / headlines.nvim

This plugin adds horizontal highlights for text filetypes, like markdown, orgmode, and neorg.
MIT License
688 stars 28 forks source link

R-Markdown file type #62

Closed n-crespo closed 10 months ago

n-crespo commented 10 months ago

I recently realized that this plugin works with the filetype rmd, which I assume is for R-Markdown files, but the most common filetype for R-Markdown files, with some standard plugins, is rmarkdown, with the .Rmd file extension. Because of this, whenever R-markdown files are opened, the plugin is not loaded unless I use :set ft=rmd. I think this should be adjusted to allow for the .Rmd (rmarkdown) filetype.

lukas-reineke commented 10 months ago

rmarkdown is not a default Neovim filetype. The correct filetype for R markdown is rmd.

But if you have some plugin that adds a new filetype, and you want to use that, you can. Just pass the configuration for it in the setup function. You can even just use the default rmd configuration, like so.

require("headlines").setup {
    rmarkdown = require("headlines").config.rmd,
}