No syntax highlighting or language server for C#

Godot Version

Godot Engine - .NET 4.4.1

Question

Hi everyone, I’m running into an issue on both windows and linux in C# scripts where I’m not getting any kind of syntax highlighting or language server suggestions or anything like I do with gdscript. I have .NET installed on both machines, and I even have my language server and highlighting working correctly in neovim, but the editor in Godot isn’t giving me anything.

Any ideas what could be going wrong? Is it better to edit C# scripts in a separate editor in Godot? If so, do I need to do anything special for my language server to give me suggestions for Godot’s C# API?

Yes, that’s kinda required and one of the reasons people tend to stick to GDScript instead. See here information about how to set up an IDE.

2 Likes

Use VS Code or JetBrains IDE.

I’ve not tried JetBrains myself, but VS Code is pretty easy to setup and is far more lightweight than using the full visual studio IDE.

3 Likes

Ah thanks for this I totally missed that blurb. I started to figure that was the case and I’m getting neovim set up for it. Do you know if Godot’s language server handles C#, or do I just rely on my roslyn language server?

Hey thanks, I appreciate that snippet, I totally missed that section somehow. I’m setting up neovim for it now. I’ve moved away from vscode and jetbrains. Hopefully I’ll be able to get it up and running tomorrow!

I can’t answer that, sorry, I don’t really use C# in Godot except for some rare specific cases, so my experience here is limited.

If anyone comes across this post, you do need to use a separate editor for c#, but your c# lsp whether it’s through a vscode extension or whatever should work fine with godot’s lsp.

I got neovim set up to work with godot and I have both the roslyn ls and godot as my gdscript ls active at the same time giving me autocomplete and hints and all those goodies.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.