Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monodevelop code highlight - highlighting the method name in method declaration

In Monodevelop 4, when I select the Visual Studio color scheme, the names of methods in method declarations appear slightly purple. In the example below, it would be GetSomeString.

I do not want, however, to highlight usage of methods (in the example below, this would be GetOtherString() in this.GetOtherString().

The second, I can control with the Method(Semantic) parameter in the Monodevelop color scheme, however I found no way whatsoever to change the first one (although in the visual studio scheme it is slightly purple, while in the default scheme it is not, so it does change...)

public lass SomeClass
{
    protected string GetSomeString() {
        return this.GetOtherString() + "SomeString";
    }

    protected string GetOtherString() {
        return "Other";
    }
}
like image 414
tbkn23 Avatar asked Jul 27 '26 02:07

tbkn23


1 Answers

If you're using a built-in style, you'll have to make a copy of that style and edit the generated .xml file. I believe the lines you want are:

<Style name="keyword.semantic.method" color="#(hex color)" />
<Style name="keyword.semantic.method.declaration" color="#(hex color)" />

Modify those to your liking.

Alternatively, if you have Semantic Highlighting turned on, turning that off should also remove it (along with all other semantic highlighting, though)

The .xml file of your created style, at least on Windows, should be stored in C:\Users\(username)\AppData\Roaming\MonoDevelop-Unity-(version#)\HighlightingSchemes\

A quick google search should tell you where the mac equivalent is, if necessary.

like image 122
Trevor Avatar answered Jul 29 '26 18:07

Trevor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!