From f06c33e482d5a1467e97d13d44fb6ffccefee559 Mon Sep 17 00:00:00 2001 From: cnst Date: Wed, 21 Aug 2024 21:21:40 +0200 Subject: [PATCH 1/2] development settings, and renaming neovim to nixvim --- flake.lock | 93 +++++++++++++------ flake.nix | 5 + home/modules/default.nix | 2 +- .../devtools/neovim/plugins/conform.nix | 38 -------- .../devtools/neovim/plugins/default.nix | 22 ----- .../modules/devtools/neovim/plugins/yanky.nix | 19 ---- .../devtools/{neovim => nixvim}/autocmd.nix | 0 .../{neovim => nixvim}/completion.nix | 0 .../devtools/{neovim => nixvim}/default.nix | 4 +- .../devtools/{neovim => nixvim}/keymap.nix | 0 .../devtools/{neovim => nixvim}/options.nix | 0 .../{neovim => nixvim}/plugins/ai.nix | 17 ++-- .../{neovim => nixvim}/plugins/barbar.nix | 17 ++-- .../{neovim => nixvim}/plugins/comment.nix | 17 ++-- .../devtools/nixvim/plugins/conform.nix | 37 ++++++++ .../devtools/nixvim/plugins/default.nix | 23 +++++ .../{neovim => nixvim}/plugins/efm.nix | 19 ++-- .../{neovim => nixvim}/plugins/floaterm.nix | 17 ++-- .../{neovim => nixvim}/plugins/harpoon.nix | 17 ++-- .../{neovim => nixvim}/plugins/lsp.nix | 6 +- .../{neovim => nixvim}/plugins/lualine.nix | 23 +++-- .../plugins/markdown-preview.nix | 17 ++-- .../{neovim => nixvim}/plugins/neo-tree.nix | 19 ++-- .../{neovim => nixvim}/plugins/nonels.nix | 19 ++-- .../devtools/nixvim/plugins/rustaceanvim.nix | 21 +++++ .../{neovim => nixvim}/plugins/startify.nix | 21 ++--- .../{neovim => nixvim}/plugins/tagbar.nix | 17 ++-- .../{neovim => nixvim}/plugins/telescope.nix | 17 ++-- .../{neovim => nixvim}/plugins/treesitter.nix | 19 ++-- .../{neovim => nixvim}/plugins/vimtex.nix | 23 +++-- .../modules/devtools/nixvim/plugins/yanky.nix | 18 ++++ .../devtools/{neovim => nixvim}/todo.nix | 0 home/users/adam/modules.nix | 2 +- home/users/cnst/modules.nix | 4 +- home/users/toothpick/modules.nix | 4 +- hosts/default.nix | 11 ++- system/dev/default.nix | 28 ++++++ 37 files changed, 349 insertions(+), 267 deletions(-) delete mode 100644 home/modules/devtools/neovim/plugins/conform.nix delete mode 100644 home/modules/devtools/neovim/plugins/default.nix delete mode 100644 home/modules/devtools/neovim/plugins/yanky.nix rename home/modules/devtools/{neovim => nixvim}/autocmd.nix (100%) rename home/modules/devtools/{neovim => nixvim}/completion.nix (100%) rename home/modules/devtools/{neovim => nixvim}/default.nix (92%) rename home/modules/devtools/{neovim => nixvim}/keymap.nix (100%) rename home/modules/devtools/{neovim => nixvim}/options.nix (100%) rename home/modules/devtools/{neovim => nixvim}/plugins/ai.nix (85%) rename home/modules/devtools/{neovim => nixvim}/plugins/barbar.nix (59%) rename home/modules/devtools/{neovim => nixvim}/plugins/comment.nix (56%) create mode 100644 home/modules/devtools/nixvim/plugins/conform.nix create mode 100644 home/modules/devtools/nixvim/plugins/default.nix rename home/modules/devtools/{neovim => nixvim}/plugins/efm.nix (69%) rename home/modules/devtools/{neovim => nixvim}/plugins/floaterm.nix (56%) rename home/modules/devtools/{neovim => nixvim}/plugins/harpoon.nix (68%) rename home/modules/devtools/{neovim => nixvim}/plugins/lsp.nix (94%) rename home/modules/devtools/{neovim => nixvim}/plugins/lualine.nix (79%) rename home/modules/devtools/{neovim => nixvim}/plugins/markdown-preview.nix (67%) rename home/modules/devtools/{neovim => nixvim}/plugins/neo-tree.nix (62%) rename home/modules/devtools/{neovim => nixvim}/plugins/nonels.nix (82%) create mode 100644 home/modules/devtools/nixvim/plugins/rustaceanvim.nix rename home/modules/devtools/{neovim => nixvim}/plugins/startify.nix (80%) rename home/modules/devtools/{neovim => nixvim}/plugins/tagbar.nix (66%) rename home/modules/devtools/{neovim => nixvim}/plugins/telescope.nix (78%) rename home/modules/devtools/{neovim => nixvim}/plugins/treesitter.nix (81%) rename home/modules/devtools/{neovim => nixvim}/plugins/vimtex.nix (83%) create mode 100644 home/modules/devtools/nixvim/plugins/yanky.nix rename home/modules/devtools/{neovim => nixvim}/todo.nix (100%) create mode 100644 system/dev/default.nix diff --git a/flake.lock b/flake.lock index 789da66a..f5ab4faf 100644 --- a/flake.lock +++ b/flake.lock @@ -102,12 +102,12 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1724179929, - "narHash": "sha256-71OTuLbwQ7f9tYn2gOikv2+wA8snkBA2+ozqS9BfptI=", - "rev": "a1a11c4bcc8df500b3e11857d02f457b67342779", - "revCount": 1355, + "lastModified": 1724241860, + "narHash": "sha256-3TNUwLe94rBqOqsOIYdwkeyyhQFbIvo5e5GeI2Aaayc=", + "rev": "adc414d4a4eaab4efa1dc7214fb4078b55599cb3", + "revCount": 1356, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1355%2Brev-a1a11c4bcc8df500b3e11857d02f457b67342779/01917124-7c92-79ff-85c1-a584be36ebc9/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1356%2Brev-adc414d4a4eaab4efa1dc7214fb4078b55599cb3/019174d5-a783-7f21-b0d7-465ab9d08b99/source.tar.gz" }, "original": { "type": "tarball", @@ -179,11 +179,32 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1724135364, - "narHash": "sha256-DuPnJXOeigXK8xQdP6BBc6MqJ9p4TzvNUqSrB2P1GQ4=", + "lastModified": 1724221791, + "narHash": "sha256-mKX67QPnUybOopVph/LhOV1G/H4EvPxDIfSmbufrVdA=", "owner": "nix-community", "repo": "fenix", - "rev": "b6a1c29a8f460af63f66cad2b5acf3b78867603e", + "rev": "e88b38a5a3834e039d413a88f8150a75ef6453ef", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1724221791, + "narHash": "sha256-mKX67QPnUybOopVph/LhOV1G/H4EvPxDIfSmbufrVdA=", + "owner": "nix-community", + "repo": "fenix", + "rev": "e88b38a5a3834e039d413a88f8150a75ef6453ef", "type": "github" }, "original": { @@ -226,11 +247,11 @@ ] }, "locked": { - "lastModified": 1724202245, - "narHash": "sha256-f5KOqfiC4pTHFQ9Ef4u9erH0sN9lX8cS8svpBjxE2SM=", + "lastModified": 1724260595, + "narHash": "sha256-slIZqQQuRhFJzaw83tYkqLheAALK0z2c3MfqKhIS6Hk=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "0cad3d778eede09d6eff11c15fb08288bbdb5cbf", + "rev": "648ea05123d211254c0fafdb39b9a592b759f7d3", "type": "github" }, "original": { @@ -684,11 +705,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1724085862, - "narHash": "sha256-qIPLv+MmTVZ0sjhx99EZhe/2aGzy5JOskmlqPd6DNFQ=", + "lastModified": 1724243887, + "narHash": "sha256-qa5TXlcANiWSEzLNZmenvXkqzzh3cDUYSfNniGi+LaU=", "ref": "refs/heads/main", - "rev": "c86db7bbb0cf14d4955ee3a4d13c0ed9f8a0e0ae", - "revCount": 5115, + "rev": "883463f9dd7f1cdc68c3e32017c0a71ccbe39b26", + "revCount": 5119, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -796,11 +817,11 @@ ] }, "locked": { - "lastModified": 1723965596, - "narHash": "sha256-0bk1/7HCi3wzeW1a4t7xPUYXzmOeq/AtXTOe72gC7so=", + "lastModified": 1724235914, + "narHash": "sha256-QEVuZNXkytS1lqAtRMBAriJREcCTOeprxBTisXxpe3s=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "f673759d01400e49e25a15566543a6b833466793", + "rev": "7bb4113a7e9cb62120e96d7c81066f0c055f0db4", "type": "github" }, "original": { @@ -1082,11 +1103,11 @@ }, "nixpkgs-small": { "locked": { - "lastModified": 1724137240, - "narHash": "sha256-VjbV/91spoYpl+fD7cK1asDhQIjJduP0lT+SgeXtcIc=", + "lastModified": 1724221631, + "narHash": "sha256-zf3gNf0nX2yOb++h4jW9l4iG8R/LfazWZD+KhmW6fcc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2fa2514f041934a6aa261c66dc44829251cffd3", + "rev": "ac2df85f4d5c580786c7b4db031c199554152681", "type": "github" }, "original": { @@ -1236,11 +1257,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1724204906, - "narHash": "sha256-5MGgiIY2IKDR3CKzODtLWDfx6xoKdu4YndYblFQ968I=", + "lastModified": 1724222231, + "narHash": "sha256-IFlMn1lgVsZQZC9WklY9YKcCdI0mUxSYZ7EfkaKCsQU=", "owner": "nix-community", "repo": "nixvim", - "rev": "38b09c1621b07518b8ba51d68ea4153216a09569", + "rev": "b7f419a759f70126e220533b724cc17e8528b184", "type": "github" }, "original": { @@ -1303,6 +1324,7 @@ "ags": "ags", "anyrun": "anyrun", "chaotic": "chaotic", + "fenix": "fenix_2", "firefox-addons": "firefox-addons", "firefox-nightly": "firefox-nightly", "flake-compat": "flake-compat_2", @@ -1327,11 +1349,28 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1724088625, - "narHash": "sha256-vgSBWgUKRyT0ZRZYj43GZkZzPEKgNodCuX/uofqlPsc=", + "lastModified": 1724153119, + "narHash": "sha256-WxpvDJDttkINkXmUA/W5o11lwLPYhATAgu0QUAacZ2g=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "979e3b54f70f6f231c117a5d628b98106e5c7d31", + "rev": "3723e5910c14f0ffbd13de474b8a8fcc74db04ce", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1724153119, + "narHash": "sha256-WxpvDJDttkINkXmUA/W5o11lwLPYhATAgu0QUAacZ2g=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "3723e5910c14f0ffbd13de474b8a8fcc74db04ce", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 09076a46..a82d03fe 100644 --- a/flake.nix +++ b/flake.nix @@ -97,5 +97,10 @@ url = "github:Aylur/ags"; inputs.nixpkgs.follows = "nixpkgs"; }; + # rust toolchain + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } diff --git a/home/modules/default.nix b/home/modules/default.nix index 7d0b89b8..50e047a5 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -3,7 +3,7 @@ "${userModules}/browsers/chromium" "${userModules}/browsers/firefox" "${userModules}/comm/discord" - "${userModules}/devtools/neovim" + "${userModules}/devtools/nixvim" "${userModules}/devtools/vscode" "${userModules}/gaming/lutris" "${userModules}/gaming/mangohud" diff --git a/home/modules/devtools/neovim/plugins/conform.nix b/home/modules/devtools/neovim/plugins/conform.nix deleted file mode 100644 index 6d1da249..00000000 --- a/home/modules/devtools/neovim/plugins/conform.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.conform-nvim; -in -{ - options = { - modules.devtools.neovim.plugins.conform-nvim.enable = mkEnableOption "Enables Conform plugin for Neovim"; - }; - - config = mkIf cfg.enable { - programs.nixvim.plugins.conform-nvim = { - enable = true; - formatOnSave = { - lspFallback = true; - timeoutMs = 500; - }; - notifyOnError = true; - formattersByFt = { - liquidsoap = [ "liquidsoap-prettier" ]; - html = [ [ "prettierd" "prettier" ] ]; - css = [ [ "prettierd" "prettier" ] ]; - javascript = [ [ "prettierd" "prettier" ] ]; - javascriptreact = [ [ "prettierd" "prettier" ] ]; - typescript = [ [ "prettierd" "prettier" ] ]; - typescriptreact = [ [ "prettierd" "prettier" ] ]; - python = [ "black" ]; - lua = [ "stylua" ]; - nix = [ "alejandra" ]; - markdown = [ [ "prettierd" "prettier" ] ]; - yaml = [ "yamllint" "yamlfmt" ]; - }; - }; - }; -} diff --git a/home/modules/devtools/neovim/plugins/default.nix b/home/modules/devtools/neovim/plugins/default.nix deleted file mode 100644 index a364486c..00000000 --- a/home/modules/devtools/neovim/plugins/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ userModules, ... }: { - imports = [ - "${userModules}/devtools/neovim/plugins/ai.nix" - "${userModules}/devtools/neovim/plugins/barbar.nix" - "${userModules}/devtools/neovim/plugins/comment.nix" - "${userModules}/devtools/neovim/plugins/conform.nix" - "${userModules}/devtools/neovim/plugins/efm.nix" - "${userModules}/devtools/neovim/plugins/floaterm.nix" - "${userModules}/devtools/neovim/plugins/harpoon.nix" - "${userModules}/devtools/neovim/plugins/lsp.nix" - "${userModules}/devtools/neovim/plugins/lualine.nix" - "${userModules}/devtools/neovim/plugins/markdown-preview.nix" - "${userModules}/devtools/neovim/plugins/neo-tree.nix" - "${userModules}/devtools/neovim/plugins/nonels.nix" - "${userModules}/devtools/neovim/plugins/startify.nix" - "${userModules}/devtools/neovim/plugins/tagbar.nix" - "${userModules}/devtools/neovim/plugins/telescope.nix" - "${userModules}/devtools/neovim/plugins/treesitter.nix" - "${userModules}/devtools/neovim/plugins/vimtex.nix" - "${userModules}/devtools/neovim/plugins/yanky.nix" - ]; -} diff --git a/home/modules/devtools/neovim/plugins/yanky.nix b/home/modules/devtools/neovim/plugins/yanky.nix deleted file mode 100644 index f18ad02a..00000000 --- a/home/modules/devtools/neovim/plugins/yanky.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.yanky; -in -{ - options = { - modules.devtools.neovim.plugins.yanky.enable = mkEnableOption "Enables Yanky plugin for Neovim"; - }; - - config = mkIf cfg.enable { - programs.nixvim.plugins.yanky = { - enable = true; - }; - }; -} diff --git a/home/modules/devtools/neovim/autocmd.nix b/home/modules/devtools/nixvim/autocmd.nix similarity index 100% rename from home/modules/devtools/neovim/autocmd.nix rename to home/modules/devtools/nixvim/autocmd.nix diff --git a/home/modules/devtools/neovim/completion.nix b/home/modules/devtools/nixvim/completion.nix similarity index 100% rename from home/modules/devtools/neovim/completion.nix rename to home/modules/devtools/nixvim/completion.nix diff --git a/home/modules/devtools/neovim/default.nix b/home/modules/devtools/nixvim/default.nix similarity index 92% rename from home/modules/devtools/neovim/default.nix rename to home/modules/devtools/nixvim/default.nix index 7fd72a80..73783d69 100644 --- a/home/modules/devtools/neovim/default.nix +++ b/home/modules/devtools/nixvim/default.nix @@ -6,7 +6,7 @@ ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.modules.devtools.neovim; + cfg = config.modules.devtools.nixvim; in { imports = [ inputs.nixvim.homeManagerModules.nixvim @@ -19,7 +19,7 @@ in { ]; options = { - modules.devtools.neovim.enable = mkEnableOption "Enable Neovim"; + modules.devtools.nixvim.enable = mkEnableOption "Enable nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/keymap.nix b/home/modules/devtools/nixvim/keymap.nix similarity index 100% rename from home/modules/devtools/neovim/keymap.nix rename to home/modules/devtools/nixvim/keymap.nix diff --git a/home/modules/devtools/neovim/options.nix b/home/modules/devtools/nixvim/options.nix similarity index 100% rename from home/modules/devtools/neovim/options.nix rename to home/modules/devtools/nixvim/options.nix diff --git a/home/modules/devtools/neovim/plugins/ai.nix b/home/modules/devtools/nixvim/plugins/ai.nix similarity index 85% rename from home/modules/devtools/neovim/plugins/ai.nix rename to home/modules/devtools/nixvim/plugins/ai.nix index 17071d96..60848b92 100644 --- a/home/modules/devtools/neovim/plugins/ai.nix +++ b/home/modules/devtools/nixvim/plugins/ai.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.ai; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.ai; +in { options = { - modules.devtools.neovim.plugins.ai.enable = mkEnableOption "Enables AI tools for Neovim"; + modules.devtools.nixvim.plugins.ai.enable = mkEnableOption "Enables AI tools for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/barbar.nix b/home/modules/devtools/nixvim/plugins/barbar.nix similarity index 59% rename from home/modules/devtools/neovim/plugins/barbar.nix rename to home/modules/devtools/nixvim/plugins/barbar.nix index 86d3284b..55e00285 100644 --- a/home/modules/devtools/neovim/plugins/barbar.nix +++ b/home/modules/devtools/nixvim/plugins/barbar.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.barbar; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.barbar; +in { options = { - modules.devtools.neovim.plugins.barbar.enable = mkEnableOption "Enables Barbar plugin for Neovim"; + modules.devtools.nixvim.plugins.barbar.enable = mkEnableOption "Enables Barbar plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/comment.nix b/home/modules/devtools/nixvim/plugins/comment.nix similarity index 56% rename from home/modules/devtools/neovim/plugins/comment.nix rename to home/modules/devtools/nixvim/plugins/comment.nix index 7e9d6588..c133772d 100644 --- a/home/modules/devtools/neovim/plugins/comment.nix +++ b/home/modules/devtools/nixvim/plugins/comment.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.comment; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.comment; +in { options = { - modules.devtools.neovim.plugins.comment.enable = mkEnableOption "Enables Comment plugin for Neovim"; + modules.devtools.nixvim.plugins.comment.enable = mkEnableOption "Enables Comment plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/nixvim/plugins/conform.nix b/home/modules/devtools/nixvim/plugins/conform.nix new file mode 100644 index 00000000..066ca723 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/conform.nix @@ -0,0 +1,37 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.conform-nvim; +in { + options = { + modules.devtools.nixvim.plugins.conform-nvim.enable = mkEnableOption "Enables Conform plugin for nixvim"; + }; + + config = mkIf cfg.enable { + programs.nixvim.plugins.conform-nvim = { + enable = true; + formatOnSave = { + lspFallback = true; + timeoutMs = 500; + }; + notifyOnError = true; + formattersByFt = { + liquidsoap = ["liquidsoap-prettier"]; + html = [["prettierd" "prettier"]]; + css = [["prettierd" "prettier"]]; + javascript = [["prettierd" "prettier"]]; + javascriptreact = [["prettierd" "prettier"]]; + typescript = [["prettierd" "prettier"]]; + typescriptreact = [["prettierd" "prettier"]]; + python = ["black"]; + lua = ["stylua"]; + nix = ["alejandra"]; + markdown = [["prettierd" "prettier"]]; + yaml = ["yamllint" "yamlfmt"]; + }; + }; + }; +} diff --git a/home/modules/devtools/nixvim/plugins/default.nix b/home/modules/devtools/nixvim/plugins/default.nix new file mode 100644 index 00000000..c9eface7 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/default.nix @@ -0,0 +1,23 @@ +{userModules, ...}: { + imports = [ + "${userModules}/devtools/nixvim/plugins/ai.nix" + "${userModules}/devtools/nixvim/plugins/barbar.nix" + "${userModules}/devtools/nixvim/plugins/comment.nix" + "${userModules}/devtools/nixvim/plugins/conform.nix" + "${userModules}/devtools/nixvim/plugins/efm.nix" + "${userModules}/devtools/nixvim/plugins/floaterm.nix" + "${userModules}/devtools/nixvim/plugins/harpoon.nix" + "${userModules}/devtools/nixvim/plugins/lsp.nix" + "${userModules}/devtools/nixvim/plugins/lualine.nix" + "${userModules}/devtools/nixvim/plugins/markdown-preview.nix" + "${userModules}/devtools/nixvim/plugins/neo-tree.nix" + "${userModules}/devtools/nixvim/plugins/nonels.nix" + "${userModules}/devtools/nixvim/plugins/startify.nix" + "${userModules}/devtools/nixvim/plugins/tagbar.nix" + "${userModules}/devtools/nixvim/plugins/telescope.nix" + "${userModules}/devtools/nixvim/plugins/treesitter.nix" + "${userModules}/devtools/nixvim/plugins/vimtex.nix" + "${userModules}/devtools/nixvim/plugins/yanky.nix" + "${userModules}/devtools/nixvim/plugins/rustaceanvim.nix" + ]; +} diff --git a/home/modules/devtools/neovim/plugins/efm.nix b/home/modules/devtools/nixvim/plugins/efm.nix similarity index 69% rename from home/modules/devtools/neovim/plugins/efm.nix rename to home/modules/devtools/nixvim/plugins/efm.nix index 326c99da..d6fde41f 100644 --- a/home/modules/devtools/neovim/plugins/efm.nix +++ b/home/modules/devtools/nixvim/plugins/efm.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.efm; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.efm; +in { options = { - modules.devtools.neovim.plugins.efm.enable = mkEnableOption "Enables EFM LSP support for Neovim"; + modules.devtools.nixvim.plugins.efm.enable = mkEnableOption "Enables EFM LSP support for nixvim"; }; config = mkIf cfg.enable { @@ -27,7 +26,7 @@ in lsp-format = { enable = true; - lspServersToEnable = [ "efm" ]; + lspServersToEnable = ["efm"]; }; efmls-configs.enable = true; diff --git a/home/modules/devtools/neovim/plugins/floaterm.nix b/home/modules/devtools/nixvim/plugins/floaterm.nix similarity index 56% rename from home/modules/devtools/neovim/plugins/floaterm.nix rename to home/modules/devtools/nixvim/plugins/floaterm.nix index c35644f5..5dfe6f17 100644 --- a/home/modules/devtools/neovim/plugins/floaterm.nix +++ b/home/modules/devtools/nixvim/plugins/floaterm.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.floaterm; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.floaterm; +in { options = { - modules.devtools.neovim.plugins.floaterm.enable = mkEnableOption "Enables Floaterm plugin for Neovim"; + modules.devtools.nixvim.plugins.floaterm.enable = mkEnableOption "Enables Floaterm plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/harpoon.nix b/home/modules/devtools/nixvim/plugins/harpoon.nix similarity index 68% rename from home/modules/devtools/neovim/plugins/harpoon.nix rename to home/modules/devtools/nixvim/plugins/harpoon.nix index 1ab4cc32..c930eb76 100644 --- a/home/modules/devtools/neovim/plugins/harpoon.nix +++ b/home/modules/devtools/nixvim/plugins/harpoon.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.harpoon; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.harpoon; +in { options = { - modules.devtools.neovim.plugins.harpoon.enable = mkEnableOption "Enables Harpoon plugin for Neovim"; + modules.devtools.nixvim.plugins.harpoon.enable = mkEnableOption "Enables Harpoon plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/lsp.nix b/home/modules/devtools/nixvim/plugins/lsp.nix similarity index 94% rename from home/modules/devtools/neovim/plugins/lsp.nix rename to home/modules/devtools/nixvim/plugins/lsp.nix index beb34bd8..07d58470 100644 --- a/home/modules/devtools/neovim/plugins/lsp.nix +++ b/home/modules/devtools/nixvim/plugins/lsp.nix @@ -4,11 +4,11 @@ ... }: let inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.lsp; + cfg = config.modules.devtools.nixvim.plugins.lsp; in { options = { - modules.devtools.neovim.plugins.lsp = { - enable = mkEnableOption "Enables LSP support for Neovim"; + modules.devtools.nixvim.plugins.lsp = { + enable = mkEnableOption "Enables LSP support for nixvim"; servers = { cssls.enable = mkEnableOption "Enable CSS LSP"; tailwindcss.enable = mkEnableOption "Enable TailwindCSS LSP"; diff --git a/home/modules/devtools/neovim/plugins/lualine.nix b/home/modules/devtools/nixvim/plugins/lualine.nix similarity index 79% rename from home/modules/devtools/neovim/plugins/lualine.nix rename to home/modules/devtools/nixvim/plugins/lualine.nix index 38df8f72..a5b6cc49 100644 --- a/home/modules/devtools/neovim/plugins/lualine.nix +++ b/home/modules/devtools/nixvim/plugins/lualine.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.lualine; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.lualine; +in { options = { - modules.devtools.neovim.plugins.lualine.enable = mkEnableOption "Enables Lualine plugin for Neovim"; + modules.devtools.nixvim.plugins.lualine.enable = mkEnableOption "Enables Lualine plugin for nixvim"; }; config = mkIf cfg.enable { @@ -18,9 +17,9 @@ in globalstatus = true; sections = { - lualine_a = [ "mode" ]; - lualine_b = [ "branch" ]; - lualine_c = [ "filename" "diff" ]; + lualine_a = ["mode"]; + lualine_b = ["branch"]; + lualine_c = ["filename" "diff"]; lualine_x = [ "diagnostics" diff --git a/home/modules/devtools/neovim/plugins/markdown-preview.nix b/home/modules/devtools/nixvim/plugins/markdown-preview.nix similarity index 67% rename from home/modules/devtools/neovim/plugins/markdown-preview.nix rename to home/modules/devtools/nixvim/plugins/markdown-preview.nix index f2806b69..22012ec2 100644 --- a/home/modules/devtools/neovim/plugins/markdown-preview.nix +++ b/home/modules/devtools/nixvim/plugins/markdown-preview.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.markdown-preview; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.markdown-preview; +in { options = { - modules.devtools.neovim.plugins.markdown-preview.enable = mkEnableOption "Enables Markdown Preview plugin for Neovim"; + modules.devtools.nixvim.plugins.markdown-preview.enable = mkEnableOption "Enables Markdown Preview plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/neo-tree.nix b/home/modules/devtools/nixvim/plugins/neo-tree.nix similarity index 62% rename from home/modules/devtools/neovim/plugins/neo-tree.nix rename to home/modules/devtools/nixvim/plugins/neo-tree.nix index 2fa53673..c7b5c59d 100644 --- a/home/modules/devtools/neovim/plugins/neo-tree.nix +++ b/home/modules/devtools/nixvim/plugins/neo-tree.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.neo-tree; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.neo-tree; +in { options = { - modules.devtools.neovim.plugins.neo-tree.enable = mkEnableOption "Enables Neo-tree plugin for Neovim"; + modules.devtools.nixvim.plugins.neo-tree.enable = mkEnableOption "Enables nix-tree plugin for nixvim"; }; config = mkIf cfg.enable { @@ -27,7 +26,7 @@ in { mode = "n"; key = "n"; - action = ":Neotree action=focus reveal toggle"; + action = ":nixtree action=focus reveal toggle"; options.silent = true; } ]; diff --git a/home/modules/devtools/neovim/plugins/nonels.nix b/home/modules/devtools/nixvim/plugins/nonels.nix similarity index 82% rename from home/modules/devtools/neovim/plugins/nonels.nix rename to home/modules/devtools/nixvim/plugins/nonels.nix index 11ff2307..6b5b68f6 100644 --- a/home/modules/devtools/neovim/plugins/nonels.nix +++ b/home/modules/devtools/nixvim/plugins/nonels.nix @@ -1,21 +1,20 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.none-ls; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.none-ls; +in { options = { - modules.devtools.neovim.plugins.none-ls.enable = mkEnableOption "Enables None-LS plugin for Neovim"; + modules.devtools.nixvim.plugins.none-ls.enable = mkEnableOption "Enables None-LS plugin for nixvim"; }; config = mkIf cfg.enable { programs.nixvim.plugins.none-ls = { enable = true; settings = { - cmd = [ "bash -c nvim" ]; + cmd = ["bash -c nvim"]; debug = true; }; sources = { diff --git a/home/modules/devtools/nixvim/plugins/rustaceanvim.nix b/home/modules/devtools/nixvim/plugins/rustaceanvim.nix new file mode 100644 index 00000000..bedc380e --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/rustaceanvim.nix @@ -0,0 +1,21 @@ +{ + lib, + pkgs, + config, + ... +}: +with lib; let + cfg = config.modules.devtools.nixvim.plugins.rustaceanvim; +in { + options.modules.devtools.nixvim.plugins.rustaceanvim = { + enable = mkEnableOption "Whether to enable rustaceanvim."; + }; + + config = mkIf cfg.enable { + programs.nixvim = { + plugins = { + rustaceanvim.enable = true; + }; + }; + }; +} diff --git a/home/modules/devtools/neovim/plugins/startify.nix b/home/modules/devtools/nixvim/plugins/startify.nix similarity index 80% rename from home/modules/devtools/neovim/plugins/startify.nix rename to home/modules/devtools/nixvim/plugins/startify.nix index 974f588a..f107cb21 100644 --- a/home/modules/devtools/neovim/plugins/startify.nix +++ b/home/modules/devtools/nixvim/plugins/startify.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.startify; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.startify; +in { options = { - modules.devtools.neovim.plugins.startify.enable = mkEnableOption "Enables Startify plugin for Neovim"; + modules.devtools.nixvim.plugins.startify.enable = mkEnableOption "Enables Startify plugin for nixvim"; }; config = mkIf cfg.enable { @@ -28,9 +27,9 @@ in change_to_dir = false; use_unicode = true; - lists = [{ type = "dir"; }]; + lists = [{type = "dir";}]; files_number = 30; - skiplist = [ "flake.lock" ]; + skiplist = ["flake.lock"]; }; }; }; diff --git a/home/modules/devtools/neovim/plugins/tagbar.nix b/home/modules/devtools/nixvim/plugins/tagbar.nix similarity index 66% rename from home/modules/devtools/neovim/plugins/tagbar.nix rename to home/modules/devtools/nixvim/plugins/tagbar.nix index d862fcc3..ee37c69a 100644 --- a/home/modules/devtools/neovim/plugins/tagbar.nix +++ b/home/modules/devtools/nixvim/plugins/tagbar.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.tagbar; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.tagbar; +in { options = { - modules.devtools.neovim.plugins.tagbar.enable = mkEnableOption "Enables Tagbar plugin for Neovim"; + modules.devtools.nixvim.plugins.tagbar.enable = mkEnableOption "Enables Tagbar plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/telescope.nix b/home/modules/devtools/nixvim/plugins/telescope.nix similarity index 78% rename from home/modules/devtools/neovim/plugins/telescope.nix rename to home/modules/devtools/nixvim/plugins/telescope.nix index c3008474..e408cec9 100644 --- a/home/modules/devtools/neovim/plugins/telescope.nix +++ b/home/modules/devtools/nixvim/plugins/telescope.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.telescope; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.telescope; +in { options = { - modules.devtools.neovim.plugins.telescope.enable = mkEnableOption "Enables Telescope plugin for Neovim"; + modules.devtools.nixvim.plugins.telescope.enable = mkEnableOption "Enables Telescope plugin for nixvim"; }; config = mkIf cfg.enable { diff --git a/home/modules/devtools/neovim/plugins/treesitter.nix b/home/modules/devtools/nixvim/plugins/treesitter.nix similarity index 81% rename from home/modules/devtools/neovim/plugins/treesitter.nix rename to home/modules/devtools/nixvim/plugins/treesitter.nix index d7c1ffda..682d36d7 100644 --- a/home/modules/devtools/neovim/plugins/treesitter.nix +++ b/home/modules/devtools/nixvim/plugins/treesitter.nix @@ -1,15 +1,14 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.treesitter; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.treesitter; +in { options = { - modules.devtools.neovim.plugins = { - treesitter.enable = mkEnableOption "Enables Treesitter plugin for Neovim"; + modules.devtools.nixvim.plugins = { + treesitter.enable = mkEnableOption "Enables Treesitter plugin for nixvim"; }; }; diff --git a/home/modules/devtools/neovim/plugins/vimtex.nix b/home/modules/devtools/nixvim/plugins/vimtex.nix similarity index 83% rename from home/modules/devtools/neovim/plugins/vimtex.nix rename to home/modules/devtools/nixvim/plugins/vimtex.nix index 331b5753..71356192 100644 --- a/home/modules/devtools/neovim/plugins/vimtex.nix +++ b/home/modules/devtools/nixvim/plugins/vimtex.nix @@ -1,14 +1,13 @@ -{ lib -, config -, ... -}: -let - inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.neovim.plugins.vimtex; -in { + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.vimtex; +in { options = { - modules.devtools.neovim.plugins.vimtex.enable = mkEnableOption "Enables VimTeX plugin for Neovim"; + modules.devtools.nixvim.plugins.vimtex.enable = mkEnableOption "Enables VimTeX plugin for nixvim"; }; config = mkIf cfg.enable { @@ -27,7 +26,7 @@ in ]; toc_config = { name = "TOC"; - layers = [ "content" "todo" ]; + layers = ["content" "todo"]; resize = true; split_width = 50; todo_sorted = false; @@ -48,13 +47,13 @@ in autoCmd = [ { - event = [ "BufEnter" "BufWinEnter" ]; + event = ["BufEnter" "BufWinEnter"]; pattern = "*.tex"; command = "set filetype=tex \"| VimtexTocOpen"; } { event = "FileType"; - pattern = [ "tex" "latex" ]; + pattern = ["tex" "latex"]; callback = '' function () vim.o.foldmethod = 'expr' diff --git a/home/modules/devtools/nixvim/plugins/yanky.nix b/home/modules/devtools/nixvim/plugins/yanky.nix new file mode 100644 index 00000000..f6c153a5 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/yanky.nix @@ -0,0 +1,18 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.yanky; +in { + options = { + modules.devtools.nixvim.plugins.yanky.enable = mkEnableOption "Enables Yanky plugin for nixvim"; + }; + + config = mkIf cfg.enable { + programs.nixvim.plugins.yanky = { + enable = true; + }; + }; +} diff --git a/home/modules/devtools/neovim/todo.nix b/home/modules/devtools/nixvim/todo.nix similarity index 100% rename from home/modules/devtools/neovim/todo.nix rename to home/modules/devtools/nixvim/todo.nix diff --git a/home/users/adam/modules.nix b/home/users/adam/modules.nix index d3b05bef..8e69f2fd 100644 --- a/home/users/adam/modules.nix +++ b/home/users/adam/modules.nix @@ -8,7 +8,7 @@ discord.enable = true; }; devtools = { - neovim = { + nixvim = { enable = true; plugins = { ai.enable = false; diff --git a/home/users/cnst/modules.nix b/home/users/cnst/modules.nix index a19867f1..c9e45390 100644 --- a/home/users/cnst/modules.nix +++ b/home/users/cnst/modules.nix @@ -8,7 +8,7 @@ discord.enable = true; }; devtools = { - neovim = { + nixvim = { enable = true; plugins = { ai.enable = true; @@ -28,6 +28,7 @@ tagbar.enable = false; vimtex.enable = false; yanky.enable = false; + rustaceanvim.enable = true; lsp = { enable = true; servers = { @@ -48,7 +49,6 @@ yamlls.enable = true; lua-ls.enable = true; tsserver.enable = false; - rust-analyzer.enable = true; }; }; }; diff --git a/home/users/toothpick/modules.nix b/home/users/toothpick/modules.nix index e0c32e12..caf1a2cc 100644 --- a/home/users/toothpick/modules.nix +++ b/home/users/toothpick/modules.nix @@ -8,7 +8,7 @@ discord.enable = true; }; devtools = { - neovim = { + nixvim = { enable = true; plugins = { ai.enable = false; @@ -28,6 +28,7 @@ tagbar.enable = false; vimtex.enable = false; yanky.enable = false; + rustaceanvim.enable = true; lsp = { enable = true; servers = { @@ -48,7 +49,6 @@ yamlls.enable = true; lua-ls.enable = true; tsserver.enable = false; - rust-analyzer.enable = true; }; }; }; diff --git a/hosts/default.nix b/hosts/default.nix index 8751dc0e..813aedb4 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -44,6 +44,7 @@ } inputs.chaotic.nixosModules.default inputs.sops-nix.nixosModules.sops + (import "${mod}/dev") ]; }; toothpc = nixosSystem { @@ -52,17 +53,21 @@ shared ++ [ ./toothpc - "${mod}/boot/lanzaboote" - "${mod}/nix/nh/toothpc" + "${mod}/boot/lanzaboote + " + "${mod}/nix/nh/toothpc + " { home-manager = { - users.toothpick.imports = homeImports."toothpick@toothpc"; + users.toothpick.imports = homeImports." + toothpick@toothpc"; extraSpecialArgs = specialArgs; }; } inputs.chaotic.nixosModules.default inputs.sops-nix.nixosModules.sops + (import "${mod}/dev") ]; }; adampad = nixosSystem { diff --git a/system/dev/default.nix b/system/dev/default.nix new file mode 100644 index 00000000..df0bdd86 --- /dev/null +++ b/system/dev/default.nix @@ -0,0 +1,28 @@ +{ + pkgs, + inputs, + ... +}: { + nixpkgs.overlays = [inputs.fenix.overlays.default]; + environment.systemPackages = with pkgs; [ + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer-nightly + + # Wayland-specific dependencies + wayland # Wayland client library + wayland-protocols # Wayland protocols (essential for building against Wayland) + pkg-config # Helps to manage libraries during compilation + + # Aquamarine: Hyprland's new compositor library + aquamarine # Aquamarine compositor library for Wayland + + # Other utilities and tools + openssl # Required for some crates that involve networking or encryption + ]; +} From ff977bfefcae360fac713119c693e66badaee3d3 Mon Sep 17 00:00:00 2001 From: cnst Date: Thu, 22 Aug 2024 17:01:29 +0200 Subject: [PATCH 2/2] dev changes, trying to get lsps to worknixconfig >:( --- home/modules/devtools/nixvim/plugins/lsp.nix | 68 +++++++------------ .../devtools/nixvim/plugins/neo-tree.nix | 2 +- home/users/cnst/modules.nix | 31 ++------- system/dev/default.nix | 5 ++ 4 files changed, 34 insertions(+), 72 deletions(-) diff --git a/home/modules/devtools/nixvim/plugins/lsp.nix b/home/modules/devtools/nixvim/plugins/lsp.nix index 07d58470..57423f7f 100644 --- a/home/modules/devtools/nixvim/plugins/lsp.nix +++ b/home/modules/devtools/nixvim/plugins/lsp.nix @@ -9,26 +9,6 @@ in { options = { modules.devtools.nixvim.plugins.lsp = { enable = mkEnableOption "Enables LSP support for nixvim"; - servers = { - cssls.enable = mkEnableOption "Enable CSS LSP"; - tailwindcss.enable = mkEnableOption "Enable TailwindCSS LSP"; - html.enable = mkEnableOption "Enable HTML LSP"; - astro.enable = mkEnableOption "Enable AstroJS LSP"; - phpactor.enable = mkEnableOption "Enable PHP LSP"; - svelte.enable = mkEnableOption "Enable Svelte LSP"; - vuels.enable = mkEnableOption "Enable Vue LSP"; - pyright.enable = mkEnableOption "Enable Python LSP"; - marksman.enable = mkEnableOption "Enable Markdown LSP"; - nixd.enable = mkEnableOption "Enable Nix LSP"; - dockerls.enable = mkEnableOption "Enable Docker LSP"; - bashls.enable = mkEnableOption "Enable Bash LSP"; - clangd.enable = mkEnableOption "Enable C/C++ LSP"; - csharp-ls.enable = mkEnableOption "Enable C# LSP"; - yamlls.enable = mkEnableOption "Enable YAML LSP"; - lua-ls.enable = mkEnableOption "Enable Lua LSP"; - tsserver.enable = mkEnableOption "Enable TypeScript/JavaScript LSP"; - rust-analyzer.enable = mkEnableOption "Enable Rust LSP"; - }; }; }; @@ -54,34 +34,32 @@ in { }; servers = { - cssls = mkIf cfg.servers.cssls.enable {}; - tailwindcss = mkIf cfg.servers.tailwindcss.enable {}; - html = mkIf cfg.servers.html.enable {}; - astro = mkIf cfg.servers.astro.enable {}; - phpactor = mkIf cfg.servers.phpactor.enable {}; - svelte = mkIf cfg.servers.svelte.enable {}; - vuels = mkIf cfg.servers.vuels.enable {}; - pyright = mkIf cfg.servers.pyright.enable {}; - marksman = mkIf cfg.servers.marksman.enable {}; - nixd = mkIf cfg.servers.nixd.enable {}; - dockerls = mkIf cfg.servers.dockerls.enable {}; - bashls = mkIf cfg.servers.bashls.enable {}; - clangd = mkIf cfg.servers.clangd.enable {}; - csharp-ls = mkIf cfg.servers.csharp-ls.enable {}; - yamlls = mkIf cfg.servers.yamlls.enable {}; - lua-ls = mkIf cfg.servers.lua-ls.enable { + # Average webdev LSPs + cssls.enable = true; # CSS + tailwindcss.enable = true; # TailwindCSS + html.enable = true; # HTML + astro.enable = true; # AstroJS + phpactor.enable = true; # PHP + svelte.enable = false; # Svelte + vuels.enable = false; # Vue + pyright.enable = true; + marksman.enable = true; + nixd.enable = true; + dockerls.enable = true; + bashls.enable = true; + clangd.enable = true; + csharp-ls.enable = true; + yamlls.enable = true; + lua-ls = { + enable = true; settings.telemetry.enable = false; - settings.diagnostics.globals = ["vim"]; - }; - tsserver = mkIf cfg.servers.tsserver.enable {}; - rust-analyzer = mkIf cfg.servers.rust-analyzer.enable { - installRustc = true; - installCargo = true; - settings = { - checkOnSave = true; - check.command = "clippy"; + settings.diagnostics = { + globals = ["vim"]; }; }; + tsserver = { + enable = false; # TS/JS + }; }; }; }; diff --git a/home/modules/devtools/nixvim/plugins/neo-tree.nix b/home/modules/devtools/nixvim/plugins/neo-tree.nix index c7b5c59d..4f3678b2 100644 --- a/home/modules/devtools/nixvim/plugins/neo-tree.nix +++ b/home/modules/devtools/nixvim/plugins/neo-tree.nix @@ -26,7 +26,7 @@ in { { mode = "n"; key = "n"; - action = ":nixtree action=focus reveal toggle"; + action = ":neotree action=focus reveal toggle"; options.silent = true; } ]; diff --git a/home/users/cnst/modules.nix b/home/users/cnst/modules.nix index c9e45390..a70b5f87 100644 --- a/home/users/cnst/modules.nix +++ b/home/users/cnst/modules.nix @@ -16,41 +16,20 @@ comment.enable = true; conform-nvim.enable = true; efm.enable = true; + floaterm.enable = false; + harpoon.enable = false; + lsp.enable = true; lualine.enable = true; markdown-preview.enable = true; neo-tree.enable = true; none-ls.enable = true; + rustaceanvim.enable = true; startify.enable = true; + tagbar.enable = false; telescope.enable = true; treesitter.enable = true; - floaterm.enable = false; - harpoon.enable = false; - tagbar.enable = false; vimtex.enable = false; yanky.enable = false; - rustaceanvim.enable = true; - lsp = { - enable = true; - servers = { - cssls.enable = true; - tailwindcss.enable = true; - html.enable = true; - astro.enable = false; - phpactor.enable = true; - svelte.enable = false; - vuels.enable = false; - pyright.enable = true; - marksman.enable = true; - nixd.enable = true; - dockerls.enable = true; - bashls.enable = true; - clangd.enable = true; - csharp-ls.enable = true; - yamlls.enable = true; - lua-ls.enable = true; - tsserver.enable = false; - }; - }; }; }; vscode.enable = false; diff --git a/system/dev/default.nix b/system/dev/default.nix index df0bdd86..ea3c38d7 100644 --- a/system/dev/default.nix +++ b/system/dev/default.nix @@ -24,5 +24,10 @@ # Other utilities and tools openssl # Required for some crates that involve networking or encryption + alejandra + nixd + pyright + yaml-language-server + lua-language-server ]; }