summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2024-02-25 02:10:00 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2024-02-25 02:10:00 -0600
commit0c2bd6e8c1af8f8a0588b6acd80cb7f7c613a8e6 (patch)
tree0571b4a26186c0786c17a5bfa6e18fe9895ff675
parentc2da0102748883d9e60fa1a98a2b0658ac5cc211 (diff)
fix: windows path for lua libs
-rw-r--r--lua/plugins/lspconfig.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua
index 304bc5c..a2b1ee2 100644
--- a/lua/plugins/lspconfig.lua
+++ b/lua/plugins/lspconfig.lua
@@ -1,3 +1,15 @@
+local function get_lua_lib()
+ if vim.loop.os_uname().sysname == 'Linux' then
+ return {
+ vim.env.VIMRUNTIME,
+ os.getenv('HOME') .. '/.local/lib/lua',
+ }
+ end
+ return {
+ vim.env.VIMRUNTIME,
+ }
+end
+
local servers = {
clangd = {},
gopls = { -- just the key for the gopls config
@@ -30,11 +42,7 @@ local servers = {
telemetry = { enable = false },
workspace = {
checkThirdParty = false,
- library = {
- vim.env.VIMRUNTIME,
- -- need to check if there is a better directory
- os.getenv('HOME') .. '/.local/lib/lua',
- }
+ library = get_lua_lib(),
},
},
},