fix: enable full Quarto support when R is activated

Agent-Logs-Url: https://github.com/dwinkler1/np/sessions/8f21e9a2-22be-44c9-aa37-bc4fd64b20a3

Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-29 06:25:26 +00:00 committed by GitHub
commit 31bc081831
Failed to generate hash of commit
2 changed files with 20 additions and 3 deletions

View file

@ -185,6 +185,10 @@
julia = config.enabledLanguages.julia;
python = config.enabledLanguages.python;
r = config.enabledLanguages.r;
# Enable markdown/quarto plugins whenever R is active so that
# .qmd buffers get proper syntax highlighting and chunk
# recognition via quarto-nvim and otter-nvim.
markdown = config.enabledLanguages.r;
project = true;
gitPlugins = config.enabledPackages.gitPlugins;
background = config.theme.background;
@ -202,11 +206,22 @@
# Development shell configuration
devShells = forSystems (system: let
pkgs = import nixpkgs {inherit system;};
# When R is enabled, build an overlaid pkgs that includes the R-enhanced
# quarto (with knitr and other R packages baked in via extraRPackages).
# This ensures `quarto render` from the terminal also works correctly.
rPkgs =
if config.enabledLanguages.r
then
import nixpkgs {
inherit system;
overlays = [rixOverlay rOverlay];
}
else pkgs;
# Language-specific packages that should be available in shell
languagePackages = with pkgs;
languagePackages =
[]
++ (if config.enabledLanguages.r then [quarto] else [])
++ (if config.enabledLanguages.python then [uv] else [])
++ (if config.enabledLanguages.r then [rPkgs.quarto] else [])
++ (if config.enabledLanguages.python then [pkgs.uv] else [])
++ (if config.enabledLanguages.julia then [] else []);
in {
default = pkgs.mkShell {