From 241416b4c2456e5a4847ce0d48e6998892720ce2 Mon Sep 17 00:00:00 2001 From: Lucario387 Date: Fri, 3 Mar 2023 11:32:40 +0900 Subject: [PATCH] Use debug to get exact path to base46 (#163) --- lua/base46/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/base46/init.lua b/lua/base46/init.lua index 8b95bfd..ae7243c 100644 --- a/lua/base46/init.lua +++ b/lua/base46/init.lua @@ -1,6 +1,7 @@ local M = {} local g = vim.g local config = require("core.utils").load_config() +local base46_path = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h") M.get_theme_tb = function(type) local default_path = "base46.themes." .. g.nvchad_theme @@ -124,7 +125,7 @@ M.compile = function() end -- All integration modules, each file returns a table - local hl_files = vim.g.base46_custom_path or vim.fn.stdpath "data" .. "/lazy/base46/lua/base46/integrations" + local hl_files = base46_path .. "/integrations" for _, file in ipairs(vim.fn.readdir(hl_files)) do -- skip caching some files