summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-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(),
},
},
},