From 40e91c0226cecdd9611d82964b6d00cd8d9f417a Mon Sep 17 00:00:00 2001 From: Segcolt <9hmbzr275@mozmail.com> Date: Sun, 10 Nov 2024 13:33:03 -0300 Subject: [PATCH] Fix astrolsp, again. Apparently now it returns a function? Well, whatever, it works now. --- lua/plugins/astrolsp.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index b633875..f1c8c31 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -57,7 +57,14 @@ return { "--query-driver=/usr/bin/*gcc", "--function-arg-placeholders=0", }, - root_dir = require("lspconfig.util").root_pattern(".git") or vim.fn.getcwd(), + root_dir = function(path) + local normal = require("lspconfig.util").root_pattern(".git")(vim.fn.getcwd()) + if normal then + return normal + else + return vim.fn.getcwd() + end + end, filetypes = { "cpp", "c" }, capabilities = { offsetEncoding = "utf-8",