From 7d5b6f7d3e3431e0ddfb3203d0fd98385722ea1d Mon Sep 17 00:00:00 2001 From: MDietermann Date: Wed, 1 Jul 2026 20:04:41 +0200 Subject: [PATCH] Nvim switch from NvChad to LazyVim --- config/nvim/.gitignore | 8 +++ config/nvim/.neoconf.json | 15 ++++ config/nvim/LICENSE | 24 ------- config/nvim/README.md | 9 --- config/nvim/init.lua | 39 +--------- config/nvim/lazy-lock.json | 40 +++++++---- config/nvim/lazyvim.json | 10 +++ config/nvim/lua/autocmds.lua | 1 - config/nvim/lua/chadrc.lua | 24 ------- config/nvim/lua/config/autocmds.lua | 2 + config/nvim/lua/config/keymaps.lua | 22 ++++++ config/nvim/lua/config/lazy.lua | 41 +++++++++++ config/nvim/lua/config/options.lua | 2 + config/nvim/lua/configs/conform.lua | 15 ---- config/nvim/lua/configs/lazy.lua | 47 ------------ config/nvim/lua/configs/lspconfig.lua | 6 -- config/nvim/lua/mappings.lua | 28 -------- config/nvim/lua/options.lua | 6 -- config/nvim/lua/plugins/colorscheme.lua | 8 +++ config/nvim/lua/plugins/init.lua | 83 ---------------------- config/nvim/lua/plugins/tmux-navigator.lua | 13 ++++ home/tmux.nix | 48 +++++++++++++ 22 files changed, 198 insertions(+), 293 deletions(-) create mode 100644 config/nvim/.gitignore create mode 100644 config/nvim/.neoconf.json delete mode 100644 config/nvim/LICENSE delete mode 100644 config/nvim/README.md create mode 100644 config/nvim/lazyvim.json delete mode 100644 config/nvim/lua/autocmds.lua delete mode 100644 config/nvim/lua/chadrc.lua create mode 100644 config/nvim/lua/config/autocmds.lua create mode 100644 config/nvim/lua/config/keymaps.lua create mode 100644 config/nvim/lua/config/lazy.lua create mode 100644 config/nvim/lua/config/options.lua delete mode 100644 config/nvim/lua/configs/conform.lua delete mode 100644 config/nvim/lua/configs/lazy.lua delete mode 100644 config/nvim/lua/configs/lspconfig.lua delete mode 100644 config/nvim/lua/mappings.lua delete mode 100644 config/nvim/lua/options.lua create mode 100644 config/nvim/lua/plugins/colorscheme.lua delete mode 100644 config/nvim/lua/plugins/init.lua create mode 100644 config/nvim/lua/plugins/tmux-navigator.lua create mode 100644 home/tmux.nix diff --git a/config/nvim/.gitignore b/config/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/config/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/config/nvim/.neoconf.json b/config/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/config/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/config/nvim/LICENSE b/config/nvim/LICENSE deleted file mode 100644 index fdddb29..0000000 --- a/config/nvim/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/config/nvim/README.md b/config/nvim/README.md deleted file mode 100644 index 769fbdf..0000000 --- a/config/nvim/README.md +++ /dev/null @@ -1,9 +0,0 @@ -**This repo is supposed to be used as config by NvChad users!** - -- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. -- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` -- So you can delete the .git from this repo ( when you clone it locally ) or fork it :) - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/config/nvim/init.lua b/config/nvim/init.lua index e861b68..2514f9e 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -1,37 +1,2 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" -vim.g.mapleader = " " - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, -}, lazy_config) - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "options" -require "autocmds" - -vim.schedule(function() - require "mappings" -end) +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 1050dd0..f0e7d17 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,29 +1,43 @@ { - "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, - "NvChad": { "branch": "v2.5", "commit": "d042cc975247c2aa55fcb228e5d146dc1dc6c648" }, - "base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" }, + "LazyVim": { "branch": "main", "commit": "459a4c3b1059671e766a46c7cc223827dc67e3d0" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "e068ab5f8261f23f6f71ffd8791ae40315b77b9c" }, "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, + "crates.nvim": { "branch": "main", "commit": "694357861ec9ebf12475ddcdd04ea45a0923c32d" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "2038c666bd9d8a0b7349a0b6ee00dc83104b9ecf" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, + "grug-far.nvim": { "branch": "main", "commit": "c69859c1d5427ab5fc7ed12380ab521b4e336691" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, + "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, - "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, - "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, - "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, + "mini.ai": { "branch": "main", "commit": "cb20f298ebf5ae91924cd0c6c310712de2ef4086" }, + "mini.icons": { "branch": "main", "commit": "e56797f90192d81f1fda02e662fc3e8e3d775027" }, + "mini.pairs": { "branch": "main", "commit": "db0fac0a25884183650352ccf92b362a41ed2e9c" }, + "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, + "nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" }, "nvim-lspconfig": { "branch": "master", "commit": "3371bf298c1f56efc26771ee961f461176958fb5" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-tree.lua": { "branch": "master", "commit": "8e8be709c9a93e1ebefde7964884a8b564bfd3e0" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, + "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, + "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "rose-pine": { "branch": "main", "commit": "ff483051a47e27d84bdef47703538df1ed9f4a47" }, "rustaceanvim": { "branch": "main", "commit": "5a3a4158857ee1f7ec839b6ddd87cc0083a19c5f" }, - "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" }, - "ui": { "branch": "v3.0", "commit": "3e67e9d5325fd47fdbc90ca00a147db2f3525754" }, - "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" }, + "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json new file mode 100644 index 0000000..d8bcaf6 --- /dev/null +++ b/config/nvim/lazyvim.json @@ -0,0 +1,10 @@ +{ + "extras": [ + + ], + "install_version": 8, + "news": { + "NEWS.md": "11866" + }, + "version": 8 +} \ No newline at end of file diff --git a/config/nvim/lua/autocmds.lua b/config/nvim/lua/autocmds.lua deleted file mode 100644 index d2db0bb..0000000 --- a/config/nvim/lua/autocmds.lua +++ /dev/null @@ -1 +0,0 @@ -require "nvchad.autocmds" diff --git a/config/nvim/lua/chadrc.lua b/config/nvim/lua/chadrc.lua deleted file mode 100644 index e874e56..0000000 --- a/config/nvim/lua/chadrc.lua +++ /dev/null @@ -1,24 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua --- Please read that file to know all available options :( - ----@type ChadrcConfig -local M = {} - -M.base46 = { - theme = "rosepine", - - -- hl_override = { - -- Comment = { italic = true }, - -- ["@comment"] = { italic = true }, - -- }, -} - --- M.nvdash = { load_on_startup = true } --- M.ui = { --- tabufline = { --- lazyload = false --- } --- } - -return M diff --git a/config/nvim/lua/config/autocmds.lua b/config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..2d0dd71 --- /dev/null +++ b/config/nvim/lua/config/autocmds.lua @@ -0,0 +1,2 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua diff --git a/config/nvim/lua/config/keymaps.lua b/config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..b1f3506 --- /dev/null +++ b/config/nvim/lua/config/keymaps.lua @@ -0,0 +1,22 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua + +local map = vim.keymap.set + +map("n", ";", ":", { desc = "CMD enter command mode" }) +map("i", "jk", "") + +-- DAP (override LazyVim defaults with previous muscle-memory bindings) +map("n", "dl", function() require("dap").step_into() end, { desc = "Debugger step into" }) +map("n", "dj", function() require("dap").step_over() end, { desc = "Debugger step over" }) +map("n", "dk", function() require("dap").step_out() end, { desc = "Debugger step out" }) +map("n", "dc", function() require("dap").continue() end, { desc = "Debugger continue" }) +map("n", "db", function() require("dap").toggle_breakpoint() end, { desc = "Debugger toggle breakpoint" }) +map("n", "dd", function() + require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) +end, { desc = "Debugger conditional breakpoint" }) +map("n", "de", function() require("dap").terminate() end, { desc = "Debugger terminate" }) +map("n", "dr", function() require("dap").run_last() end, { desc = "Debugger run last" }) + +-- rustaceanvim +map("n", "dt", "RustLsp testables", { desc = "Rust testables" }) diff --git a/config/nvim/lua/config/lazy.lua b/config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..14586bc --- /dev/null +++ b/config/nvim/lua/config/lazy.lua @@ -0,0 +1,41 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +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("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.dap.core" }, + { import = "lazyvim.plugins.extras.lang.rust" }, + { import = "plugins" }, + }, + defaults = { + lazy = false, + version = false, + }, + install = { colorscheme = { "rose-pine", "tokyonight", "habamax" } }, + checker = { enabled = true, notify = false }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/config/nvim/lua/config/options.lua b/config/nvim/lua/config/options.lua new file mode 100644 index 0000000..a941f1b --- /dev/null +++ b/config/nvim/lua/config/options.lua @@ -0,0 +1,2 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua diff --git a/config/nvim/lua/configs/conform.lua b/config/nvim/lua/configs/conform.lua deleted file mode 100644 index 35ba6cf..0000000 --- a/config/nvim/lua/configs/conform.lua +++ /dev/null @@ -1,15 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - -- css = { "prettier" }, - -- html = { "prettier" }, - }, - - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, -} - -return options diff --git a/config/nvim/lua/configs/lazy.lua b/config/nvim/lua/configs/lazy.lua deleted file mode 100644 index cd170bd..0000000 --- a/config/nvim/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/config/nvim/lua/configs/lspconfig.lua b/config/nvim/lua/configs/lspconfig.lua deleted file mode 100644 index 20a0cce..0000000 --- a/config/nvim/lua/configs/lspconfig.lua +++ /dev/null @@ -1,6 +0,0 @@ -require("nvchad.configs.lspconfig").defaults() - -local servers = { "html", "cssls" } -vim.lsp.enable(servers) - --- read :h vim.lsp.config for changing options of lsp servers diff --git a/config/nvim/lua/mappings.lua b/config/nvim/lua/mappings.lua deleted file mode 100644 index be83799..0000000 --- a/config/nvim/lua/mappings.lua +++ /dev/null @@ -1,28 +0,0 @@ -require "nvchad.mappings" - --- add yours here - -local map = vim.keymap.set - -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jk", "") - --- map({ "n", "i", "v" }, "", " w ") - --- Nvim DAP -map("n", "dl", "lua require'dap'.step_into()", { desc = "Debugger step into" }) -map("n", "dj", "lua require'dap'.step_over()", { desc = "Debugger step over" }) -map("n", "dk", "lua require'dap'.step_out()", { desc = "Debugger step out" }) -map("n", "dc", "lua require'dap'.continue()", { desc = "Debugger continue" }) -map("n", "db", "lua require'dap'.toggle_breakpoint()", { desc = "Debugger toggle breakpoint" }) -map( - "n", - "dd", - "lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))", - { desc = "Debugger set conditional breakpoint" } -) -map("n", "de", "lua require'dap'.terminate()", { desc = "Debugger reset" }) -map("n", "dr", "lua require'dap'.run_last()", { desc = "Debugger run last" }) - --- rustaceanvim -map("n", "dt", "lua vim.cmd('RustLsp testables')", { desc = "Debugger testables" }) diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua deleted file mode 100644 index 738f20b..0000000 --- a/config/nvim/lua/options.lua +++ /dev/null @@ -1,6 +0,0 @@ -require "nvchad.options" - --- add yours here! - --- local o = vim.o --- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/config/nvim/lua/plugins/colorscheme.lua b/config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..7c4b1fe --- /dev/null +++ b/config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,8 @@ +return { + { "rose-pine/neovim", name = "rose-pine", lazy = false, priority = 1000 }, + + { + "LazyVim/LazyVim", + opts = { colorscheme = "rose-pine" }, + }, +} diff --git a/config/nvim/lua/plugins/init.lua b/config/nvim/lua/plugins/init.lua deleted file mode 100644 index 8b4b2c4..0000000 --- a/config/nvim/lua/plugins/init.lua +++ /dev/null @@ -1,83 +0,0 @@ -return { - { - "stevearc/conform.nvim", - -- event = 'BufWritePre', -- uncomment for format on save - opts = require "configs.conform", - }, - - -- These are some examples, uncomment them if you want to see them work! - { - "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, - }, - - { - 'mrcjkb/rustaceanvim', - -- To avoid being surprised by breaking changes, - -- I recommend you set a version range - version = '^9', - -- This plugin implements proper lazy-loading (see :h lua-plugin-lazy). - -- No need for lazy.nvim to lazy-load it. - lazy = false, - config = function() - local mason_registry = require('mason-registry') - local codelldb = mason_registry.get_package('codelldb') - local extension_path = codelldb:get_install_path() .. "/extension/" - local codelldb_path = extension_path .. "adapter/codelldb" - local liblldb_ext = vim.uv.os_uname().sysname == "Darwin" and "dylib" or "so" - local liblldb_path = extension_path .. "lldb/lib/liblldb." .. liblldb_ext - local cfg = require('rustaceanvim.config') - - vim.g.rustaceanvim = { - dap = { - adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path), - }, - } - end - }, - - { - 'mfussenegger/nvim-dap', - config = function() - local dap, dapui = require('dap'), require('dapui') - - dap.listeners.before.attach.dapui_config = function() - dapui.open() - end - - dap.listeners.before.launch.dapui_config = function() - dapui.open() - end - - dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() - end - - dap.listeners.before.event_exited.dapui_config = function() - dapui.close() - end - end - }, - - { - 'rcarriga/nvim-dap-ui', - dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' }, - config = function() - require('dapui').setup() - end, - }, - - { import = "nvchad.blink.lazyspec" }, - - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "vim", "lua", "vimdoc", - "html", "css" - }, - }, - }, -} diff --git a/config/nvim/lua/plugins/tmux-navigator.lua b/config/nvim/lua/plugins/tmux-navigator.lua new file mode 100644 index 0000000..cd3d721 --- /dev/null +++ b/config/nvim/lua/plugins/tmux-navigator.lua @@ -0,0 +1,13 @@ +return { + { + "christoomey/vim-tmux-navigator", + lazy = false, + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + }, +} diff --git a/home/tmux.nix b/home/tmux.nix new file mode 100644 index 0000000..c0dcd6e --- /dev/null +++ b/home/tmux.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +{ + programs.tmux = { + enable = true; + prefix = "C-Space"; + keyMode = "vi"; + mouse = true; + escapeTime = 10; + terminal = "tmux-256color"; + historyLimit = 50000; + baseIndex = 1; + plugins = with pkgs.tmuxPlugins; [ + vim-tmux-navigator + resurrect + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-save-interval '15' + ''; + } + ]; + extraConfig = '' + # True-color + undercurl passthrough for nvim LSP underlines + set -ga terminal-overrides ',*256col*:Tc' + set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' + set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' + + set -g renumber-windows on + setw -g pane-base-index 1 + + # Splits open in pane's CWD + bind | split-window -h -c "#{pane_current_path}" + bind - split-window -v -c "#{pane_current_path}" + unbind '"' + unbind % + bind c new-window -c "#{pane_current_path}" + + # Reload config + bind r source-file ~/.config/tmux/tmux.conf \; display "reloaded" + + # Vi copy-mode: v select, y yank to X11 clipboard + bind-key -T copy-mode-vi v send -X begin-selection + bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -i' + ''; + }; +}