Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
2ebdf4e6a3
|
|||
| b614474c26 | |||
|
512086bffe
|
|||
|
c74e84ab5f
|
|||
| de069c059c | |||
| c9ebcd6fdb | |||
| 68488e306b | |||
|
da66344b91
|
|||
|
1cb76a84df
|
|||
| d0011ce867 | |||
|
0e0e75eeb6
|
@@ -9,26 +9,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
|
||||||
ref: "main"
|
|
||||||
- name: Setup sudo (required for the next step)
|
- name: Setup sudo (required for the next step)
|
||||||
run: apt-get update && apt-get install -y sudo
|
run: apt-get update && apt-get install -y sudo
|
||||||
- name: Setup nix
|
- name: Setup nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: cachix/install-nix-action@v31
|
||||||
with:
|
with:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
github_access_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
github_access_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
nix_path: nixpkgs=channel:nixos-24.05
|
nix_path: nixpkgs=channel:nixos-25.05
|
||||||
- uses: cachix/cachix-action@v15
|
- uses: cachix/cachix-action@v16
|
||||||
with:
|
with:
|
||||||
name: palkx
|
name: palkx
|
||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
extraPullNames: nix-community
|
extraPullNames: nix-community
|
||||||
- name: Build nix flake
|
- name: Build nix flake
|
||||||
run: |
|
run: |
|
||||||
while true; do sleep 1; rm -rf /homeless-shelter; done &
|
nix build .
|
||||||
nix build
|
|
||||||
- name: Check nix flake
|
- name: Check nix flake
|
||||||
run: nix flake check --all-systems
|
run: nix flake check --all-systems
|
||||||
|
|||||||
0
.gitingore → .gitignore
vendored
0
.gitingore → .gitignore
vendored
2
cog.toml
Normal file
2
cog.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[commit_types]
|
||||||
|
version = { bump_patch = true, changelog_title = "Version" }
|
||||||
@@ -1,9 +1,32 @@
|
|||||||
{ pkgs }:
|
{
|
||||||
pkgs.stdenv.mkDerivation {
|
imports = [
|
||||||
name = "nvim-config";
|
./options.nix
|
||||||
src = ./src;
|
|
||||||
installPhase = ''
|
./modules/colorschemes/catppuccin.nix
|
||||||
mkdir -p $out/
|
|
||||||
cp -r . $out/
|
./modules/plugins/lsp
|
||||||
'';
|
|
||||||
|
./modules/plugins/airline.nix
|
||||||
|
./modules/plugins/blink-cmp.nix
|
||||||
|
./modules/plugins/bufferline.nix
|
||||||
|
./modules/plugins/conform-nvim.nix
|
||||||
|
./modules/plugins/fzf-lua.nix
|
||||||
|
./modules/plugins/gitsigns.nix
|
||||||
|
./modules/plugins/mini.nix
|
||||||
|
# ./modules/plugins/neotree.nix
|
||||||
|
./modules/plugins/oil.nix
|
||||||
|
./modules/plugins/snacks.nix
|
||||||
|
./modules/plugins/tmux-navigator.nix
|
||||||
|
./modules/plugins/treesitter.nix
|
||||||
|
./modules/plugins/undotree.nix
|
||||||
|
./modules/plugins/venv-selector.nix
|
||||||
|
./modules/plugins/which-key.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
performance.byteCompileLua.enable = true;
|
||||||
|
performance.byteCompileLua.configs = true;
|
||||||
|
performance.byteCompileLua.initLua = true;
|
||||||
|
performance.byteCompileLua.luaLib = true;
|
||||||
|
performance.byteCompileLua.nvimRuntime = true;
|
||||||
|
performance.byteCompileLua.plugins = true;
|
||||||
}
|
}
|
||||||
|
|||||||
14
config/modules/colorschemes/catppuccin.nix
Normal file
14
config/modules/colorschemes/catppuccin.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
colorschemes = {
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
flavour = "macchiato";
|
||||||
|
transparent_background = false;
|
||||||
|
dim_inactive = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
config/modules/plugins/airline.nix
Normal file
5
config/modules/plugins/airline.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.airline = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
28
config/modules/plugins/blink-cmp.nix
Normal file
28
config/modules/plugins/blink-cmp.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
plugins.blink-cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
completion = {
|
||||||
|
accept = {
|
||||||
|
auto_brackets = {
|
||||||
|
enabled = true;
|
||||||
|
semantic_token_resolution = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
signature = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
sources = {
|
||||||
|
default = [
|
||||||
|
"omni"
|
||||||
|
"lsp"
|
||||||
|
"buffer"
|
||||||
|
"path"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
46
config/modules/plugins/bufferline.nix
Normal file
46
config/modules/plugins/bufferline.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
plugins.bufferline.enable = true;
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<Tab>";
|
||||||
|
action = "<cmd>BufferLineCycleNext<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to next buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-Tab>";
|
||||||
|
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to previous buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-l>";
|
||||||
|
action = "<cmd>BufferLineCycleNext<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to next buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-h>";
|
||||||
|
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to previous buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bd";
|
||||||
|
action = "<cmd>bdelete<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
141
config/modules/plugins/conform-nvim.nix
Normal file
141
config/modules/plugins/conform-nvim.nix
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
extraConfigLuaPre =
|
||||||
|
# lua
|
||||||
|
''
|
||||||
|
local slow_format_filetypes = {}
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
|
if args.bang then
|
||||||
|
-- FormatDisable! will disable formatting just for this buffer
|
||||||
|
vim.b.disable_autoformat = true
|
||||||
|
else
|
||||||
|
vim.g.disable_autoformat = true
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
desc = "Disable autoformat-on-save",
|
||||||
|
bang = true,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
|
vim.b.disable_autoformat = false
|
||||||
|
vim.g.disable_autoformat = false
|
||||||
|
end, {
|
||||||
|
desc = "Re-enable autoformat-on-save",
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_user_command("FormatToggle", function(args)
|
||||||
|
local Snacks = require("Snacks");
|
||||||
|
if args.bang then
|
||||||
|
-- Toggle formatting for current buffer
|
||||||
|
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||||
|
Snacks.notify.notify("[Buffer] Autoformat enabled: " .. tostring(not vim.b.disable_autoformat))
|
||||||
|
else
|
||||||
|
-- Toggle formatting globally
|
||||||
|
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||||
|
Snacks.notify.notify("[Global] Autoformat enabled: " .. tostring(not vim.g.disable_autoformat))
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
desc = "Toggle autoformat-on-save",
|
||||||
|
bang = true,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
plugins.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
autoInstall.enable = true;
|
||||||
|
settings = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
html = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
css = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
javascript = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
javascriptreact = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
typescript = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
typescriptreact = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
python = [ "ruff_format" ];
|
||||||
|
lua = [ "stylua" ];
|
||||||
|
nix = [ "nixfmt-rfc-style" ];
|
||||||
|
markdown = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
yaml = {
|
||||||
|
__unkeyed-1 = "prettierd";
|
||||||
|
__unkeyed-2 = "prettier";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
terraform = [ "terraform_fmt" ];
|
||||||
|
bash = [
|
||||||
|
"shellcheck"
|
||||||
|
"shellharden"
|
||||||
|
"shfmt"
|
||||||
|
];
|
||||||
|
json = [ "jq" ];
|
||||||
|
go = [
|
||||||
|
"goimports"
|
||||||
|
"gofmt"
|
||||||
|
];
|
||||||
|
"_" = [ "trim_whitespace" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
formatters = {
|
||||||
|
terraform_fmt = {
|
||||||
|
command = "${lib.getExe (
|
||||||
|
pkgs.terraform.overrideAttrs (oldAttrs: {
|
||||||
|
meta = lib.recursiveUpdate oldAttrs.meta {
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
)}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uf";
|
||||||
|
action = "<cmd>FormatToggle<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Format (Global)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uF";
|
||||||
|
action = "<cmd>FormatToggle!<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Format (Buffer)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
5
config/modules/plugins/fzf-lua.nix
Normal file
5
config/modules/plugins/fzf-lua.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.fzf-lua = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
9
config/modules/plugins/gitsigns.nix
Normal file
9
config/modules/plugins/gitsigns.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
plugins.gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
current_line_blame = true;
|
||||||
|
current_line_blame_formatter = " <author>, <committer_time:%R> • <summary>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
3
config/modules/plugins/lazygit.nix
Normal file
3
config/modules/plugins/lazygit.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
plugins.lazygit.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/ansiblels.nix
Normal file
3
config/modules/plugins/lsp/ansiblels.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.ansiblels.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/bashls.nix
Normal file
3
config/modules/plugins/lsp/bashls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.bashls.enable = true;
|
||||||
|
}
|
||||||
24
config/modules/plugins/lsp/default.nix
Normal file
24
config/modules/plugins/lsp/default.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Default configurations for lsp servers
|
||||||
|
./lspconfig.nix
|
||||||
|
|
||||||
|
./ansiblels.nix
|
||||||
|
./bashls.nix
|
||||||
|
./docker_compose_language_server.nix
|
||||||
|
./dockerls.nix
|
||||||
|
./gopls.nix
|
||||||
|
./helm_ls.nix
|
||||||
|
./jdtls.nix
|
||||||
|
./jsonls.nix
|
||||||
|
./jsonnet_ls.nix
|
||||||
|
./just.nix
|
||||||
|
./lua_ls.nix
|
||||||
|
./marksman.nix
|
||||||
|
./nixd.nix
|
||||||
|
./pyright.nix
|
||||||
|
./tflint.nix
|
||||||
|
./yamlls.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.docker_compose_language_service.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/dockerls.nix
Normal file
3
config/modules/plugins/lsp/dockerls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.dockerls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/gopls.nix
Normal file
3
config/modules/plugins/lsp/gopls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.gopls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/helm_ls.nix
Normal file
3
config/modules/plugins/lsp/helm_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.helm_ls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/jdtls.nix
Normal file
3
config/modules/plugins/lsp/jdtls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.jdtls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/jsonls.nix
Normal file
3
config/modules/plugins/lsp/jsonls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.jsonls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/jsonnet_ls.nix
Normal file
3
config/modules/plugins/lsp/jsonnet_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.jsonnet_ls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/just.nix
Normal file
3
config/modules/plugins/lsp/just.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.just.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/lspconfig.nix
Normal file
3
config/modules/plugins/lsp/lspconfig.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
plugins.lspconfig.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/lua_ls.nix
Normal file
3
config/modules/plugins/lsp/lua_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.lua_ls.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/marksman.nix
Normal file
3
config/modules/plugins/lsp/marksman.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.marksman.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/nixd.nix
Normal file
3
config/modules/plugins/lsp/nixd.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.nixd.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/pyright.nix
Normal file
3
config/modules/plugins/lsp/pyright.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.pyright.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/tflint.nix
Normal file
3
config/modules/plugins/lsp/tflint.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.tflint.enable = true;
|
||||||
|
}
|
||||||
3
config/modules/plugins/lsp/yamlls.nix
Normal file
3
config/modules/plugins/lsp/yamlls.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
lsp.servers.yamlls.enable = true;
|
||||||
|
}
|
||||||
11
config/modules/plugins/mini.nix
Normal file
11
config/modules/plugins/mini.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
plugins.mini = {
|
||||||
|
enable = true;
|
||||||
|
mockDevIcons = true;
|
||||||
|
modules = {
|
||||||
|
icons = { };
|
||||||
|
comment = { };
|
||||||
|
diff = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
config/modules/plugins/neotree.nix
Normal file
32
config/modules/plugins/neotree.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
plugins.neo-tree = {
|
||||||
|
enable = true;
|
||||||
|
enableDiagnostics = true;
|
||||||
|
enableGitStatus = true;
|
||||||
|
enableModifiedMarkers = true;
|
||||||
|
enableRefreshOnWrite = true;
|
||||||
|
closeIfLastWindow = true;
|
||||||
|
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
|
||||||
|
buffers = {
|
||||||
|
bindToCwd = false;
|
||||||
|
followCurrentFile = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
width = 40;
|
||||||
|
height = 15;
|
||||||
|
autoExpandWidth = false;
|
||||||
|
mappings = {
|
||||||
|
"<space>" = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
action = "<cmd>Neotree toggle<CR>";
|
||||||
|
key = "<leader>e";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
28
config/modules/plugins/oil.nix
Normal file
28
config/modules/plugins/oil.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
plugins.oil = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
win_options = {
|
||||||
|
signcolumn = "yes:2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins.oil-git-status = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
show_ignored = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
action = "<cmd>Oil<CR>";
|
||||||
|
key = "<leader>o";
|
||||||
|
options = {
|
||||||
|
desc = "Open [O]il";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
499
config/modules/plugins/snacks.nix
Normal file
499
config/modules/plugins/snacks.nix
Normal file
@@ -0,0 +1,499 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
plugins.snacks = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
bigfile.enabled = true;
|
||||||
|
notifier.enabled = true;
|
||||||
|
quickfile.enabled = true;
|
||||||
|
statuscolumn.enabled = true;
|
||||||
|
words.enabled = true;
|
||||||
|
lazygit.enabled = true;
|
||||||
|
picker.enabled = true;
|
||||||
|
indent.enabled = true;
|
||||||
|
scope.enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPackages = [
|
||||||
|
pkgs.ripgrep
|
||||||
|
pkgs.fd
|
||||||
|
pkgs.lazygit
|
||||||
|
];
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader><space>";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.smart() end";
|
||||||
|
options = {
|
||||||
|
desc = "Smart Find Files";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>,";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.buffers() end";
|
||||||
|
options = {
|
||||||
|
desc = "Buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>/";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.grep() end";
|
||||||
|
options = {
|
||||||
|
desc = "Grep";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>:";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.command_history() end";
|
||||||
|
options = {
|
||||||
|
desc = "Command History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>n";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.notifications() end";
|
||||||
|
options = {
|
||||||
|
desc = "Notification History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>e";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.explorer() end";
|
||||||
|
options = {
|
||||||
|
desc = "File Explorer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fb";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.buffers() end";
|
||||||
|
options = {
|
||||||
|
desc = "Buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fc";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.files({ cwd = vim.fn.stdpath(\"config\") }) end";
|
||||||
|
options = {
|
||||||
|
desc = "Find Config File";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ff";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.files() end";
|
||||||
|
options = {
|
||||||
|
desc = "Find Files";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fg";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_files() end";
|
||||||
|
options = {
|
||||||
|
desc = "Find Git Files";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fp";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.projects() end";
|
||||||
|
options = {
|
||||||
|
desc = "Projects";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>fr";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.recent() end";
|
||||||
|
options = {
|
||||||
|
desc = "Recent";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gb";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_branches() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Branches";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gl";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Log";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gL";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log_line() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Log Line";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gs";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_status() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Status";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gS";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_stash() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Stash";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gd";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_diff() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Diff (Hunks)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gf";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log_file() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Log File";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sb";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lines() end";
|
||||||
|
options = {
|
||||||
|
desc = "Buffer Lines";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sB";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.grep_buffers() end";
|
||||||
|
options = {
|
||||||
|
desc = "Grep Open Buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sg";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.grep() end";
|
||||||
|
options = {
|
||||||
|
desc = "Grep";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sw";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.grep_word() end";
|
||||||
|
options = {
|
||||||
|
desc = "Visual selection or word";
|
||||||
|
};
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>s\"";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.registers() end";
|
||||||
|
options = {
|
||||||
|
desc = "Registers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>s/";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.search_history() end";
|
||||||
|
options = {
|
||||||
|
desc = "Search History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sa";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.autocmds() end";
|
||||||
|
options = {
|
||||||
|
desc = "Autocmds";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sb";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lines() end";
|
||||||
|
options = {
|
||||||
|
desc = "Buffer Lines";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sc";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.command_history() end";
|
||||||
|
options = {
|
||||||
|
desc = "Command History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sC";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.commands() end";
|
||||||
|
options = {
|
||||||
|
desc = "Commands";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sd";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.diagnostics() end";
|
||||||
|
options = {
|
||||||
|
desc = "Diagnostics";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sD";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.diagnostics_buffer() end";
|
||||||
|
options = {
|
||||||
|
desc = "Buffer Diagnostics";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sh";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.help() end";
|
||||||
|
options = {
|
||||||
|
desc = "Help Pages";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sH";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.highlights() end";
|
||||||
|
options = {
|
||||||
|
desc = "Highlights";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>si";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.icons() end";
|
||||||
|
options = {
|
||||||
|
desc = "Icons";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sj";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.jumps() end";
|
||||||
|
options = {
|
||||||
|
desc = "Jumps";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sk";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.keymaps() end";
|
||||||
|
options = {
|
||||||
|
desc = "Keymaps";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sl";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.loclist() end";
|
||||||
|
options = {
|
||||||
|
desc = "Location List";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sm";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.marks() end";
|
||||||
|
options = {
|
||||||
|
desc = "Marks";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sM";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.man() end";
|
||||||
|
options = {
|
||||||
|
desc = "Man Pages";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sp";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lazy() end";
|
||||||
|
options = {
|
||||||
|
desc = "Search for Plugin Spec";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sq";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.qflist() end";
|
||||||
|
options = {
|
||||||
|
desc = "Quickfix List";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sR";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.resume() end";
|
||||||
|
options = {
|
||||||
|
desc = "Resume";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>su";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.undo() end";
|
||||||
|
options = {
|
||||||
|
desc = "Undo History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>uC";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.colorschemes() end";
|
||||||
|
options = {
|
||||||
|
desc = "Colorschemes";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gd";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_definitions() end";
|
||||||
|
options = {
|
||||||
|
desc = "Goto Definition";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gD";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_declarations() end";
|
||||||
|
options = {
|
||||||
|
desc = "Goto Declaration";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gr";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_references() end";
|
||||||
|
options = {
|
||||||
|
desc = "References";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gI";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_implementations() end";
|
||||||
|
options = {
|
||||||
|
desc = "Goto Implementation";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gy";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_type_definitions() end";
|
||||||
|
options = {
|
||||||
|
desc = "Goto T[y]pe Definition";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gai";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_incoming_calls() end";
|
||||||
|
options = {
|
||||||
|
desc = "C[a]lls Incoming";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "gao";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_outgoing_calls() end";
|
||||||
|
options = {
|
||||||
|
desc = "C[a]lls Outgoing";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ss";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_symbols() end";
|
||||||
|
options = {
|
||||||
|
desc = "LSP Symbols";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sS";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_workspace_symbols() end";
|
||||||
|
options = {
|
||||||
|
desc = "LSP Workspace Symbols";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>z";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.zen() end";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Zen Mode";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>Z";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.zen.zoom() end";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Zoom";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>.";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.scratch() end";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Scratch Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>S";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.scratch.select() end";
|
||||||
|
options = {
|
||||||
|
desc = "Select Scratch Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>n";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.notifier.show_history() end";
|
||||||
|
options = {
|
||||||
|
desc = "Notification History";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>bd";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.bufdelete() end";
|
||||||
|
options = {
|
||||||
|
desc = "Delete Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>cR";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.rename.rename_file() end";
|
||||||
|
options = {
|
||||||
|
desc = "Rename File";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gB";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.gitbrowse() end";
|
||||||
|
options = {
|
||||||
|
desc = "Git Browse";
|
||||||
|
};
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>gg";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.lazygit() end";
|
||||||
|
options = {
|
||||||
|
desc = "Lazygit";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>un";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.notifier.hide() end";
|
||||||
|
options = {
|
||||||
|
desc = "Dismiss All Notifications";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<c-/>";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.terminal() end";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Terminal";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<c-_>";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.terminal() end";
|
||||||
|
options = {
|
||||||
|
desc = "which_key_ignore";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "]]";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.words.jump(vim.v.count1) end";
|
||||||
|
options = {
|
||||||
|
desc = "Next Reference";
|
||||||
|
};
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "[[";
|
||||||
|
action = lib.nixvim.mkRaw "function() Snacks.words.jump(-vim.v.count1) end";
|
||||||
|
options = {
|
||||||
|
desc = "Prev Reference";
|
||||||
|
};
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
3
config/modules/plugins/tmux-navigator.nix
Normal file
3
config/modules/plugins/tmux-navigator.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
plugins.tmux-navigator.enable = true;
|
||||||
|
}
|
||||||
37
config/modules/plugins/treesitter.nix
Normal file
37
config/modules/plugins/treesitter.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
indent = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
highlight = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixvimInjections = true;
|
||||||
|
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter-context = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter-textobjects = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
select = {
|
||||||
|
enable = true;
|
||||||
|
lookahead = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfigLua = ''
|
||||||
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
|
'';
|
||||||
|
}
|
||||||
14
config/modules/plugins/undotree.nix
Normal file
14
config/modules/plugins/undotree.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
plugins.undotree.enable = true;
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ut";
|
||||||
|
action = "<cmd>UndotreeToggle<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Undotree";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
26
config/modules/plugins/venv-selector.nix
Normal file
26
config/modules/plugins/venv-selector.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
plugins.venv-selector = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
dap_enabled = true;
|
||||||
|
name = [
|
||||||
|
"venv"
|
||||||
|
".venv"
|
||||||
|
];
|
||||||
|
pyenv_path = lib.nixvim.mkRaw "vim.fn.expand('$HOME/.pyenv/versions')";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cv";
|
||||||
|
action = "<cmd>VenvSelect<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Select Python virtual env";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
5
config/modules/plugins/which-key.nix
Normal file
5
config/modules/plugins/which-key.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.which-key = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
115
config/options.nix
Normal file
115
config/options.nix
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
globalOpts = {
|
||||||
|
# Line numbers
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
|
||||||
|
# Enable more colors (24-bit)
|
||||||
|
termguicolors = true;
|
||||||
|
|
||||||
|
# Have a better completion experience
|
||||||
|
completeopt = [
|
||||||
|
"menuone"
|
||||||
|
"noselect"
|
||||||
|
"noinsert"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Always show the signcolumn, otherwise text would be shifted when displaying error icons
|
||||||
|
signcolumn = "yes:3";
|
||||||
|
|
||||||
|
# Enable mouse
|
||||||
|
mouse = "a";
|
||||||
|
|
||||||
|
# Search
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
|
||||||
|
# Configure how new splits should be opened
|
||||||
|
splitright = true;
|
||||||
|
splitbelow = true;
|
||||||
|
|
||||||
|
list = true;
|
||||||
|
# NOTE: .__raw here means that this field is raw lua code
|
||||||
|
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||||||
|
|
||||||
|
expandtab = true;
|
||||||
|
tabstop = 2;
|
||||||
|
shiftwidth = 2;
|
||||||
|
softtabstop = 0;
|
||||||
|
smarttab = true;
|
||||||
|
|
||||||
|
# Set encoding
|
||||||
|
encoding = "utf-8";
|
||||||
|
fileencoding = "utf-8";
|
||||||
|
|
||||||
|
# Save undo history
|
||||||
|
undofile = true;
|
||||||
|
swapfile = true;
|
||||||
|
backup = false;
|
||||||
|
autoread = true;
|
||||||
|
|
||||||
|
# Highlight the current line for cursor
|
||||||
|
cursorline = true;
|
||||||
|
|
||||||
|
# Show line and column when searching
|
||||||
|
ruler = true;
|
||||||
|
|
||||||
|
# Global substitution by default
|
||||||
|
gdefault = true;
|
||||||
|
|
||||||
|
# Start scrolling when the cursor is X lines away from the top/bottom
|
||||||
|
scrolloff = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
diagnostic.settings = {
|
||||||
|
update_in_insert = true;
|
||||||
|
severity_sort = true;
|
||||||
|
float = {
|
||||||
|
border = "rounded";
|
||||||
|
};
|
||||||
|
jump = {
|
||||||
|
severity.__raw = "vim.diagnostic.severity.WARN";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# userCommands = {
|
||||||
|
# Q.command = "q";
|
||||||
|
# Q.bang = true;
|
||||||
|
# Wq.command = "q";
|
||||||
|
# Wq.bang = true;
|
||||||
|
# WQ.command = "q";
|
||||||
|
# WQ.bang = true;
|
||||||
|
# W.command = "q";
|
||||||
|
# W.bang = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
globals.mapleader = ",";
|
||||||
|
|
||||||
|
# autoCmd = [
|
||||||
|
# {
|
||||||
|
# event = [ "VimEnter" ];
|
||||||
|
# callback = {
|
||||||
|
# __raw = "function() if vim.fn.argv(0) == '' then require('telescope.builtin').find_files() end end";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# event = [ "VimEnter" ];
|
||||||
|
# command = "set relativenumber";
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
#autoCmd = [
|
||||||
|
# {
|
||||||
|
# event = [ "BufEnter" "BufWinEnter" ];
|
||||||
|
# pattern = [ "*.md" "*.mdx" ];
|
||||||
|
# command = "MarkdownPreviewToggle";
|
||||||
|
# }
|
||||||
|
#];
|
||||||
|
|
||||||
|
# highlight = {
|
||||||
|
# Comment.fg = "#ff00ff";
|
||||||
|
# Comment.bg = "#000000";
|
||||||
|
# Comment.underline = true;
|
||||||
|
# Comment.bold = true;
|
||||||
|
# };
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
/tmp/lazyvim-lazygit/config.yml
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/tmp/lazyvim-lazygit/state.yml
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"neodev": {
|
|
||||||
"library": {
|
|
||||||
"enabled": true,
|
|
||||||
"plugins": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neoconf": {
|
|
||||||
"plugins": {
|
|
||||||
"lua_ls": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
-- Configure symlinks needed by LazyVim
|
|
||||||
vim.fn.system({ "mkdir", "-p", os.getenv("HOME") .. "/.config/lazyvim/nvim" })
|
|
||||||
vim.fn.system({ "mkdir", "-p", os.getenv("HOME") .. "/.config/lazyvim/lazygit" })
|
|
||||||
vim.fn.system({ "ln", "-sfT", os.getenv("HOME") .. "/.config/lazyvim/nvim", "/tmp/lazyvim-nvim" })
|
|
||||||
vim.fn.system({ "ln", "-sfT", os.getenv("HOME") .. "/.config/lazyvim/lazygit", "/tmp/lazyvim-lazygit" })
|
|
||||||
|
|
||||||
-- Load lazyvim
|
|
||||||
require("config.lazy")
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/tmp/lazyvim-nvim/lazy-lock.json
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/tmp/lazyvim-nvim/lazyvim.json
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
|
||||||
-- Add any additional autocmds here
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
-- Keymaps are automatically loaded on the VeryLazy event
|
|
||||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
|
||||||
-- Add any additional keymaps here
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
-- bootstrap lazy.nvim
|
|
||||||
-- stylua: ignore
|
|
||||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
|
|
||||||
lazypath })
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- add LazyVim and import its plugins
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
|
||||||
-- Blink currently not supported by all extras 2024-11-19 11:08
|
|
||||||
-- { import = "lazyvim.plugins.extras.coding.blink" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.illuminate" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.outline" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
|
||||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.ansible" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.git" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.helm" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.nix" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.scala" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.sql" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.terraform" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
|
||||||
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
|
||||||
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
|
|
||||||
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
|
|
||||||
{ import = "plugins.catppuccin" },
|
|
||||||
{ import = "plugins.lang.shell" },
|
|
||||||
{ import = "plugins.misc.tmux-navigator" },
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
|
||||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
|
||||||
lazy = false,
|
|
||||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
|
||||||
-- have outdated releases, which may break your Neovim install.
|
|
||||||
version = nil, -- always use the latest git commit
|
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
|
||||||
},
|
|
||||||
install = { colorscheme = { "catppuccin-macchiato" } },
|
|
||||||
checker = { enabled = true, frequency = 60 * 60 * 24 }, -- automatically check for plugin updates once per day
|
|
||||||
performance = {
|
|
||||||
cache = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
-- Options are automatically loaded before lazy.nvim startup
|
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
|
||||||
-- Add any additional options here
|
|
||||||
vim.g.mapleader = ","
|
|
||||||
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = false
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
return {
|
|
||||||
"catppuccin/nvim",
|
|
||||||
lazy = true,
|
|
||||||
name = "catppuccin",
|
|
||||||
opts = {
|
|
||||||
flavour = "macchiato",
|
|
||||||
transparent_background = false,
|
|
||||||
integrations = {
|
|
||||||
aerial = true,
|
|
||||||
alpha = true,
|
|
||||||
cmp = true,
|
|
||||||
dashboard = true,
|
|
||||||
flash = true,
|
|
||||||
grug_far = true,
|
|
||||||
gitsigns = true,
|
|
||||||
headlines = true,
|
|
||||||
illuminate = true,
|
|
||||||
indent_blankline = { enabled = true },
|
|
||||||
leap = true,
|
|
||||||
lsp_trouble = true,
|
|
||||||
mason = true,
|
|
||||||
markdown = true,
|
|
||||||
mini = true,
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
underlines = {
|
|
||||||
errors = { "undercurl" },
|
|
||||||
hints = { "undercurl" },
|
|
||||||
warnings = { "undercurl" },
|
|
||||||
information = { "undercurl" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
navic = { enabled = true, custom_bg = "lualine" },
|
|
||||||
neotest = true,
|
|
||||||
neotree = true,
|
|
||||||
noice = true,
|
|
||||||
notify = true,
|
|
||||||
semantic_tokens = true,
|
|
||||||
telescope = true,
|
|
||||||
treesitter = true,
|
|
||||||
treesitter_context = true,
|
|
||||||
which_key = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
specs = {
|
|
||||||
{
|
|
||||||
"akinsho/bufferline.nvim",
|
|
||||||
optional = true,
|
|
||||||
opts = function(_, opts)
|
|
||||||
if (vim.g.colors_name or ""):find("catppuccin") then
|
|
||||||
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "catppuccin-macchiato",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
optional = true,
|
|
||||||
opts = {
|
|
||||||
formatters_by_ft = {
|
|
||||||
["nix"] = { "alejandra" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = {
|
|
||||||
servers = {
|
|
||||||
nixd = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = function(_, opts)
|
|
||||||
if type(opts.ensure_installed) == "table" then
|
|
||||||
vim.list_extend(opts.ensure_installed, {
|
|
||||||
"nix",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimtools/none-ls.nvim",
|
|
||||||
optional = true,
|
|
||||||
opts = function(_, opts)
|
|
||||||
local null_ls = require("null-ls")
|
|
||||||
opts.sources = vim.list_extend(opts.sources or {}, {
|
|
||||||
null_ls.builtins.code_actions.statix,
|
|
||||||
null_ls.builtins.diagnostics.statix,
|
|
||||||
null_ls.builtins.formatting.alejandra,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.ensure_installed = opts.ensure_installed or {}
|
|
||||||
vim.list_extend(opts.ensure_installed, {
|
|
||||||
"shfmt",
|
|
||||||
"shellcheck",
|
|
||||||
"bash-language-server",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
event = { "BufWritePre" },
|
|
||||||
cmd = { "ConformInfo" },
|
|
||||||
opts = {
|
|
||||||
formatters_by_ft = {
|
|
||||||
["sh"] = { "shfmt" },
|
|
||||||
["command"] = { "shfmt" },
|
|
||||||
},
|
|
||||||
formatters = {
|
|
||||||
shfmt = {
|
|
||||||
prepend_args = { "-i", "2", "-ci" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = {
|
|
||||||
servers = {
|
|
||||||
bashls = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = function(_, opts)
|
|
||||||
if type(opts.ensure_installed) == "table" then
|
|
||||||
vim.list_extend(opts.ensure_installed, {
|
|
||||||
"bash",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Disable certain features if file is big
|
|
||||||
{
|
|
||||||
"LunarVim/bigfile.nvim",
|
|
||||||
opts = {
|
|
||||||
filesize = 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
"christoomey/vim-tmux-navigator",
|
|
||||||
cmd = {
|
|
||||||
"TmuxNavigateLeft",
|
|
||||||
"TmuxNavigateDown",
|
|
||||||
"TmuxNavigateUp",
|
|
||||||
"TmuxNavigateRight",
|
|
||||||
"TmuxNavigatePrevious",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
|
||||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
|
||||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
|
||||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
|
||||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "make",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = {
|
|
||||||
".git/",
|
|
||||||
"^node_modules/",
|
|
||||||
".cache",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
live_grep = {
|
|
||||||
additional_args = { "-L" },
|
|
||||||
},
|
|
||||||
grep_string = {
|
|
||||||
additional_args = { "-L" },
|
|
||||||
},
|
|
||||||
find_files = {
|
|
||||||
hidden = true,
|
|
||||||
follow = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/tokyonight.nvim",
|
|
||||||
opts = {
|
|
||||||
transparent = true,
|
|
||||||
styles = {
|
|
||||||
sidebars = "transparent",
|
|
||||||
floats = "transparent",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"chrisbra/Colorizer",
|
|
||||||
keys = {
|
|
||||||
{ "<leader>uR", "<cmd>ColorToggle<cr>", desc = "Toggle Colorizer" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"mbbill/undotree",
|
|
||||||
keys = {
|
|
||||||
{ "<leader>u", "<cmd> UndotreeToggle <CR>", desc = "Toggle undotree", mode = { "n" } },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
column_width = 120
|
|
||||||
302
flake.lock
generated
302
flake.lock
generated
@@ -1,50 +1,15 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733328505,
|
|
||||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1763759067,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -56,22 +21,22 @@
|
|||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"neovim-nightly-overlay",
|
"nixvim",
|
||||||
"hercules-ci-effects",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1763759067,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "flake-parts",
|
"owner": "hercules-ci",
|
||||||
"type": "indirect"
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
@@ -92,140 +57,132 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"git-hooks": {
|
"ixx": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-utils": [
|
||||||
"gitignore": "gitignore",
|
"nixvim",
|
||||||
"nixpkgs": [
|
"nuschtosSearch",
|
||||||
"neovim-nightly-overlay",
|
"flake-utils"
|
||||||
"nixpkgs"
|
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": [
|
"nixpkgs": [
|
||||||
"neovim-nightly-overlay",
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734797603,
|
"lastModified": 1754860581,
|
||||||
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
|
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||||
"owner": "cachix",
|
"owner": "NuschtOS",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "ixx",
|
||||||
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
|
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "cachix",
|
"owner": "NuschtOS",
|
||||||
"repo": "git-hooks.nix",
|
"ref": "v0.1.1",
|
||||||
"type": "github"
|
"repo": "ixx",
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"git-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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hercules-ci-effects": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733333617,
|
|
||||||
"narHash": "sha256-nMMQXREGvLOLvUa0ByhYFdaL0Jov0t1wzLbKjr05P2w=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "hercules-ci-effects",
|
|
||||||
"rev": "56f8ea8d502c87cf62444bec4ee04512e8ea24ea",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "hercules-ci-effects",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neovim-nightly-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"git-hooks": "git-hooks",
|
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
|
||||||
"neovim-src": "neovim-src",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735172062,
|
|
||||||
"narHash": "sha256-Ru+5fwMqXEoc6G1PbuTppAzxtqvj0322cBAWCb0Yhbo=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "neovim-nightly-overlay",
|
|
||||||
"rev": "d05e1d754812bcd89925d845992f377faf6c4944",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "neovim-nightly-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neovim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735157560,
|
|
||||||
"narHash": "sha256-ndlWdGm61W3uObi8cowWqnPdJwq2FsH4GHGOQYeNSOM=",
|
|
||||||
"owner": "neovim",
|
|
||||||
"repo": "neovim",
|
|
||||||
"rev": "487c48ec8689b865bad04fdb87b61f5ada25da97",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "neovim",
|
|
||||||
"repo": "neovim",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734991663,
|
"lastModified": 1764522689,
|
||||||
"narHash": "sha256-8T660guvdaOD+2/Cj970bWlQwAyZLKrrbkhYOFcY1YE=",
|
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6c90912761c43e22b6fb000025ab96dd31c971ff",
|
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1761765539,
|
||||||
|
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764338033,
|
||||||
|
"narHash": "sha256-1LNGcU+aTbATD3BPCf7U1KsP1CjCH+ZWqM6JH0sZ6Q0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ba9b83e5fb4b552a423d24dabe5ccb47a9c89901",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764614282,
|
||||||
|
"narHash": "sha256-oHT1/E5yf9lvOVHtO5joevADcQLGp5mVab5shVVqxso=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "6bdabc1359d7658e1d9ce065db37df92e904b581",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-parts": "flake-parts",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixvim": "nixvim",
|
||||||
|
"systems": "systems_3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
@@ -243,24 +200,33 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"treefmt-nix": {
|
"systems_2": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735135567,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
"owner": "numtide",
|
"owner": "nix-systems",
|
||||||
"repo": "treefmt-nix",
|
"repo": "default",
|
||||||
"rev": "9e09d30a644c57257715902efbb3adc56c79cf28",
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "nix-systems",
|
||||||
"repo": "treefmt-nix",
|
"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"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
93
flake.nix
93
flake.nix
@@ -1,59 +1,54 @@
|
|||||||
{
|
{
|
||||||
description = "NVIM Configuration";
|
description = "Neovim configuration, declaratively written using nix";
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
neovim-nightly-overlay = {
|
|
||||||
url = "github:nix-community/neovim-nightly-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixConfig = {
|
inputs = {
|
||||||
trusted-substituters = [
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://palkx.cachix.org"
|
nixvim.url = "github:nix-community/nixvim/nixos-25.11";
|
||||||
];
|
|
||||||
extra-trusted-public-keys = [
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"palkx.cachix.org-1:qaQoL5CXpGzUbqsIvxUEL7wUhoIrjV0Q8M4HbJ8/8S4="
|
systems.url = "github:nix-systems/default";
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
{
|
||||||
nixpkgs,
|
nixvim,
|
||||||
flake-utils,
|
flake-parts,
|
||||||
neovim-nightly-overlay,
|
|
||||||
...
|
...
|
||||||
}:
|
}@inputs:
|
||||||
flake-utils.lib.eachDefaultSystem (
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
system:
|
systems = import inputs.systems;
|
||||||
let
|
|
||||||
overlayFlakeInputs = prev: final: {
|
|
||||||
neovim = neovim-nightly-overlay.packages.${system}.default.overrideAttrs (oa: {
|
|
||||||
nativeBuildInputs = oa.nativeBuildInputs ++ [ final.libtermkey ];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
overlayLazyVim = prev: final: { lazyVim = import ./packages/lazyVim.nix { pkgs = final; }; };
|
perSystem =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
nixvimLib = nixvim.lib.${system};
|
||||||
|
nixvimPkgs = nixvim.legacyPackages.${system};
|
||||||
|
nixvimModule = {
|
||||||
|
inherit 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 = nixvimPkgs.makeNixvimWithModule nixvimModule;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
# Run `nix flake check .` to verify that your config is not broken
|
||||||
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||||
|
};
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
packages = {
|
||||||
inherit system;
|
# Lets you run `nix run .` to start nixvim
|
||||||
overlays = [
|
default = nvim;
|
||||||
overlayFlakeInputs
|
};
|
||||||
overlayLazyVim
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
in
|
};
|
||||||
rec {
|
|
||||||
packages.lazyVim = pkgs.lazyVim;
|
|
||||||
apps.lazyVim = {
|
|
||||||
type = "app";
|
|
||||||
program = "${packages.default}/bin/nvim";
|
|
||||||
};
|
|
||||||
packages.default = packages.lazyVim;
|
|
||||||
apps.default = apps.lazyVim;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
let
|
|
||||||
config = import ../config { inherit pkgs; };
|
|
||||||
runtimeDeps = import ../runtimeDeps.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
pkgs.wrapNeovim pkgs.neovim {
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
withNodeJs = true;
|
|
||||||
withPython3 = true;
|
|
||||||
withRuby = false;
|
|
||||||
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps.dependencies}" --set XDG_CONFIG_HOME "${config}"'';
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
"extends": ["local>local/renovate"],
|
|
||||||
"nix": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
{
|
|
||||||
dependencies =
|
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
nixfmt-rfc-style # nix formatter
|
|
||||||
(terraform.overrideAttrs (oldAttrs: {
|
|
||||||
meta.license = lib.licenses.mpl20;
|
|
||||||
})) # terraform fmt
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
git
|
|
||||||
curl # needed to fetch titles from urls
|
|
||||||
wget
|
|
||||||
cargo
|
|
||||||
php82
|
|
||||||
php82Packages.composer
|
|
||||||
go
|
|
||||||
ruby
|
|
||||||
luarocks
|
|
||||||
zulu # java11
|
|
||||||
fish
|
|
||||||
fzf
|
|
||||||
perl540
|
|
||||||
perl540Packages.CPAN
|
|
||||||
unzip
|
|
||||||
tree-sitter
|
|
||||||
gnumake
|
|
||||||
lazygit
|
|
||||||
python312
|
|
||||||
python312Packages.pip
|
|
||||||
]
|
|
||||||
++ (if pkgs.stdenv.hostPlatform.isDarwin then [ ] else [ gcc ]);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user