From 1beecf1d9994543dbba4179be52e70fbe4f957a2 Mon Sep 17 00:00:00 2001 From: cnst Date: Sat, 31 Aug 2024 20:24:08 +0200 Subject: [PATCH 1/2] module resyntaxing --- .sops.yaml | 40 ---- flake.lock | 146 ++++++-------- home/modules/default.nix | 1 + home/modules/devtools/neovim/config/init.lua | 61 ++++++ .../devtools/neovim/config/lspconfig.lua | 39 ++++ .../devtools/neovim/config/nvim-cmp.lua | 73 +++++++ .../devtools/neovim/config/theming.lua | 20 ++ .../neovim/config/treesitter-textobjects.lua | 14 ++ .../devtools/neovim/config/treesitter.lua | 25 +++ home/modules/devtools/neovim/config/utils.lua | 39 ++++ .../devtools/neovim/config/which-key.lua | 52 +++++ home/modules/devtools/neovim/default.nix | 81 ++++++++ home/modules/devtools/nixvim/completion.nix | 161 ++++++++++++--- home/modules/devtools/nixvim/default.nix | 12 +- home/modules/devtools/nixvim/plugins/cmp.nix | 163 ++++++++++++++++ .../devtools/nixvim/plugins/conform.nix | 33 ++-- .../devtools/nixvim/plugins/copilot.nix | 4 +- .../devtools/nixvim/plugins/default.nix | 2 + home/modules/devtools/nixvim/plugins/efm.nix | 13 ++ .../devtools/nixvim/plugins/lightline.nix | 51 +++++ .../devtools/nixvim/plugins/lsp-format.nix | 32 +++ home/modules/devtools/nixvim/plugins/lsp.nix | 96 ++++----- .../devtools/nixvim/plugins/lualine.nix | 29 ++- .../devtools/nixvim/plugins/neo-tree.nix | 6 +- .../devtools/nixvim/plugins/nonels.nix | 5 +- .../devtools/nixvim/plugins/rustaceanvim.nix | 14 +- home/users/adam/modules.nix | 183 +++++++++++++----- home/users/cnst/modules.nix | 14 +- home/users/toothpick/modules.nix | 182 ++++++++++++----- home/users/toothpick/modules.nixbak | 77 ++++++++ hosts/adampad/modules.nix | 162 +++++++++++----- hosts/default.nix | 2 +- hosts/toothpc/modules.nix | 172 +++++++++++----- system/dev/default.nix | 1 + 34 files changed, 1567 insertions(+), 438 deletions(-) delete mode 100644 .sops.yaml create mode 100644 home/modules/devtools/neovim/config/init.lua create mode 100644 home/modules/devtools/neovim/config/lspconfig.lua create mode 100644 home/modules/devtools/neovim/config/nvim-cmp.lua create mode 100644 home/modules/devtools/neovim/config/theming.lua create mode 100644 home/modules/devtools/neovim/config/treesitter-textobjects.lua create mode 100644 home/modules/devtools/neovim/config/treesitter.lua create mode 100644 home/modules/devtools/neovim/config/utils.lua create mode 100644 home/modules/devtools/neovim/config/which-key.lua create mode 100644 home/modules/devtools/neovim/default.nix create mode 100644 home/modules/devtools/nixvim/plugins/cmp.nix create mode 100644 home/modules/devtools/nixvim/plugins/lightline.nix create mode 100644 home/modules/devtools/nixvim/plugins/lsp-format.nix create mode 100644 home/users/toothpick/modules.nixbak diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index 38a4c9e8..00000000 --- a/.sops.yaml +++ /dev/null @@ -1,40 +0,0 @@ -keys: - # Users - - &cnst age1aj6tdyjcxjc3fqda3uvnzy6m49yj4ankvzdstnj3w9dr8hmsccts5vsgd8 - - &adam placeholderkey - - &toothpick age1x6zshjaxnjt76pwqspulc9pqp33lsytwvvwvx6ukqlh7xjqv4p3qcqzlyx - # Hosts - - &cnix age1rzee3wxh7773p7ytaq3zcl8q4tpsz3l43rdv2wezetgk0dlz0vws9jcpu2 - - &adampad placeholderkey - - &toothpc age1un3d9mnxack229gycahuuw0lngjutfwtc4pned9as085mtynm5nqyyxaak -creation_rules: - - path_regex: secrets/cnix-secrets.(yaml|json|env|ini)$ - key_groups: - - age: - - *cnst - - *cnix - - path_regex: secrets/cnst-secrets.(yaml|json|env|ini)$ - key_groups: - - age: - - *cnst - - *cnix - - path_regex: secrets/adampad-secrets.(yaml|json|env|ini)$ - key_groups: - - age: - - *adam - - *adampad - - path_regex: secrets/adam-secrets.(yaml|json|env|ini)$ - key_groups: - - age: - - *adam - - *adampad - # - path_regex: secrets/toothpc-secrets.(yaml|json|env|ini)$ - # key_groups: - # - age: - # - *toothpick - # - *toothpc - # - path_regex: secrets/toothpick-secrets.(yaml|json|env|ini)$ - # key_groups: - # - age: - # - *toothpick - # - *toothpc diff --git a/flake.lock b/flake.lock index 8f69ebeb..7a11a25e 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ ] }, "locked": { - "lastModified": 1724781866, - "narHash": "sha256-ItgACCJCwn8Rx7p8hJBpnU9eCtrdmkg4AbqMZL/rXlY=", + "lastModified": 1724850097, + "narHash": "sha256-3BHxvFb3NJzch1X8puRMkVZujOoarQ1llu3ZcwuvsKU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "7cc3d3179c06caf3769afb3eb0c69aa55676c96a", + "rev": "23c7925dd31e79e8c06086ace3edb129a070ac01", "type": "github" }, "original": { @@ -123,12 +123,12 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1724848807, - "narHash": "sha256-vnqqX1XTwiPL4lV/xUa9wbDVw3zgT3FjpHYaNqRiCi0=", - "rev": "82ab7e98b75a39df40658f66272aa159cfb49400", - "revCount": 1374, + "lastModified": 1724976120, + "narHash": "sha256-ab+ioJFNMI0K2k3ZAaDJKW+B/kQajiPaw4Bmk++uAq8=", + "rev": "c6aca01e74579088d643a5bd1bfcf7a99f9066e7", + "revCount": 1377, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1374%2Brev-82ab7e98b75a39df40658f66272aa159cfb49400/01919927-80d2-70c0-afbc-95bfe6a3f8f7/source.tar.gz?rev=82ab7e98b75a39df40658f66272aa159cfb49400&revCount=1374" + "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1377%2Brev-c6aca01e74579088d643a5bd1bfcf7a99f9066e7/0191a0ac-7734-737a-bdbd-10af179ac962/source.tar.gz?rev=c6aca01e74579088d643a5bd1bfcf7a99f9066e7&revCount=1377" }, "original": { "type": "tarball", @@ -222,11 +222,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1724826636, - "narHash": "sha256-hz8Szf5J9oQg6EeMhHE/eKuexoHPiDbmOZTPvijYwyM=", + "lastModified": 1724913098, + "narHash": "sha256-CgAGpxcTUwkbA2pjjnpLclSKI/DYZ55B8uPmwoXCorI=", "owner": "nix-community", "repo": "fenix", - "rev": "3454a665ff4dd29cf618e6a2e53065370876297f", + "rev": "2d808ed09caffa0984a6d54bc1558959d48b012b", "type": "github" }, "original": { @@ -243,11 +243,11 @@ "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { - "lastModified": 1724826636, - "narHash": "sha256-hz8Szf5J9oQg6EeMhHE/eKuexoHPiDbmOZTPvijYwyM=", + "lastModified": 1724999484, + "narHash": "sha256-AIR8uYGteWS/RyHyZJAHQAUEJ/Mv4ktkPe2mzbJ2zCE=", "owner": "nix-community", "repo": "fenix", - "rev": "3454a665ff4dd29cf618e6a2e53065370876297f", + "rev": "e3bb9176e807e2b166d54153ce8caea5cb2c6700", "type": "github" }, "original": { @@ -265,11 +265,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1724904198, - "narHash": "sha256-KVK7fRmpD4RcAH1wzq4gXqLzr2eHzkDrRc0aAyKTyt8=", + "lastModified": 1725014336, + "narHash": "sha256-4sLMoyIIRR2eRNCcQN1N7UEtuETpa0KrnJOe3vKJm3I=", "owner": "rycee", "repo": "nur-expressions", - "rev": "9e63f0ed86c157ce26b3fd56ee908a726713dfed", + "rev": "c4261180db65409bd3a71bd300c97313d5d37051", "type": "gitlab" }, "original": { @@ -290,11 +290,11 @@ ] }, "locked": { - "lastModified": 1724899320, - "narHash": "sha256-C7x+GwFa9FGUlnVjNYSIrvj0aFaqnbg6KmzDT8hNbQw=", + "lastModified": 1724980034, + "narHash": "sha256-aihnQNfqq9W5C6OPZIGpScwyhjZpP92oT2aepc+vKFA=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "9cb29975e9142471489c582b99cba9db9c01432a", + "rev": "85f50a52e3c33477599b7463398d2ddca68d21ad", "type": "github" }, "original": { @@ -391,11 +391,11 @@ ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725015982, + "narHash": "sha256-1WXS/BBKZUcWlfeZL7U8ujuCdlLktImbpmJgN9zsZXM=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "4f37dc19b47b50512008f38858734f8fa8a4e0cc", "type": "github" }, "original": { @@ -769,11 +769,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1724874889, - "narHash": "sha256-Zb+IQjUMSE+6LPMg9HuxVvHHJsamU5VB13tD7XmBugY=", + "lastModified": 1724967012, + "narHash": "sha256-Zn5Eq6Elq0SRInPrEYGGoo972JzVxd5zExF7FSuTKlo=", "ref": "refs/heads/main", - "rev": "b9b8e6220f55af34e862b541a5a4b30ae6d8f15f", - "revCount": 5155, + "rev": "604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d", + "revCount": 5157, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -881,11 +881,11 @@ ] }, "locked": { - "lastModified": 1724235914, - "narHash": "sha256-QEVuZNXkytS1lqAtRMBAriJREcCTOeprxBTisXxpe3s=", + "lastModified": 1724927767, + "narHash": "sha256-ktnK4QJsbM4+8TQCxeWujvozDo50CldgNGCJ6Omuz/0=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "7bb4113a7e9cb62120e96d7c81066f0c055f0db4", + "rev": "9c1e9e7db2f2746ad9ee144543a786a4da591c7b", "type": "github" }, "original": { @@ -906,11 +906,11 @@ ] }, "locked": { - "lastModified": 1722869141, - "narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=", + "lastModified": 1724863980, + "narHash": "sha256-7Ke9wFRYPUIXwm5ZndGHkWBKj6BsFTkSEXUNXQRHE54=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "0252fd13e78e60fb0da512a212e56007515a49f7", + "rev": "aadf9a27dddd2272ca354ba5a22a0c2d1f919039", "type": "github" }, "original": { @@ -953,11 +953,11 @@ ] }, "locked": { - "lastModified": 1724837759, - "narHash": "sha256-gt1mCTlqnirTHAG8Q90IWEs91fRsTSjBqXhb6bQboe8=", + "lastModified": 1724908834, + "narHash": "sha256-QYtm4H+nzO8lYJYN6TfitmZ5jvb94YqY5MGWvZRCre8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "a679e3a0ef9d3d43639f7ba894069c43e2d39c2c", + "rev": "0ce5684924f553c65828041a86e7e3e09aeaac29", "type": "github" }, "original": { @@ -1167,11 +1167,11 @@ }, "nixpkgs-small": { "locked": { - "lastModified": 1724870369, - "narHash": "sha256-dGHUOi1tBiVOsVdT9QNEuk+FuSMtQxkyx+9CN/34kkk=", + "lastModified": 1724938759, + "narHash": "sha256-1fBHjcU/bh+ivx/uttMjgF5eTI1s9nyxyrZmgEeutns=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "215ea7473ff80eb6cb157ee07223920cc53f4b09", + "rev": "314ab2d44863ce4e5fd47b6575938b323804f1f4", "type": "github" }, "original": { @@ -1197,22 +1197,6 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1721524707, - "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1717196966, @@ -1231,11 +1215,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1724479785, - "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { @@ -1247,11 +1231,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1724224976, - "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { @@ -1337,11 +1321,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1724910392, - "narHash": "sha256-+eAf/UTXPvjMqBXCHaYgJ1SnTsv5w4dE3etga4RBiWw=", + "lastModified": 1724968633, + "narHash": "sha256-eb2NCdLwfXL1MuTAkoDncSl2lCJwyylV5/NM1Ws2P/U=", "owner": "nix-community", "repo": "nixvim", - "rev": "bc7f4166f475bf16b8dac90dc660730ba502c024", + "rev": "2704133fe3ca616b22ed6685cc67180456eb4160", "type": "github" }, "original": { @@ -1423,18 +1407,17 @@ "nixpkgs": "nixpkgs_7", "nixpkgs-small": "nixpkgs-small", "nixvim": "nixvim", - "sops-nix": "sops-nix", "systems": "systems_8" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1724761543, - "narHash": "sha256-G4z3E2PbuAIJ4CSss6Fxs0HMSpnaxMMUFCdyVahAppg=", + "lastModified": 1724841371, + "narHash": "sha256-k6WsRPDn+mZ67Aggh6miUZdGvDmbqlI+N1PJ+hi3znw=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "8db40df2a3c1c3b18402c4844643d2fb6dce87d6", + "rev": "f454ea877180f0fd8d53390a1d9e6bdd6047b35d", "type": "github" }, "original": { @@ -1447,11 +1430,11 @@ "rust-analyzer-src_2": { "flake": false, "locked": { - "lastModified": 1724761543, - "narHash": "sha256-G4z3E2PbuAIJ4CSss6Fxs0HMSpnaxMMUFCdyVahAppg=", + "lastModified": 1724937894, + "narHash": "sha256-M/28TIG+fm5x3GtQ6qSGDw1NHS4nHttz0DM7JcDs4g8=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "8db40df2a3c1c3b18402c4844643d2fb6dce87d6", + "rev": "0ae42bd42576566540a84c62e118aa823edcf2ec", "type": "github" }, "original": { @@ -1482,27 +1465,6 @@ "type": "github" } }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1723501126, - "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/home/modules/default.nix b/home/modules/default.nix index 12d25036..cf2b05e0 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -3,6 +3,7 @@ "${userModules}/browsers/chromium" "${userModules}/browsers/firefox" "${userModules}/comm/discord" + #"${userModules}/devtools/neovim" "${userModules}/devtools/nixvim" "${userModules}/devtools/vscode" "${userModules}/gaming/lutris" diff --git a/home/modules/devtools/neovim/config/init.lua b/home/modules/devtools/neovim/config/init.lua new file mode 100644 index 00000000..f3409928 --- /dev/null +++ b/home/modules/devtools/neovim/config/init.lua @@ -0,0 +1,61 @@ +-- Faster completion +vim.opt.updatetime = 100 + +-- Line numbers +vim.opt.relativenumber = false -- Relative line numbers +vim.opt.number = true -- Display the absolute line number of the current line + +-- Buffer and window options +vim.opt.hidden = true -- Keep closed buffer open in the background +vim.opt.showmode = false -- Do not show the mode in the command line +vim.opt.mouse = "a" -- Enable mouse control +vim.opt.mousemodel = "popup" -- Mouse right-click extends the current selection +vim.opt.splitbelow = true -- A new window is put below the current one +vim.opt.splitright = true -- A new window is put right of the current one + +-- List options +vim.opt.list = true +vim.opt.listchars = { + tab = "▷ ", + trail = "·", + nbsp = "○", + extends = "◣", + precedes = "◢", +} + +-- Swap and undo files +vim.opt.swapfile = false -- Disable the swap file +vim.opt.modeline = true -- Tags such as 'vim:ft=sh' +vim.opt.modelines = 100 -- Sets the type of modelines +vim.opt.undofile = true -- Automatically save and restore undo history + +-- Search options +vim.opt.incsearch = true -- Incremental search: show match for partly typed search command +vim.opt.inccommand = "split" -- Search and replace: preview changes in quickfix list +vim.opt.ignorecase = true -- When the search query is lower-case, match both lower and upper-case patterns +vim.opt.smartcase = true -- Override the 'ignorecase' option if the search pattern contains upper case characters + +-- Scrolling and cursor options +vim.opt.scrolloff = 4 -- Number of screen lines to show around the cursor +vim.opt.cursorline = true -- Highlight the screen line of the cursor +vim.opt.cursorcolumn = false -- Highlight the screen column of the cursor +vim.opt.signcolumn = "yes" -- Whether to show the signcolumn + +-- Display options +vim.opt.colorcolumn = "" -- Columns to highlight +vim.opt.laststatus = 3 -- When to use a status line for the last window +vim.opt.fileencoding = "utf-8" -- File-content encoding for the current buffer +vim.opt.spell = false -- Highlight spelling mistakes (local to window) +vim.opt.wrap = false -- Prevent text from wrapping + +-- Tab options +vim.opt.tabstop = 4 -- Number of spaces a in the text stands for (local to buffer) +vim.opt.shiftwidth = 4 -- Number of spaces used for each step of (auto)indent (local to buffer) +vim.opt.expandtab = true -- Expand to spaces in Insert mode (local to buffer) +vim.opt.autoindent = true -- Do clever autoindenting + +-- Text width +vim.opt.textwidth = 0 -- Maximum width of text that is being inserted + +-- Folding +vim.opt.foldlevel = 99 -- Folds with a level higher than this number will be closed diff --git a/home/modules/devtools/neovim/config/lspconfig.lua b/home/modules/devtools/neovim/config/lspconfig.lua new file mode 100644 index 00000000..b4e34a88 --- /dev/null +++ b/home/modules/devtools/neovim/config/lspconfig.lua @@ -0,0 +1,39 @@ +local lspc = require'lspconfig' + +-- Setup for LSP servers +lspc.tsserver.setup({ + on_attach = function(client, bufnr) + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + + local ts_utils = require("nvim-lsp-ts-utils") + ts_utils.setup({}) + ts_utils.setup_client(client) + + local buf_map = function(bufnr, mode, lhs, rhs, opts) + vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or { silent = true }) + end + + buf_map(bufnr, "n", "gs", ":TSLspOrganize") + buf_map(bufnr, "n", "gi", ":TSLspRenameFile") + buf_map(bufnr, "n", "go", ":TSLspImportAll") + + -- Custom on_attach functionality + on_attach(client, bufnr) + end, +}) +lspc.cssls.setup{} +lspc.clangd.setup{} +lspc.tailwindcss.setup{} +lspc.html.setup{} +lspc.astro.setup{} +lspc.phpactor.setup{} +lspc.pyright.setup{} +lspc.marksman.setup{} +lspc.nixd.setup{} +lspc.dockerls.setup{} +lspc.bashls.setup{} +lspc.csharp_ls.setup{} +lspc.yamlls.setup{} +lspc.lua_ls.setup({ +}) diff --git a/home/modules/devtools/neovim/config/nvim-cmp.lua b/home/modules/devtools/neovim/config/nvim-cmp.lua new file mode 100644 index 00000000..589191b6 --- /dev/null +++ b/home/modules/devtools/neovim/config/nvim-cmp.lua @@ -0,0 +1,73 @@ +local has_words_before = function() + local line, col = table.unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil +end + +local feedkey = function(key, mode) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true) +end + +local cmp = require("cmp") +local lspkind = require("lspkind") + +cmp.setup({ + sources = { + { name = "nvim_lsp" }, + { name = "cmp_tabnine" }, + { name = "treesitter" }, + { name = "buffer" }, + { name = "path" }, + { name = "vsnip" }, + -- { name = "copilot" }, + }, + + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end, + }, + + formatting = { + format = lspkind.cmp_format({ + with_text = true, + menu = { + buffer = "[Buf]", + nvim_lsp = "[LSP]", + nvim_lua = "[Lua]", + latex_symbols = "[Latex]", + treesitter = "[TS]", + cmp_tabnine = "[TN]", + vsnip = "[Snip]", + }, + }), + }, + + mapping = { + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif vim.fn["vsnip#available"](1) == 1 then + feedkey("(vsnip-expand-or-jump)", "") + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { + "i", + "s", + }), + + [""] = cmp.mapping(function() + if cmp.visible() then + cmp.select_prev_item() + elseif vim.fn["vsnip#jumpable"](-1) == 1 then + feedkey("(vsnip-jump-prev)", "") + end + end, { + "i", + "s", + }), + }, +}) diff --git a/home/modules/devtools/neovim/config/theming.lua b/home/modules/devtools/neovim/config/theming.lua new file mode 100644 index 00000000..1f33fdbd --- /dev/null +++ b/home/modules/devtools/neovim/config/theming.lua @@ -0,0 +1,20 @@ +-- Set colorscheme +vim.cmd("set termguicolors") + +-- Configure gruvbox-material +vim.g.gruvbox_material_background = "medium" -- Options: 'hard', 'medium', 'soft' +vim.g.gruvbox_material_palette = "material" -- Options: 'material', 'original', 'palenight' + +-- Load the gruvbox-material colorscheme +vim.cmd([[colorscheme gruvbox-material]]) + +-- Enable colorizer +require("colorizer").setup() +-- set sign +vim.cmd("sign define DiagnosticSignError text= linehl= texthl=DiagnosticSignError numhl=") +vim.cmd("sign define DiagnosticSignHint text= linehl= texthl=DiagnosticSignHint numhl=") +vim.cmd("sign define DiagnosticSignInfo text= linehl= texthl=DiagnosticSignInfo numhl=") +vim.cmd("sign define DiagnosticSignWarn text= linehl= texthl=DiagnosticSignWarn numhl=") + +-- set lightline theme to horizon +vim.g.lightline = { colorscheme = "apprentice" } diff --git a/home/modules/devtools/neovim/config/treesitter-textobjects.lua b/home/modules/devtools/neovim/config/treesitter-textobjects.lua new file mode 100644 index 00000000..8f2c6d6a --- /dev/null +++ b/home/modules/devtools/neovim/config/treesitter-textobjects.lua @@ -0,0 +1,14 @@ +require'nvim-treesitter.configs'.setup { + textobjects = { + select = { + enable = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + }, +} diff --git a/home/modules/devtools/neovim/config/treesitter.lua b/home/modules/devtools/neovim/config/treesitter.lua new file mode 100644 index 00000000..b5d1b77e --- /dev/null +++ b/home/modules/devtools/neovim/config/treesitter.lua @@ -0,0 +1,25 @@ +require("nvim-treesitter.configs").setup({ + highlight = { + enable = true, + disable = {}, + }, + rainbow = { + enable = true, + extended_mode = true, + }, + autotag = { + enable = true, + }, + context_commentstring = { + enable = true, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, +}) diff --git a/home/modules/devtools/neovim/config/utils.lua b/home/modules/devtools/neovim/config/utils.lua new file mode 100644 index 00000000..ad33663a --- /dev/null +++ b/home/modules/devtools/neovim/config/utils.lua @@ -0,0 +1,39 @@ +-- telescope +require("telescope").load_extension("fzy_native") + +-- null-ls +local nb = require("null-ls").builtins + +require("null-ls").setup({ + sources = { + nb.formatting.alejandra, + nb.code_actions.statix, + nb.diagnostics.cppcheck, + nb.diagnostics.deadnix, + nb.diagnostics.statix, + nb.diagnostics.eslint, + nb.completion.spell, + }, +}) + +require("gitsigns").setup() + +-- autopairs +require("nvim-autopairs").setup({}) + +-- copy to system clipboard +vim.api.nvim_set_keymap("v", "y", '"+y', { noremap = true }) +vim.api.nvim_set_keymap("n", "y", ":%+y", { noremap = true }) + +-- paste from system clipboard +vim.api.nvim_set_keymap("n", "p", '"+p', { noremap = true }) + +-- textyankpost autocmd +vim.api.nvim_create_augroup("highlight_yank", { clear = true }) +vim.api.nvim_create_autocmd("TextYankPost", { + group = "highlight_yank", + desc = "Highlight when yanking (copying) text", + callback = function() + vim.highlight.on_yank() + end, +}) diff --git a/home/modules/devtools/neovim/config/which-key.lua b/home/modules/devtools/neovim/config/which-key.lua new file mode 100644 index 00000000..6de6be9e --- /dev/null +++ b/home/modules/devtools/neovim/config/which-key.lua @@ -0,0 +1,52 @@ +-- Updated Which-Key Spec +local wk = require("which-key") + +wk.setup {} + +wk.register({ + [""] = { + ["/"] = { "Telescope live_grep", "Live Grep" }, + P = { '"+P', "Paste from clipboard before cursor" }, + a = { "lua require('telescope.builtin').lsp_code_actions()", "Code Actions" }, + ac = { "CopilotChatToggle", "Toggle Copilot chat" }, + b = { "Telescope buffers", "Buffers" }, + d = { "lua require('telescope.builtin').lsp_document_diagnostics()", "LSP Diagnostics" }, + f = { "Telescope find_files", "Find File" }, + g = { + b = { "ToggleBlameLine", "Toggle BlameLine" }, + c = { "Neogit commit", "Commit" }, + i = { "lua require('telescope').extensions.gh.issues()", "Github Issues" }, + name = "Git / VCS", + p = { "lua require('telescope').extensions.gh.pull_request()", "Github PRs" }, + s = { "Neogit kind=split", "Staging" } + }, + k = { "lua vim.lsp.buf.signature_help()", "Signature Help" }, + l = { + e = { "lua vim.lsp.diagnostic.show_line_diagnostics()", "Show Line Diagnostics" }, + f = { "lua vim.lsp.buf.formatting_sync()", "Format file" }, + name = "LSP", + q = { "lua vim.lsp.diagnostic.set_loclist()", "Set Loclist" } + }, + p = { '"+p', "Paste from clipboard" }, + qc = { "lua local input = vim.fn.input('Quick Chat: '); if input ~= '' then require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer }) end", "CopilotChat - Quick chat" }, + y = { '"+y', "Yank to clipboard" } + }, + g = { + e = { "G", "Bottom" }, + h = { "0", "Line start" }, + l = { "$", "Line end" }, + s = { "^", "First non-blank in line" } + }, + i = { + [""] = { "p", "Paste in Insert Mode" } + }, + v = { + ["<"] = { ""] = { "y", "Yank Selection" }, + [""] = { ""] = { ">gv", "Indent Right" }, + [">"] = { ">gv", "Indent Right" }, + J = { ":m '>+1gv=gv", "Move Down" }, + K = { ":m '<-2gv=gv", "Move Up" } + } +}, { prefix = "" }) diff --git a/home/modules/devtools/neovim/default.nix b/home/modules/devtools/neovim/default.nix new file mode 100644 index 00000000..2f86bfc8 --- /dev/null +++ b/home/modules/devtools/neovim/default.nix @@ -0,0 +1,81 @@ +{ + pkgs, + lib, + config, + ... +}: let + inherit (lib) mkIf mkEnableOption; + cfg = config.modules.devtools.neovim; +in { + options = { + modules.devtools.neovim.enable = mkEnableOption "Enables neovim"; + }; + config = mkIf cfg.enable { + programs.neovim = { + enable = true; + + vimAlias = true; + viAlias = true; + vimdiffAlias = true; + + plugins = with pkgs.vimPlugins; [ + gruvbox-material-nvim + nvim-web-devicons + comment-nvim + cmp-buffer + cmp-nvim-lsp + cmp-path + cmp-spell + cmp-treesitter + cmp-vsnip + friendly-snippets + gitsigns-nvim + lightline-vim + lspkind-nvim + neogit + null-ls-nvim + nvim-autopairs + nvim-cmp + nvim-colorizer-lua + nvim-lspconfig + nvim-tree-lua + (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) + plenary-nvim + rainbow-delimiters-nvim + telescope-fzy-native-nvim + telescope-nvim + vim-floaterm + vim-sneak + vim-vsnip + which-key-nvim + copilot-lua + copilot-cmp + statix + phpactor + ]; + + extraPackages = with pkgs; [nixd gcc ripgrep fd deadnix lua-language-server yaml-language-server bash-language-server]; + + extraConfig = let + luaRequire = module: + builtins.readFile (builtins.toString + ./config + + "/${module}.lua"); + luaConfig = builtins.concatStringsSep "\n" (map luaRequire [ + "init" + "lspconfig" + "nvim-cmp" + "theming" + "treesitter" + "treesitter-textobjects" + "utils" + "which-key" + ]); + in '' + lua <<  + ${luaConfig} +  + ''; + }; + }; +} diff --git a/home/modules/devtools/nixvim/completion.nix b/home/modules/devtools/nixvim/completion.nix index 498c7fda..ea677672 100644 --- a/home/modules/devtools/nixvim/completion.nix +++ b/home/modules/devtools/nixvim/completion.nix @@ -1,51 +1,148 @@ { programs.nixvim = { - opts.completeopt = ["menu" "menuone" "noselect"]; - plugins = { luasnip.enable = true; - - lspkind = { - enable = true; - - cmp = { - enable = true; - menu = { - nvim_lsp = "[LSP]"; - nvim_lua = "[api]"; - path = "[path]"; - luasnip = "[snip]"; - buffer = "[buffer]"; - }; - }; - }; + cmp-buffer = {enable = true;}; + cmp-emoji = {enable = true;}; + cmp-nvim-lsp = {enable = true;}; + cmp-path = {enable = true;}; + cmp_luasnip = {enable = true;}; cmp = { enable = true; - settings = { - snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - - mapping = { - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.close()"; - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; - "" = "cmp.mapping.confirm({ select = true })"; - }; - + experimental = {ghost_text = true;}; + snippet.expand = '' + function(args) + require('luasnip').lsp_expand(args.body) + end + ''; sources = [ - {name = "path";} {name = "nvim_lsp";} {name = "luasnip";} { name = "buffer"; - # Words from other open buffers can also be suggested. option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; } + {name = "nvim_lua";} + {name = "path";} + {name = "copilot";} ]; + formatting = { + fields = ["abbr" "kind" "menu"]; + format = + # lua + '' + function(_, item) + local icons = { + Namespace = "󰌗", + Text = "󰉿", + Method = "󰆧", + Function = "󰆧", + Constructor = "", + Field = "󰜢", + Variable = "󰀫", + Class = "󰠱", + Interface = "", + Module = "", + Property = "󰜢", + Unit = "󰑭", + Value = "󰎠", + Enum = "", + Keyword = "󰌋", + Snippet = "", + Color = "󰏘", + File = "󰈚", + Reference = "󰈇", + Folder = "󰉋", + EnumMember = "", + Constant = "󰏿", + Struct = "󰙅", + Event = "", + Operator = "󰆕", + TypeParameter = "󰊄", + Table = "", + Object = "󰅩", + Tag = "", + Array = "[]", + Boolean = "", + Number = "", + Null = "󰟢", + String = "󰉿", + Calendar = "", + Watch = "󰥔", + Package = "", + Copilot = "", + Codeium = "", + TabNine = "", + } + + local icon = icons[item.kind] or "" + item.kind = string.format("%s %s", icon, item.kind or "") + return item + end + ''; + }; + window = { + completion = { + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + scrollbar = false; + sidePadding = 0; + border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]; + }; + settings.documentation = { + border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]; + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + }; + }; + mapping = { + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.close()"; + "" = + # lua + '' + function(fallback) + local line = vim.api.nvim_get_current_line() + if line:match("^%s*$") then + fallback() + elseif cmp.visible() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }) + else + fallback() + end + end + ''; + "" = + # lua + '' + function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end + ''; + "" = + # lua + '' + function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end + ''; + }; }; }; }; diff --git a/home/modules/devtools/nixvim/default.nix b/home/modules/devtools/nixvim/default.nix index 73783d69..e6e59a7d 100644 --- a/home/modules/devtools/nixvim/default.nix +++ b/home/modules/devtools/nixvim/default.nix @@ -12,7 +12,6 @@ in { inputs.nixvim.homeManagerModules.nixvim ./plugins ./autocmd.nix - ./completion.nix ./keymap.nix ./options.nix ./todo.nix @@ -24,7 +23,7 @@ in { config = mkIf cfg.enable { programs.nixvim = { - extraPlugins = [pkgs.vimPlugins.gruvbox-material]; + extraPlugins = with pkgs.vimPlugins; [gruvbox-material-nvim nvim-web-devicons]; colorscheme = "gruvbox-material"; enable = true; defaultEditor = true; @@ -32,13 +31,8 @@ in { vimAlias = true; luaLoader.enable = true; plugins = { - gitsigns = { - enable = true; - settings.signs = { - add.text = "+"; - change.text = "~"; - }; - }; + gitsigns.enable = true; + statuscol.enable = true; nvim-autopairs.enable = true; nvim-colorizer = { enable = true; diff --git a/home/modules/devtools/nixvim/plugins/cmp.nix b/home/modules/devtools/nixvim/plugins/cmp.nix new file mode 100644 index 00000000..46b7d841 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/cmp.nix @@ -0,0 +1,163 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.cmp; +in { + options = { + modules.devtools.nixvim.plugins.cmp.enable = mkEnableOption "Enables completion plugin for nixvim"; + }; + + config = mkIf cfg.enable { + programs.nixvim = { + plugins = { + luasnip.enable = true; + cmp-buffer = {enable = true;}; + cmp-emoji = {enable = true;}; + cmp-nvim-lsp = {enable = true;}; + cmp-path = {enable = true;}; + cmp_luasnip = {enable = true;}; + + cmp = { + enable = true; + settings = { + experimental = {ghost_text = true;}; + snippet.expand = '' + function(args) + require('luasnip').lsp_expand(args.body) + end + ''; + sources = [ + {name = "nvim_lsp";} + {name = "luasnip";} + { + name = "buffer"; + option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; + } + {name = "nvim_lua";} + {name = "path";} + {name = "copilot";} + ]; + formatting = { + fields = ["abbr" "kind" "menu"]; + format = + # lua + '' + function(_, item) + local icons = { + Namespace = "󰌗", + Text = "󰉿", + Method = "󰆧", + Function = "󰆧", + Constructor = "", + Field = "󰜢", + Variable = "󰀫", + Class = "󰠱", + Interface = "", + Module = "", + Property = "󰜢", + Unit = "󰑭", + Value = "󰎠", + Enum = "", + Keyword = "󰌋", + Snippet = "", + Color = "󰏘", + File = "󰈚", + Reference = "󰈇", + Folder = "󰉋", + EnumMember = "", + Constant = "󰏿", + Struct = "󰙅", + Event = "", + Operator = "󰆕", + TypeParameter = "󰊄", + Table = "", + Object = "󰅩", + Tag = "", + Array = "[]", + Boolean = "", + Number = "", + Null = "󰟢", + String = "󰉿", + Calendar = "", + Watch = "󰥔", + Package = "", + Copilot = "", + Codeium = "", + TabNine = "", + } + + local icon = icons[item.kind] or "" + item.kind = string.format("%s %s", icon, item.kind or "") + return item + end + ''; + }; + window = { + completion = { + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + scrollbar = false; + sidePadding = 0; + border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]; + }; + settings.documentation = { + border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]; + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + }; + }; + mapping = { + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.close()"; + "" = + # lua + '' + function(fallback) + local line = vim.api.nvim_get_current_line() + if line:match("^%s*$") then + fallback() + elseif cmp.visible() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }) + else + fallback() + end + end + ''; + "" = + # lua + '' + function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end + ''; + "" = + # lua + '' + function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end + ''; + }; + }; + }; + }; + }; + }; +} diff --git a/home/modules/devtools/nixvim/plugins/conform.nix b/home/modules/devtools/nixvim/plugins/conform.nix index 3e10b619..d17da91b 100644 --- a/home/modules/devtools/nixvim/plugins/conform.nix +++ b/home/modules/devtools/nixvim/plugins/conform.nix @@ -1,35 +1,44 @@ { lib, config, + pkgs, ... }: let inherit (lib) mkEnableOption mkIf; - cfg = config.modules.devtools.nixvim.plugins.conform-nvim; + cfg = config.modules.devtools.nixvim.plugins.conform; in { options = { - modules.devtools.nixvim.plugins.conform-nvim.enable = mkEnableOption "Enables Conform plugin for nixvim"; + modules.devtools.nixvim.plugins.conform.enable = mkEnableOption "Enables Conform plugin for nixvim"; }; config = mkIf cfg.enable { - programs.nixvim.plugins.conform-nvim = { + programs.nixvim.plugins.conform = { enable = true; settings = { notify_on_error = true; formatters_by_ft = { - liquidsoap = ["liquidsoap-prettier"]; - html = [["prettierd" "prettier"]]; - css = [["prettierd" "prettier"]]; - javascript = [["prettierd" "prettier"]]; - javascriptreact = [["prettierd" "prettier"]]; - typescript = [["prettierd" "prettier"]]; - typescriptreact = [["prettierd" "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"]; + markdown = ["prettierd" "prettier"]; + yaml = ["yamlfmt"]; + rust = ["rustfmt"]; + xml = ["xmllint"]; + php = ["php-cs-fixer"]; }; + stop_after_first = true; }; }; + home.packages = with pkgs; [ + prettierd + yamlfmt + libxml2Python + ]; }; } diff --git a/home/modules/devtools/nixvim/plugins/copilot.nix b/home/modules/devtools/nixvim/plugins/copilot.nix index 04c33987..c156fb1c 100644 --- a/home/modules/devtools/nixvim/plugins/copilot.nix +++ b/home/modules/devtools/nixvim/plugins/copilot.nix @@ -19,11 +19,11 @@ in { copilot-lua = { enable = true; suggestion = { - enabled = true; + enabled = false; autoTrigger = true; keymap.accept = ""; }; - panel.enabled = true; + panel.enabled = false; }; }; keymaps = [ diff --git a/home/modules/devtools/nixvim/plugins/default.nix b/home/modules/devtools/nixvim/plugins/default.nix index e32e1a44..b6bbac48 100644 --- a/home/modules/devtools/nixvim/plugins/default.nix +++ b/home/modules/devtools/nixvim/plugins/default.nix @@ -3,12 +3,14 @@ "${userModules}/devtools/nixvim/plugins/barbar.nix" "${userModules}/devtools/nixvim/plugins/comment.nix" "${userModules}/devtools/nixvim/plugins/conform.nix" + "${userModules}/devtools/nixvim/plugins/cmp.nix" "${userModules}/devtools/nixvim/plugins/copilot.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/lightline.nix" "${userModules}/devtools/nixvim/plugins/markdown-preview.nix" "${userModules}/devtools/nixvim/plugins/neo-tree.nix" "${userModules}/devtools/nixvim/plugins/nonels.nix" diff --git a/home/modules/devtools/nixvim/plugins/efm.nix b/home/modules/devtools/nixvim/plugins/efm.nix index f4d832d7..56d7afb3 100644 --- a/home/modules/devtools/nixvim/plugins/efm.nix +++ b/home/modules/devtools/nixvim/plugins/efm.nix @@ -67,6 +67,7 @@ in { formatter = "black"; }; nix = { + formatter = "alejandra"; linter = "statix"; }; lua = { @@ -86,12 +87,24 @@ in { css = { formatter = "prettier"; }; + scss = { + formatter = "prettier"; + }; ts = { formatter = "prettier"; }; gitcommit = { linter = "gitlint"; }; + php = { + formatter = "php_cs_fixer"; + }; + rust = { + formatter = "rustfmt"; + }; + sql = { + formatter = "sql-formatter"; + }; }; }; }; diff --git a/home/modules/devtools/nixvim/plugins/lightline.nix b/home/modules/devtools/nixvim/plugins/lightline.nix new file mode 100644 index 00000000..12f35f11 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/lightline.nix @@ -0,0 +1,51 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.lightline; +in { + options = { + modules.devtools.nixvim.plugins.lightline.enable = mkEnableOption "Enables lightline plugin for nixvim"; + }; + + config = mkIf cfg.enable { + programs.nixvim.plugins.lightline = { + enable = true; + settings = { + colorscheme = "apprentice"; + active = { + right = [ + [ + "lineinfo" + ] + [ + "percent" + ] + [ + "fileformat" + "fileencoding" + "filetype" + ] + ]; + }; + component = { + charvaluehex = "0x%B"; + lineinfo = "%3l:%-2v%<"; + }; + component_function = { + gitbranch = "FugitiveHead"; + }; + inactive = []; + mode_map = { + "" = "SB"; + "" = "VB"; + i = "I"; + n = "N"; + v = "V"; + }; + }; + }; + }; +} diff --git a/home/modules/devtools/nixvim/plugins/lsp-format.nix b/home/modules/devtools/nixvim/plugins/lsp-format.nix new file mode 100644 index 00000000..493c98f8 --- /dev/null +++ b/home/modules/devtools/nixvim/plugins/lsp-format.nix @@ -0,0 +1,32 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.modules.devtools.nixvim.plugins.lsp-format; +in { + options = { + modules.devtools.nixvim.plugins.lsp-format = { + enable = mkEnableOption "Enables LSP formatting support for nixvim"; + }; + }; + + config = mkIf cfg.enable { + programs.nixvim.plugins.lsp-format = { + enable = true; + + lspServersToEnable = [ + "rustfmt" + "prettier" + "prettierd" + "php-cs-fixer" + "alejandra" + "xmllint" + "black" + "yamlfmt" + "stylua" + ]; + }; + }; +} diff --git a/home/modules/devtools/nixvim/plugins/lsp.nix b/home/modules/devtools/nixvim/plugins/lsp.nix index 9f997950..99a256f7 100644 --- a/home/modules/devtools/nixvim/plugins/lsp.nix +++ b/home/modules/devtools/nixvim/plugins/lsp.nix @@ -13,54 +13,62 @@ in { }; config = mkIf cfg.enable { - programs.nixvim.plugins.lsp = { - enable = true; - - keymaps = { - silent = true; - diagnostic = { - "k" = "goto_prev"; - "j" = "goto_next"; - }; - - lspBuf = { - gd = "definition"; - gD = "references"; - gt = "type_definition"; - gi = "implementation"; - K = "hover"; - "" = "rename"; - }; + programs.nixvim.plugins = { + lsp-format = { + enable = true; + lspServersToEnable = [ + "rust-analyzer" + ]; }; + lsp = { + enable = true; - servers = { - # 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; - diagnostics = { - globals = ["vim"]; - }; + keymaps = { + silent = true; + diagnostic = { + "k" = "goto_prev"; + "j" = "goto_next"; + }; + + lspBuf = { + gd = "definition"; + gD = "references"; + gt = "type_definition"; + gi = "implementation"; + K = "hover"; + "" = "rename"; }; }; - tsserver = { - enable = false; # TS/JS + + servers = { + # 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; + diagnostics = { + globals = ["vim"]; + }; + }; + }; + tsserver = { + enable = false; # TS/JS + }; }; }; }; diff --git a/home/modules/devtools/nixvim/plugins/lualine.nix b/home/modules/devtools/nixvim/plugins/lualine.nix index a5b6cc49..1016f69e 100644 --- a/home/modules/devtools/nixvim/plugins/lualine.nix +++ b/home/modules/devtools/nixvim/plugins/lualine.nix @@ -31,22 +31,35 @@ in { local msg = "" local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') local clients = vim.lsp.get_active_clients() - if next(clients) == nil then - return msg - end + local non_null_ls_clients = {} + for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name + if client.name ~= "null-ls" then + table.insert(non_null_ls_clients, client) end end + + if #non_null_ls_clients > 0 then + for _, client in ipairs(non_null_ls_clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + else + for _, client in ipairs(clients) do + if client.name == "null-ls" then + return client.name + end + end + end + return msg end ''; icon = ""; - color.fg = "#ffffff"; + color.fg = "#A89984"; } - "encoding" "fileformat" "filetype" ]; diff --git a/home/modules/devtools/nixvim/plugins/neo-tree.nix b/home/modules/devtools/nixvim/plugins/neo-tree.nix index 4f3678b2..9dd7b065 100644 --- a/home/modules/devtools/nixvim/plugins/neo-tree.nix +++ b/home/modules/devtools/nixvim/plugins/neo-tree.nix @@ -7,7 +7,7 @@ cfg = config.modules.devtools.nixvim.plugins.neo-tree; in { options = { - modules.devtools.nixvim.plugins.neo-tree.enable = mkEnableOption "Enables nix-tree plugin for nixvim"; + modules.devtools.nixvim.plugins.neo-tree.enable = mkEnableOption "Enables neo-tree plugin for nixvim"; }; config = mkIf cfg.enable { @@ -18,7 +18,7 @@ in { closeIfLastWindow = true; window = { width = 30; - autoExpandWidth = true; + # autoExpandWidth = true; }; }; @@ -26,7 +26,7 @@ in { { mode = "n"; key = "n"; - action = ":neotree action=focus reveal toggle"; + action = ":Neotree focus toggle"; options.silent = true; } ]; diff --git a/home/modules/devtools/nixvim/plugins/nonels.nix b/home/modules/devtools/nixvim/plugins/nonels.nix index 2b229b33..fe1d1b9f 100644 --- a/home/modules/devtools/nixvim/plugins/nonels.nix +++ b/home/modules/devtools/nixvim/plugins/nonels.nix @@ -32,12 +32,15 @@ in { alejandra.enable = true; stylua.enable = true; shfmt.enable = true; - nixpkgs_fmt.enable = false; google_java_format.enable = false; prettier = { enable = true; disableTsServerFormatter = true; }; + prettierd.enable = true; + phpcsfixer.enable = true; + xmllint.enable = true; + yamlfmt.enable = true; black = { enable = true; settings = '' diff --git a/home/modules/devtools/nixvim/plugins/rustaceanvim.nix b/home/modules/devtools/nixvim/plugins/rustaceanvim.nix index bedc380e..88394825 100644 --- a/home/modules/devtools/nixvim/plugins/rustaceanvim.nix +++ b/home/modules/devtools/nixvim/plugins/rustaceanvim.nix @@ -1,6 +1,5 @@ { lib, - pkgs, config, ... }: @@ -13,8 +12,17 @@ in { config = mkIf cfg.enable { programs.nixvim = { - plugins = { - rustaceanvim.enable = true; + plugins.rustaceanvim = { + enable = true; + + settings.server = { + default_settings.rust-analyzer = { + cargo.features = "all"; + checkOnSave = true; + check.command = "clippy"; + rustc.source = "discover"; + }; + }; }; }; }; diff --git a/home/users/adam/modules.nix b/home/users/adam/modules.nix index 0aa664e7..ebba9178 100644 --- a/home/users/adam/modules.nix +++ b/home/users/adam/modules.nix @@ -1,75 +1,166 @@ { modules = { browsers = { - firefox.enable = true; - chromium.enable = false; + firefox = { + enable = true; + }; + chromium = { + enable = false; + }; }; comm = { - discord.enable = true; + discord = { + enable = true; + }; }; devtools = { nixvim = { enable = true; plugins = { - barbar.enable = true; - comment.enable = true; - conform-nvim.enable = true; - copilot.enable = false; - efm.enable = true; - floaterm.enable = false; - harpoon.enable = false; - lsp.enabe = true; - lualine.enable = true; - markdown-preview.enable = true; - neo-tree.enable = true; - none-ls.enable = true; - startify.enable = true; - tagbar.enable = false; - telescope.enable = true; - treesitter.enable = true; - vimtex.enable = false; - yanky.enable = false; + barbar = { + enable = false; + }; + comment = { + enable = true; + }; + conform = { + enable = false; + }; + cmp = { + enable = true; + }; + copilot = { + enable = false; + }; + efm = { + enable = true; + }; + floaterm = { + enable = false; + }; + harpoon = { + enable = false; + }; + lsp = { + enable = true; + }; + lightline = { + enable = false; + }; + lualine = { + enable = true; + }; + markdown-preview = { + enable = true; + }; + neo-tree = { + enable = true; + }; + none-ls = { + enable = false; + }; + rustaceanvim = { + enable = true; + }; + startify = { + enable = true; + }; + tagbar = { + enable = false; + }; + telescope = { + enable = true; + }; + treesitter = { + enable = true; + }; + vimtex = { + enable = false; + }; + yanky = { + enable = false; + }; }; }; - vscode.enable = false; + vscode = { + enable = false; + }; }; gaming = { - lutris.enable = false; - mangohud.enable = false; + lutris = { + enable = false; + }; + mangohud = { + enable = false; + }; }; terminal = { - alacritty.enable = true; - foot.enable = true; - kitty.enable = true; - zellij.enable = false; + alacritty = { + enable = true; + }; + foot = { + enable = true; + }; + kitty = { + enable = true; + }; + zellij = { + enable = false; + }; }; userd = { - sops = { - enable = false; - adam = false; + copyq = { + enable = true; + }; + mako = { + enable = true; + }; + udiskie = { + enable = true; }; - copyq.enable = true; - mako.enable = true; - udiskie.enable = true; }; utils = { - ags.enable = false; - anyrun.enable = false; - rofi.enable = false; - waybar.enable = true; - yazi.enable = true; - misc.enable = true; + ags = { + enable = false; + }; + anyrun = { + enable = false; + }; + rofi = { + enable = false; + }; + waybar = { + enable = true; + }; + yazi = { + enable = true; + }; + misc = { + enable = true; + }; }; wm = { hyprland = { - cnst.enable = false; - toothpick.enable = false; - adam.enable = true; + cnst = { + enable = false; + }; + toothpick = { + enable = false; + }; + adam = { + enable = true; + }; }; utils = { - hypridle.enable = true; - hyprlock.enable = true; - hyprpaper.enable = true; + hypridle = { + enable = true; + }; + hyprlock = { + enable = true; + }; + hyprpaper = { + enable = true; + }; }; }; }; diff --git a/home/users/cnst/modules.nix b/home/users/cnst/modules.nix index 7793eb52..06ea201e 100644 --- a/home/users/cnst/modules.nix +++ b/home/users/cnst/modules.nix @@ -5,7 +5,7 @@ enable = true; }; chromium = { - enable = false; + enable = true; }; }; comm = { @@ -18,12 +18,15 @@ enable = true; plugins = { barbar = { - enable = true; + enable = false; }; comment = { enable = true; }; - conform-nvim = { + conform = { + enable = false; + }; + cmp = { enable = true; }; copilot = { @@ -41,6 +44,9 @@ lsp = { enable = true; }; + lightline = { + enable = false; + }; lualine = { enable = true; }; @@ -51,7 +57,7 @@ enable = true; }; none-ls = { - enable = true; + enable = false; }; rustaceanvim = { enable = true; diff --git a/home/users/toothpick/modules.nix b/home/users/toothpick/modules.nix index 1ea2dc16..4441d7c7 100644 --- a/home/users/toothpick/modules.nix +++ b/home/users/toothpick/modules.nix @@ -1,76 +1,166 @@ { modules = { browsers = { - firefox.enable = true; - chromium.enable = false; + firefox = { + enable = true; + }; + chromium = { + enable = true; + }; }; comm = { - discord.enable = true; + discord = { + enable = true; + }; }; devtools = { nixvim = { enable = true; plugins = { - barbar.enable = true; - comment.enable = true; - conform-nvim.enable = true; - copilot.enable = false; - 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; - vimtex.enable = false; - yanky.enable = false; + barbar = { + enable = false; + }; + comment = { + enable = true; + }; + conform = { + enable = false; + }; + cmp = { + enable = true; + }; + copilot = { + enable = false; + }; + efm = { + enable = true; + }; + floaterm = { + enable = false; + }; + harpoon = { + enable = false; + }; + lsp = { + enable = true; + }; + lightline = { + enable = false; + }; + lualine = { + enable = true; + }; + markdown-preview = { + enable = true; + }; + neo-tree = { + enable = true; + }; + none-ls = { + enable = false; + }; + rustaceanvim = { + enable = true; + }; + startify = { + enable = true; + }; + tagbar = { + enable = false; + }; + telescope = { + enable = true; + }; + treesitter = { + enable = true; + }; + vimtex = { + enable = false; + }; + yanky = { + enable = false; + }; }; }; - vscode.enable = true; + vscode = { + enable = true; + }; }; gaming = { - lutris.enable = false; - mangohud.enable = false; + lutris = { + enable = false; + }; + mangohud = { + enable = false; + }; }; terminal = { - alacritty.enable = true; - foot.enable = true; - kitty.enable = true; - zellij.enable = false; + alacritty = { + enable = true; + }; + foot = { + enable = true; + }; + kitty = { + enable = true; + }; + zellij = { + enable = false; + }; }; userd = { - sops = { + copyq = { + enable = true; + }; + mako = { + enable = true; + }; + udiskie = { enable = true; - toothpick.enable = true; }; - copyq.enable = true; - mako.enable = true; - udiskie.enable = true; }; utils = { - ags.enable = false; - anyrun.enable = false; - rofi.enable = false; - waybar.enable = true; - yazi.enable = true; - misc.enable = true; + ags = { + enable = false; + }; + anyrun = { + enable = false; + }; + rofi = { + enable = false; + }; + waybar = { + enable = true; + }; + yazi = { + enable = true; + }; + misc = { + enable = true; + }; }; wm = { hyprland = { - cnst.enable = false; - toothpick.enable = true; - adam.enable = false; + cnst = { + enable = false; + }; + toothpick = { + enable = true; + }; + adam = { + enable = false; + }; }; utils = { - hypridle.enable = true; - hyprlock.enable = true; - hyprpaper.enable = true; + hypridle = { + enable = true; + }; + hyprlock = { + enable = true; + }; + hyprpaper = { + enable = true; + }; }; }; }; diff --git a/home/users/toothpick/modules.nixbak b/home/users/toothpick/modules.nixbak new file mode 100644 index 00000000..1ea2dc16 --- /dev/null +++ b/home/users/toothpick/modules.nixbak @@ -0,0 +1,77 @@ +{ + modules = { + browsers = { + firefox.enable = true; + chromium.enable = false; + }; + comm = { + discord.enable = true; + }; + devtools = { + nixvim = { + enable = true; + plugins = { + barbar.enable = true; + comment.enable = true; + conform-nvim.enable = true; + copilot.enable = false; + 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; + vimtex.enable = false; + yanky.enable = false; + }; + }; + vscode.enable = true; + }; + gaming = { + lutris.enable = false; + mangohud.enable = false; + }; + terminal = { + alacritty.enable = true; + foot.enable = true; + kitty.enable = true; + zellij.enable = false; + }; + userd = { + sops = { + enable = true; + toothpick.enable = true; + }; + copyq.enable = true; + mako.enable = true; + udiskie.enable = true; + }; + utils = { + ags.enable = false; + anyrun.enable = false; + rofi.enable = false; + waybar.enable = true; + yazi.enable = true; + misc.enable = true; + }; + wm = { + hyprland = { + cnst.enable = false; + toothpick.enable = true; + adam.enable = false; + }; + utils = { + hypridle.enable = true; + hyprlock.enable = true; + hyprpaper.enable = true; + }; + }; + }; +} diff --git a/hosts/adampad/modules.nix b/hosts/adampad/modules.nix index 02712e4f..9a1c7caf 100644 --- a/hosts/adampad/modules.nix +++ b/hosts/adampad/modules.nix @@ -1,69 +1,143 @@ { modules = { gaming = { - steam.enable = false; - gamescope.enable = false; - lutris.enable = false; + steam = { + enable = false; + }; + gamescope = { + enable = false; + }; + lutris = { + enable = false; + }; gamemode = { enable = false; - optimizeGpu = false; + optimizeGpu = { + enable = false; + }; }; }; gui = { - gnome.enable = false; - hyprland.enable = true; - }; - hardware = { - bluetooth.enable = true; - logitech.enable = false; - graphics = { - amd.enable = true; - nvidia.enable = false; + gnome = { + enable = false; + }; + hyprland = { + enable = true; }; }; - network = { - enable = true; - hostName = "adampad"; - interfaces = { - "wlp6s0" = { - allowedTCPPorts = [22 80 443]; + hardware = { + bluetooth = { + enable = true; + }; + logitech = { + enable = false; + }; + graphics = { + amd = { + enable = true; + }; + nvidia = { + enable = false; + }; + }; + network = { + enable = true; + hostName = "adampad"; + interfaces = { + "wlp6s0" = { + allowedTCPPorts = [22 80 443]; + }; }; }; }; studio = { blender = { enable = false; - hip = false; + hip = { + enable = false; + }; + }; + gimp = { + enable = false; + }; + inkscape = { + enable = false; }; - gimp.enable = false; - inkscape.enable = false; }; sysd = { - blueman.enable = true; - dbus.enable = true; - fwupd.enable = true; - gnome-keyring.enable = true; - greetd.enable = true; - gvfs.enable = true; - locate.enable = true; - mullvad.enable = true; - pipewire.enable = true; - powerd.enable = true; - samba.enable = false; - sops = { - enable = false; - adampad = false; + blueman = { + enable = true; + }; + dbus = { + enable = true; + }; + fwupd = { + enable = true; + }; + gnome-keyring = { + enable = true; + }; + greetd = { + enable = true; + }; + gvfs = { + enable = true; + }; + locate = { + enable = true; + }; + mullvad = { + enable = true; + }; + pipewire = { + enable = true; + }; + powerd = { + enable = true; + }; + samba = { + enable = false; + }; + ssh = { + enable = true; + }; + udisks = { + enable = true; + }; + xserver = { + amd = { + enable = true; + }; }; - ssh.enable = true; - udisks.enable = true; - xserver.amd.enable = true; }; utils = { - android.enable = true; - anyrun.enable = true; - corectrl.enable = false; - microfetch.enable = true; - nix-ld.enable = false; + agenix = { + enable = true; + adampad = { + enable = true; + }; + }; + android = { + enable = true; + }; + anyrun = { + enable = true; + }; + corectrl = { + enable = false; + }; + microfetch = { + enable = true; + }; + nix-ld = { + enable = false; + }; + misc = { + enable = true; + }; + npm = { + enable = true; + }; }; }; } diff --git a/hosts/default.nix b/hosts/default.nix index 49af9ac8..9c48e2c6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -36,6 +36,7 @@ ./cnix "${mod}/boot/lanzaboote" "${mod}/nix/nh/cnix" + "${mod}/dev" { home-manager = { users.cnst.imports = homeImports."cnst@cnix"; @@ -44,7 +45,6 @@ } inputs.chaotic.nixosModules.default inputs.agenix.nixosModules.default - (import "${mod}/dev") ]; }; toothpc = nixosSystem { diff --git a/hosts/toothpc/modules.nix b/hosts/toothpc/modules.nix index a15bd33b..8241994b 100644 --- a/hosts/toothpc/modules.nix +++ b/hosts/toothpc/modules.nix @@ -1,74 +1,144 @@ { modules = { gaming = { - steam.enable = true; - gamescope.enable = true; - lutris.enable = true; + steam = { + enable = true; + }; + gamescope = { + enable = true; + }; + lutris = { + enable = true; + }; gamemode = { enable = true; - optimizeGpu = false; - }; - }; - gui = { - gnome.enable = false; - hyprland.enable = true; - }; - hardware = { - bluetooth.enable = false; - logitech.enable = true; - graphics = { - amd.enable = false; - nvidia = { - enable = true; - package = "production"; # set to beta/stable/production depending on preference + optimizeGpu = { + enable = false; }; }; }; - network = { - enable = true; - hostName = "toothpc"; - interfaces = { - "enp4s0" = { - allowedTCPPorts = [22 80 443]; + gui = { + gnome = { + enable = false; + }; + hyprland = { + enable = true; + }; + }; + hardware = { + bluetooth = { + enable = false; + }; + logitech = { + enable = true; + }; + graphics = { + amd = { + enable = false; + }; + nvidia = { + enable = true; + package = "production"; # set to beta/stable/production depending on your needs + }; + }; + network = { + enable = true; + hostName = "toothpc"; + interfaces = { + "enp4s0" = { + allowedTCPPorts = [22 80 443]; + }; }; }; }; studio = { blender = { enable = false; - hip = false; + hip = { + enable = false; + }; + }; + gimp = { + enable = true; + }; + inkscape = { + enable = true; }; - gimp.enable = true; - inkscape.enable = true; }; sysd = { - blueman.enable = false; - dbus.enable = true; - fwupd.enable = true; - gnome-keyring.enable = true; - greetd.enable = true; - gvfs.enable = true; - locate.enable = true; - mullvad.enable = true; - pipewire.enable = true; - powerd.enable = true; - samba.enable = false; - sops = { - enable = true; - toothpc.enable = true; + blueman = { + enable = false; + }; + dbus = { + enable = true; + }; + fwupd = { + enable = true; + }; + gnome-keyring = { + enable = true; + }; + greetd = { + enable = true; + }; + gvfs = { + enable = true; + }; + locate = { + enable = true; + }; + mullvad = { + enable = true; + }; + pipewire = { + enable = true; + }; + powerd = { + enable = true; + }; + samba = { + enable = false; + }; + ssh = { + enable = true; + }; + udisks = { + enable = true; + }; + xserver = { + nvidia = { + enable = true; + }; }; - ssh.enable = true; - udisks.enable = true; - xserver.nvidia.enable = true; }; utils = { - android.enable = true; - anyrun.enable = true; - corectrl.enable = false; - microfetch.enable = true; - nix-ld.enable = false; - misc.enable = true; - npm.enable = true; + agenix = { + enable = true; + toothpc = { + enable = true; + }; + }; + android = { + enable = false; + }; + anyrun = { + enable = true; + }; + corectrl = { + enable = false; + }; + microfetch = { + enable = true; + }; + nix-ld = { + enable = false; + }; + misc = { + enable = true; + }; + npm = { + enable = true; + }; }; }; } diff --git a/system/dev/default.nix b/system/dev/default.nix index fdb68020..8c27886f 100644 --- a/system/dev/default.nix +++ b/system/dev/default.nix @@ -25,6 +25,7 @@ # Other utilities and tools openssl # Required for some crates that involve networking or encryption alejandra + php84Packages.php-cs-fixer # nixd # pyright # yaml-language-server From e6a55ce180a71bf1276f9cc81a8341def0b7794b Mon Sep 17 00:00:00 2001 From: cnst Date: Sat, 31 Aug 2024 20:24:53 +0200 Subject: [PATCH 2/2] module resyntaxing and nixvim changes --- home/users/toothpick/modules.nixbak | 77 ----------------------------- 1 file changed, 77 deletions(-) delete mode 100644 home/users/toothpick/modules.nixbak diff --git a/home/users/toothpick/modules.nixbak b/home/users/toothpick/modules.nixbak deleted file mode 100644 index 1ea2dc16..00000000 --- a/home/users/toothpick/modules.nixbak +++ /dev/null @@ -1,77 +0,0 @@ -{ - modules = { - browsers = { - firefox.enable = true; - chromium.enable = false; - }; - comm = { - discord.enable = true; - }; - devtools = { - nixvim = { - enable = true; - plugins = { - barbar.enable = true; - comment.enable = true; - conform-nvim.enable = true; - copilot.enable = false; - 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; - vimtex.enable = false; - yanky.enable = false; - }; - }; - vscode.enable = true; - }; - gaming = { - lutris.enable = false; - mangohud.enable = false; - }; - terminal = { - alacritty.enable = true; - foot.enable = true; - kitty.enable = true; - zellij.enable = false; - }; - userd = { - sops = { - enable = true; - toothpick.enable = true; - }; - copyq.enable = true; - mako.enable = true; - udiskie.enable = true; - }; - utils = { - ags.enable = false; - anyrun.enable = false; - rofi.enable = false; - waybar.enable = true; - yazi.enable = true; - misc.enable = true; - }; - wm = { - hyprland = { - cnst.enable = false; - toothpick.enable = true; - adam.enable = false; - }; - utils = { - hypridle.enable = true; - hyprlock.enable = true; - hyprpaper.enable = true; - }; - }; - }; -}