more nvim config
This commit is contained in:
parent
123fd7b129
commit
05b317d275
3 changed files with 67 additions and 29 deletions
|
@ -6,6 +6,15 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.programs.v.nvim;
|
cfg = config.programs.v.nvim;
|
||||||
|
nvim-nio = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "nvim-nio";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "nvim-neotest";
|
||||||
|
repo = "nvim-nio";
|
||||||
|
rev = "refs/tags/v1.8.0";
|
||||||
|
sha256 = "sha256-RFmH+683vrg4BELwtAQqjV8oGkvRgzcd6kd5r1s3Jp8=";
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
|
@ -103,15 +112,20 @@ with lib;
|
||||||
lua = true;
|
lua = true;
|
||||||
}
|
}
|
||||||
# Switch buffers
|
# Switch buffers
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>q";
|
||||||
|
action = ":bd<R>"; # Delete buffer
|
||||||
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>s";
|
key = "<leader>s";
|
||||||
action = ":bn<CR>";
|
action = ":bn<CR>"; # Buffer next
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>a";
|
key = "<leader>a";
|
||||||
action = ":bp<CR>";
|
action = ":bp<CR>"; # Buffer previous
|
||||||
}
|
}
|
||||||
# Change Indenting
|
# Change Indenting
|
||||||
{
|
{
|
||||||
|
@ -119,6 +133,11 @@ with lib;
|
||||||
key = "<S-Tab>";
|
key = "<S-Tab>";
|
||||||
action = "<<_";
|
action = "<<_";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<Tab>";
|
||||||
|
action = ">>_";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
mode = "v";
|
mode = "v";
|
||||||
key = "<Tab>";
|
key = "<Tab>";
|
||||||
|
@ -165,6 +184,7 @@ with lib;
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
FixCursorHold-nvim
|
FixCursorHold-nvim
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
|
nvim-nio
|
||||||
];
|
];
|
||||||
|
|
||||||
colorschemes.catppuccin = {
|
colorschemes.catppuccin = {
|
||||||
|
@ -194,14 +214,14 @@ with lib;
|
||||||
folder = "daily";
|
folder = "daily";
|
||||||
};
|
};
|
||||||
workspaces = [
|
workspaces = [
|
||||||
{
|
|
||||||
name = "notes";
|
|
||||||
path = "~/src/notes";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "uni";
|
name = "uni";
|
||||||
path = "~/cloud/Documents/CESE/notes";
|
path = "~/cloud/Documents/CESE/notes";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "notes";
|
||||||
|
path = "~/src/notes";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
completion = {
|
completion = {
|
||||||
min_chars = 2;
|
min_chars = 2;
|
||||||
|
@ -233,6 +253,7 @@ with lib;
|
||||||
progress = {
|
progress = {
|
||||||
ignoreDoneAlready = true;
|
ignoreDoneAlready = true;
|
||||||
ignore = [ "ltex" ];
|
ignore = [ "ltex" ];
|
||||||
|
display.doneTtl = 5;
|
||||||
};
|
};
|
||||||
notification = {
|
notification = {
|
||||||
overrideVimNotify = true;
|
overrideVimNotify = true;
|
||||||
|
@ -240,12 +261,15 @@ with lib;
|
||||||
};
|
};
|
||||||
neotest = {
|
neotest = {
|
||||||
enable = true;
|
enable = true;
|
||||||
adapters.plenary.enable = true;
|
adapters = {
|
||||||
adapters.rust = {
|
plenary.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
rust = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.args = [ "--no-capture" ];
|
settings.args = [ "--no-capture" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nixGrammars = true;
|
nixGrammars = true;
|
||||||
|
@ -334,7 +358,6 @@ with lib;
|
||||||
};
|
};
|
||||||
vimtex.enable = true;
|
vimtex.enable = true;
|
||||||
floaterm.enable = true;
|
floaterm.enable = true;
|
||||||
|
|
||||||
cmp = {
|
cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnableSources = true;
|
autoEnableSources = true;
|
||||||
|
|
|
@ -1,14 +1,28 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.programs.v.rust;
|
let
|
||||||
in {
|
cfg = config.programs.v.rust;
|
||||||
options.programs.v.rust = { enable = mkEnableOption "rust"; };
|
in
|
||||||
|
{
|
||||||
|
options.programs.v.rust.enable = mkEnableOption "rust";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [ rustup cargo-nextest cargo-msrv cargo-dist cargo-cross];
|
packages = with pkgs; [
|
||||||
|
rustup
|
||||||
|
cargo-binutils
|
||||||
|
cargo-nextest
|
||||||
|
cargo-msrv
|
||||||
|
cargo-dist
|
||||||
|
cargo-cross
|
||||||
|
];
|
||||||
|
|
||||||
file = {
|
file.".cargo/config.toml".text = ''
|
||||||
".cargo/config.toml".text = ''
|
|
||||||
[registries.crates-io]
|
[registries.crates-io]
|
||||||
protocol = "sparse"
|
protocol = "sparse"
|
||||||
|
|
||||||
|
@ -22,7 +36,6 @@ in {
|
||||||
[profile.rust-analyzer]
|
[profile.rust-analyzer]
|
||||||
inherits = "dev"
|
inherits = "dev"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
sessionPath = [ "$HOME/.cargo/bin" ];
|
sessionPath = [ "$HOME/.cargo/bin" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
devShells.default = channels.nixpkgs.mkShell {
|
devShells.default = channels.nixpkgs.mkShell {
|
||||||
name = "devShell";
|
name = "devShell";
|
||||||
VAULT_ADDR = "http://vault.olympus:8200/";
|
VAULT_ADDR = "http://vault.olympus:8200/";
|
||||||
|
FLAKE = "/home/vivian/src/infrastructure-new";
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
attic.packages.${system}.attic
|
attic.packages.${system}.attic
|
||||||
apply-local
|
apply-local
|
||||||
|
@ -144,6 +145,7 @@
|
||||||
yamllint
|
yamllint
|
||||||
jq
|
jq
|
||||||
fup-repl
|
fup-repl
|
||||||
|
nh
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue