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" ];
# Device specific overlays
nixpkgs.overlays = [];
nixpkgs.overlays = [ ];
# System Packages
environment.systemPackages = lib.mkAfter (
with pkgs;
[
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.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}

View file

@ -8,6 +8,12 @@
nerdFontsVersion = "3";
theme = {
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" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitportal.nvim": { "branch": "main", "commit": "0c3e1c1d518c9e42e61e8df35ea0c0582a278a65" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mini.pairs": { "branch": "main", "commit": "4089aa6ea6423e02e1a8326a7a7a00159f6f5e04" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" },
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"schemastore.nvim": { "branch": "main", "commit": "9b6a3ab14cecc7da9f3aa4fa0ae2a7390748aca5" },
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"snipe.nvim": { "branch": "main", "commit": "d2d196c335919767803f905d573ce66340e33ee6" },
"substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" },
"vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" },
"vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"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("gopls")
vim.lsp.enable("eslint")
vim.lsp.enable("biome")
vim.diagnostic.config({
virtual_text = false,

View file

@ -29,7 +29,7 @@ return {
enabled = true,
},
sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
default = { "lsp", "path", "snippets", "buffer" },
per_filetype = {
sql = { "dadbod" },
mysql = { "dadbod" },
@ -38,11 +38,6 @@ return {
},
providers = {
dadbod = { module = "vim_dadbod_completion.blink" },
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
},
},
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 },
lazygit = {
enabled = true,
configure = true,
},
notifier = { enabled = true },
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 {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = {
"angular",
"bash",
"c",
"css",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"odin",
"go",
"goctl",
"gowork",
"gomod",
"gosum",
"gotmpl",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
opts = {
ensure_installed = {
"angular",
"bash",
"c",
"css",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"odin",
"go",
"goctl",
"gowork",
"gomod",
"gosum",
"gotmpl",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
},
auto_install = true,
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,
ignore_install = {},
modules = {},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
init_selection = "<c-space>",
node_incremental = "<c-space>",
scope_incremental = "<c-s>",
node_decremental = "<M-space>",
-- You can use the capture groups defined in textobjects.scm
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
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",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
swap = {
enable = true,
swap_next = {
["<leader>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>A"] = "@parameter.inner",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
})
vim.treesitter.language.register("markdown", "vimwiki")
end,
swap = {
enable = true,
swap_next = {
["<leader>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>A"] = "@parameter.inner",
},
},
},
},
}

View file

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

View file

@ -1,36 +1,5 @@
{ 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 = {
enable = true;
@ -102,15 +71,6 @@ in
unbind v
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
panes:
- nvim +"lua Snacks.picker.files({ hidden = true })"
- bun dev
- run:
layout: main-vertical
panes: