basic structure, colorschemes and astrocore
This commit is contained in:
commit
dc02604cdf
10 changed files with 390 additions and 0 deletions
16
config/colorscheme.nix
Normal file
16
config/colorscheme.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{lib,...}: {
|
||||||
|
colorscheme = lib.mkOverride 500 "kanagawa";
|
||||||
|
|
||||||
|
colorschemes = (builtins.listToAttrs
|
||||||
|
(map
|
||||||
|
(scheme: { name = scheme; value = {enable = true;};})
|
||||||
|
[
|
||||||
|
"tokyonight"
|
||||||
|
"nord"
|
||||||
|
"rose-pine"
|
||||||
|
"kanagawa"
|
||||||
|
"gruvbox"
|
||||||
|
"everforest"
|
||||||
|
])
|
||||||
|
);
|
||||||
|
}
|
||||||
3
config/core.nix
Normal file
3
config/core.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
enablePrintInit = true;
|
||||||
|
}
|
||||||
12
config/default.nix
Normal file
12
config/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, ...}: let
|
||||||
|
definitions = lib.attrNames (
|
||||||
|
lib.filterAttrs
|
||||||
|
(filename: kind:
|
||||||
|
filename != "default.nix"
|
||||||
|
&& (kind == "regular" || kind == "directory")
|
||||||
|
)
|
||||||
|
(builtins.readDir ./.)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
imports = map (file: import ./${file}) definitions;
|
||||||
|
}
|
||||||
23
default.nix
Normal file
23
default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
_:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./plugins
|
||||||
|
./config
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
globals.mapleader = " ";
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
clipboard = {
|
||||||
|
providers = {
|
||||||
|
xsel.enable = true;
|
||||||
|
wl-copy.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
register = "unnamedplus";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
217
flake.lock
generated
Normal file
217
flake.lock
generated
Normal file
|
|
@ -0,0 +1,217 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1762980239,
|
||||||
|
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"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": 1763618868,
|
||||||
|
"narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1763464769,
|
||||||
|
"narHash": "sha256-AJHrsT7VoeQzErpBRlLJM1SODcaayp0joAoEA35yiwM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6f374686605df381de8541c072038472a5ea2e2d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1763717236,
|
||||||
|
"narHash": "sha256-rJVRoLS+V1X7ge6qiaudG8OxYCiglF9puxm+i9cVPDo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "a635b5689484279ab552ad211ce318d6d0f7614b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1761730856,
|
||||||
|
"narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"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
|
||||||
|
}
|
||||||
38
flake.nix
Normal file
38
flake.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
description = "My nixvim configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, nixvim, flake-utils, ... }@inputs:
|
||||||
|
let
|
||||||
|
config = import ./config; # import the module directly
|
||||||
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
nixvimLib = nixvim.lib.${system};
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
|
nvim = nixvim'.makeNixvimWithModule {
|
||||||
|
inherit pkgs;
|
||||||
|
module = ./.;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
formatter = nixpkgs.legacyPackages.${system}.alejandra;
|
||||||
|
|
||||||
|
checks = {
|
||||||
|
default = nixvimLib.check.mkTestDerivationFromNvim {
|
||||||
|
inherit nvim;
|
||||||
|
name = "My nixvim configuration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
# Lets you run `nix run .` to start nixvim
|
||||||
|
default = nvim;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||||
|
});
|
||||||
|
}
|
||||||
38
plugins/astrocore.nix
Normal file
38
plugins/astrocore.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{pkgs, lib,...}: let
|
||||||
|
inherit lib.nixvim.lua.toLuaObject;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
features = {
|
||||||
|
large_buf = { size = 1024 * 256; lines = 10000 }; # set global limits for large files for disabling features like treesitter
|
||||||
|
autopairs = true; # enable autopairs at start
|
||||||
|
cmp = true; # enable completion at start
|
||||||
|
diagnostics = { virtual_text = true; virtual_lines = false }; # diagnostic settings on startup
|
||||||
|
highlighturl = true; # highlight URLs at start
|
||||||
|
notifications = true; # enable notifications at start
|
||||||
|
};
|
||||||
|
# Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true;
|
||||||
|
underline = true;
|
||||||
|
};
|
||||||
|
# passed to `vim.filetype.add`
|
||||||
|
# filetypes = {
|
||||||
|
# # see `:h vim.filetype.add` for usage
|
||||||
|
# extension = {
|
||||||
|
# foo = "fooscript";
|
||||||
|
# };
|
||||||
|
# filename = {
|
||||||
|
# [".foorc"] = "fooscript";
|
||||||
|
# };
|
||||||
|
# pattern = {
|
||||||
|
# [".*/etc/foo/.*"] = "fooscript";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
extraPlugins = [pkgs.vimPlugins.astrocore];
|
||||||
|
|
||||||
|
extraConfigLua = /*lua*/ ''
|
||||||
|
require('astrocore').setup(${toLuaObject options})
|
||||||
|
''
|
||||||
|
}
|
||||||
5
plugins/default.nix
Normal file
5
plugins/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./treesitter.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
19
plugins/treesitter.nix
Normal file
19
plugins/treesitter.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
nixGrammars = true;
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter-context = {
|
||||||
|
enable = true;
|
||||||
|
settings.max_lines = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# rainbow-delimiters.enable = true;
|
||||||
|
}
|
||||||
19
shell.nix
Normal file
19
shell.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
g++
|
||||||
|
gcc
|
||||||
|
|
||||||
|
python3
|
||||||
|
|
||||||
|
nodejs_24
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue