From ddcc998f6e2c8173f6a2dfdc38ee5ef1fb4305cf Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Mon, 16 Dec 2024 20:48:33 +0100 Subject: [PATCH] Evade the crazy issue with failing a single comment indent test. It has to do with `.` appearing twice on the runtime path. So... avoid doing so when we're headless. --- scripts/minimal_init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/minimal_init.lua b/scripts/minimal_init.lua index d0449f30..232ad89e 100644 --- a/scripts/minimal_init.lua +++ b/scripts/minimal_init.lua @@ -6,7 +6,13 @@ local this_dir = vim.fs.dirname(debug.getinfo(1, 'S').source:sub(2)) local lean_nvim_dir = vim.fs.dirname(this_dir) local packpath = vim.fs.joinpath(lean_nvim_dir, 'packpath/*') vim.opt.runtimepath:append(packpath) -vim.opt.runtimepath:append(lean_nvim_dir) + +-- Doing this unconditionally seems to fail a random indent test?!?! +-- Inanis/Plenary will automatically set rtp+. (which seems wrong, but OK) +-- so really we need this just for `just nvim`... +if #vim.api.nvim_list_uis() ~= 0 then + vim.opt.runtimepath:append(lean_nvim_dir) +end vim.cmd [[ runtime! plugin/lspconfig.vim