diff options
| -rw-r--r-- | lua/lspconfig/omnisharp.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lua/lspconfig/omnisharp.lua b/lua/lspconfig/omnisharp.lua index 5f2f2c46..e163770c 100644 --- a/lua/lspconfig/omnisharp.lua +++ b/lua/lspconfig/omnisharp.lua @@ -19,11 +19,14 @@ OmniSharp server based on Roslyn workspaces `omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases). Omnisharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp). -**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of you unzipped . +Omnisharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. ```lua local pid = vim.fn.getpid() -local omnisharp_bin = "/path/to/omnisharp/OmniSharp" +-- On linux/darwin if using a release build, otherwise under scripts/OmniSharp(.Core)(.cmd) +local omnisharp_bin = "/path/to/omnisharp-repo/run" -- on Windows -- local omnisharp_bin = "/path/to/omnisharp/OmniSharp.exe" require'lspconfig'.omnisharp.setup{ @@ -31,6 +34,11 @@ require'lspconfig'.omnisharp.setup{ ... } ``` + +Note, if you download the executable for darwin you will need to strip the quarantine label to run: +```bash +find /path/to/omnisharp-osx | xargs xattr -r -d com.apple.quarantine +``` ]]; default_config = { root_dir = [[root_pattern(".csproj", ".sln")]]; |
