refactor: major config changes

This commit is contained in:
Dennis Schoepf 2026-02-04 19:02:27 +01:00
parent b2c8430125
commit ff32ecb811
14 changed files with 148 additions and 179 deletions

View file

@ -26,13 +26,19 @@
nix.settings.trusted-users = [ "dennis" ]; nix.settings.trusted-users = [ "dennis" ];
# Device specific overlays # Device specific overlays
nixpkgs.overlays = []; nixpkgs.overlays = [ ];
# System Packages # System Packages
environment.systemPackages = lib.mkAfter ( environment.systemPackages = lib.mkAfter (
with pkgs; with pkgs;
[ [
rsync rsync
# Some global devtools that are
# not included in project flakes
tree-sitter
nil
stylua
lua-language-server
] ]
); );
@ -73,5 +79,8 @@
}; };
nix.enable = false; nix.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
} }

View file

@ -8,6 +8,12 @@
nerdFontsVersion = "3"; nerdFontsVersion = "3";
theme = { theme = {
lightTheme = false; lightTheme = false;
activeBorderColor = [ "magenta" "bold" ];
searchingActiveBorderColor = [ "cyan" "bold" ];
inactiveBorderColor = [ "#807c9f" ];
optionsTextColor = [ "#807c9f" ];
selectedLineBgColor = [ "#331531" ];
inactiveViewSelectedLineBgColor = [ "#1d202f" ];
}; };
}; };
}; };

View file

@ -6,19 +6,18 @@
"follow-md-links.nvim": { "branch": "main", "commit": "728d96d268eef9666f0ee77a083e7e2f0b44f607" }, "follow-md-links.nvim": { "branch": "main", "commit": "728d96d268eef9666f0ee77a083e7e2f0b44f607" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitportal.nvim": { "branch": "main", "commit": "0c3e1c1d518c9e42e61e8df35ea0c0582a278a65" }, "gitportal.nvim": { "branch": "main", "commit": "0c3e1c1d518c9e42e61e8df35ea0c0582a278a65" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mini.pairs": { "branch": "main", "commit": "4089aa6ea6423e02e1a8326a7a7a00159f6f5e04" }, "mini.pairs": { "branch": "main", "commit": "4089aa6ea6423e02e1a8326a7a7a00159f6f5e04" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" }, "nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" },
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" }, "oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"schemastore.nvim": { "branch": "main", "commit": "9b6a3ab14cecc7da9f3aa4fa0ae2a7390748aca5" }, "schemastore.nvim": { "branch": "main", "commit": "9b6a3ab14cecc7da9f3aa4fa0ae2a7390748aca5" },
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }, "snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"snipe.nvim": { "branch": "main", "commit": "d2d196c335919767803f905d573ce66340e33ee6" },
"substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" }, "substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" },
"vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" }, "vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" },
"vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
} }

View file

@ -0,0 +1,34 @@
---@type vim.lsp.Config
return {
cmd = function(dispatchers, config)
local cmd = 'biome'
local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/biome'
if local_cmd and vim.fn.executable(local_cmd) == 1 then
cmd = local_cmd
end
return vim.lsp.rpc.start({ cmd, 'lsp-proxy' }, dispatchers)
end,
filetypes = {
'astro',
'css',
'graphql',
'html',
'javascript',
'javascriptreact',
'json',
'jsonc',
'svelte',
'typescript',
'typescriptreact',
'vue',
},
workspace_required = true,
root_markers = {
'package-lock.json',
'yarn.lock',
'pnpm-lock.yaml',
'bun.lockb',
'bun.lock',
'deno.lock',
},
}

View file

@ -6,6 +6,7 @@ vim.lsp.enable("astro")
vim.lsp.enable("tailwindcss") vim.lsp.enable("tailwindcss")
vim.lsp.enable("gopls") vim.lsp.enable("gopls")
vim.lsp.enable("eslint") vim.lsp.enable("eslint")
vim.lsp.enable("biome")
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = false, virtual_text = false,

View file

@ -29,7 +29,7 @@ return {
enabled = true, enabled = true,
}, },
sources = { sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" }, default = { "lsp", "path", "snippets", "buffer" },
per_filetype = { per_filetype = {
sql = { "dadbod" }, sql = { "dadbod" },
mysql = { "dadbod" }, mysql = { "dadbod" },
@ -38,11 +38,6 @@ return {
}, },
providers = { providers = {
dadbod = { module = "vim_dadbod_completion.blink" }, dadbod = { module = "vim_dadbod_completion.blink" },
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
}, },
}, },
fuzzy = { implementation = "prefer_rust_with_warning" }, fuzzy = { implementation = "prefer_rust_with_warning" },

View file

@ -0,0 +1,3 @@
return {
"tpope/vim-dispatch",
}

View file

@ -1,7 +0,0 @@
return {
{
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {},
},
}

View file

@ -26,7 +26,6 @@ return {
input = { enabled = true }, input = { enabled = true },
lazygit = { lazygit = {
enabled = true, enabled = true,
configure = true,
}, },
notifier = { enabled = true }, notifier = { enabled = true },
picker = { picker = {

View file

@ -1,19 +0,0 @@
return {
"leath-dub/snipe.nvim",
keys = {
{
"<leader>bs",
function()
require("snipe").open_buffer_menu()
end,
desc = "Open Snipe buffer menu",
},
},
opts = {
position = "center",
open_win_override = {
title = "Select buffer",
border = "rounded",
},
},
}

View file

@ -1,106 +1,100 @@
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
config = function() opts = {
local configs = require("nvim-treesitter.configs") ensure_installed = {
"angular",
configs.setup({ "bash",
ensure_installed = { "c",
"angular", "css",
"bash", "diff",
"c", "html",
"css", "javascript",
"diff", "jsdoc",
"html", "json",
"javascript", "jsonc",
"jsdoc", "lua",
"json", "luadoc",
"jsonc", "luap",
"lua", "markdown",
"luadoc", "markdown_inline",
"luap", "odin",
"markdown", "go",
"markdown_inline", "goctl",
"odin", "gowork",
"go", "gomod",
"goctl", "gosum",
"gowork", "gotmpl",
"gomod", "printf",
"gosum", "python",
"gotmpl", "query",
"printf", "regex",
"python", "toml",
"query", "tsx",
"regex", "typescript",
"toml", "vim",
"tsx", "vimdoc",
"typescript", "xml",
"vim", "yaml",
"vimdoc", },
"xml", auto_install = true,
"yaml", sync_install = false,
ignore_install = {},
modules = {},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<c-space>",
node_incremental = "<c-space>",
scope_incremental = "<c-s>",
node_decremental = "<M-space>",
}, },
auto_install = true, },
sync_install = false, textobjects = {
ignore_install = {}, select = {
modules = {},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true, enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = { keymaps = {
init_selection = "<c-space>", -- You can use the capture groups defined in textobjects.scm
node_incremental = "<c-space>", ["aa"] = "@parameter.outer",
scope_incremental = "<c-s>", ["ia"] = "@parameter.inner",
node_decremental = "<M-space>", ["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
}, },
}, },
textobjects = { move = {
select = { enable = true,
enable = true, set_jumps = true, -- whether to set jumps in the jumplist
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim goto_next_start = {
keymaps = { ["]m"] = "@function.outer",
-- You can use the capture groups defined in textobjects.scm ["]]"] = "@class.outer",
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
}, },
move = { goto_next_end = {
enable = true, ["]M"] = "@function.outer",
set_jumps = true, -- whether to set jumps in the jumplist ["]["] = "@class.outer",
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
}, },
swap = { goto_previous_start = {
enable = true, ["[m"] = "@function.outer",
swap_next = { ["[["] = "@class.outer",
["<leader>a"] = "@parameter.inner", },
}, goto_previous_end = {
swap_previous = { ["[M"] = "@function.outer",
["<leader>A"] = "@parameter.inner", ["[]"] = "@class.outer",
},
}, },
}, },
}) swap = {
enable = true,
vim.treesitter.language.register("markdown", "vimwiki") swap_next = {
end, ["<leader>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>A"] = "@parameter.inner",
},
},
},
},
} }

View file

@ -14,14 +14,10 @@
home.packages = lib.mkAfter ( home.packages = lib.mkAfter (
with pkgs; with pkgs;
[ [
# Some devtools not included in project
# flakes
stylua stylua
typescript-language-server
vscode-langservers-extracted
astro-language-server
tailwindcss-language-server
lua-language-server lua-language-server
prettierd
eslint_d
nil nil
tree-sitter tree-sitter
] ]

View file

@ -1,36 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
let
tmux-compile = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "compile-mode";
version = "1.0";
src = pkgs.fetchFromGitHub {
owner = "alexekdahl";
repo = "tmux-compile";
rev = "be830d944a189fc6b209490fcb815346a3c402ca";
hash = "sha256-+b3Oc4M0xhwCo7HupAJpG68ZxMC8yMNZLl6QtEQv12o=";
};
nativeBuildInputs = [ pkgs.makeWrapper ];
postPatch = ''
patchShebangs .
'';
postInstall = ''
for script in $target/share/tmux-plugins/*/bin/* $target/share/tmux-plugins/*/*.tmux; do
[ -f "$script" ] && [ -x "$script" ] && wrapProgram "$script" \
--prefix PATH : ${
pkgs.lib.makeBinPath [
pkgs.bash
pkgs.coreutils
pkgs.tmux
pkgs.gnused
pkgs.gnugrep
]
}
done
'';
};
in
{ {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
@ -102,15 +71,6 @@ in
unbind v unbind v
bind v choose-tree -Zw "join-pane -t '%%'" bind v choose-tree -Zw "join-pane -t '%%'"
# Custom plugins
set -g @compile-mode-key "C-b"
set -g @compile-mode-recompile-key "C-r"
set -g @compile-mode-kill-key "C-k"
set -g @compile-mode-height "30%"
set -g @compile-mode-history-file "$HOME/.config/tmux-compile-mode/compile-history"
set -g @compile-mode-open-file-key "Enter"
run-shell ${tmux-compile}/share/tmux-plugins/compile-mode/compile-mode.tmux
''; '';
}; };
} }

View file

@ -5,7 +5,6 @@ windows:
layout: main-horizontal layout: main-horizontal
panes: panes:
- nvim +"lua Snacks.picker.files({ hidden = true })" - nvim +"lua Snacks.picker.files({ hidden = true })"
- bun dev
- run: - run:
layout: main-vertical layout: main-vertical
panes: panes: