global/neovim: init

This commit is contained in:
Infinidoge 2024-05-05 00:56:07 -04:00
parent a3740a9a31
commit da6002b618
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
4 changed files with 169 additions and 1 deletions

91
flake.lock generated
View file

@ -180,6 +180,27 @@
"type": "github" "type": "github"
} }
}, },
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -313,6 +334,74 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"devshell": [
"devshell"
],
"flake-compat": [
"blank"
],
"flake-parts": [
"flake-parts"
],
"home-manager": [
"home-manager"
],
"nix-darwin": [
"blank"
],
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": [
"pre-commit-hooks"
]
},
"locked": {
"lastModified": 1714494971,
"narHash": "sha256-7RsTiRKMMrlwuert1QNFvnoPIwl1q1cepR4H8jv2iok=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "2483dff03dd326296278213a8e051d375b56d3df",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
"blank"
],
"flake-utils": [
"flake-utils"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714478972,
"narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "2849da033884f54822af194400f8dff435ada242",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"private": { "private": {
"locked": { "locked": {
"lastModified": 1706954352, "lastModified": 1706954352,
@ -345,6 +434,8 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"pre-commit-hooks": "pre-commit-hooks",
"private": "private", "private": "private",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"stable": "stable", "stable": "stable",

View file

@ -30,6 +30,9 @@
## Rust ## Rust
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
## Neovim
nixvim.url = "github:nix-community/nixvim";
### Cleanup ### ### Cleanup ###
## Follow nixpkgs ## Follow nixpkgs
agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.nixpkgs.follows = "nixpkgs";
@ -39,6 +42,7 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs"; nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
universe-cli.inputs.nixpkgs.follows = "nixpkgs"; universe-cli.inputs.nixpkgs.follows = "nixpkgs";
@ -47,6 +51,8 @@
agenix.inputs.darwin.follows = "blank"; agenix.inputs.darwin.follows = "blank";
nix-minecraft.inputs.flake-compat.follows = "blank"; nix-minecraft.inputs.flake-compat.follows = "blank";
nixos-wsl.inputs.flake-compat.follows = "blank"; nixos-wsl.inputs.flake-compat.follows = "blank";
nixvim.inputs.flake-compat.follows = "blank";
nixvim.inputs.nix-darwin.follows = "blank";
## Follow flake-utils ## Follow flake-utils
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
@ -64,6 +70,17 @@
## Misc ## Misc
agenix.inputs.home-manager.follows = "home-manager"; agenix.inputs.home-manager.follows = "home-manager";
nixvim.inputs.flake-parts.follows = "flake-parts";
nixvim.inputs.home-manager.follows = "home-manager";
nixvim.inputs.devshell.follows = "devshell";
nixvim.inputs.pre-commit-hooks.follows = "pre-commit-hooks";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs = {
flake-compat.follows = "blank";
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
universe-cli.inputs = { universe-cli.inputs = {
devshell.follows = "devshell"; devshell.follows = "devshell";
flake-parts.follows = "flake-parts"; flake-parts.follows = "flake-parts";
@ -136,6 +153,7 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
inputs.impermanence.nixosModules.home-manager.impermanence inputs.impermanence.nixosModules.home-manager.impermanence
inputs.nixvim.homeManagerModules.nixvim
] ++ (self.lib.leaves ./users/modules); ] ++ (self.lib.leaves ./users/modules);
}; };
} }

View file

@ -0,0 +1,60 @@
{ config, pkgs, lib, ... }:
{
programs.nixvim = {
enable = true;
defaultEditor = true;
opts = {
termguicolors = true;
number = true;
relativenumber = true;
ignorecase = true;
smartcase = true;
mouse = "a";
tabstop = 4;
shiftwidth = 4;
clipboard = "unnamedplus,unnamed";
directory = [
"~/.local/share/vim/swap//"
"."
];
};
globals = {
doom_one_cursor_coloring = true;
doom_one_terminal_colors = true;
doom_one_italic_comments = false;
doom_one_enable_treesitter = true;
};
colorscheme = "doom-one";
extraPlugins = with pkgs.vimPlugins; [
doom-one-nvim
];
globals.mapleader = "<space>";
autoCmd = [
{ event = [ "TermOpen" ]; command = "setlocal nonumber norelativenumber"; }
];
keymaps = [
{ key = "<C-w> n"; action = "<C-\\><C-n>"; mode = "t"; }
];
plugins = {
comment.enable = true;
direnv.enable = true;
gitsigns.enable = true;
# lsp.enable = true;
# nix.enable = true;
# nvim-autopairs.enable = true;
surround.enable = true;
todo-comments.enable = true;
treesitter-context.enable = false;
treesitter.enable = true;
ts-autotag.enable = true;
ts-context-commentstring.enable = true;
};
};
}

View file

@ -1,7 +1,6 @@
{ ... }: { { ... }: {
programs.vim = { programs.vim = {
enable = true; enable = true;
defaultEditor = true;
settings = { settings = {
background = "dark"; background = "dark";
directory = [ directory = [