From 676c1fc9b5c0a7040290c6e268d8fafdfca830db Mon Sep 17 00:00:00 2001 From: Ren B <127970608+Ren-B-7@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:27:36 +0200 Subject: [PATCH] Update omnisharp.lua Add fdfind inline if statement --- lua/csharp/modules/lsp/omnisharp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/csharp/modules/lsp/omnisharp.lua b/lua/csharp/modules/lsp/omnisharp.lua index 053d946..aea47dd 100644 --- a/lua/csharp/modules/lsp/omnisharp.lua +++ b/lua/csharp/modules/lsp/omnisharp.lua @@ -9,8 +9,8 @@ local function get_root_dir(buffer) if file_name:sub(-#"csx") == "csx" then return file_name:match(".*/") end - - local root_dir = vim.fn.systemlist("fd -e sln . " .. vim.loop.cwd())[1] + + local root_dir = vim.fn.systemlist((vim.fn.executable("fdfind") == 1 and "fdfind" or "fd") .. " -e sln . " .. vim.loop.cwd())[1] if root_dir == nil then root_dir = vim.loop.cwd()