mirror of
https://github.com/dwinkler1/np.git
synced 2026-05-22 21:23:31 -04:00
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:
parent
bc072038b0
commit
31bc081831
2 changed files with 20 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue