From 5a897538937fe5cfce7b7b98cd24aeafddea1b30 Mon Sep 17 00:00:00 2001 From: Weckyy702 Date: Wed, 11 Mar 2026 18:45:27 +0100 Subject: [PATCH] Update nixvim config --- home/home.nix | 10 +++- home/nixvim/default.nix | 20 +++----- home/nixvim/keymaps.nix | 4 +- home/nixvim/options.nix | 2 +- home/nixvim/plugins/cmp/default.nix | 10 ++-- home/nixvim/plugins/cmp/keymaps.nix | 4 +- home/nixvim/plugins/default.nix | 3 +- home/nixvim/plugins/lsp.nix | 60 +++++++++++------------ home/nixvim/plugins/telescope/default.nix | 6 +-- home/nixvim/plugins/telescope/keymaps.nix | 4 +- 10 files changed, 62 insertions(+), 61 deletions(-) diff --git a/home/home.nix b/home/home.nix index 049e17c..d1bcc10 100644 --- a/home/home.nix +++ b/home/home.nix @@ -8,7 +8,6 @@ top @ { config inputs.nixvim.homeModules.nixvim inputs.catppuccin.homeModules.catppuccin inputs.spicetify-nix.homeManagerModules.default - ./nixvim ./borgmatic.nix ./ssh.nix ]; @@ -37,6 +36,10 @@ top @ { config gdb ]; + home.sessionVariables = { + EDITOR = "nvim"; + }; + home.pointerCursor = let size = 24; @@ -73,6 +76,11 @@ top @ { config #TODO: GDB configuration + programs.nixvim = { + enable = true; + imports = [ ./nixvim ]; + }; + programs.thunderbird = { enable = true; profiles.default.isDefault = true; diff --git a/home/nixvim/default.nix b/home/nixvim/default.nix index bb9f02e..0d88d65 100644 --- a/home/nixvim/default.nix +++ b/home/nixvim/default.nix @@ -5,19 +5,15 @@ ./plugins ]; - programs.nixvim = { + clipboard.register = "unnamedplus"; + + colorschemes.catppuccin = { enable = true; - - clipboard.register = "unnamedplus"; - - colorschemes.catppuccin = { - enable = true; - settings.flavour = "mocha"; - settings.integrations = { - gitsigns = true; - treesitter = true; - cmp = true; - }; + settings.flavour = "mocha"; + settings.integrations = { + gitsigns = true; + treesitter = true; + cmp = true; }; }; } diff --git a/home/nixvim/keymaps.nix b/home/nixvim/keymaps.nix index 604c144..c549baa 100644 --- a/home/nixvim/keymaps.nix +++ b/home/nixvim/keymaps.nix @@ -1,7 +1,7 @@ { ... }: { - programs.nixvim.globals.mapleader = " "; + globals.mapleader = " "; - programs.nixvim.keymaps = [ + keymaps = [ { key = ""; action = ":noh"; diff --git a/home/nixvim/options.nix b/home/nixvim/options.nix index f618d79..02ff1e7 100644 --- a/home/nixvim/options.nix +++ b/home/nixvim/options.nix @@ -1,5 +1,5 @@ { ... }: { - programs.nixvim.opts = { + opts = { # Expand tabs to 4 spaces shiftwidth = 4; softtabstop = 4; diff --git a/home/nixvim/plugins/cmp/default.nix b/home/nixvim/plugins/cmp/default.nix index dd19d2a..4b6f6a7 100644 --- a/home/nixvim/plugins/cmp/default.nix +++ b/home/nixvim/plugins/cmp/default.nix @@ -1,9 +1,9 @@ -{...}: { +{ ... }: { imports = [ ./keymaps.nix ]; - programs.nixvim.plugins = { + plugins = { lspkind.enable = true; cmp-nvim-lsp-signature-help.enable = true; @@ -14,9 +14,9 @@ autoLoad = true; settings.sources = [ - {name = "nvim_lsp";} - {name = "nvim_lsp_signature_help";} - {name = "path";} + { name = "nvim_lsp"; } + { name = "nvim_lsp_signature_help"; } + { name = "path"; } ]; settings.mapping = { diff --git a/home/nixvim/plugins/cmp/keymaps.nix b/home/nixvim/plugins/cmp/keymaps.nix index 7eaa941..6ab2a03 100644 --- a/home/nixvim/plugins/cmp/keymaps.nix +++ b/home/nixvim/plugins/cmp/keymaps.nix @@ -1,5 +1,5 @@ -{...}: { - programs.nixvim.keymaps = [ +{ ... }: { + keymaps = [ { key = "grd"; action = "Telescope lsp_definitions"; diff --git a/home/nixvim/plugins/default.nix b/home/nixvim/plugins/default.nix index 46f54f1..3e350cb 100644 --- a/home/nixvim/plugins/default.nix +++ b/home/nixvim/plugins/default.nix @@ -5,14 +5,13 @@ ./cmp ]; - programs.nixvim.plugins = { + plugins = { lualine.enable = true; web-devicons.enable = true; treesitter = { enable = true; - folding = true; autoLoad = true; }; diff --git a/home/nixvim/plugins/lsp.nix b/home/nixvim/plugins/lsp.nix index ab6a91c..142b838 100644 --- a/home/nixvim/plugins/lsp.nix +++ b/home/nixvim/plugins/lsp.nix @@ -1,38 +1,36 @@ { ... }: { - programs.nixvim = { - dependencies.rust-analyzer.enable = true; + dependencies.rust-analyzer.enable = true; - lsp = { - inlayHints.enable = true; - servers = { - "*" = { - config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true; - config.root_markers = [ - ".git" - ]; - }; - clangd = { - enable = true; - config.root_markers = [ - "compile_commands.json" - ]; - }; - rust_analyzer = { - enable = true; - }; - rnix.enable = true; + lsp = { + inlayHints.enable = true; + servers = { + "*" = { + config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true; + config.root_markers = [ + ".git" + ]; }; - - keymaps = [ - { - key = "e"; - action = "lua vim.diagnostic.open_float()"; - options.desc = "Open Diagnostics"; - } - ]; + clangd = { + enable = true; + config.root_markers = [ + "compile_commands.json" + ]; + }; + rust_analyzer = { + enable = true; + }; + rnix.enable = true; }; - plugins.lspconfig.enable = true; - plugins.clangd-extensions.enable = true; + keymaps = [ + { + key = "e"; + action = "lua vim.diagnostic.open_float()"; + options.desc = "Open Diagnostics"; + } + ]; }; + + plugins.lspconfig.enable = true; + plugins.clangd-extensions.enable = true; } diff --git a/home/nixvim/plugins/telescope/default.nix b/home/nixvim/plugins/telescope/default.nix index 453d53c..ec74c02 100644 --- a/home/nixvim/plugins/telescope/default.nix +++ b/home/nixvim/plugins/telescope/default.nix @@ -1,10 +1,10 @@ -{...}: { +{ ... }: { imports = [ ./keymaps.nix ]; - programs.nixvim.dependencies.ripgrep.enable = true; + dependencies.ripgrep.enable = true; - programs.nixvim.plugins.telescope = { + plugins.telescope = { enable = true; extensions.file-browser = { enable = true; diff --git a/home/nixvim/plugins/telescope/keymaps.nix b/home/nixvim/plugins/telescope/keymaps.nix index c95f76c..d2cdd3d 100644 --- a/home/nixvim/plugins/telescope/keymaps.nix +++ b/home/nixvim/plugins/telescope/keymaps.nix @@ -1,5 +1,5 @@ -{...}: { - programs.nixvim.keymaps = [ +{ ... }: { + keymaps = [ { key = "sf"; action = "Telescope find_files";