113 lines
2.2 KiB
Nix
113 lines
2.2 KiB
Nix
{ config, pkgs, inputs, my-r,... }:
|
|
let
|
|
nvim-config-store = builtins.filterSource (path: type: baseNameOf path != "default.nix") ./.;
|
|
nvim-config-files = builtins.attrNames (builtins.readDir nvim-config-store);
|
|
nvim-config-lis = map (path: builtins.readFile "${nvim-config-store}/${path}") (nvim-config-files);
|
|
nvim-config = builtins.concatStringsSep "\n" nvim-config-lis;
|
|
|
|
in
|
|
{
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
nvim-treesitter.withAllGrammars
|
|
nvim-lspconfig
|
|
telescope-nvim
|
|
nvim-cmp
|
|
cmp-nvim-lsp
|
|
nvim-tree-lua
|
|
which-key-nvim
|
|
trouble-nvim
|
|
kanagawa-nvim
|
|
lazygit-nvim
|
|
quarto-nvim
|
|
otter-nvim
|
|
otter-nvim
|
|
image-nvim
|
|
molten-nvim
|
|
toggleterm-nvim
|
|
markdown-preview-nvim
|
|
lualine-nvim
|
|
gitsigns-nvim
|
|
indent-blankline-nvim
|
|
guess-indent-nvim
|
|
nvim-autopairs
|
|
catppuccin-nvim
|
|
];
|
|
|
|
extraLuaConfig = nvim-config;
|
|
|
|
|
|
extraPackages = with pkgs; [
|
|
#quarto
|
|
pyright
|
|
ripgrep
|
|
lua-language-server
|
|
rust-analyzer
|
|
lazygit
|
|
tectonic
|
|
imagemagick
|
|
jupyter
|
|
pnglatex
|
|
nil
|
|
nixfmt
|
|
|
|
rustc
|
|
cargo
|
|
rustfmt
|
|
clippy
|
|
rust-analyzer
|
|
];
|
|
|
|
extraLuaPackages = p: with p; [
|
|
magick
|
|
];
|
|
|
|
|
|
extraPython3Packages = ps: with ps; [
|
|
pynvim
|
|
jupyter-client
|
|
cairosvg
|
|
pnglatex
|
|
plotly
|
|
pyperclip
|
|
ipython
|
|
nbformat
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
xdg.dataFile."jupyter/kernels/ir-nix/kernel.json".text = ''
|
|
{
|
|
"argv": [
|
|
"${my-r.env}/bin/R",
|
|
"--slave",
|
|
"-e",
|
|
"IRkernel::main()",
|
|
"--args",
|
|
"{connection_file}"
|
|
],
|
|
"display_name": "R (nix)",
|
|
"language": "R"
|
|
}
|
|
'';
|
|
|
|
home.file.".Rprofile".text = ''
|
|
graphics::par(bg = "white")
|
|
options(
|
|
jupyter.rich_display = TRUE,
|
|
#jupyter.display_mimetypes = c("text/plain", "image/png", "text/latex"),
|
|
jupyter.display_mimetypes = c("text/plain", "image/png"),
|
|
jupyter.plot_mimetypes = "image/png"
|
|
)
|
|
'';
|
|
|
|
#sessionVariables = {
|
|
# EDITOR = "nvim";
|
|
# VISUAL = "nvim";
|
|
#};
|
|
}
|