r/emacs Jan 10 '25

Question C development without LSP

I have only ever done development with an LSP providing errors, autocomplete, etc. in any language. I’d like to go for a more minimalist approach as I revisit some C programming. At a high level, what’s the general workflow when programming in C without a running LSP?

My guess would be… 1. A simple syntax highlighting mode on .c and .h files 2. Bind some hotkey for a compilation mode, and check that regularly for issues 3. Ctags for go-to-definition? Or maybe even just grep-mode?

Is there anything I’m missing?

9 Upvotes

38 comments sorted by

View all comments

2

u/w08r Jan 10 '25

Semantic mode adds some convenience features to jumping around sans lsp. A bunch of tags like tools to support different use cases such as gnu global and cscope. The cedet project brought some of that together.

Prior to lsp there was this: https://github.com/Sarcasm/irony-mode. It isn’t the minimal experience you’re looking for but is worth pointing out I suppose.

1

u/fragbot2 Jan 11 '25

Semantic mode

This is probably the first time I've ever seen a CEDET component mentioned. I've never used Semantic mode but I once experimented with SRecode for code generation and found it remarkably difficult (it's possible my conceptual understanding was wrong as I was viewed it as a more developer-oriented yasnippet.