From a41935a30e1f0fe95251535a0617f561e62e10cd Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 24 Jul 2024 22:57:01 +0200 Subject: [PATCH] Update things --- flake.lock | 72 +++++++++++++-------------- modules/cli/nvim/init.lua | 23 +++++---- modules/cli/nvim/lazy-lock.json | 50 +++++++++---------- modules/cli/nvim/lua/plugins/lsp.lua | 4 +- modules/cli/nvim/lua/plugins/tree.lua | 10 +++- modules/cli/nvim/lua/plugins/ui.lua | 19 +------ modules/gui/default.nix | 9 ++++ modules/gui/gtk.nix | 2 +- 8 files changed, 98 insertions(+), 91 deletions(-) diff --git a/flake.lock b/flake.lock index bbb77f2..b486668 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1720868637, - "narHash": "sha256-DuU5zs+IbGqIS6z61j/CBOl0x/ZPc7ssq7NiVhs8YKM=", + "lastModified": 1721228239, + "narHash": "sha256-dNnyG0Oi5xeGm8A5Sm6KfwC3mc1y8RGFhwCt7Pi58fU=", "owner": "astal-sh", "repo": "river", - "rev": "1296dc824446984038c08a2278ebeea1c537ebf7", + "rev": "fea47f78b9fcad82544a43ddb81f63d8e477ecc0", "type": "github" }, "original": { @@ -92,11 +92,11 @@ ] }, "locked": { - "lastModified": 1719877454, - "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "type": "github" }, "original": { @@ -222,11 +222,11 @@ "zls": "zls" }, "locked": { - "lastModified": 1720024143, - "narHash": "sha256-Fba/6644jv2BV5dBipH5xELZdnyG+cKdW8NswNV8pjg=", + "lastModified": 1721775877, + "narHash": "sha256-KWZkrocYkmtfgD3Kb4MHip2OoXe7B95P4llBqeoYPUM=", "ref": "refs/heads/main", - "rev": "9f3f663633c3e9a79fb37930e5313b2da78f9ca4", - "revCount": 6444, + "rev": "5620d3bf96a09d4eb9918336650001ddccac039d", + "revCount": 6687, "type": "git", "url": "ssh://git@github.com/mitchellh/ghostty" }, @@ -249,11 +249,11 @@ ] }, "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "lastModified": 1721042469, + "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", "type": "github" }, "original": { @@ -335,11 +335,11 @@ ] }, "locked": { - "lastModified": 1720601689, - "narHash": "sha256-G6MgCUWjJAonm9vgd1zR0rOF7A0YxN83gcXyEs/tWzY=", - "ref": "refs/heads/master", - "rev": "04216763901f904e7e59afe23d30bb814d6c5d14", - "revCount": 3642, + "lastModified": 1720620972, + "narHash": "sha256-coYldbq5xB5ujJgUs2jxVt85IUu4niFjUIt0KP8T/tU=", + "ref": "refs/heads/feat/river-inService", + "rev": "420f02cb253211ddf3a395081691711979bfaf14", + "revCount": 3640, "type": "git", "url": "file:///home/zoriya/projects/home-manager" }, @@ -387,11 +387,11 @@ ] }, "locked": { - "lastModified": 1719971132, - "narHash": "sha256-/u/dRd43l8WHW8WIEAtMf4KnayefCLpB3VpLF2FBEno=", + "lastModified": 1721801625, + "narHash": "sha256-AAgl+P5DcKhqzygohZR0eGzZ24R2H6M5fGac6JHkQvI=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "97bbe0cc1dc3d8962a9d15404a3c41da0ad2a3b3", + "rev": "784324e08c0d597ee74cccb3ea038ef0faf2c1e6", "type": "github" }, "original": { @@ -403,11 +403,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1719963642, - "narHash": "sha256-2+K/i8t4FkGCHEanISE8Q/SbLmWKp1dtpGlf44/x4m0=", + "lastModified": 1721777624, + "narHash": "sha256-X0tpZ/YxBJv/kxsLyGto0PFo2rkDv9jSOFIkpNxfYuQ=", "owner": "neovim", "repo": "neovim", - "rev": "d413038b4fd71b7a335b6653aa64d2cb6daeac7b", + "rev": "c025c049a4a7b0a6dbcd94f804504bba6d081a84", "type": "github" }, "original": { @@ -423,11 +423,11 @@ ] }, "locked": { - "lastModified": 1719832725, - "narHash": "sha256-dr8DkeS74KVNTgi8BE0BiUKALb+EKlMIV86G2xPYO64=", + "lastModified": 1721531260, + "narHash": "sha256-O72uxk4gYFQDwNkoBioyrR3GK9EReZmexCStBaORMW8=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "2917972ed34ce292309b3a4976286f8b5c08db27", + "rev": "b6db9fd8dc59bb2ccb403f76d16ba8bbc1d5263d", "type": "github" }, "original": { @@ -438,11 +438,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1719895800, - "narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=", + "lastModified": 1721754224, + "narHash": "sha256-JEVfxzZRo+/zdWKBjHpAUG905SDZL9fmoLJxf9b5CGU=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "6e253f12b1009053eff5344be5e835f604bb64cd", + "rev": "405b654893aba16c8014de6a17e84439d3fb8e46", "type": "github" }, "original": { @@ -461,11 +461,11 @@ ] }, "locked": { - "lastModified": 1719220171, - "narHash": "sha256-xywM6JoGT8AwfoOFJBTv8GRlvNu8LYqqqMS/OQ6uCgE=", + "lastModified": 1721650907, + "narHash": "sha256-2VX/zPeLhGTsHpToFH1gfI+oGNS6m7ZUWWaqwmw3HVY=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "269411cfed6aab694e46f719277c972de96177bb", + "rev": "6686cbe947cb8b135e229ad2a3447b88d1cf6da9", "type": "github" }, "original": { @@ -476,11 +476,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719848872, - "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "lastModified": 1721562059, + "narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", "type": "github" }, "original": { diff --git a/modules/cli/nvim/init.lua b/modules/cli/nvim/init.lua index 6a95eda..ac86242 100644 --- a/modules/cli/nvim/init.lua +++ b/modules/cli/nvim/init.lua @@ -1,15 +1,20 @@ +-- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) + require("./settings"); require("lazy").setup("plugins", { change_detection = { notify = false } }); diff --git a/modules/cli/nvim/lazy-lock.json b/modules/cli/nvim/lazy-lock.json index af7bbb6..bf79278 100644 --- a/modules/cli/nvim/lazy-lock.json +++ b/modules/cli/nvim/lazy-lock.json @@ -1,56 +1,56 @@ { "ReplaceWithRegister": { "branch": "master", "commit": "832efc23111d19591d495dc72286de2fb0b09345" }, - "SchemaStore.nvim": { "branch": "main", "commit": "e796f9d8d95c2ada582b591d3332daac32f012fc" }, + "SchemaStore.nvim": { "branch": "main", "commit": "4abc1ab13ad5031049864cba0bfaec06a908e7e5" }, "auto-save.nvim": { "branch": "main", "commit": "5fe9ab0c42f0457f2a973e814a6352b8eeb04730" }, "blame.nvim": { "branch": "main", "commit": "20cf0918962fa2da787c4b25331f6024d1b1d808" }, - "catppuccin": { "branch": "main", "commit": "31fcfb02c47952d5c75aec893b93b2878abe5fbb" }, - "cmp-git": { "branch": "main", "commit": "8dfbc33fb32c33e5c0be9dcc8176a4f4d395f95e" }, + "catppuccin": { "branch": "main", "commit": "07f1ee861394c163d1f1d3e1926eb309e0c81027" }, + "cmp-git": { "branch": "main", "commit": "3d83031c4b63f9b10703e32e070cda0700a81992" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "conform.nvim": { "branch": "master", "commit": "c26dadf8a47a547768d1048a0d698ecec33494ce" }, + "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, - "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, + "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "flit.nvim": { "branch": "main", "commit": "a9be4e76c30a128f1e51af448c8321bf8366bcd4" }, "git-conflict.nvim": { "branch": "main", "commit": "45cde6f0acf26d0e4b64acfa45349dd1da01e577" }, - "gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" }, + "gitsigns.nvim": { "branch": "main", "commit": "b29cb58126663569f6f34401fab513c2375e95d3" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, "increment-activator": { "branch": "master", "commit": "b49fc24094f93aa29a7592034b97095b709c3528" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, "lazy-lsp.nvim": { "branch": "master", "commit": "3ce514080931ca6c35036dd9f90da879e9ab3204" }, - "lazy.nvim": { "branch": "main", "commit": "a9d7ade203b3f3ee3058c082c62afdf8e4bcb416" }, - "lazydev.nvim": { "branch": "main", "commit": "78d8a11fbd02ad4eafa07dd8a43a959a69fb3bf8" }, - "leap.nvim": { "branch": "main", "commit": "eca8108dcd5f41fbde2a674dceb58b81ed887dc8" }, + "lazy.nvim": { "branch": "main", "commit": "4496b4cad69a862199bb3ad452d3c4988bb925a1" }, + "lazydev.nvim": { "branch": "main", "commit": "399299ca570aa82c13ee4fb1bd1304ce6baf7f05" }, + "leap.nvim": { "branch": "main", "commit": "437bccd18c933e97c69f2f7d300f1b9d56678bfd" }, "lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "ltex_extra.nvim": { "branch": "dev", "commit": "57192d7ae5ba8cef3c10e90f2cd62d4a7cdaab69" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mini.align": { "branch": "main", "commit": "68a8d3205f0e7ce1bded057f4a851f42ef8fc584" }, + "mini.icons": { "branch": "main", "commit": "352a25dce86c41ab9fe854dd37f60c36ea7048df" }, "mini.splitjoin": { "branch": "main", "commit": "db26e1c991ff5f8cf377e800ef7fba6b5618306b" }, - "neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" }, - "noice.nvim": { "branch": "main", "commit": "03c6a75661e68012e30b0ed81f050358b1e2233c" }, + "neogen": { "branch": "main", "commit": "4a2f68d3eae0018b04132f1d4590e51484043354" }, + "noice.nvim": { "branch": "main", "commit": "d9328ef903168b6f52385a751eb384ae7e906c6f" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, + "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "08bd34bf0ed79723f62764c7f9ca70516d461d0d" }, "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "53a3c6444ec5006b567071614c83edc8ad651f6d" }, + "nvim-lspconfig": { "branch": "master", "commit": "3cceca5a79b66d735cbacbf05fa0bce5f8b716ca" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, "nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-treesitter": { "branch": "master", "commit": "4ee5fdd666f46fb379302a32750f932d25448d98" }, + "nvim-treesitter": { "branch": "master", "commit": "c760e4037cc02336ddd00737f95ee26e128fa745" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, "nvim-type-fmt": { "branch": "main", "commit": "6c1f520f04c1e4f924dae4e822262d7186b5ed59" }, - "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, - "oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" }, + "oil.nvim": { "branch": "master", "commit": "71c972fbd218723a3c15afcb70421f67340f5a6d" }, "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "aad7bf06b4ca0de816b919d475a75b30f5f62b61" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "statuscol.nvim": { "branch": "0.10", "commit": "b0de00dfcf583bdd94284d844aac1b134d47c578" }, "telescope-fzf-native.nvim": { "branch": "feature/69-prebuilt-release-binaries", "commit": "af1d3c6efa0124123272bba094a60e15682c9cd5" }, - "telescope.nvim": { "branch": "master", "commit": "7bd2f9b72f8449780b79bcf351534e2cd36ec43a" }, - "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, - "trouble.nvim": { "branch": "main", "commit": "e5d0e04121c662ce29190a57dd03655d43c59d44" }, - "ts-comments.nvim": { "branch": "main", "commit": "c075b4ee00f6e111b44bf99a8cfd5a4cfce9258a" }, + "telescope.nvim": { "branch": "master", "commit": "bc4e7e450397970ab741d0f489e370ec4ce4d57c" }, + "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" }, "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, "vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, @@ -59,6 +59,6 @@ "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" }, "virtcolumn.nvim": { "branch": "main", "commit": "2291fe12098f1541483e7ee4d0fa0835c1f028f6" }, - "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }, - "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } -} \ No newline at end of file + "which-key.nvim": { "branch": "main", "commit": "058486e5b001f11ef48f180dd57ae3088f5bb6dc" }, + "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } +} diff --git a/modules/cli/nvim/lua/plugins/lsp.lua b/modules/cli/nvim/lua/plugins/lsp.lua index 877fc9a..1e64d1a 100644 --- a/modules/cli/nvim/lua/plugins/lsp.lua +++ b/modules/cli/nvim/lua/plugins/lsp.lua @@ -263,13 +263,14 @@ return { { "e", function() - require("conform").format({ async = true, lsp_fallback = true --[["always"--]] }) + require("conform").format() end, desc = "Format", mode = { "n", "v" }, }, }, opts = { + default_format_opts = { async = true, lsp_format = "fallback" }, formatters_by_ft = { python = function(bufnr) if require("conform").get_formatter_info("ruff_format", bufnr).available then @@ -288,6 +289,7 @@ return { sql = { "pg_format" }, cs = { "csharpier" }, nix = { "alejandra" }, + -- ["_"] = { "injected", lsp_format = "last" }, ["*"] = { "injected" } }, formatters = { diff --git a/modules/cli/nvim/lua/plugins/tree.lua b/modules/cli/nvim/lua/plugins/tree.lua index 393e510..9080454 100644 --- a/modules/cli/nvim/lua/plugins/tree.lua +++ b/modules/cli/nvim/lua/plugins/tree.lua @@ -2,9 +2,15 @@ return { { "stevearc/oil.nvim", lazy = false, - dependencies = { "nvim-tree/nvim-web-devicons" }, + dependencies = { { + "echasnovski/mini.icons", + config = function(_, opts) + require("mini.icons").setup(opts); + MiniIcons.mock_nvim_web_devicons() + end + } }, keys = { - { "-", "Oil", desc = "Open parent directory" }, + { "-", "Oil", desc = "Open parent directory" }, { "", "Oil", desc = "Open parent directory" }, }, opts = { diff --git a/modules/cli/nvim/lua/plugins/ui.lua b/modules/cli/nvim/lua/plugins/ui.lua index 71c40eb..ec3191b 100644 --- a/modules/cli/nvim/lua/plugins/ui.lua +++ b/modules/cli/nvim/lua/plugins/ui.lua @@ -139,23 +139,8 @@ return { opts = { plugins = { spelling = true }, }, - config = function(_, opts) + init = function() vim.opt["timeoutlen"] = 500 - - local wk = require("which-key") - wk.setup(opts) - - wk.register({ - gx = { name = "+Git conflict" }, - }) - wk.register({ - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - ["g"] = { name = "+git" }, - ["l"] = { name = "+lsp" }, - }) end, }, @@ -203,7 +188,7 @@ return { "folke/trouble.nvim", keys = { { "lw", "Trouble cascade", desc = "Diagnostics" }, - { "lt", "TroubleToggle", desc = "Toogle trouble window" }, + { "lt", "TroubleToggle", desc = "Toogle trouble window" }, }, opts = { auto_close = true, diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 6f1298d..9dbc606 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -32,6 +32,15 @@ in { postman ]; + xdg.configFile."discord/settings.json" = { + force = true; + text = '' + { + "SKIP_HOST_UPDATE": true + } + ''; + }; + home.sessionVariables = rec { # Waiting for https://github.com/mitchellh/ghostty/issues/809 before switching to ghostty TERMINAL = "kitty"; diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix index 3d02313..b48842b 100644 --- a/modules/gui/gtk.nix +++ b/modules/gui/gtk.nix @@ -22,7 +22,7 @@ home.pointerCursor = { gtk.enable = true; name = "Adwaita"; - package = pkgs.gnome.adwaita-icon-theme; + package = pkgs.adwaita-icon-theme; size = 24; x11 = { enable = true;