From f8118b464bcd4f998eac6a07a7adbaf4c9860576 Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 11:43:09 +0200 Subject: [PATCH 01/19] push flake.lock --- flake.lock | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 4b9d2b9..66aa604 100644 --- a/flake.lock +++ b/flake.lock @@ -2,7 +2,6 @@ "nodes": { "devshell": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "nixvim", "nixpkgs" @@ -62,11 +61,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { From f3867e65687608926f4602e303fb36d2b6d6a9bd Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 11:43:36 +0200 Subject: [PATCH 02/19] add oil toggle keybinding --- plugins/oil.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/oil.nix b/plugins/oil.nix index fdb0f46..683ae3a 100644 --- a/plugins/oil.nix +++ b/plugins/oil.nix @@ -4,13 +4,13 @@ _: { keymaps = [ { key = "O"; - action = "function() require('oil').toggle_float() end"; + action = "Oil"; options.desc = "Toggle oil floating window"; mode = "n"; } { key = "to"; - action = "function() require('oil').toggle_float() end"; + action.__raw = "function() require('oil').toggle_float() end"; options.desc = "Toggle oil floating window"; mode = "n"; } From 3cf562e9d3422a18fef0db6b72d886df16678baf Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 11:45:21 +0200 Subject: [PATCH 03/19] push flake.lock --- flake.lock | 71 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 66aa604..2a61994 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1717408969, - "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", "owner": "numtide", "repo": "devshell", - "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", "type": "github" }, "original": { @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1719877454, - "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "type": "github" }, "original": { @@ -91,11 +91,11 @@ ] }, "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "lastModified": 1724857454, + "narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", "type": "github" }, "original": { @@ -134,11 +134,11 @@ ] }, "locked": { - "lastModified": 1719827439, - "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -155,11 +155,11 @@ ] }, "locked": { - "lastModified": 1719845423, - "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", + "lastModified": 1724561770, + "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "ec12b88104d6c117871fad55e931addac4626756", + "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", "type": "github" }, "original": { @@ -192,11 +192,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720542800, - "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", + "lastModified": 1725432240, + "narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "feb2849fdeb70028c70d73b848214b00d324a497", + "rev": "ad416d066ca1222956472ab7d0555a6946746a80", "type": "github" }, "original": { @@ -217,14 +217,15 @@ "nixpkgs": [ "nixpkgs" ], + "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1720864742, - "narHash": "sha256-NVkF91eZPav7zbcMR+7mUzOdMKgIEBJSwtFU2rv1OpY=", + "lastModified": 1725669404, + "narHash": "sha256-Bbp1GVgKVLz9mSfzgwBdQ96Pxm+RgPEdYjS4kKSFrAI=", "owner": "nix-community", "repo": "nixvim", - "rev": "195978e6272702ea5d6e9b837d083c411dc5d688", + "rev": "86a4021597c860a6cd1953305a9995f44e60d4d5", "type": "github" }, "original": { @@ -265,6 +266,28 @@ "type": "gitlab" } }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724584782, + "narHash": "sha256-7FfHv7b1jwMPSu9SPY9hdxStk8E6EeSwzqdvV69U4BM=", + "owner": "NuschtOS", + "repo": "search", + "rev": "5a08d691de30b6fc28d58ce71a5e420f2694e087", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "nix-formatter-pack": "nix-formatter-pack", @@ -295,11 +318,11 @@ ] }, "locked": { - "lastModified": 1719887753, - "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "lastModified": 1724833132, + "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", "type": "github" }, "original": { From 45ff2e9e45cf70716c1e31945186399d262d5877 Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 11:47:33 +0200 Subject: [PATCH 04/19] add treesitter highlights --- plugins/treesitter.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/treesitter.nix b/plugins/treesitter.nix index d88603b..3008a64 100644 --- a/plugins/treesitter.nix +++ b/plugins/treesitter.nix @@ -16,6 +16,7 @@ settings.incremental_selection = { enable = true; keymaps = lib.mkForce { }; + highlight.enable = true; }; }; From c31c0026170c55a6ec16fc7a5b1d786a1b48afdf Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 12:05:55 +0200 Subject: [PATCH 05/19] update settings --- plugins/treesitter.nix | 3 ++- plugins/which-key.nix | 57 ++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/plugins/treesitter.nix b/plugins/treesitter.nix index 3008a64..9ffd687 100644 --- a/plugins/treesitter.nix +++ b/plugins/treesitter.nix @@ -16,8 +16,9 @@ settings.incremental_selection = { enable = true; keymaps = lib.mkForce { }; - highlight.enable = true; }; + + settings.highlight.enable = true; }; rootOpts = { diff --git a/plugins/which-key.nix b/plugins/which-key.nix index f87790f..8215e8e 100644 --- a/plugins/which-key.nix +++ b/plugins/which-key.nix @@ -5,29 +5,48 @@ { opts = { enable = true; - icons.group = ""; - window.border = "single"; + # Disable which-key when in neo-tree or telescope - disable.filetypes = [ - "TelescopePrompt" - "neo-tree" - "neo-tree-popup" - ]; - # Customize section names (prefixed mappings) - registrations = { - "b".name = "${icons.Tab} Buffers"; - "bs".name = "${icons.Sort} Sort Buffers"; - "d".name = "${icons.Debugger} Debugger"; - "f".name = "${icons.Search} Find"; - "g".name = "${icons.Git} Git"; - "l".name = "${icons.ActiveLSP} Language Tools"; - "m".name = " Markdown"; - "s".name = "${icons.Session} Session"; - "t".name = "${icons.Terminal} Terminal"; - "u".name = "${icons.Window} UI/UX"; + settings = { + icons.group = ""; + window.border = "single"; + + # Customize section names (prefixed mappings) + spec = [ + { __unkeyed = "b"; group = "Buffers"; icon = icons.Tab; } + { __unkeyed = "bs"; group = "Sort Buffers"; icon = icons.Sort;} + { __unkeyed = "d"; group = "Debugger"; icon = icons.Debugger;} + { __unkeyed = "f"; group = "Find"; icon = icons.Search;} + { __unkeyed = "g"; group = "Git"; icon = icons.Git;} + { __unkeyed = "l"; group = "Language Tools"; icon = icons.ActiveLSP;} + { __unkeyed = "m"; group = " Markdown"; } + { __unkeyed = "s"; group = "Session"; icon = icons.Session;} + { __unkeyed = "t"; group = "Terminal"; icon = icons.Terminal;} + { __unkeyed = "u"; group = "UI/UX"; icon = icons.Window;} + ]; + + disable.ft = [ + "TelescopePrompt" + "neo-tree" + "neo-tree-popup" + ]; }; + + + # registrations = { + # "b".name = "${icons.Tab} Buffers"; + # "bs".name = "${icons.Sort} Sort Buffers"; + # "d".name = "${icons.Debugger} Debugger"; + # "f".name = "${icons.Search} Find"; + # "g".name = "${icons.Git} Git"; + # "l".name = "${icons.ActiveLSP} Language Tools"; + # "m".name = " Markdown"; + # "s".name = "${icons.Session} Session"; + # "t".name = "${icons.Terminal} Terminal"; + # "u".name = "${icons.Window} UI/UX"; + # }; }; # Enable catppuccin colors From 515bf0662032bb2aa1aeed902ad1c01431506495 Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 7 Sep 2024 12:06:06 +0200 Subject: [PATCH 06/19] override flake lock for eslint alias --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 2a61994..1bd7fa7 100644 --- a/flake.lock +++ b/flake.lock @@ -221,11 +221,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1725669404, - "narHash": "sha256-Bbp1GVgKVLz9mSfzgwBdQ96Pxm+RgPEdYjS4kKSFrAI=", + "lastModified": 1725478117, + "narHash": "sha256-Ly0DgmYniwBtQ+3aW4JO9ETJq9nbPemlISxC6MEDyB8=", "owner": "nix-community", "repo": "nixvim", - "rev": "86a4021597c860a6cd1953305a9995f44e60d4d5", + "rev": "2ef974182ef62a6a6992118f0beb54dce812ae9b", "type": "github" }, "original": { From 2b91fb060a0a74c0375e9e3fd3caa4944ec9874e Mon Sep 17 00:00:00 2001 From: Michael Flossmann Date: Thu, 22 Aug 2024 09:53:36 +0200 Subject: [PATCH 07/19] edit the config structure to use modules rather than sets --- config/colorscheme.nix | 28 +++++++++++++++++++++++++++- config/default.nix | 5 +++-- config/keymaps/default.nix | 2 +- config/options.nix | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/config/colorscheme.nix b/config/colorscheme.nix index a6b4a74..8433717 100644 --- a/config/colorscheme.nix +++ b/config/colorscheme.nix @@ -1,5 +1,24 @@ -{ +{lib, ...}:{ + # TODO: Make colorscheme configurable + colorscheme = lib.mkOverride 500 "everforest"; + colorschemes = { + kanagawa.enable = true; + nord.enable = true; + tokyonight = { + enable = true; + settings = { + style = "storm"; + light_style = "day"; + transparent = false; + }; + }; + everforest = { + enable = true; + settings = { + enable_italic = 1; + }; + }; catppuccin = { enable = true; @@ -8,6 +27,13 @@ # Needed to keep terminal transparency, if any transparent_background = false; + + styles = { + keywords = [ "italic" ]; + conditionals = [ "italic" ]; + functions = [ "italic" ]; + loops = [ "italic" ]; + }; }; }; }; diff --git a/config/default.nix b/config/default.nix index a19604a..c794b51 100644 --- a/config/default.nix +++ b/config/default.nix @@ -9,5 +9,6 @@ let ) (builtins.readDir ./.) ); -in -lib.mkMerge (map (file: import ./${file}) definitions) +in { + imports = map (file: import ./${file}) definitions; +} diff --git a/config/keymaps/default.nix b/config/keymaps/default.nix index 4fb1a61..2d161d8 100644 --- a/config/keymaps/default.nix +++ b/config/keymaps/default.nix @@ -1,4 +1,4 @@ -{ +_: { keymaps = (import ./buffers.nix) ++ (import ./diagnostics.nix) diff --git a/config/options.nix b/config/options.nix index 6170bdc..fd6ec50 100644 --- a/config/options.nix +++ b/config/options.nix @@ -1,7 +1,7 @@ # Neovim options # Use :options to get the list of all options # Use :h