From 93499c5deb37641c6cf71528a93f101d186b409f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 13 Jul 2024 18:07:56 +0200 Subject: [PATCH] fix(config): check for lib64. Fixes #1343 --- .editorconfig | 12 ++++++++++++ lua/lazy/core/config.lua | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a9452c7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index ff178c1..ee3e38b 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -284,6 +284,9 @@ function M.setup(opts) M.me = debug.getinfo(1, "S").source:sub(2) M.me = Util.norm(vim.fn.fnamemodify(M.me, ":p:h:h:h:h")) + local lib = vim.fn.fnamemodify(vim.v.progpath, ":p:h:h") .. "/lib" + lib = vim.uv.fs_stat(lib .. "64") and (lib .. "64") or lib + lib = lib .. "/nvim" if M.options.performance.rtp.reset then ---@type vim.Option vim.opt.rtp = { @@ -291,7 +294,7 @@ function M.setup(opts) vim.fn.stdpath("data") .. "/site", M.me, vim.env.VIMRUNTIME, - vim.fn.fnamemodify(vim.v.progpath, ":p:h:h") .. "/lib/nvim", + lib, vim.fn.stdpath("config") .. "/after", } end