diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-01-25 13:45:36 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-25 13:45:36 -0800 |
| commit | 62b9ee353cf0dfdc13f5303bd3695245b8dc0a72 (patch) | |
| tree | 0e8f9d0f9701b2ad2bdde8e81754d89153f73140 | |
| parent | [docgen] Update CONFIG.md (diff) | |
| parent | omnisharp: update instructions for darwin/linux (diff) | |
| download | nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar.gz nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar.bz2 nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar.lz nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar.xz nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.tar.zst nvim-lspconfig-62b9ee353cf0dfdc13f5303bd3695245b8dc0a72.zip | |
Merge pull request #700 from mjlbach/update_omnisharp
omnisharp: update instructions for darwin/linux
| -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")]]; |
