tree-sitter-c
csharp-mode
| tree-sitter-c | csharp-mode | |
|---|---|---|
| 8 | 4 | |
| 328 | 158 | |
| 3.4% | 0.6% | |
| 5.7 | 0.0 | |
| 28 days ago | about 3 years ago | |
| JavaScript | Emacs Lisp | |
| MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tree-sitter-c
- Show HN: Globstar – Open-source static analysis toolkit
Supporting C / C++ is in our roadmap. It needs some additional work to handle preprocessor directives [1] [2], which is why we didn't focus on it for the initial release.
[1] https://github.com/tree-sitter/tree-sitter-c/issues/13
[2] https://github.com/tree-sitter/tree-sitter-c/issues/108
- How to Get Started with Tree-Sitter
- Emacs and Java Development: Corfu + Cape + LSP-Mode + Treesit
- GitHub code search is generally available
The feature isn't working well yet on C and C++. If I recall correctly it's based on Tree-Sitter[1] parsing, and there are still too many bugs in corresponding grammars - tree-sitter-c[2] and tree-sitter-cpp[3]. Hopefully, it will be greatly improved in the future as the share of the existing and newly written code in C and C++ is quite significant.
[1] https://tree-sitter.github.io/tree-sitter/
[2] https://github.com/tree-sitter/tree-sitter-c/issues
[3] https://github.com/tree-sitter/tree-sitter-cpp/issues
- Indent 8 spaces
[[language]] name = "c" scope = "source.c" injection-regex = "c" file-types = ["c"] # TODO: ["h"] roots = [] comment-token = "//" language-server = { command = "clangd" } indent = { tab-width = 8, unit = " " } [language.debugger] name = "lldb-vscode" transport = "stdio" command = "lldb-vscode" [[language.debugger.templates]] name = "binary" request = "launch" completion = [ { name = "binary", completion = "filename" } ] args = { console = "internalConsole", program = "{0}" } [[language.debugger.templates]] name = "attach" request = "attach" completion = [ "pid" ] args = { console = "internalConsole", pid = "{0}" } [[language.debugger.templates]] name = "gdbserver attach" request = "attach" completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ] args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] } [[grammar]] name = "c" source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "7175a6dd5fc1cee660dce6fe23f6043d75af424a" }
- Building tree-sitter languages for Emacs
- treesitter printf format highlighting?
There's no way to highlight format specs currently, since the treesitter C grammar doesn't specify them. You could open an issue on the tree-sitter-c repo.
- Tree-sitter: an incremental parsing system for programming tools
[1] https://github.com/tree-sitter/tree-sitter-c/issues/51
csharp-mode
- Error trying to load csharp mode -- weird interaction with R-mode???
csharp-mode is an installed package. Status: Installed in ‘csharp-mode-20210105.1950/’ (unsigned). Delete Version: 20210105.1950 Summary: C# mode derived mode Homepage: https://github.com/emacs-csharp/csharp-mode Keywords: c# languages oop mode Other versions: 0.11.0 (installed), 20211124.1105 (Melpa), 20200402.919 (melpa), 1.1.1 (Melpa Stable), 0.9.0 (marmalade).
- csharp-mode: A major-mode for editing C# in emacs
- Tree-sitter: an incremental parsing system for programming tools
Tooting my own horn, Emacs’ csharp-mode[1] is undergoing a rewrite to be 100% based on tree-sitter rather than regexps.
The new code runs way faster and is so much nicer to work with.
Once all the kinks are gone, I can’t imagine going back.
[1] https://github.com/emacs-csharp/csharp-mode/blob/master/csha...
- Csharpmode Adds Support For Treesitter
What are some alternatives?
tree-sitter-cpp - C++ grammar for tree-sitter
parser - A Ruby parser.
tree-sitter-rust - Rust grammar for tree-sitter
Moose - MOOSE - Platform for software and data analysis.
tree-sitter-kotlin - Kotlin grammar for Tree-sitter
moose - Multiphysics Object Oriented Simulation Environment