emacs-csharp / csharp-mode

A major-mode for editing C# in emacs
GNU General Public License v3.0
155 stars 47 forks source link

Enumeration type explicitly specifying underlying type #237

Closed pbertin-oneex closed 1 year ago

pbertin-oneex commented 3 years ago

Hello there,

when specifying the underlying type of an enumeration type, only the type after the column is colored.

Code to test (could be added in the test-files/imenu-namespace-test.cs.

public enum MyEnum : byte
{

}

I would be pleased to propose a pull request but I have very short time trying to understand / learn Elisp. I am trying to read the code and make some tries in the regex to make it work.

If you can help me finding the way to fix it or some good documentation to learn Elisp oriented for code syntax purposes, I'll be able to help more on this repo (I am using C# with emacs all the day...) and the project is interesting and helpful. :)

theothornhill commented 3 years ago

Hello, and thanks for showing interest!

Before going further on advice, I just need to know whether you see this problem in the tree-sitter version or the cc-mode one. I think we need to fix both, but good to know where you see the issues first.

Could you try both snd report your findings?

pbertin-oneex commented 3 years ago

What I've tried so far is cc-mode (without tree-sitter).

In fact, copying pasting the code of the README into my .emacs shows an error like symbol's function definition is void: use-package so I didn't test with tree-sitter for now.

I'll try to keep installing it after work day and let you know. I'll also try to propose a patch if I can figure out the exact regex to be modified and how. :)

josteink commented 1 year ago

csharp-mode is now developed as part of core emacs.

If you still have any issues, file a bug-report with the GNU Emacs bug-tracker :)