feat(nvim): setup for ipynb dev work
All checks were successful
/ check (push) Successful in 20s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 1s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 1s
/ build (nvim) (push) Successful in 1s
All checks were successful
/ check (push) Successful in 20s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 1s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 1s
/ build (nvim) (push) Successful in 1s
Setup: - molten (run python code) - otter (lsp in markdown codeblocks) - jupytext (convert .ipynb files to .md files transparently) - image (display images inside neovim (e.g. matplotlib graphs))
This commit is contained in:
parent
4f7479490e
commit
f30afe506b
4 changed files with 42 additions and 21 deletions
|
@ -1,24 +1,22 @@
|
||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
let
|
|
||||||
standalone = ../nvim/standalone.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
flake.overlays.nixvim = inputs.nixvim.overlays.default;
|
flake.overlays.nixvim = inputs.nixvim.overlays.default;
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, system, ... }:
|
{ pkgs, system, ... }:
|
||||||
{
|
let
|
||||||
# Check standalone nvim build
|
nixvimLib = inputs.nixvim.lib.${system};
|
||||||
checks.nvim = inputs.nixvim.lib.${system}.check.mkTestDerivationFromNixvimModule {
|
nixvim = inputs.nixvim.legacyPackages.${system};
|
||||||
|
module = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = ../nvim/standalone.nix;
|
module = ../nvim/standalone.nix;
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Check standalone nvim build
|
||||||
|
checks.nvim = nixvimLib.check.mkTestDerivationFromNixvimModule module;
|
||||||
|
|
||||||
# Nvim standalone module
|
# Nvim standalone module
|
||||||
packages.nvim = inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
packages.nvim = nixvim.makeNixvimWithModule module;
|
||||||
inherit pkgs;
|
|
||||||
module = standalone;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (helpers) mkRaw;
|
inherit (helpers) mkRaw enableExceptInTests;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config.plugins = {
|
config.plugins = {
|
||||||
|
@ -160,6 +160,15 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
gitsigns.enable = true;
|
gitsigns.enable = true;
|
||||||
|
image.enable = enableExceptInTests;
|
||||||
|
jupytext = {
|
||||||
|
enable = true;
|
||||||
|
settings.custom_language_formatting.python = {
|
||||||
|
extension = "md";
|
||||||
|
style = "markdown";
|
||||||
|
force_ft = "markdown";
|
||||||
|
};
|
||||||
|
};
|
||||||
lint = {
|
lint = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lintersByFt = {
|
lintersByFt = {
|
||||||
|
@ -210,6 +219,15 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.update_events = "TextChanged,TextChangedI";
|
settings.update_events = "TextChanged,TextChangedI";
|
||||||
};
|
};
|
||||||
|
molten = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
image_provider = "image.nvim";
|
||||||
|
virt_text_output = true;
|
||||||
|
molten_auto_open_output = false;
|
||||||
|
molten_virt_lines_off_by_1 = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
noice = {
|
noice = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lsp.override = {
|
lsp.override = {
|
||||||
|
@ -241,6 +259,7 @@ in
|
||||||
mode = "virtualtext";
|
mode = "virtualtext";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
otter.enable = true;
|
||||||
rustaceanvim = {
|
rustaceanvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Install through rustup
|
# Install through rustup
|
||||||
|
@ -256,6 +275,7 @@ in
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
indent.enable = true;
|
indent.enable = true;
|
||||||
incremental_election.enable = true;
|
incremental_election.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
pkgs.unstable.taplo
|
pkgs.unstable.taplo
|
||||||
pkgs.unstable.typos
|
pkgs.unstable.typos
|
||||||
pkgs.unstable.yamlfmt
|
pkgs.unstable.yamlfmt
|
||||||
|
(pkgs.unstable.python3.withPackages (p: [ p.jupytext ]))
|
||||||
];
|
];
|
||||||
extraConfigLuaPre =
|
extraConfigLuaPre =
|
||||||
# lua
|
# lua
|
||||||
|
|
|
@ -74,15 +74,17 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc = keysFromGithub;
|
environment.etc = keysFromGithub;
|
||||||
services.openssh.authorizedKeysFiles = builtins.map (path: "/etc/${path}") (
|
services = {
|
||||||
builtins.attrNames keysFromGithub
|
# Enable printer autodiscovery if printing is enabled
|
||||||
);
|
avahi = {
|
||||||
|
inherit (config.services.printing) enable;
|
||||||
# Enable printer autodiscovery if printing is enabled
|
nssmdns4 = true;
|
||||||
services.avahi = {
|
openFirewall = true;
|
||||||
inherit (config.services.printing) enable;
|
};
|
||||||
nssmdns4 = true;
|
openssh.authorizedKeysFiles = builtins.map (path: "/etc/${path}") (
|
||||||
openFirewall = true;
|
builtins.attrNames keysFromGithub
|
||||||
|
);
|
||||||
|
jupyter.enable = cfg.dev.enable;
|
||||||
};
|
};
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
# Open ports for spotifyd
|
# Open ports for spotifyd
|
||||||
|
|
Loading…
Reference in a new issue