From c1f198c90fee6b49970c1aa391fd73eafe475deb Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Sun, 24 Nov 2024 23:13:13 +0100 Subject: [PATCH] feat: update neovim config, switch up the colors --- config/bat/config | 2 +- config/nvim/lazy-lock.json | 46 ++++++++--------- config/nvim/lazyvim.json | 4 +- config/nvim/lua/config/lazy.lua | 2 +- config/nvim/lua/plugins/ui.lua | 89 ++++++++++++++++++++++++++------- devenv.lock | 55 ++++++++++---------- home/fish.nix | 2 +- home/tmux.nix | 3 +- 8 files changed, 126 insertions(+), 77 deletions(-) diff --git a/config/bat/config b/config/bat/config index f42922a..6fceb88 100644 --- a/config/bat/config +++ b/config/bat/config @@ -1,5 +1,5 @@ # Nord is love, Nord is life ---theme="Nord" +--theme="TwoDark" # Use ".gitignore"-style highlighting for ".ignore" files --map-syntax ".ignore:Git Ignore" diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 9b79c04..bd2aa69 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,11 +1,11 @@ { - "CopilotChat.nvim": { "branch": "canary", "commit": "6b2b412da939e8bc1120d6a2e0323f1354f76aba" }, - "LazyVim": { "branch": "main", "commit": "4d596cf4b4dcb369b2aef7e4d09635416b6c5a3f" }, + "CopilotChat.nvim": { "branch": "canary", "commit": "ac7edc4f8021124cb29892f1facdb1f3001688b6" }, + "LazyVim": { "branch": "main", "commit": "adcbfc72fd8d0808d78bdfe0940d98c6432c4ef0" }, "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, - "SchemaStore.nvim": { "branch": "main", "commit": "291b15c6a03d8f859da8d83f46ed41ae6bb0ea8d" }, + "SchemaStore.nvim": { "branch": "main", "commit": "bbd005a56daab7a19ceea22360a836957ac2c42c" }, "blamer.nvim": { "branch": "master", "commit": "e0d43c11697300eb68f00d69df8b87deb0bf52dc" }, "bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" }, - "catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" }, + "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, "clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, @@ -14,20 +14,19 @@ "codi.vim": { "branch": "master", "commit": "83b9859aaf8066d95892e01eb9c01571a4b325dd" }, "conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" }, "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, - "copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" }, + "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, "crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, - "dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "git-conflict.nvim": { "branch": "main", "commit": "4dc906855751096aaeba2edde7c2cdc7bb881c98" }, - "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, "grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" }, "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" }, "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, - "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, + "lazydev.nvim": { "branch": "main", "commit": "251ca793204bb10986e6eafbff48b6ba247b5f1d" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, @@ -40,35 +39,33 @@ "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" }, - "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "neoconf.nvim": { "branch": "main", "commit": "6cbef40da67b18990670a90136773b55ce96f65e" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "neogit": { "branch": "master", "commit": "89d13fb9898619774d359a3900959181d60dd02f" }, + "neo-tree.nvim": { "branch": "main", "commit": "42caaf5c3b7ca346ab278201151bb878006a6031" }, + "neoconf.nvim": { "branch": "main", "commit": "24db302fe23c4c07233e4b9d79ebe1dd2d3c975b" }, + "neogit": { "branch": "master", "commit": "efd2a182024e422a4c4061683b9264c782eb684a" }, "neoscroll.nvim": { "branch": "master", "commit": "e58ecc61e38f348dcc8f2af037fe7031f8a6ef7c" }, "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, - "neotest-golang": { "branch": "main", "commit": "df6e3f34ae65f2520db798481a9d3f97581899b7" }, + "neotest-golang": { "branch": "main", "commit": "cdb0eb0edfedcdf145972fdbe19fb95d17d987c2" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, "nim.nvim": { "branch": "master", "commit": "076239e8869e3e9b061b17cbca2cea2df73d5f92" }, - "noice.nvim": { "branch": "main", "commit": "203f74adaae11d47440a667555b4af9156be807b" }, + "noice.nvim": { "branch": "main", "commit": "9ccd02965382922c33762933c5601318f93e19fb" }, "none-ls.nvim": { "branch": "main", "commit": "1f2bf17eddfdd45aed254b6922c6c68b933dba9e" }, - "nord.nvim": { "branch": "main", "commit": "4cc19936b1b57ba08eb461c5f450b3976cbb8e0c" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-cmp": { "branch": "main", "commit": "40a03dc225383c4f6256596c2cdf27e03b8119b5" }, + "nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, "nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, - "nvim-lint": { "branch": "master", "commit": "8e9562de7261e5b862c631958df616e1a65552cd" }, - "nvim-lspconfig": { "branch": "master", "commit": "291a8f1a319dc712db85bcc174b0cf406f0a5b69" }, + "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, + "nvim-lspconfig": { "branch": "master", "commit": "dafd61d6533bd90ecf6e2a3a972298fdddc74d82" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-recorder": { "branch": "main", "commit": "60c47f8757817c8e1002795e17d39d23326c8c1e" }, - "nvim-treesitter": { "branch": "master", "commit": "a3a732107f8b529f97bf4921b3e1af5dcc756bb6" }, + "nvim-recorder": { "branch": "main", "commit": "ca25a55f4cdc336a3a0228f9f035c46382b0b70d" }, + "nvim-treesitter": { "branch": "master", "commit": "7930b5f983c37bb07c9af27274334a7adcb3e5af" }, "nvim-treesitter-nim": { "branch": "main", "commit": "c8deb0fa65c12aa63c9c056385f7147b7ec0192c" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, - "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, + "nvim-web-devicons": { "branch": "master", "commit": "f09be61d05bebcba85bb47be1931322d51b95644" }, "obsidian.nvim": { "branch": "main", "commit": "14e0427bef6c55da0d63f9a313fd9941be3a2479" }, "octo.nvim": { "branch": "master", "commit": "51f18085561805732e0306cf7300f773ec86872c" }, "ollama.nvim": { "branch": "main", "commit": "45e58779fecde7ac5b8f62800bbe7180d4b48507" }, @@ -77,9 +74,11 @@ "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, + "render-markdown.nvim": { "branch": "main", "commit": "e1879e0ea3d5cee295b48335fc90e76ae8a63081" }, + "rustaceanvim": { "branch": "master", "commit": "6e742b9fc6a37e46181879f6c32cecfa8cd2cebf" }, "scope.nvim": { "branch": "main", "commit": "932102696ead2b7ab9ff65017767b57e2722fdde" }, "smartyank.nvim": { "branch": "master", "commit": "0a4554a4ea4cad73dab0a15e559f2128ca03c7b2" }, + "snacks.nvim": { "branch": "main", "commit": "7564a30cad803c01f8ecc15683a280d2f0e9bdb7" }, "sort.nvim": { "branch": "main", "commit": "c789da6968337d2a61104a929880b5f144e02855" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, @@ -91,6 +90,7 @@ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, "trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, "venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" }, diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json index 33ff72e..b487734 100644 --- a/config/nvim/lazyvim.json +++ b/config/nvim/lazyvim.json @@ -3,7 +3,7 @@ "lazyvim.plugins.extras.formatting.black" ], "news": { - "NEWS.md": "6520" + "NEWS.md": "7429" }, - "version": 6 + "version": 7 } \ No newline at end of file diff --git a/config/nvim/lua/config/lazy.lua b/config/nvim/lua/config/lazy.lua index ce0d913..3ad2811 100644 --- a/config/nvim/lua/config/lazy.lua +++ b/config/nvim/lua/config/lazy.lua @@ -8,7 +8,7 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath) require("lazy").setup({ spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins", opts = { colorscheme = "nord" } }, + { "LazyVim/LazyVim", import = "lazyvim.plugins", opts = { colorscheme = "tokyonight" } }, { import = "plugins" }, { import = "lazyvim.plugins.extras.ai.copilot" }, { import = "lazyvim.plugins.extras.ai.copilot-chat" }, diff --git a/config/nvim/lua/plugins/ui.lua b/config/nvim/lua/plugins/ui.lua index 062240f..b9fef70 100644 --- a/config/nvim/lua/plugins/ui.lua +++ b/config/nvim/lua/plugins/ui.lua @@ -1,16 +1,16 @@ return { -- change trouble config -- - { - "gbprod/nord.nvim", - lazy = false, - priority = 1000, - config = function() - require("nord").setup({}) - vim.cmd.colorscheme("nord") - end, - }, - { "folke/tokyonight.nvim", enabled = false }, + -- { + -- "gbprod/nord.nvim", + -- lazy = false, + -- priority = 1000, + -- config = function() + -- require("nord").setup({}) + -- vim.cmd.colorscheme("nord") + -- end, + -- }, + -- { "folke/tokyonight.nvim", enabled = false }, { "folke/trouble.nvim", -- opts will be merged with the parent spec @@ -37,6 +37,18 @@ return { }, -- change some options opts = { + file_ignore_patterns = { ".git/", "node_modules", "poetry.lock" }, + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--hidden", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + "--trim", + }, pickers = { buffers = { theme = "ivy" }, find_files = { theme = "ivy" }, @@ -59,13 +71,42 @@ return { telescope.load_extension("project") end, }, + -- see hidden files in neotree + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + filesystem = { + filtered_items = { + visible = true, + show_hidden_count = true, + hide_dotfiles = false, + hide_gitignored = true, + hide_by_name = { + -- '.git', + -- '.DS_Store', + -- 'thumbs.db', + }, + never_show = {}, + }, + }, + }, + }, -- Scope buffers to tabs { "tiagovla/scope.nvim", config = true }, { - "nvimdev/dashboard-nvim", + "folke/snacks.nvim", event = "VimEnter", - opts = function(_, opts) - local logo = [[ + opts = { + dashboard = { + sections = { + { section = "header" }, + { icon = " ", title = "Keymaps", section = "keys", indent = 2, padding = 1 }, + { icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1 }, + { icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 }, + { section = "startup" }, + }, + preset = { + header = [[ SSSSS .sSSS s. SSSSS .sSSSSs. SSSSSSSSSs..sSSS SSSSSSSSSS SSSs.SSSSS.sSSSsSS SSsSSSSS S SS S SS SSSSS S SS S SS SSSSSS SS SSSSSS SSS SS S SSSSS Z @@ -75,11 +116,21 @@ return { S:::S S:::S SSSSS S:::S S:::S S::S SSSS S:::SS:::S SSSSS S%%%S SSSSSS%%%S SSSSSS%%%SSSSSSS S%%%S SS SS S%%%SS%%%S SSSSS SSSSSsSS;:'SSSSS SSSSSSSSSSSSSSSS SSSSS SsS SSSSSSSSSS SSSSS -]] - logo = string.rep("\n", 8) .. logo .. "\n\n" - - opts.config.header = vim.split(logo, "\n") - return opts - end, +]], + -- stylua: ignore + ---@type snacks.dashboard.Item[] + keys = { + { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, + { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, + { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, + { icon = " ", key = "s", desc = "Restore Session", section = "session" }, + { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, + }, + }, + }, }, } diff --git a/devenv.lock b/devenv.lock index 0f86701..a76c4f0 100644 --- a/devenv.lock +++ b/devenv.lock @@ -23,7 +23,6 @@ "owner": "edolstra", "repo": "flake-compat", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb", "type": "github" }, "original": { @@ -32,10 +31,32 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1732021966, + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "3308484d1a443fc5bc92012435d79e80458fe43c", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ - "pre-commit-hooks", + "git-hooks", "nixpkgs" ] }, @@ -44,7 +65,6 @@ "owner": "hercules-ci", "repo": "gitignore.nix", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9", "type": "github" }, "original": { @@ -74,7 +94,6 @@ "owner": "NixOS", "repo": "nixpkgs", "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", - "treeHash": "414dfa1e410a7dffdc26d668b49159e8020a839d", "type": "github" }, "original": { @@ -84,34 +103,14 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1732021966, - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "3308484d1a443fc5bc92012435d79e80458fe43c", - "treeHash": "434cf02841a1faf9e53437604ffa4b9a92669bff", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "devenv": "devenv", + "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks" + "pre-commit-hooks": [ + "git-hooks" + ] } } }, diff --git a/home/fish.nix b/home/fish.nix index 6ef0660..9ebbc1a 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -72,7 +72,7 @@ in set fish_cursor_replace_one underscore blink set fish_cursor_visual block bind \eh 'fuck' - set fish_theme nord + set fish_theme tokyonight set -gx EDITOR nvim set -gx GOPRIVATE github.com/reMarkable # FIXME: Disable this for now as it breaks vi mode. diff --git a/home/tmux.nix b/home/tmux.nix index 216fd71..837834c 100644 --- a/home/tmux.nix +++ b/home/tmux.nix @@ -9,11 +9,10 @@ escapeTime = 0; keyMode = "vi"; plugins = with pkgs.tmuxPlugins; [ - nord + tokyo-night-tmux tmux-thumbs tmux-fzf tmux-thumbs - tmux-fzf tilish ]; prefix = "`";