From 47838a937250fc8b151010cbbde00881425df373 Mon Sep 17 00:00:00 2001 From: Anthony Rose Date: Fri, 8 Nov 2024 11:00:19 +0000 Subject: [PATCH] Handle Windows paths --- init.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 2c77f5f..e8366d9 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,11 @@ vim.cmd("runtime vimrc") -require'lspconfig'.powershell_es.setup{ - bundle_path = os.getenv("HOME") .. '/opt/PowerShellEditorServices', -} +if vim.fn.has('windows') then + require'lspconfig'.powershell_es.setup{ + bundle_path = os.getenv("LOCALAPPDATA") .. '\\PowerShellEditorServices', + } +else + require'lspconfig'.powershell_es.setup{ + bundle_path = os.getenv("HOME") .. '/opt/PowerShellEditorServices', + } +end