From af6d975129768cce36ac4c46198ab2b3ebaafad3 Mon Sep 17 00:00:00 2001 From: Daniel Winkler Date: Thu, 21 May 2026 21:15:50 +1000 Subject: [PATCH] make quarto load optional on r or markdown cat --- plugin/21_datascience.lua | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/plugin/21_datascience.lua b/plugin/21_datascience.lua index 70902ca..2e9f86c 100644 --- a/plugin/21_datascience.lua +++ b/plugin/21_datascience.lua @@ -71,7 +71,7 @@ end) now(function() vim.treesitter.language.register("markdown", { "quarto", "rmd" }) - if nix.get_cat({"r", "markdown"}, false) then + if nix.get_cat({ "r", "markdown" }, false) then vim.api.nvim_create_autocmd("FileType", { pattern = { "quarto" }, callback = function() @@ -92,22 +92,24 @@ now(function() end) later(function() - require("quarto").setup({ - lspFeatures = { - enabled = true, - chunks = "curly", - languages = { "r", "python", "julia" }, - diagnostics = { + if nix.get_cat({ "r", "markdown" }, false) then + require("quarto").setup({ + lspFeatures = { enabled = true, - triggers = { "BufWritePost" }, + chunks = "curly", + languages = { "r", "python", "julia" }, + diagnostics = { + enabled = true, + triggers = { "BufWritePost" }, + }, + completion = { + enabled = true, + }, }, - completion = { + codeRunner = { enabled = true, + default_method = "slime", }, - }, - codeRunner = { - enabled = true, - default_method = "slime", - }, - }) + }) + end end)