Overriding rendering of specific lines


#1

Hi, I was wondering if it’s possible for a package to override rendering of a set of lines. What I want to do is replace inline docs with a rendered “rich text” view

If that’s not possible, is it possible to add a right-hand gutter that’s aligned with specific lines?


#2

I doubt it. Even just changing the font size causes selection issues (e.g., making markdown headings larger than the regular text). So I imagine changing the visible characters will also throw it off. However, there are packages that display a processed version of the source inline, so maybe check them out. Examples I can think of are atom-quokka and hydrogen.

What do you mean? Gutters can be added with the Atom API, though most of it will be configured via TextEditor methods. I know the documentation is lacking, so I recommend playing around with what the different things do, to get a clearer idea before committing to anything. I believe new gutters should appear like the line numbers one, except empty initially.

These gutters will stay aligned with the line they represent (like the line number gutter). For something like an entirely different pane, look at the markdown-preview package.