On Thursday, November 10th, 2022 at 12:45, Theodor Thornhill via "Emacs development discussions." <emacs-devel@gnu.org> wrote: > > Hi all, > > See the attached patch for support for several C-like languages. > > They all support: > - Font locking > - Indentation (with styles for c/c++) > - Movement > - Imenu > - Which-func > > These modes are meant as a supplement to tree-sitter. > > I'm hopeful for some constructive criticism, and some testing. This > patch needs to be applied to the feature/tree-sitter branch, and should > hopefully be applied there before we merge the branch to master, well > before Emacs 29 is cut. > > I hope you like it, > > Theo Thanks Theo! I was actually just about to email you about this stuff. I will test drive the C and C++ stuff. A few comments: - (This one is for everyone) For lists of things (like keywords, etc.) and the font-lock rules, can we consider alphabetizing them (for the font-lock rules it would be by feature)? It would make them a lot easier to scan for what's there/not there and give them some order (and we could then be consistent everywhere). I am happy to send a patch for this. - I recently added some new font-lock faces for tree-sitter that you may wish to make use of: http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=feature/tree-sitter&id=e06953b02a0e7b26b33c511a22896d0db4e5d63d - I am happy to send a patch adding support for them. - For my C++ configuration, my treesit font lock rules has 2 queries: one for C and one for C++. The C one has all the usual C stuff, and the C++ one has ONLY C++-related things. Could we do something similar here? That would really reduce the duplication in the C++ file.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4