From 07cfcb7b4b6984fab287a3453ec1f897c1904e61 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Thu, 19 Mar 2026 10:48:27 -0700 Subject: [PATCH 1/3] Update to silence nixpkgs deprecation warnings --- nix/home/programs/git/default.nix | 23 ++++++++++++++--------- nix/home/programs/yazi/default.nix | 2 ++ nix/home/programs/zsh/default.nix | 4 +++- nix/home/universal.nix | 4 ++-- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/nix/home/programs/git/default.nix b/nix/home/programs/git/default.nix index f69e983..0fecc84 100644 --- a/nix/home/programs/git/default.nix +++ b/nix/home/programs/git/default.nix @@ -3,18 +3,23 @@ let in { + programs.delta = { + enable = true; + options = { + side-by-side = true; + line-numbers = true; + }; + enableGitIntegration = true; + }; + programs.git = { enable = true; - userName = "Haak Saxberg"; - userEmail = "haak.erling@gmail.com"; - delta = { - enable = true; - options = { - side-by-side = true; - line-numbers = true; + settings = { + user = { + name = "Haak Saxberg"; + email = "haak.erling@gmail.com"; }; - }; - extraConfig = { + rebase = { updateRefs = true; }; diff --git a/nix/home/programs/yazi/default.nix b/nix/home/programs/yazi/default.nix index dd26a32..cc71449 100644 --- a/nix/home/programs/yazi/default.nix +++ b/nix/home/programs/yazi/default.nix @@ -1,7 +1,9 @@ { pkgs, ... }: { + # A command-line file manager programs.yazi = { enable = true; enableZshIntegration = true; + shellWrapperName = "y"; }; } diff --git a/nix/home/programs/zsh/default.nix b/nix/home/programs/zsh/default.nix index 53c4ad1..17bdc7e 100644 --- a/nix/home/programs/zsh/default.nix +++ b/nix/home/programs/zsh/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: with builtins; { @@ -22,6 +22,8 @@ with builtins; { "vi-mode" ]; }; + + dotDir = "${config.xdg.configHome}/zsh"; }; home.file.".oh-my-zsh/custom/themes/typewritten.zsh-theme" = { diff --git a/nix/home/universal.nix b/nix/home/universal.nix index 6485149..a58d0ac 100644 --- a/nix/home/universal.nix +++ b/nix/home/universal.nix @@ -45,8 +45,8 @@ with builtins; (import ./programs/zsh) (import ./programs/tmux) (import ./programs/nvim) - (import ./programs/helix) - (import ./programs/yazi) + # (import ./programs/helix) + # (import ./programs/yazi) ]; home.packages = defaultPkgs; From 1ae28d39ecc0b38c14bae81e0814465c03a4bf04 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Thu, 19 Mar 2026 10:48:46 -0700 Subject: [PATCH 2/3] Update vim plugins --- nix/home/programs/nvim/default.nix | 167 +++++++++++++++------- nix/home/programs/nvim/init.vim | 9 -- nix/home/programs/nvim/nvim-lspconfig.lua | 4 +- 3 files changed, 117 insertions(+), 63 deletions(-) diff --git a/nix/home/programs/nvim/default.nix b/nix/home/programs/nvim/default.nix index 60cd79d..0cfdff5 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -28,26 +28,32 @@ with builtins; vimAlias = true; plugins = with pkgs.vimPlugins; [ vim-sensible - vim-startify - catppuccin-nvim - vim-precognition - nvim-treesitter.withAllGrammars - { - plugin = fzf-vim; + plugin = vim-precognition; config = '' - noremap fc :BCommits + lua << EOF + require("precognition").setup({}) + EOF + noremap ? :lua require("precognition").peek() + ''; + } + plenary-nvim + { + plugin = nvim-treesitter-legacy.withAllGrammars; + config = '' + lua << EOF + require'nvim-treesitter.configs'.setup { + highlight = { + enable = true, + }, + } + EOF ''; } - vim-elixir - alchemist-vim - vim-nix - vim-javascript - vim-json - vim-jsx-pretty - vim-commentary - vim-airline + # cosmetic improvements + catppuccin-nvim + vim-illuminate { plugin = rainbow; config = '' @@ -66,37 +72,58 @@ with builtins; let g:indent_guides_start_level = 2 ''; } + + # language-agnostic editor improvements + { + plugin = fzf-vim; + config = '' + noremap fc :BCommits + ''; + } + which-key-nvim + { + plugin = alpha-nvim; + config = '' + lua << EOF + local alpha = require("alpha"); + local dashboard = require("alpha.themes.startify"); + alpha.setup(dashboard.config); + EOF + ''; + } + { + plugin = nvim-autopairs; + config = '' + lua << EOF + require("nvim-autopairs").setup {} + EOF + ''; + } + { + plugin = lualine-nvim; + config = '' + lua << EOF + require('lualine').setup() + EOF + ''; + } + { + plugin = comment-nvim; + config = '' + lua << EOF + require('Comment').setup() + EOF + ''; + } vim-surround { - plugin = vim-fugitive; + # file explorer + plugin = oil-nvim; config = '' - nnoremap gb :Git blame - ''; - } - { - plugin = git-blame-nvim; - config = '' - let g:gitblame_date_format = '%Y-%m-%d' - nnoremap gC :GitBlameOpenCommitURL - ''; - } - { - plugin = neogit; - config = '' - noremap g :Neogit - lua << EOF - local neogit = require('neogit') - neogit.setup {} - EOF - ''; - } - vinegar - { - plugin = gitsigns-nvim; - config = '' - lua << EOF - require('gitsigns').setup() - EOF + lua << EOF + require("oil").setup() + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) + EOF ''; } { @@ -118,6 +145,42 @@ with builtins; endif ''; } + { + plugin = telescope-nvim; + config = '' + nnoremap ff lua require('telescope.builtin').find_files() + nnoremap fg lua require('telescope.builtin').live_grep() + nnoremap fb lua require('telescope.builtin').buffers() + nnoremap fh lua require('telescope.builtin').help_tags() + ''; + } + nvim-dap + nvim-dap-ui + + # Git stuff + { + plugin = vim-fugitive; + config = '' + nnoremap gb :Git blame + ''; + } + { + plugin = git-blame-nvim; + config = '' + let g:gitblame_date_format = '%Y-%m-%d' + nnoremap gC :GitBlameOpenCommitURL + ''; + } + { + plugin = gitsigns-nvim; + config = '' + lua << EOF + require('gitsigns').setup() + EOF + ''; + } + + # Language servers cmp-nvim-lsp { plugin = nvim-lspconfig; @@ -129,22 +192,20 @@ with builtins; # we'll probably always want them around. lua_ls = pkgs.lua-language-server; nixd = pkgs.nixd; - ts_server = pkgs.nodePackages.typescript-language-server; + + # Nearly always want the diagnostic server diagnostic_server = pkgs.nodePackages.diagnostic-languageserver; } ) } EOF ''; } - { - plugin = telescope-nvim; - config = '' - nnoremap ff lua require('telescope.builtin').find_files() - nnoremap fg lua require('telescope.builtin').live_grep() - nnoremap fb lua require('telescope.builtin').buffers() - nnoremap fh lua require('telescope.builtin').help_tags() - ''; - } + + # language-specific plugins + vim-nix + vim-json + dart-vim-plugin + # have the completion plugin get loaded last just in case anything above # needs to do setup work before completions get set up. { diff --git a/nix/home/programs/nvim/init.vim b/nix/home/programs/nvim/init.vim index a3c9351..72af96d 100644 --- a/nix/home/programs/nvim/init.vim +++ b/nix/home/programs/nvim/init.vim @@ -51,7 +51,6 @@ autocmd BufWritePre * :%s/\s\+$//e noremap ; : inoremap jj noremap Q -noremap ? :lua require("precognition").peek() """ Esperanto digraphs (for use with ctrl-k) :digraph Cx 264 @@ -85,11 +84,3 @@ set scrolloff=10 if filereadable($HOME . "/.vimrc.local") source ~/.vimrc.local endif - -lua << EOF -require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - }, - } -EOF diff --git a/nix/home/programs/nvim/nvim-lspconfig.lua b/nix/home/programs/nvim/nvim-lspconfig.lua index 9862892..b15eaca 100644 --- a/nix/home/programs/nvim/nvim-lspconfig.lua +++ b/nix/home/programs/nvim/nvim-lspconfig.lua @@ -151,7 +151,7 @@ capabilitiesWithoutFomatting.textDocument.rangeFormatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false nvim_lsp.ts_ls.setup { - cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' }, + cmd = { "typescript-language-server", '--stdio' }, init_options = { hostInfo = "neovim", maxTsServerMemory = "8192", @@ -185,3 +185,5 @@ nvim_lsp.lua_ls.setup { nvim_lsp.texlab.setup {} nvim_lsp.gleam.setup {} + +nvim_lsp.dartls.setup {} From 8075ec0091af825eb9e1c667e849312d27eca7d4 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Thu, 19 Mar 2026 11:57:56 -0700 Subject: [PATCH 3/3] Remove deprecation warning about lspconfig --- nix/home/programs/nvim/default.nix | 3 +- nix/home/programs/nvim/nvim-lspconfig.lua | 49 +++++++++++------------ 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/nix/home/programs/nvim/default.nix b/nix/home/programs/nvim/default.nix index 0cfdff5..45ddce7 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -53,7 +53,8 @@ with builtins; # cosmetic improvements catppuccin-nvim - vim-illuminate + vim-illuminate # highlight cursor-word + nvim-web-devicons { plugin = rainbow; config = '' diff --git a/nix/home/programs/nvim/nvim-lspconfig.lua b/nix/home/programs/nvim/nvim-lspconfig.lua index b15eaca..72b8188 100644 --- a/nix/home/programs/nvim/nvim-lspconfig.lua +++ b/nix/home/programs/nvim/nvim-lspconfig.lua @@ -1,12 +1,6 @@ -local nvim_lsp = require("lspconfig") --- --- https://vonheikemen.github.io/devlog/tools/setup-nvim-lspconfig-plus-nvim-cmp/ -local lsp_defaults = nvim_lsp.util.default_config -lsp_defaults.capabilities = vim.tbl_deep_extend( - 'force', - lsp_defaults.capabilities, - require("cmp_nvim_lsp").default_capabilities() -) +vim.lsp.config('*', { + capabilities = require("cmp_nvim_lsp").default_capabilities() +}) vim.api.nvim_create_autocmd("LspAttach", { desc = "LSP actions", @@ -61,7 +55,7 @@ vim.api.nvim_create_autocmd("BufWritePre", { end }) -nvim_lsp.diagnosticls.setup { +vim.lsp.config("diagnosticls", { cmd = { "@diagnostic_server@/bin/diagnostic-languageserver", '--stdio' }, filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'markdown', 'pandoc', 'prisma' }, @@ -140,17 +134,17 @@ nvim_lsp.diagnosticls.setup { prisma = 'prettier' } } -} +}); +vim.lsp.enable("diagnosticls"); -nvim_lsp.elmls.setup { -} +vim.lsp.config("elmls", {}) local capabilitiesWithoutFomatting = vim.lsp.protocol.make_client_capabilities() capabilitiesWithoutFomatting.textDocument.formatting = false capabilitiesWithoutFomatting.textDocument.rangeFormatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false -nvim_lsp.ts_ls.setup { +vim.lsp.config("ts_ls", { cmd = { "typescript-language-server", '--stdio' }, init_options = { hostInfo = "neovim", @@ -158,16 +152,19 @@ nvim_lsp.ts_ls.setup { preferences = { quotePreference = "single", allowIncompleteCompletions = false }, capabilities = capabilitiesWithoutFomatting } -} -nvim_lsp.elixirls.setup { +}) +vim.lsp.config("elixirls", { cmd = { "elixir-ls" }, -} -nvim_lsp.nixd.setup { - cmd = { "@nixd@/bin/nixd" }, -} -nvim_lsp.rust_analyzer.setup {} +}) -nvim_lsp.lua_ls.setup { +vim.lsp.config("nixd", { + cmd = { "@nixd@/bin/nixd" }, +}); +vim.lsp.enable("nixd"); + +vim.lsp.config("rust_analyzer", {}) + +vim.lsp.config("lua_ls", { cmd = { "@lua_ls@/bin/lua-language-server" }, single_file_support = true, flags = { @@ -180,10 +177,10 @@ nvim_lsp.lua_ls.setup { } } }, -} +}) -nvim_lsp.texlab.setup {} +vim.lsp.config("texlab", {}) -nvim_lsp.gleam.setup {} +vim.lsp.config("gleam", {}) -nvim_lsp.dartls.setup {} +vim.lsp.config("dartls", {})