Init commit
This commit is contained in:
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Nixvim template
|
||||||
|
|
||||||
|
This template gives you a good starting point for configuring nixvim standalone.
|
||||||
|
|
||||||
|
## Configuring
|
||||||
|
|
||||||
|
To start configuring, just add or modify the nix files in `./config`.
|
||||||
|
If you add a new configuration file, remember to add it to the
|
||||||
|
[`config/default.nix`](./config/default.nix) file
|
||||||
|
|
||||||
|
## Testing your new configuration
|
||||||
|
|
||||||
|
To test your configuration simply run the following command
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run .
|
||||||
|
```
|
||||||
6
config/bufferline.nix
Normal file
6
config/bufferline.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
bufferline.enable = true;
|
||||||
|
web-devicons.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
config/cmp.nix
Normal file
13
config/cmp.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
settings.sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
45
config/config.nix
Normal file
45
config/config.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
colorschemes.catppuccin.enable = true;
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
};
|
||||||
|
opts = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
spell = true;
|
||||||
|
spellfile = "~/.config/nvim/spell/en.utf-8.add";
|
||||||
|
shiftwidth = 2;
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>s";
|
||||||
|
action = "[s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>S";
|
||||||
|
action = "]s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>z";
|
||||||
|
action = "z=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Z";
|
||||||
|
action = "1z=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>N";
|
||||||
|
action = ":bprev<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>n";
|
||||||
|
action = ":bnext<CR>";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
10
config/default.nix
Normal file
10
config/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./telescope.nix
|
||||||
|
./bufferline.nix
|
||||||
|
./treesitter.nix
|
||||||
|
./lsp.nix
|
||||||
|
./cmp.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
17
config/lsp.nix
Normal file
17
config/lsp.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installCargo = false;
|
||||||
|
installRustc = false;
|
||||||
|
};
|
||||||
|
nil_ls = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
config/telescope.nix
Normal file
10
config/telescope.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
"<leader>ff" = "find_files";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
config/treesitter.nix
Normal file
10
config/treesitter.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
ensure_installed = [ "rust" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
219
flake.lock
generated
Normal file
219
flake.lock
generated
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756770412,
|
||||||
|
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756770412,
|
||||||
|
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ixx": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754860581,
|
||||||
|
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.1.1",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758763312,
|
||||||
|
"narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e57b3b16ad8758fd681511a078f35c416a8cc939",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754788789,
|
||||||
|
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758701979,
|
||||||
|
"narHash": "sha256-c7DUti3XM1aga8oVgaPnrVmEeCFtN9PaBxyNuqx8jPc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e2642aa7d5a15eae586932a56f4294934f959c14",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758834902,
|
||||||
|
"narHash": "sha256-Pt7YS5qKMdh6gU0NP6+7qfe/TFlgjo2gnOSmF9fLQ9A=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "da7b983a29ffb8a390a4be7dfd643467c63543bf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758662783,
|
||||||
|
"narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixvim": "nixvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
47
flake.nix
Normal file
47
flake.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
description = "A nixvim configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixvim, flake-parts, ... }@inputs:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{ system, ... }:
|
||||||
|
let
|
||||||
|
nixvimLib = nixvim.lib.${system};
|
||||||
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
|
nixvimModule = {
|
||||||
|
inherit system; # or alternatively, set `pkgs`
|
||||||
|
module = import ./config; # import the module directly
|
||||||
|
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||||
|
extraSpecialArgs = {
|
||||||
|
# inherit (inputs) foo;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
# Run `nix flake check .` to verify that your config is not broken
|
||||||
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
# Lets you run `nix run .` to start nixvim
|
||||||
|
default = nvim;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user