reddit / emacs

Getting Omnisharp-roslyn to play nice

Gloriouspieps · 2022-04-30 13:52
Yep this is a baby question, apologies in advance. Started with Emacs only yesterday. Originally briefly used Neovim, later Vscode with Vim keybinds. Needless to say I'm now using **Doom Emacs**. I'm totally and utterly new to Doom Emacs, having read and watched nothing but the absolute basics. I've made a small to-do list (in Org mode, yes sir) for myself of things I need to prioritize setting up if I wish to use it as a text editor for work. In the Doom *init.el* file I've uncommented ":csharp" under languages. Synced and restarted Doom. I now get basic highlighting in cs files, but not much else. I don't know what else this does. My intuition was to assume it probably didn't install omnisharp, so I got the omnisharp-roslyn package from the AUR. Added it to my path. From here on out I'm not sure what to do. I know I probably need a lsp client, but not much else. Any help is appreciated.
Gloriouspieps · 2022-04-30 17:18
Initially I attempted to use Eglot, but despite seemingly connecting to Omnisharp just fine, it kept producing null pointer exceptions. Defeated, I took to the Doom Discord server and got explained Doom already sports a lsp module that needs to be uncommented in init. After having done so I added the +lsp flag to csharp, like "(csharp +lsp)". This did not find the installed omnisharp server, but could install it manually. Upon having done that it worked perfectly fine.