From 732587735a1a89642f64bce632d6631b7dc0dc67 Mon Sep 17 00:00:00 2001 From: S1M0N38 Date: Sun, 11 Feb 2024 15:01:45 +0100 Subject: [PATCH] fix(config): select only one lib when multiple are provided --- lua/love2d/config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/love2d/config.lua b/lua/love2d/config.lua index 4c6370b..aae49fc 100644 --- a/lua/love2d/config.lua +++ b/lua/love2d/config.lua @@ -33,9 +33,9 @@ end config.setup = function(opts) config.options = vim.tbl_deep_extend("force", {}, config.defaults, opts or {}) if config.options.path_to_love_library ~= "" then - local library_path = vim.fn.expand(config.options.path_to_love_library) + local library_path = vim.fn.split(vim.fn.expand(config.options.path_to_love_library), "\n")[1] if vim.fn.isdirectory(library_path) == 0 then - vim.notify("The library path does not exist.", vim.log.levels.ERROR) + vim.notify("The library path " .. library_path .. " does not exist.", vim.log.levels.ERROR) return end setup_lsp(library_path)