Compare commits

...

1 commit

Author SHA1 Message Date
copilot-swe-agent[bot]
31bc081831
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>
2026-04-29 06:25:26 +00:00
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 {

View file

@ -18,8 +18,10 @@ final: prev: let
broom # Tidy model outputs
data_table # Fast data manipulation
janitor # Data cleaning helpers
knitr # Required by Quarto to execute R code chunks
languageserver # LSP for IDE support
reprex # Reproducible examples
rmarkdown # Required by Quarto for R-based rendering
styler # Code formatting
tidyverse # Data science ecosystem
]