How to do variable (and function) highlighting for my own language?



  • In my language, I have variables which are either defined by dim or by prefixing it by @ (implicit variable definition).

    I want to add this syntax highlighting to Notepad++, but I think for the dim, I’m out of luck. But I tried with @, and it’s working, but it’s highlighting the whole line (for example @Var.$id highlights everything, except what I want is everything up to the first .). How could I do this?

    Example:

    @JobListObject = @Node.call("Instantiate", @jblistClass.$id, $self.$id);
    

    I want Notepad++ to highlight all of the following:

    • @JobListObject
    • @Node (without the .call)
    • @jblistClass (without the .$id)
    • $self
    • $id
    • call()

    Is there a way to do this?

    [I know if I switch to Perl language, it looks fine, but I want to define this myself so I can add specific language constructs as well as autocomplete]

    Thanks!



  • You could try adding “.” as an operator.


Log in to reply