[ZeroBrane Studio] Re: Change the tooltip formatting via interpreter? How to distribute interpreter & api?

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Wed, 29 Oct 2014 11:15:34 -0700

Hi Jan,

> The standard markup styles are applied, but unfortunately they are all grey 
> (of course, since they are meant to be for comments). So I do need my own 
> styles, as I do not want the documentation window to have grey text.

You can get different colors with something like this:

    local styles = StylesGetDefault()
    MarkupAddStyles(styles)
    styles.text.fg = {0, 0, 255}
    styles['**'].fg = {255, 0, 0}
    styles['_'].fg = {0, 255, 0}
    SetupKeywords(e,"lua",nil,styles,ide.font.oNormal,ide.font.oItalic)
    StylesApplyToEditor(styles,e,ide.font.oNormal,ide.font.oItalic)

This will color the bold fragments green and italic fragments red
while the rest of the text will be blue. I tried and couldn't get it
to work using your markup (^^* and ^^_), so I'm checking what may be
causing this. It's not intended to work with the markup you have, but
I'm curious as to why it wouldn't. Will update if I find the issue...

Paul.

Other related posts: