Highlight a function name in the line when it is defined -- user defined language

aj2000
2014-02-23
2014-03-01
  • aj2000

    aj2000 - 2014-02-23

    A function name will be highlighted when it is defined, by the embedded highlighting syntax, for example in python scripts using npp:
    def myFunc():
    ....
    myFunc above will be highlighted.
    Now I am trying to make a similar highlighting effect to my user-defined language but got stuck for days.
    Could anyone kindly let me know if it is possible at all?

    Thanks for the guidance!

     
  • cchris

    cchris - 2014-03-01

    Not possible in the current implemenation of UDLs, I don't know all of Loreia's plans for v3.0 .
    However, I thinnk thata Python (or otherwise) script could sacn your file and adjust a specific keyword category in userDefinedLang.xml with all your user-defined keywords, be them function names or anything else.
    I don't know whether a plugin could update the corresponding Scintilla property live by polling (well it could, but with what performance penalty?).

    CChris

     
  • Loreia2

    Loreia2 - 2014-03-01

    Hi,

    Chris thanks for replying, it looks like my gmail filtered aj2000's message.
    Anyway, this is not possible in UDL. I don't even know how to implement this. Maybe as a multi part keyword where second part can be anything, but each part would have a separate styler? Seems too complex for a generic highlighter.

    BR,
    Loreia

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks