-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(omnisharp): omnisharp does not start when local dotnet is availab…
…le for some reason, here we launch dll directly
- Loading branch information
1 parent
8c232cd
commit e4a7e6d
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
local M = {} | ||
|
||
---Get PATH executable, returns nil if not found | ||
---@param binary string | ||
---@return string | nil | ||
local path_executable = function(binary) | ||
M.path_executable = function(binary) | ||
local exe = vim.fn.exepath(binary) | ||
if exe == "" then | ||
return nil | ||
end | ||
return exe | ||
end | ||
|
||
local M = {} | ||
---Returns a full path to exec from PATH if found, | ||
---if not found, then returns the provided one | ||
---@param binname any | ||
---@param fullpath any | ||
---@return string | ||
M.from_path_or_default = function(binname, fullpath) | ||
return path_executable(binname) or fullpath | ||
return M.path_executable(binname) or fullpath | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters