Styling org-roam buffer

Just starting with org-roam, getting comfy. Coming from Roam Research and Obsidian, I would like to customize a bit the style of the org-roam buffer that lists the backlinks, etc. I’ve gone through the online manual for org-roam but that particular section is ‘under construction’ (I guess, as is marked yet as ‘TODO’).

So my question is, have you tried customizing it? How would I go about it? I don’t want to bother you by requiring details, just a few pointers or a tip on where to start would get me going.

Thanks in advance for all your help.

I think you can change the look and feel (colors and fonts, etc.) with customizing the faces related to Org-roam. I can see these listed via command list-faces.

If you wish to go beyond faces, there are some additional customizing options – these are just options I am aware of; by no means do I claim it to be exhaustive. But hope this gives you some ideas.

You can use org-roam-preview-function to customize what text excerpts are displayed (the text excerpt is called “preview” in Org-roam).

You can also use org-roam-mode-section-functions to define which sections to be displayed – You could create your own section if you are familiar with Elisp.

Org-roam is still ultimately org-mode underneath, so might be worth looking at how others customise it:

1 Like

Thanks a lot, sorry for the delay in answering. This will surely get me going. Thanks again.

Thanks! I’ll look into those references.

Quick follow-up question: I’ve seen that the background of the org-roam side buffer (the one showing backlinks, etc) changes with the theme, so I guess it is possible to change it independently from the org-roam main buffer itself. How would I go about this? Do I have to change all the backgrounds for the faces on the buffer? Thanks in advance.

I think what you have seen is not really the background of the buffer. See the next two images (Figure 1 and 2). The “side buffer” on the left appears to have different background colors. But they are because the cursor is on to highlight the section. You should be able to confirm what I am talking about on your end.


Figure 1. Section named “Backlinks” selected, resulting in highlighting the whole section with gray


Figure 2. Cursor not on any section resulting in white (default) background color

You can change the highlight color by changing face magit-section-highlight like this.


Figure 3. Magit Section Highlight face customized to change the color