From 3bb4ec6ec4d5d4adaf15d22899788c3db407bdad Mon Sep 17 00:00:00 2001 From: steven-na Date: Tue, 30 Jun 2026 19:55:05 -0700 Subject: 2 different vim versions --- arch/bigvim/.config/bigvim/.stylua.toml | 3 + arch/bigvim/.config/bigvim/init.lua | 27 +++++ arch/bigvim/.config/bigvim/lazy-lock.json | 32 ++++++ arch/bigvim/.config/bigvim/lua/keymaps.lua | 41 +++++++ arch/bigvim/.config/bigvim/lua/options.lua | 39 +++++++ .../.config/bigvim/lua/plugins/colorscheme.lua | 108 +++++++++++++++++ .../.config/bigvim/lua/plugins/completion.lua | 60 ++++++++++ arch/bigvim/.config/bigvim/lua/plugins/editor.lua | 73 ++++++++++++ arch/bigvim/.config/bigvim/lua/plugins/extras.lua | 107 +++++++++++++++++ .../.config/bigvim/lua/plugins/formatting.lua | 60 ++++++++++ arch/bigvim/.config/bigvim/lua/plugins/fzf.lua | 30 +++++ arch/bigvim/.config/bigvim/lua/plugins/linting.lua | 17 +++ arch/bigvim/.config/bigvim/lua/plugins/lsp.lua | 103 +++++++++++++++++ arch/bigvim/.config/bigvim/lua/plugins/nav.lua | 16 +++ .../.config/bigvim/lua/plugins/treesitter.lua | 31 +++++ arch/bigvim/.config/bigvim/lua/plugins/ui.lua | 106 +++++++++++++++++ .../bigvim/.config/bigvim/lua/plugins/whichkey.lua | 25 ++++ arch/fish/.config/fish/functions/vi.fish | 3 + arch/lightvim/.config/lightvim/lua/plugins.lua | 128 ++++++++++++--------- arch/nvim/.config/nvim/.stylua.toml | 3 - arch/nvim/.config/nvim/init.lua | 27 ----- arch/nvim/.config/nvim/lazy-lock.json | 32 ------ arch/nvim/.config/nvim/lua/keymaps.lua | 41 ------- arch/nvim/.config/nvim/lua/options.lua | 39 ------- arch/nvim/.config/nvim/lua/plugins/colorscheme.lua | 108 ----------------- arch/nvim/.config/nvim/lua/plugins/completion.lua | 60 ---------- arch/nvim/.config/nvim/lua/plugins/editor.lua | 73 ------------ arch/nvim/.config/nvim/lua/plugins/extras.lua | 107 ----------------- arch/nvim/.config/nvim/lua/plugins/formatting.lua | 60 ---------- arch/nvim/.config/nvim/lua/plugins/fzf.lua | 30 ----- arch/nvim/.config/nvim/lua/plugins/linting.lua | 17 --- arch/nvim/.config/nvim/lua/plugins/lsp.lua | 103 ----------------- arch/nvim/.config/nvim/lua/plugins/nav.lua | 16 --- arch/nvim/.config/nvim/lua/plugins/treesitter.lua | 31 ----- arch/nvim/.config/nvim/lua/plugins/ui.lua | 106 ----------------- arch/nvim/.config/nvim/lua/plugins/whichkey.lua | 25 ---- 36 files changed, 954 insertions(+), 933 deletions(-) create mode 100644 arch/bigvim/.config/bigvim/.stylua.toml create mode 100644 arch/bigvim/.config/bigvim/init.lua create mode 100644 arch/bigvim/.config/bigvim/lazy-lock.json create mode 100644 arch/bigvim/.config/bigvim/lua/keymaps.lua create mode 100644 arch/bigvim/.config/bigvim/lua/options.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/colorscheme.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/completion.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/editor.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/extras.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/formatting.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/fzf.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/linting.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/lsp.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/nav.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/treesitter.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/ui.lua create mode 100644 arch/bigvim/.config/bigvim/lua/plugins/whichkey.lua create mode 100644 arch/fish/.config/fish/functions/vi.fish delete mode 100644 arch/nvim/.config/nvim/.stylua.toml delete mode 100644 arch/nvim/.config/nvim/init.lua delete mode 100644 arch/nvim/.config/nvim/lazy-lock.json delete mode 100644 arch/nvim/.config/nvim/lua/keymaps.lua delete mode 100644 arch/nvim/.config/nvim/lua/options.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/colorscheme.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/completion.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/editor.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/extras.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/formatting.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/fzf.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/linting.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/lsp.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/nav.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/treesitter.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/ui.lua delete mode 100644 arch/nvim/.config/nvim/lua/plugins/whichkey.lua (limited to 'arch') diff --git a/arch/bigvim/.config/bigvim/.stylua.toml b/arch/bigvim/.config/bigvim/.stylua.toml new file mode 100644 index 0000000..e55efd5 --- /dev/null +++ b/arch/bigvim/.config/bigvim/.stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 4 +column_width = 120 diff --git a/arch/bigvim/.config/bigvim/init.lua b/arch/bigvim/.config/bigvim/init.lua new file mode 100644 index 0000000..fb4cadd --- /dev/null +++ b/arch/bigvim/.config/bigvim/init.lua @@ -0,0 +1,27 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.uv.fs_stat(lazypath) then + vim.fn.system({ + "git", "clone", "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("options") +require("keymaps") + +require("lazy").setup("plugins", { + performance = { + rtp = { + disabled_plugins = { + "gzip", "matchit", "matchparen", "netrwPlugin", + "tarPlugin", "tohtml", "tutor", "zipPlugin", + }, + }, + }, + install = { colorscheme = { "habamax" } }, + checker = { enabled = false }, + change_detection = { notify = false }, +}) diff --git a/arch/bigvim/.config/bigvim/lazy-lock.json b/arch/bigvim/.config/bigvim/lazy-lock.json new file mode 100644 index 0000000..fdd24c3 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lazy-lock.json @@ -0,0 +1,32 @@ +{ + "LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, + "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "fzf-lua": { "branch": "main", "commit": "b437bafc981a180d609bb4092c56ce8999f7a2c4" }, + "gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" }, + "hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, + "leap.nvim": { "branch": "main", "commit": "156c71aabb68d520c6269db4103c8e5580e3ea67" }, + "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "mini.animate": { "branch": "main", "commit": "0365de8b69331c25d0d0d7573407a7dc7719e578" }, + "mini.base16": { "branch": "main", "commit": "800f107b27a00978b0dadd672d6da21a5b12fa9a" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, + "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, + "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, + "nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" }, + "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, + "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, + "rustaceanvim": { "branch": "main", "commit": "a60811ae6054ba981cb4693aaecd715dea783327" }, + "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, + "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, + "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} diff --git a/arch/bigvim/.config/bigvim/lua/keymaps.lua b/arch/bigvim/.config/bigvim/lua/keymaps.lua new file mode 100644 index 0000000..2a38a95 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/keymaps.lua @@ -0,0 +1,41 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +local map = vim.keymap.set + +-- Disable Space in normal/visual (used as leader) +map({ "n", "v" }, "", "", { silent = true }) + +-- Save +map({ "n", "i" }, "", "w", { desc = "Save" }) + +-- Clear search highlight +map("n", "", "nohlsearch") + +-- Exit terminal mode +map("t", "", "", { desc = "Exit terminal" }) + +-- Better up/down on wrapped lines +map({ "n", "v" }, "j", "gj") +map({ "n", "v" }, "k", "gk") + +-- Buffer navigation +map("n", "", "bprevious", { desc = "Prev buffer" }) +map("n", "", "bnext", { desc = "Next buffer" }) +map("n", "bd", "bdelete", { desc = "Delete buffer" }) + +-- Splits +map("n", "sv", "v", { desc = "Split vertical" }) +map("n", "sh", "s", { desc = "Split horizontal" }) +map("n", "se", "=", { desc = "Equal splits" }) +map("n", "sx", "close", { desc = "Close split" }) + +-- Move lines +map("n", "", "m .+1==", { desc = "Move line down" }) +map("n", "", "m .-2==", { desc = "Move line up" }) +map("v", "", ":m '>+1gv=gv", { desc = "Move selection down" }) +map("v", "", ":m '<-2gv=gv", { desc = "Move selection up" }) + +-- Stay in visual after indent +map("v", "<", "", ">gv") diff --git a/arch/bigvim/.config/bigvim/lua/options.lua b/arch/bigvim/.config/bigvim/lua/options.lua new file mode 100644 index 0000000..6d53af3 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/options.lua @@ -0,0 +1,39 @@ +local opt = vim.opt + +-- Line numbers +opt.number = true +opt.relativenumber = true + +-- Indentation +opt.expandtab = true +opt.tabstop = 4 +opt.shiftwidth = 4 +opt.softtabstop = 4 + +-- Visual +opt.cursorline = true +opt.scrolloff = 20 +opt.signcolumn = "yes" +opt.list = true +opt.listchars = { tab = " ", trail = "·", nbsp = "␣" } +opt.termguicolors = true +opt.colorcolumn = "" + +-- Behaviour +opt.swapfile = false +opt.undofile = true +opt.updatetime = 250 +opt.timeoutlen = 300 +opt.splitbelow = true +opt.splitright = true +opt.ignorecase = true +opt.smartcase = true +opt.inccommand = "split" +opt.hlsearch = true +opt.breakindent = true + +-- Folding (nvim-ufo) +opt.foldcolumn = "0" +opt.foldlevel = 99 +opt.foldlevelstart = 99 +opt.foldenable = true diff --git a/arch/bigvim/.config/bigvim/lua/plugins/colorscheme.lua b/arch/bigvim/.config/bigvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..2e25d6c --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/colorscheme.lua @@ -0,0 +1,108 @@ +return { + "echasnovski/mini.base16", + version = false, + lazy = false, + priority = 1000, + config = function() + local palette_path = vim.fn.expand("~/.cache/wallust/nvim.lua") + + local fallback = { + base00 = "#1e1e2e", + base01 = "#181825", + base02 = "#313244", + base03 = "#45475a", + base04 = "#585b70", + base05 = "#cdd6f4", + base06 = "#f5c2e7", + base07 = "#b4befe", + base08 = "#f38ba8", + base09 = "#fab387", + base0A = "#f9e2af", + base0B = "#a6e3a1", + base0C = "#94e2d5", + base0D = "#89b4fa", + base0E = "#cba6f7", + base0F = "#f2cdcd", + } + + local function load_palette() + local ok, p = pcall(dofile, palette_path) + return ok and p or fallback + end + + local transparent_groups = { + "Normal", + "NormalNC", + "NormalFloat", + "SignColumn", + "FoldColumn", + "EndOfBuffer", + "LineNr", + "CursorLineNr", + "CursorLine", + "StatusLine", + "StatusLineNC", + "TabLine", + "TabLineFill", + "TabLineSel", + "VertSplit", + "WinSeparator", + "Pmenu", + "PmenuSbar", + "PmenuThumb", + "FloatBorder", + "FloatTitle", + } + + local function apply_transparent() + for _, grp in ipairs(transparent_groups) do + vim.cmd("hi " .. grp .. " guibg=NONE ctermbg=NONE") + end + end + + local function apply(palette) + require("mini.base16").setup({ palette = palette }) + vim.api.nvim_set_hl(0, "LineNr", { fg = palette.base05 }) + vim.api.nvim_set_hl(0, "LineNrAbove", { fg = palette.base05 }) + vim.api.nvim_set_hl(0, "LineNrBelow", { fg = palette.base05 }) + vim.api.nvim_set_hl(0, "CursorLineNr", { fg = palette.base03, bold = true }) + vim.api.nvim_set_hl(0, "SignColumn", { bg = palette.base00 }) + vim.api.nvim_set_hl(0, "CursorLineSign", { bg = palette.base00 }) + vim.api.nvim_set_hl(0, "DiagnosticSignError", { fg = palette.base08, bg = palette.base00 }) + vim.api.nvim_set_hl(0, "DiagnosticSignWarn", { fg = palette.base0A, bg = palette.base00 }) + vim.api.nvim_set_hl(0, "DiagnosticSignInfo", { fg = palette.base0D, bg = palette.base00 }) + vim.api.nvim_set_hl(0, "DiagnosticSignHint", { fg = palette.base0C, bg = palette.base00 }) + if vim.g.transparent_bg then + apply_transparent() + end + end + + vim.g.transparent_bg = false + apply(load_palette()) + + -- Watch wallust output file and reload automatically + local watcher = vim.uv.new_fs_event() + if watcher then + watcher:start( + palette_path, + {}, + vim.schedule_wrap(function() + apply(load_palette()) + vim.api.nvim_exec_autocmds("User", { pattern = "ThemeChanged" }) + end) + ) + end + + vim.keymap.set("n", "tt", function() + vim.g.transparent_bg = not vim.g.transparent_bg + if vim.g.transparent_bg then + apply_transparent() + vim.notify("Background: transparent", vim.log.levels.INFO) + else + apply(load_palette()) + vim.notify("Background: colorscheme", vim.log.levels.INFO) + end + vim.api.nvim_exec_autocmds("User", { pattern = "TransparentToggle" }) + end, { desc = "Toggle transparent background" }) + end, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/completion.lua b/arch/bigvim/.config/bigvim/lua/plugins/completion.lua new file mode 100644 index 0000000..8fe2e26 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/completion.lua @@ -0,0 +1,60 @@ +local function expand_menu() + local cfg = require("blink.cmp.config").completion + cfg.menu.max_height = 10 + cfg.documentation.auto_show = true + pcall(function() + require("blink.cmp.completion.windows.menu").update_position() + end) +end + +vim.api.nvim_create_autocmd("User", { + pattern = "BlinkCmpMenuClose", + callback = function() + local ok, cfg = pcall(function() return require("blink.cmp.config").completion end) + if not ok then return end + cfg.menu.max_height = 5 + cfg.documentation.auto_show = false + end, +}) + +return { + { + "saghen/blink.cmp", + version = "*", + dependencies = { "L3MON4D3/LuaSnip", "rafamadriz/friendly-snippets" }, + opts = { + keymap = { + preset = "none", + [""] = { "show", "show_documentation", "hide_documentation" }, + [""] = { "hide" }, + [""] = { "accept", "fallback" }, + [""] = { expand_menu, "select_next", "fallback" }, + [""] = { "select_prev", "fallback" }, + [""] = { "scroll_documentation_up", "fallback" }, + [""] = { "scroll_documentation_down", "fallback" }, + [""] = { "select_next", "fallback" }, + [""] = { "select_prev", "fallback" }, + [""] = { "snippet_forward", "fallback" }, + [""] = { "snippet_backward", "fallback" }, + }, + appearance = { nerd_font_variant = "mono" }, + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, + snippets = { preset = "luasnip" }, + completion = { + documentation = { auto_show = false, auto_show_delay_ms = 200 }, + ghost_text = { enabled = false }, + menu = { auto_show = true, max_height = 5 }, + }, + }, + }, + { + "L3MON4D3/LuaSnip", + event = "InsertEnter", + dependencies = { "rafamadriz/friendly-snippets" }, + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/editor.lua b/arch/bigvim/.config/bigvim/lua/plugins/editor.lua new file mode 100644 index 0000000..a6ec0e0 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/editor.lua @@ -0,0 +1,73 @@ +return { + -- Motion: s + two chars to jump anywhere + { + url = "https://codeberg.org/andyg/leap.nvim", + keys = { + { "s", "(leap)", mode = { "n", "x", "o" }, desc = "Leap" }, + { "S", "(leap-from-window)", mode = { "n", "o" }, desc = "Leap from window" }, + }, + }, + -- Enforce good vim habits + { + "m4xshen/hardtime.nvim", + event = "VeryLazy", + dependencies = { "MunifTanjim/nui.nvim" }, + opts = { + max_count = 4, + -- Remove arrows from disabled (completely blocked) and add to + -- restricted (blocked after max_count, same as hjkl) + disabled_keys = { + [""] = {}, + [""] = {}, + [""] = {}, + [""] = {}, + }, + restricted_keys = { + [""] = { "n", "x" }, + [""] = { "n", "x" }, + [""] = { "n", "x" }, + [""] = { "n", "x" }, + }, + }, + }, + -- Auto-close brackets/quotes + { + "windwp/nvim-autopairs", + event = "InsertEnter", + opts = { check_ts = true }, + }, + -- Folding powered by treesitter/LSP + { + "kevinhwang91/nvim-ufo", + dependencies = { "kevinhwang91/promise-async" }, + event = "BufReadPost", + keys = { + { + "zR", + function() + require("ufo").openAllFolds() + end, + desc = "Open all folds", + }, + { + "zM", + function() + require("ufo").closeAllFolds() + end, + desc = "Close all folds", + }, + }, + opts = { + provider_selector = function() + return { "treesitter", "indent" } + end, + }, + }, + -- Surround text objects: ys, ds, cs + { + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + opts = {}, + }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/extras.lua b/arch/bigvim/.config/bigvim/lua/plugins/extras.lua new file mode 100644 index 0000000..21ef0f8 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/extras.lua @@ -0,0 +1,107 @@ +return { + -- Splash screen / dashboard + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + dashboard = { + sections = { + { section = "header" }, + { section = "keys", gap = 1, padding = 1 }, + { section = "startup" }, + }, + }, + }, + }, + -- Undo history tree + { + "mbbill/undotree", + keys = { + { "u", "UndotreeToggle", desc = "Undo tree" }, + }, + }, + -- Buffer-based file explorer + { + "stevearc/oil.nvim", + lazy = false, + keys = { + { "e", "Oil", desc = "File explorer" }, + { "-", "Oil", desc = "Open parent dir" }, + }, + opts = { + default_file_explorer = true, + view_options = { show_hidden = true }, + constrain_cursor = false, + }, + }, + -- { + -- "nullromo/go-up.nvim", + -- opts = { + -- respectScrolloff = true, + -- goUpLimit = "center", + -- ignoredFiletypes = { + -- "oil", + -- "snacks_dashboard", + -- "lazy", + -- }, + -- }, -- specify options here + -- config = function(_, opts) + -- local goUp = require("go-up") + -- goUp.setup(opts) + -- + -- -- Use to center + -- vim.keymap.set({ "n", "v" }, "", function() + -- require("go-up").centerScreen() + -- end, { desc = "center the screen" }) + -- + -- -- vim.o.scrolloff = 0 -- disable native, we handle it entirely + -- -- vim.opt.fillchars:append({ eob = " " }) + -- -- + -- -- local SCROLLOFF = 20 -- your desired value + -- -- + -- -- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "BufEnter" }, { + -- -- group = vim.api.nvim_create_augroup("ScrollOffEOF", { clear = true }), + -- -- callback = function() + -- -- if vim.bo.filetype == "oil" then + -- -- return + -- -- end + -- -- + -- -- local win_h = vim.api.nvim_win_get_height(0) + -- -- local off = math.min(SCROLLOFF, math.floor(win_h / 2)) + -- -- local line = vim.fn.line(".") + -- -- local last = vim.fn.line("$") + -- -- local winline = vim.fn.winline() + -- -- + -- -- -- Near top: scroll into go-up virtual lines (Ctrl-Y) + -- -- if line <= off then + -- -- local needed = off - winline + 1 + -- -- if needed > 0 then + -- -- vim.cmd('execute "normal! ' .. needed .. '\025"') + -- -- return + -- -- end + -- -- end + -- -- + -- -- -- Near bottom / EOF: scroll past last line (winrestview) + -- -- local dist_bot = last - line + -- -- local rem = vim.fn.line("w$") - vim.fn.line("w0") + 1 + -- -- if dist_bot < off and win_h - rem + dist_bot < off then + -- -- local view = vim.fn.winsaveview() + -- -- view.topline = view.topline + off - (win_h - rem + dist_bot) + -- -- vim.fn.winrestview(view) + -- -- return + -- -- end + -- -- + -- -- -- Middle: replicate normal scrolloff behavior + -- -- if winline > win_h - off then + -- -- -- too close to bottom of window, scroll down (Ctrl-E) + -- -- vim.cmd('execute "normal! ' .. (winline - (win_h - off)) .. '\005"') + -- -- elseif winline < off + 1 then + -- -- -- too close to top of window, scroll up (Ctrl-Y) + -- -- vim.cmd('execute "normal! ' .. (off + 1 - winline) .. '\025"') + -- -- end + -- -- end, + -- -- }) + -- end, + -- }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/formatting.lua b/arch/bigvim/.config/bigvim/lua/plugins/formatting.lua new file mode 100644 index 0000000..4367c59 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/formatting.lua @@ -0,0 +1,60 @@ +return { + "stevearc/conform.nvim", + event = "BufWritePre", + cmd = { "ConformInfo", "FormatToggle" }, + keys = { + { + "cF", + function() + vim.g.format_on_save = not vim.g.format_on_save + vim.notify( + "Format on save: " .. (vim.g.format_on_save and "enabled" or "disabled"), + vim.log.levels.INFO, + { title = "conform" } + ) + end, + desc = "Toggle autoformat", + }, + { + "cf", + function() + require("conform").format({ async = true, lsp_fallback = true }) + end, + desc = "Format buffer", + }, + }, + config = function() + vim.g.format_on_save = true + + require("conform").setup({ + formatters_by_ft = { + c = { "clang_format" }, + cpp = { "clang_format" }, + python = { "isort", "black" }, + lua = { "stylua" }, + haskell = { "ormolu" }, + odin = { "odinfmt" }, + rust = { "rustfmt" }, + }, + + format_on_save = function(bufnr) + if not vim.g.format_on_save then + return + end + if vim.g.disable_autoformat_buf and vim.g.disable_autoformat_buf[bufnr] then + return + end + return { timeout_ms = 500, lsp_fallback = true } + end, + }) + + require("conform").formatters.clang_format = { + prepend_args = { "--style={IndentWidth: 4, TabWidth: 4, UseTab: Never}" }, + } + + vim.api.nvim_create_user_command("FormatToggle", function() + vim.g.format_on_save = not vim.g.format_on_save + vim.notify("Format on save: " .. (vim.g.format_on_save and "on" or "off")) + end, {}) + end, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/fzf.lua b/arch/bigvim/.config/bigvim/lua/plugins/fzf.lua new file mode 100644 index 0000000..9a34c9a --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/fzf.lua @@ -0,0 +1,30 @@ +return { + "ibhagwan/fzf-lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + cmd = "FzfLua", + keys = { + { "ff", "FzfLua files", desc = "Find files" }, + { "fg", "FzfLua live_grep", desc = "Live grep" }, + { "fb", "FzfLua buffers", desc = "Buffers" }, + { "fs", "FzfLua grep_cword", desc = "Grep word under cursor" }, + { "fr", "FzfLua oldfiles", desc = "Recent files" }, + { "fc", "FzfLua commands", desc = "Commands" }, + { "fd", "FzfLua diagnostics_document", desc = "Document diagnostics" }, + { "/", "FzfLua blines", desc = "Search current buffer" }, + }, + opts = { + winopts = { + height = 0.6, + width = 0.8, + border = "single", + preview = { border = "single" }, + }, + fzf_opts = { ["--cycle"] = true }, + grep = { + rg_opts = "--hidden --follow --glob '!.git' --column --line-number --no-heading --color=always", + }, + files = { + rg_opts = "--files --hidden --follow --glob '!.git'", + }, + }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/linting.lua b/arch/bigvim/.config/bigvim/lua/plugins/linting.lua new file mode 100644 index 0000000..bbbeaa7 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/linting.lua @@ -0,0 +1,17 @@ +return { + "mfussenegger/nvim-lint", + event = { "BufReadPost", "BufWritePost", "InsertLeave" }, + config = function() + require("lint").linters_by_ft = { + c = { "cppcheck" }, + cpp = { "cppcheck" }, + python = { "ruff" }, + } + + vim.api.nvim_create_autocmd({ "BufWritePost", "BufReadPost", "InsertLeave" }, { + callback = function() + require("lint").try_lint() + end, + }) + end, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/lsp.lua b/arch/bigvim/.config/bigvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..76566d1 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/lsp.lua @@ -0,0 +1,103 @@ +vim.g.rustaceanvim = { + server = { + default_settings = { + ["rust-analyzer"] = { + cargo = { allFeatures = true }, + check = { command = "clippy" }, + inlayHints = { lifetimeElisionHints = { enable = "skip_trivial" } }, + }, + }, + }, +} + +return { + { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "saghen/blink.cmp", + { + "folke/lazydev.nvim", + ft = "lua", + opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } } } }, + }, + }, + config = function() + vim.lsp.config("*", { + capabilities = require("blink.cmp").get_lsp_capabilities(), + }) + + -- Server-specific overrides + vim.lsp.config("lua_ls", { + settings = { + Lua = { + diagnostics = { globals = { "vim" } }, + workspace = { checkThirdParty = false }, + }, + }, + }) + + vim.lsp.config("ols", { + cmd = { "ols" }, + filetypes = { "odin" }, + root_markers = { "ols.json", ".git" }, + init_options = { + odin_command = "odin", + checker_args = "-strict-style", + collections = { + { name = "shared", path = vim.fn.expand("$HOME/code/odin/shared/") }, + }, + }, + }) + + -- Enable servers (default configs come from nvim-lspconfig runtime) + vim.lsp.enable({ "clangd", "pyright", "lua_ls", "hls", "ols" }) + + -- Keymaps on attach + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(ev) + local map = function(keys, func, desc) + vim.keymap.set("n", keys, func, { buffer = ev.buf, desc = "LSP: " .. desc }) + end + if vim.lsp.inlay_hint then + vim.lsp.inlay_hint.enable(true, { bufnr = ev.buf }) + end + map("gd", vim.lsp.buf.definition, "Goto definition") + map("gD", vim.lsp.buf.declaration, "Goto declaration") + map("gr", vim.lsp.buf.references, "Goto references") + map("gI", vim.lsp.buf.implementation, "Goto implementation") + map("K", vim.lsp.buf.hover, "Hover docs") + map("rn", vim.lsp.buf.rename, "Rename") + map("ca", vim.lsp.buf.code_action, "Code action") + map("[d", vim.diagnostic.goto_prev, "Prev diagnostic") + map("]d", vim.diagnostic.goto_next, "Next diagnostic") + map("e", vim.diagnostic.open_float, "Show diagnostic") + end, + }) + + vim.diagnostic.config({ + virtual_text = true, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = "", + [vim.diagnostic.severity.WARN] = "", + [vim.diagnostic.severity.INFO] = "", + [vim.diagnostic.severity.HINT] = "", + }, + }, + underline = true, + update_in_insert = false, + }) + end, + }, + { + "j-hui/fidget.nvim", + event = "LspAttach", + opts = { notification = { window = { winblend = 0 } } }, + }, + { + "mrcjkb/rustaceanvim", + version = "^9", + lazy = false, + }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/nav.lua b/arch/bigvim/.config/bigvim/lua/plugins/nav.lua new file mode 100644 index 0000000..827da07 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/nav.lua @@ -0,0 +1,16 @@ +return { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", "TmuxNavigateDown", + "TmuxNavigateUp", "TmuxNavigateRight", + }, + keys = { + { "", "TmuxNavigateLeft", desc = "Pane left", mode = { "n", "t" } }, + { "", "TmuxNavigateDown", desc = "Pane down", mode = { "n", "t" } }, + { "", "TmuxNavigateUp", desc = "Pane up", mode = { "n", "t" } }, + { "", "TmuxNavigateRight", desc = "Pane right", mode = { "n", "t" } }, + }, + init = function() + vim.g.tmux_navigator_no_mappings = 1 + end, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/treesitter.lua b/arch/bigvim/.config/bigvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..348eaba --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/treesitter.lua @@ -0,0 +1,31 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = { "BufReadPre", "BufNewFile" }, + opts = { + ensure_installed = { + "c", + "cpp", + "python", + "lua", + "haskell", + "vim", + "vimdoc", + "query", + "bash", + "markdown", + "markdown_inline", + "json", + "toml", + "yaml", + "odin", + }, + highlight = { enable = true }, + indent = { enable = true }, + auto_install = false, + }, + config = function(_, opts) + -- new API, configs module is gone + require("nvim-treesitter").setup(opts) + end, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/ui.lua b/arch/bigvim/.config/bigvim/lua/plugins/ui.lua new file mode 100644 index 0000000..35a22de --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/ui.lua @@ -0,0 +1,106 @@ +return { + -- Statusline + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + config = function() + local function make_theme() + local ok, p = pcall(dofile, vim.fn.expand("~/.cache/wallust/nvim.lua")) + if not ok then + p = { + base01 = "#181825", + base0D = "#89b4fa", + base05 = "#cdd6f4", + base04 = "#585b70", + base0B = "#a6e3a1", + base0E = "#cba6f7", + base08 = "#f38ba8", + base0A = "#f9e2af", + } + end + local bg = vim.g.transparent_bg and "NONE" or p.base01 + return { + normal = { + a = { fg = p.base0D, bg = bg, gui = "bold" }, + b = { fg = p.base05, bg = bg }, + c = { fg = p.base04, bg = bg }, + }, + insert = { a = { fg = p.base0B, bg = bg, gui = "bold" } }, + visual = { a = { fg = p.base0E, bg = bg, gui = "bold" } }, + replace = { a = { fg = p.base08, bg = bg, gui = "bold" } }, + command = { a = { fg = p.base0A, bg = bg, gui = "bold" } }, + inactive = { + a = { fg = p.base04, bg = bg }, + b = { fg = p.base04, bg = bg }, + c = { fg = p.base04, bg = bg }, + }, + } + end + + require("lualine").setup({ + options = { + theme = make_theme(), + globalstatus = true, + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { { "filename", path = 1 } }, + lualine_x = { "encoding", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + }) + + vim.api.nvim_create_autocmd("User", { + pattern = "ThemeChanged", + callback = function() + require("lualine").setup({ options = { theme = make_theme() } }) + end, + }) + + vim.api.nvim_create_autocmd("ColorScheme", { + callback = function() + require("lualine").setup({ options = { theme = make_theme() } }) + end, + }) + end, + }, + -- -- Buffer tabs + { + "akinsho/bufferline.nvim", + version = "*", + event = "VeryLazy", + keys = { + { "bp", "BufferLinePick", desc = "Pick buffer" }, + { "bo", "BufferLineCloseOthers", desc = "Close others" }, + { "bc", "BufferLinePickClose", desc = "Close (pick)" }, + }, + opts = { + options = { + mode = "buffers", + show_buffer_close_icons = false, + show_close_icon = false, + separator_style = "thin", + always_show_bufferline = false, + diagnostics = "nvim_lsp", + }, + }, + }, + -- Git signs in the gutter + { + "lewis6991/gitsigns.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = { + signs = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + }, + }, + }, +} diff --git a/arch/bigvim/.config/bigvim/lua/plugins/whichkey.lua b/arch/bigvim/.config/bigvim/lua/plugins/whichkey.lua new file mode 100644 index 0000000..97e8b19 --- /dev/null +++ b/arch/bigvim/.config/bigvim/lua/plugins/whichkey.lua @@ -0,0 +1,25 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + icons = { mappings = false }, + delay = 300, + spec = { + { "f", group = "find" }, + { "b", group = "buffer" }, + { "s", group = "split" }, + { "r", group = "refactor" }, + { "c", group = "code" }, + { "cF", desc = "Toggle autoformat" }, + { "cf", desc = "Format buffer" }, + { "e", desc = "File explorer" }, + { "u", desc = "Undo tree" }, + { "bp", desc = "Pick buffer" }, + { "bo", desc = "Close others" }, + { "bc", desc = "Close (pick)" }, + }, + }, + keys = { + { "?", function() require("which-key").show({ global = false }) end, desc = "Buffer keymaps" }, + }, +} diff --git a/arch/fish/.config/fish/functions/vi.fish b/arch/fish/.config/fish/functions/vi.fish new file mode 100644 index 0000000..e362555 --- /dev/null +++ b/arch/fish/.config/fish/functions/vi.fish @@ -0,0 +1,3 @@ +function vi --wraps=nvim --wraps=vims --wraps=vim --description 'alias vi vims' + vims $argv +end diff --git a/arch/lightvim/.config/lightvim/lua/plugins.lua b/arch/lightvim/.config/lightvim/lua/plugins.lua index d9b563b..2f737b2 100644 --- a/arch/lightvim/.config/lightvim/lua/plugins.lua +++ b/arch/lightvim/.config/lightvim/lua/plugins.lua @@ -102,64 +102,82 @@ return { config = function() local mc = require("multicursor-nvim") mc.setup() - local set = vim.keymap.set local nv = { "n", "v" } - -- Adding cursors (Alt+Shift+arrow — Ctrl+Shift+arrow is move-line) - set(nv, "", function() mc.lineAddCursor(1) end, { desc = "Add cursor down" }) - set(nv, "", function() mc.lineAddCursor(-1) end, { desc = "Add cursor up" }) - - -- Skipping (advance without dropping a cursor) - set(nv, "m", function() mc.lineSkipCursor(1) end, { desc = "Skip line down" }) - set(nv, "m", function() mc.lineSkipCursor(-1) end, { desc = "Skip line up" }) - - -- Match-based add / skip - set(nv, "mn", function() mc.matchAddCursor(1) end, { desc = "Add cursor: next match" }) - set(nv, "mp", function() mc.matchAddCursor(-1) end, { desc = "Add cursor: prev match" }) - set(nv, "ms", function() mc.matchSkipCursor(1) end, { desc = "Skip match, advance" }) - set(nv, "mA", mc.matchAllAddCursors, { desc = "Cursors for all matches" }) - - -- Repeat keys: ;/, add or skip when cursors active; default f/F/t/T otherwise - set("n", ";", function() - if mc.hasCursors() then mc.matchAddCursor(1) else vim.cmd("normal! ;") end - end, { desc = "Repeat f/F/t/T · next-match cursor when active" }) - set("n", ",", function() - if mc.hasCursors() then mc.matchSkipCursor(1) else vim.cmd("normal! ,") end - end, { desc = "Reverse f/F/t/T · skip-match when active" }) - - -- Manual toggle / delete - set(nv, "mt", mc.toggleCursor, { desc = "Toggle cursor here" }) - set(nv, "mx", mc.deleteCursor, { desc = "Delete cursor under main" }) - - -- Rotate / jump main focus through cursor list (arrows) - set(nv, "m", mc.nextCursor, { desc = "Rotate to next cursor" }) - set(nv, "m", mc.prevCursor, { desc = "Rotate to prev cursor" }) - set(nv, "mF", mc.firstCursor, { desc = "Jump to first cursor" }) - set(nv, "mL", mc.lastCursor, { desc = "Jump to last cursor" }) - - -- Bulk ops - set(nv, "m=", mc.alignCursors, { desc = "Align cursors" }) - set(nv, "mu", mc.restoreCursors, { desc = "Restore last cursors" }) - set(nv, "md", function() - if mc.cursorsEnabled() then mc.disableCursors() else mc.enableCursors() end - end, { desc = "Freeze/unfreeze cursors" }) - set(nv, "m.", function() mc.transposeCursors(1) end, { desc = "Transpose forward" }) - set(nv, "m,", function() mc.transposeCursors(-1) end, { desc = "Transpose back" }) - - -- Pattern-based (visual mode — needs a selection) - set("x", "m/", mc.matchCursors, { desc = "Cursors at regex matches" }) - set("x", "mS", mc.splitCursors, { desc = "Split selection by pattern" }) - - -- Esc: re-enable / clear / nohlsearch - set("n", "", function() - if not mc.cursorsEnabled() then - mc.enableCursors() - elseif mc.hasCursors() then - mc.clearCursors() - else - vim.cmd("nohlsearch") + -- Bind everything via a function so we can re-apply per-buffer + -- (oil buffers set their own buffer-local maps that would otherwise + -- shadow these globals). + local function bind(buf) + local opts_base = buf and { buffer = buf } or {} + local function set(mode, lhs, rhs, opts) + local o = vim.tbl_extend("force", opts_base, opts or {}) + vim.keymap.set(mode, lhs, rhs, o) end - end) + + -- Adding cursors (Alt+Shift+arrow — Ctrl+Shift+arrow is move-line) + set(nv, "", function() mc.lineAddCursor(1) end, { desc = "Add cursor down" }) + set(nv, "", function() mc.lineAddCursor(-1) end, { desc = "Add cursor up" }) + + -- Skipping (advance without dropping a cursor) + set(nv, "m", function() mc.lineSkipCursor(1) end, { desc = "Skip line down" }) + set(nv, "m", function() mc.lineSkipCursor(-1) end, { desc = "Skip line up" }) + + -- Match-based add / skip + set(nv, "mn", function() mc.matchAddCursor(1) end, { desc = "Add cursor: next match" }) + set(nv, "mp", function() mc.matchAddCursor(-1) end, { desc = "Add cursor: prev match" }) + set(nv, "ms", function() mc.matchSkipCursor(1) end, { desc = "Skip match, advance" }) + set(nv, "mA", mc.matchAllAddCursors, { desc = "Cursors for all matches" }) + + -- Repeat keys: ;/, add or skip when cursors active; default f/F/t/T otherwise + set("n", ";", function() + if mc.hasCursors() then mc.matchAddCursor(1) else vim.cmd("normal! ;") end + end, { desc = "Repeat f/F/t/T · next-match cursor when active" }) + set("n", ",", function() + if mc.hasCursors() then mc.matchSkipCursor(1) else vim.cmd("normal! ,") end + end, { desc = "Reverse f/F/t/T · skip-match when active" }) + + -- Manual toggle / delete + set(nv, "mt", mc.toggleCursor, { desc = "Toggle cursor here" }) + set(nv, "mx", mc.deleteCursor, { desc = "Delete cursor under main" }) + + -- Rotate / jump main focus through cursor list (arrows) + set(nv, "m", mc.nextCursor, { desc = "Rotate to next cursor" }) + set(nv, "m", mc.prevCursor, { desc = "Rotate to prev cursor" }) + set(nv, "mF", mc.firstCursor, { desc = "Jump to first cursor" }) + set(nv, "mL", mc.lastCursor, { desc = "Jump to last cursor" }) + + -- Bulk ops + set(nv, "m=", mc.alignCursors, { desc = "Align cursors" }) + set(nv, "mu", mc.restoreCursors, { desc = "Restore last cursors" }) + set(nv, "md", function() + if mc.cursorsEnabled() then mc.disableCursors() else mc.enableCursors() end + end, { desc = "Freeze/unfreeze cursors" }) + set(nv, "m.", function() mc.transposeCursors(1) end, { desc = "Transpose forward" }) + set(nv, "m,", function() mc.transposeCursors(-1) end, { desc = "Transpose back" }) + + -- Pattern-based (visual mode — needs a selection) + set("x", "m/", mc.matchCursors, { desc = "Cursors at regex matches" }) + set("x", "mS", mc.splitCursors, { desc = "Split selection by pattern" }) + + -- Esc: re-enable / clear / nohlsearch + set("n", "", function() + if not mc.cursorsEnabled() then + mc.enableCursors() + elseif mc.hasCursors() then + mc.clearCursors() + else + vim.cmd("nohlsearch") + end + end) + end + + bind(nil) + + -- Re-bind buffer-local for oil so its keymaps don't shadow ours. + vim.api.nvim_create_autocmd("FileType", { + pattern = "oil", + callback = function(args) bind(args.buf) end, + }) end, }, diff --git a/arch/nvim/.config/nvim/.stylua.toml b/arch/nvim/.config/nvim/.stylua.toml deleted file mode 100644 index e55efd5..0000000 --- a/arch/nvim/.config/nvim/.stylua.toml +++ /dev/null @@ -1,3 +0,0 @@ -indent_type = "Spaces" -indent_width = 4 -column_width = 120 diff --git a/arch/nvim/.config/nvim/init.lua b/arch/nvim/.config/nvim/init.lua deleted file mode 100644 index fb4cadd..0000000 --- a/arch/nvim/.config/nvim/init.lua +++ /dev/null @@ -1,27 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.uv.fs_stat(lazypath) then - vim.fn.system({ - "git", "clone", "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require("options") -require("keymaps") - -require("lazy").setup("plugins", { - performance = { - rtp = { - disabled_plugins = { - "gzip", "matchit", "matchparen", "netrwPlugin", - "tarPlugin", "tohtml", "tutor", "zipPlugin", - }, - }, - }, - install = { colorscheme = { "habamax" } }, - checker = { enabled = false }, - change_detection = { notify = false }, -}) diff --git a/arch/nvim/.config/nvim/lazy-lock.json b/arch/nvim/.config/nvim/lazy-lock.json deleted file mode 100644 index fdd24c3..0000000 --- a/arch/nvim/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, - "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, - "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "fzf-lua": { "branch": "main", "commit": "b437bafc981a180d609bb4092c56ce8999f7a2c4" }, - "gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" }, - "hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, - "leap.nvim": { "branch": "main", "commit": "156c71aabb68d520c6269db4103c8e5580e3ea67" }, - "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, - "mini.animate": { "branch": "main", "commit": "0365de8b69331c25d0d0d7573407a7dc7719e578" }, - "mini.base16": { "branch": "main", "commit": "800f107b27a00978b0dadd672d6da21a5b12fa9a" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, - "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, - "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, - "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, - "nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" }, - "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, - "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "rustaceanvim": { "branch": "main", "commit": "a60811ae6054ba981cb4693aaecd715dea783327" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, - "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } -} diff --git a/arch/nvim/.config/nvim/lua/keymaps.lua b/arch/nvim/.config/nvim/lua/keymaps.lua deleted file mode 100644 index 2a38a95..0000000 --- a/arch/nvim/.config/nvim/lua/keymaps.lua +++ /dev/null @@ -1,41 +0,0 @@ -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -local map = vim.keymap.set - --- Disable Space in normal/visual (used as leader) -map({ "n", "v" }, "", "", { silent = true }) - --- Save -map({ "n", "i" }, "", "w", { desc = "Save" }) - --- Clear search highlight -map("n", "", "nohlsearch") - --- Exit terminal mode -map("t", "", "", { desc = "Exit terminal" }) - --- Better up/down on wrapped lines -map({ "n", "v" }, "j", "gj") -map({ "n", "v" }, "k", "gk") - --- Buffer navigation -map("n", "", "bprevious", { desc = "Prev buffer" }) -map("n", "", "bnext", { desc = "Next buffer" }) -map("n", "bd", "bdelete", { desc = "Delete buffer" }) - --- Splits -map("n", "sv", "v", { desc = "Split vertical" }) -map("n", "sh", "s", { desc = "Split horizontal" }) -map("n", "se", "=", { desc = "Equal splits" }) -map("n", "sx", "close", { desc = "Close split" }) - --- Move lines -map("n", "", "m .+1==", { desc = "Move line down" }) -map("n", "", "m .-2==", { desc = "Move line up" }) -map("v", "", ":m '>+1gv=gv", { desc = "Move selection down" }) -map("v", "", ":m '<-2gv=gv", { desc = "Move selection up" }) - --- Stay in visual after indent -map("v", "<", "", ">gv") diff --git a/arch/nvim/.config/nvim/lua/options.lua b/arch/nvim/.config/nvim/lua/options.lua deleted file mode 100644 index 6d53af3..0000000 --- a/arch/nvim/.config/nvim/lua/options.lua +++ /dev/null @@ -1,39 +0,0 @@ -local opt = vim.opt - --- Line numbers -opt.number = true -opt.relativenumber = true - --- Indentation -opt.expandtab = true -opt.tabstop = 4 -opt.shiftwidth = 4 -opt.softtabstop = 4 - --- Visual -opt.cursorline = true -opt.scrolloff = 20 -opt.signcolumn = "yes" -opt.list = true -opt.listchars = { tab = " ", trail = "·", nbsp = "␣" } -opt.termguicolors = true -opt.colorcolumn = "" - --- Behaviour -opt.swapfile = false -opt.undofile = true -opt.updatetime = 250 -opt.timeoutlen = 300 -opt.splitbelow = true -opt.splitright = true -opt.ignorecase = true -opt.smartcase = true -opt.inccommand = "split" -opt.hlsearch = true -opt.breakindent = true - --- Folding (nvim-ufo) -opt.foldcolumn = "0" -opt.foldlevel = 99 -opt.foldlevelstart = 99 -opt.foldenable = true diff --git a/arch/nvim/.config/nvim/lua/plugins/colorscheme.lua b/arch/nvim/.config/nvim/lua/plugins/colorscheme.lua deleted file mode 100644 index 2e25d6c..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,108 +0,0 @@ -return { - "echasnovski/mini.base16", - version = false, - lazy = false, - priority = 1000, - config = function() - local palette_path = vim.fn.expand("~/.cache/wallust/nvim.lua") - - local fallback = { - base00 = "#1e1e2e", - base01 = "#181825", - base02 = "#313244", - base03 = "#45475a", - base04 = "#585b70", - base05 = "#cdd6f4", - base06 = "#f5c2e7", - base07 = "#b4befe", - base08 = "#f38ba8", - base09 = "#fab387", - base0A = "#f9e2af", - base0B = "#a6e3a1", - base0C = "#94e2d5", - base0D = "#89b4fa", - base0E = "#cba6f7", - base0F = "#f2cdcd", - } - - local function load_palette() - local ok, p = pcall(dofile, palette_path) - return ok and p or fallback - end - - local transparent_groups = { - "Normal", - "NormalNC", - "NormalFloat", - "SignColumn", - "FoldColumn", - "EndOfBuffer", - "LineNr", - "CursorLineNr", - "CursorLine", - "StatusLine", - "StatusLineNC", - "TabLine", - "TabLineFill", - "TabLineSel", - "VertSplit", - "WinSeparator", - "Pmenu", - "PmenuSbar", - "PmenuThumb", - "FloatBorder", - "FloatTitle", - } - - local function apply_transparent() - for _, grp in ipairs(transparent_groups) do - vim.cmd("hi " .. grp .. " guibg=NONE ctermbg=NONE") - end - end - - local function apply(palette) - require("mini.base16").setup({ palette = palette }) - vim.api.nvim_set_hl(0, "LineNr", { fg = palette.base05 }) - vim.api.nvim_set_hl(0, "LineNrAbove", { fg = palette.base05 }) - vim.api.nvim_set_hl(0, "LineNrBelow", { fg = palette.base05 }) - vim.api.nvim_set_hl(0, "CursorLineNr", { fg = palette.base03, bold = true }) - vim.api.nvim_set_hl(0, "SignColumn", { bg = palette.base00 }) - vim.api.nvim_set_hl(0, "CursorLineSign", { bg = palette.base00 }) - vim.api.nvim_set_hl(0, "DiagnosticSignError", { fg = palette.base08, bg = palette.base00 }) - vim.api.nvim_set_hl(0, "DiagnosticSignWarn", { fg = palette.base0A, bg = palette.base00 }) - vim.api.nvim_set_hl(0, "DiagnosticSignInfo", { fg = palette.base0D, bg = palette.base00 }) - vim.api.nvim_set_hl(0, "DiagnosticSignHint", { fg = palette.base0C, bg = palette.base00 }) - if vim.g.transparent_bg then - apply_transparent() - end - end - - vim.g.transparent_bg = false - apply(load_palette()) - - -- Watch wallust output file and reload automatically - local watcher = vim.uv.new_fs_event() - if watcher then - watcher:start( - palette_path, - {}, - vim.schedule_wrap(function() - apply(load_palette()) - vim.api.nvim_exec_autocmds("User", { pattern = "ThemeChanged" }) - end) - ) - end - - vim.keymap.set("n", "tt", function() - vim.g.transparent_bg = not vim.g.transparent_bg - if vim.g.transparent_bg then - apply_transparent() - vim.notify("Background: transparent", vim.log.levels.INFO) - else - apply(load_palette()) - vim.notify("Background: colorscheme", vim.log.levels.INFO) - end - vim.api.nvim_exec_autocmds("User", { pattern = "TransparentToggle" }) - end, { desc = "Toggle transparent background" }) - end, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/completion.lua b/arch/nvim/.config/nvim/lua/plugins/completion.lua deleted file mode 100644 index 8fe2e26..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/completion.lua +++ /dev/null @@ -1,60 +0,0 @@ -local function expand_menu() - local cfg = require("blink.cmp.config").completion - cfg.menu.max_height = 10 - cfg.documentation.auto_show = true - pcall(function() - require("blink.cmp.completion.windows.menu").update_position() - end) -end - -vim.api.nvim_create_autocmd("User", { - pattern = "BlinkCmpMenuClose", - callback = function() - local ok, cfg = pcall(function() return require("blink.cmp.config").completion end) - if not ok then return end - cfg.menu.max_height = 5 - cfg.documentation.auto_show = false - end, -}) - -return { - { - "saghen/blink.cmp", - version = "*", - dependencies = { "L3MON4D3/LuaSnip", "rafamadriz/friendly-snippets" }, - opts = { - keymap = { - preset = "none", - [""] = { "show", "show_documentation", "hide_documentation" }, - [""] = { "hide" }, - [""] = { "accept", "fallback" }, - [""] = { expand_menu, "select_next", "fallback" }, - [""] = { "select_prev", "fallback" }, - [""] = { "scroll_documentation_up", "fallback" }, - [""] = { "scroll_documentation_down", "fallback" }, - [""] = { "select_next", "fallback" }, - [""] = { "select_prev", "fallback" }, - [""] = { "snippet_forward", "fallback" }, - [""] = { "snippet_backward", "fallback" }, - }, - appearance = { nerd_font_variant = "mono" }, - sources = { - default = { "lsp", "path", "snippets", "buffer" }, - }, - snippets = { preset = "luasnip" }, - completion = { - documentation = { auto_show = false, auto_show_delay_ms = 200 }, - ghost_text = { enabled = false }, - menu = { auto_show = true, max_height = 5 }, - }, - }, - }, - { - "L3MON4D3/LuaSnip", - event = "InsertEnter", - dependencies = { "rafamadriz/friendly-snippets" }, - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/editor.lua b/arch/nvim/.config/nvim/lua/plugins/editor.lua deleted file mode 100644 index a6ec0e0..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/editor.lua +++ /dev/null @@ -1,73 +0,0 @@ -return { - -- Motion: s + two chars to jump anywhere - { - url = "https://codeberg.org/andyg/leap.nvim", - keys = { - { "s", "(leap)", mode = { "n", "x", "o" }, desc = "Leap" }, - { "S", "(leap-from-window)", mode = { "n", "o" }, desc = "Leap from window" }, - }, - }, - -- Enforce good vim habits - { - "m4xshen/hardtime.nvim", - event = "VeryLazy", - dependencies = { "MunifTanjim/nui.nvim" }, - opts = { - max_count = 4, - -- Remove arrows from disabled (completely blocked) and add to - -- restricted (blocked after max_count, same as hjkl) - disabled_keys = { - [""] = {}, - [""] = {}, - [""] = {}, - [""] = {}, - }, - restricted_keys = { - [""] = { "n", "x" }, - [""] = { "n", "x" }, - [""] = { "n", "x" }, - [""] = { "n", "x" }, - }, - }, - }, - -- Auto-close brackets/quotes - { - "windwp/nvim-autopairs", - event = "InsertEnter", - opts = { check_ts = true }, - }, - -- Folding powered by treesitter/LSP - { - "kevinhwang91/nvim-ufo", - dependencies = { "kevinhwang91/promise-async" }, - event = "BufReadPost", - keys = { - { - "zR", - function() - require("ufo").openAllFolds() - end, - desc = "Open all folds", - }, - { - "zM", - function() - require("ufo").closeAllFolds() - end, - desc = "Close all folds", - }, - }, - opts = { - provider_selector = function() - return { "treesitter", "indent" } - end, - }, - }, - -- Surround text objects: ys, ds, cs - { - "kylechui/nvim-surround", - version = "*", - event = "VeryLazy", - opts = {}, - }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/extras.lua b/arch/nvim/.config/nvim/lua/plugins/extras.lua deleted file mode 100644 index 21ef0f8..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/extras.lua +++ /dev/null @@ -1,107 +0,0 @@ -return { - -- Splash screen / dashboard - { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - dashboard = { - sections = { - { section = "header" }, - { section = "keys", gap = 1, padding = 1 }, - { section = "startup" }, - }, - }, - }, - }, - -- Undo history tree - { - "mbbill/undotree", - keys = { - { "u", "UndotreeToggle", desc = "Undo tree" }, - }, - }, - -- Buffer-based file explorer - { - "stevearc/oil.nvim", - lazy = false, - keys = { - { "e", "Oil", desc = "File explorer" }, - { "-", "Oil", desc = "Open parent dir" }, - }, - opts = { - default_file_explorer = true, - view_options = { show_hidden = true }, - constrain_cursor = false, - }, - }, - -- { - -- "nullromo/go-up.nvim", - -- opts = { - -- respectScrolloff = true, - -- goUpLimit = "center", - -- ignoredFiletypes = { - -- "oil", - -- "snacks_dashboard", - -- "lazy", - -- }, - -- }, -- specify options here - -- config = function(_, opts) - -- local goUp = require("go-up") - -- goUp.setup(opts) - -- - -- -- Use to center - -- vim.keymap.set({ "n", "v" }, "", function() - -- require("go-up").centerScreen() - -- end, { desc = "center the screen" }) - -- - -- -- vim.o.scrolloff = 0 -- disable native, we handle it entirely - -- -- vim.opt.fillchars:append({ eob = " " }) - -- -- - -- -- local SCROLLOFF = 20 -- your desired value - -- -- - -- -- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "BufEnter" }, { - -- -- group = vim.api.nvim_create_augroup("ScrollOffEOF", { clear = true }), - -- -- callback = function() - -- -- if vim.bo.filetype == "oil" then - -- -- return - -- -- end - -- -- - -- -- local win_h = vim.api.nvim_win_get_height(0) - -- -- local off = math.min(SCROLLOFF, math.floor(win_h / 2)) - -- -- local line = vim.fn.line(".") - -- -- local last = vim.fn.line("$") - -- -- local winline = vim.fn.winline() - -- -- - -- -- -- Near top: scroll into go-up virtual lines (Ctrl-Y) - -- -- if line <= off then - -- -- local needed = off - winline + 1 - -- -- if needed > 0 then - -- -- vim.cmd('execute "normal! ' .. needed .. '\025"') - -- -- return - -- -- end - -- -- end - -- -- - -- -- -- Near bottom / EOF: scroll past last line (winrestview) - -- -- local dist_bot = last - line - -- -- local rem = vim.fn.line("w$") - vim.fn.line("w0") + 1 - -- -- if dist_bot < off and win_h - rem + dist_bot < off then - -- -- local view = vim.fn.winsaveview() - -- -- view.topline = view.topline + off - (win_h - rem + dist_bot) - -- -- vim.fn.winrestview(view) - -- -- return - -- -- end - -- -- - -- -- -- Middle: replicate normal scrolloff behavior - -- -- if winline > win_h - off then - -- -- -- too close to bottom of window, scroll down (Ctrl-E) - -- -- vim.cmd('execute "normal! ' .. (winline - (win_h - off)) .. '\005"') - -- -- elseif winline < off + 1 then - -- -- -- too close to top of window, scroll up (Ctrl-Y) - -- -- vim.cmd('execute "normal! ' .. (off + 1 - winline) .. '\025"') - -- -- end - -- -- end, - -- -- }) - -- end, - -- }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/formatting.lua b/arch/nvim/.config/nvim/lua/plugins/formatting.lua deleted file mode 100644 index 4367c59..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/formatting.lua +++ /dev/null @@ -1,60 +0,0 @@ -return { - "stevearc/conform.nvim", - event = "BufWritePre", - cmd = { "ConformInfo", "FormatToggle" }, - keys = { - { - "cF", - function() - vim.g.format_on_save = not vim.g.format_on_save - vim.notify( - "Format on save: " .. (vim.g.format_on_save and "enabled" or "disabled"), - vim.log.levels.INFO, - { title = "conform" } - ) - end, - desc = "Toggle autoformat", - }, - { - "cf", - function() - require("conform").format({ async = true, lsp_fallback = true }) - end, - desc = "Format buffer", - }, - }, - config = function() - vim.g.format_on_save = true - - require("conform").setup({ - formatters_by_ft = { - c = { "clang_format" }, - cpp = { "clang_format" }, - python = { "isort", "black" }, - lua = { "stylua" }, - haskell = { "ormolu" }, - odin = { "odinfmt" }, - rust = { "rustfmt" }, - }, - - format_on_save = function(bufnr) - if not vim.g.format_on_save then - return - end - if vim.g.disable_autoformat_buf and vim.g.disable_autoformat_buf[bufnr] then - return - end - return { timeout_ms = 500, lsp_fallback = true } - end, - }) - - require("conform").formatters.clang_format = { - prepend_args = { "--style={IndentWidth: 4, TabWidth: 4, UseTab: Never}" }, - } - - vim.api.nvim_create_user_command("FormatToggle", function() - vim.g.format_on_save = not vim.g.format_on_save - vim.notify("Format on save: " .. (vim.g.format_on_save and "on" or "off")) - end, {}) - end, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/fzf.lua b/arch/nvim/.config/nvim/lua/plugins/fzf.lua deleted file mode 100644 index 9a34c9a..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/fzf.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - "ibhagwan/fzf-lua", - dependencies = { "nvim-tree/nvim-web-devicons" }, - cmd = "FzfLua", - keys = { - { "ff", "FzfLua files", desc = "Find files" }, - { "fg", "FzfLua live_grep", desc = "Live grep" }, - { "fb", "FzfLua buffers", desc = "Buffers" }, - { "fs", "FzfLua grep_cword", desc = "Grep word under cursor" }, - { "fr", "FzfLua oldfiles", desc = "Recent files" }, - { "fc", "FzfLua commands", desc = "Commands" }, - { "fd", "FzfLua diagnostics_document", desc = "Document diagnostics" }, - { "/", "FzfLua blines", desc = "Search current buffer" }, - }, - opts = { - winopts = { - height = 0.6, - width = 0.8, - border = "single", - preview = { border = "single" }, - }, - fzf_opts = { ["--cycle"] = true }, - grep = { - rg_opts = "--hidden --follow --glob '!.git' --column --line-number --no-heading --color=always", - }, - files = { - rg_opts = "--files --hidden --follow --glob '!.git'", - }, - }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/linting.lua b/arch/nvim/.config/nvim/lua/plugins/linting.lua deleted file mode 100644 index bbbeaa7..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/linting.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "mfussenegger/nvim-lint", - event = { "BufReadPost", "BufWritePost", "InsertLeave" }, - config = function() - require("lint").linters_by_ft = { - c = { "cppcheck" }, - cpp = { "cppcheck" }, - python = { "ruff" }, - } - - vim.api.nvim_create_autocmd({ "BufWritePost", "BufReadPost", "InsertLeave" }, { - callback = function() - require("lint").try_lint() - end, - }) - end, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/lsp.lua b/arch/nvim/.config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index 76566d1..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,103 +0,0 @@ -vim.g.rustaceanvim = { - server = { - default_settings = { - ["rust-analyzer"] = { - cargo = { allFeatures = true }, - check = { command = "clippy" }, - inlayHints = { lifetimeElisionHints = { enable = "skip_trivial" } }, - }, - }, - }, -} - -return { - { - "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "saghen/blink.cmp", - { - "folke/lazydev.nvim", - ft = "lua", - opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } } } }, - }, - }, - config = function() - vim.lsp.config("*", { - capabilities = require("blink.cmp").get_lsp_capabilities(), - }) - - -- Server-specific overrides - vim.lsp.config("lua_ls", { - settings = { - Lua = { - diagnostics = { globals = { "vim" } }, - workspace = { checkThirdParty = false }, - }, - }, - }) - - vim.lsp.config("ols", { - cmd = { "ols" }, - filetypes = { "odin" }, - root_markers = { "ols.json", ".git" }, - init_options = { - odin_command = "odin", - checker_args = "-strict-style", - collections = { - { name = "shared", path = vim.fn.expand("$HOME/code/odin/shared/") }, - }, - }, - }) - - -- Enable servers (default configs come from nvim-lspconfig runtime) - vim.lsp.enable({ "clangd", "pyright", "lua_ls", "hls", "ols" }) - - -- Keymaps on attach - vim.api.nvim_create_autocmd("LspAttach", { - callback = function(ev) - local map = function(keys, func, desc) - vim.keymap.set("n", keys, func, { buffer = ev.buf, desc = "LSP: " .. desc }) - end - if vim.lsp.inlay_hint then - vim.lsp.inlay_hint.enable(true, { bufnr = ev.buf }) - end - map("gd", vim.lsp.buf.definition, "Goto definition") - map("gD", vim.lsp.buf.declaration, "Goto declaration") - map("gr", vim.lsp.buf.references, "Goto references") - map("gI", vim.lsp.buf.implementation, "Goto implementation") - map("K", vim.lsp.buf.hover, "Hover docs") - map("rn", vim.lsp.buf.rename, "Rename") - map("ca", vim.lsp.buf.code_action, "Code action") - map("[d", vim.diagnostic.goto_prev, "Prev diagnostic") - map("]d", vim.diagnostic.goto_next, "Next diagnostic") - map("e", vim.diagnostic.open_float, "Show diagnostic") - end, - }) - - vim.diagnostic.config({ - virtual_text = true, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = "", - [vim.diagnostic.severity.WARN] = "", - [vim.diagnostic.severity.INFO] = "", - [vim.diagnostic.severity.HINT] = "", - }, - }, - underline = true, - update_in_insert = false, - }) - end, - }, - { - "j-hui/fidget.nvim", - event = "LspAttach", - opts = { notification = { window = { winblend = 0 } } }, - }, - { - "mrcjkb/rustaceanvim", - version = "^9", - lazy = false, - }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/nav.lua b/arch/nvim/.config/nvim/lua/plugins/nav.lua deleted file mode 100644 index 827da07..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/nav.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "christoomey/vim-tmux-navigator", - cmd = { - "TmuxNavigateLeft", "TmuxNavigateDown", - "TmuxNavigateUp", "TmuxNavigateRight", - }, - keys = { - { "", "TmuxNavigateLeft", desc = "Pane left", mode = { "n", "t" } }, - { "", "TmuxNavigateDown", desc = "Pane down", mode = { "n", "t" } }, - { "", "TmuxNavigateUp", desc = "Pane up", mode = { "n", "t" } }, - { "", "TmuxNavigateRight", desc = "Pane right", mode = { "n", "t" } }, - }, - init = function() - vim.g.tmux_navigator_no_mappings = 1 - end, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/treesitter.lua b/arch/nvim/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 348eaba..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - event = { "BufReadPre", "BufNewFile" }, - opts = { - ensure_installed = { - "c", - "cpp", - "python", - "lua", - "haskell", - "vim", - "vimdoc", - "query", - "bash", - "markdown", - "markdown_inline", - "json", - "toml", - "yaml", - "odin", - }, - highlight = { enable = true }, - indent = { enable = true }, - auto_install = false, - }, - config = function(_, opts) - -- new API, configs module is gone - require("nvim-treesitter").setup(opts) - end, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/ui.lua b/arch/nvim/.config/nvim/lua/plugins/ui.lua deleted file mode 100644 index 35a22de..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/ui.lua +++ /dev/null @@ -1,106 +0,0 @@ -return { - -- Statusline - { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - config = function() - local function make_theme() - local ok, p = pcall(dofile, vim.fn.expand("~/.cache/wallust/nvim.lua")) - if not ok then - p = { - base01 = "#181825", - base0D = "#89b4fa", - base05 = "#cdd6f4", - base04 = "#585b70", - base0B = "#a6e3a1", - base0E = "#cba6f7", - base08 = "#f38ba8", - base0A = "#f9e2af", - } - end - local bg = vim.g.transparent_bg and "NONE" or p.base01 - return { - normal = { - a = { fg = p.base0D, bg = bg, gui = "bold" }, - b = { fg = p.base05, bg = bg }, - c = { fg = p.base04, bg = bg }, - }, - insert = { a = { fg = p.base0B, bg = bg, gui = "bold" } }, - visual = { a = { fg = p.base0E, bg = bg, gui = "bold" } }, - replace = { a = { fg = p.base08, bg = bg, gui = "bold" } }, - command = { a = { fg = p.base0A, bg = bg, gui = "bold" } }, - inactive = { - a = { fg = p.base04, bg = bg }, - b = { fg = p.base04, bg = bg }, - c = { fg = p.base04, bg = bg }, - }, - } - end - - require("lualine").setup({ - options = { - theme = make_theme(), - globalstatus = true, - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { { "filename", path = 1 } }, - lualine_x = { "encoding", "filetype" }, - lualine_y = { "progress" }, - lualine_z = { "location" }, - }, - }) - - vim.api.nvim_create_autocmd("User", { - pattern = "ThemeChanged", - callback = function() - require("lualine").setup({ options = { theme = make_theme() } }) - end, - }) - - vim.api.nvim_create_autocmd("ColorScheme", { - callback = function() - require("lualine").setup({ options = { theme = make_theme() } }) - end, - }) - end, - }, - -- -- Buffer tabs - { - "akinsho/bufferline.nvim", - version = "*", - event = "VeryLazy", - keys = { - { "bp", "BufferLinePick", desc = "Pick buffer" }, - { "bo", "BufferLineCloseOthers", desc = "Close others" }, - { "bc", "BufferLinePickClose", desc = "Close (pick)" }, - }, - opts = { - options = { - mode = "buffers", - show_buffer_close_icons = false, - show_close_icon = false, - separator_style = "thin", - always_show_bufferline = false, - diagnostics = "nvim_lsp", - }, - }, - }, - -- Git signs in the gutter - { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = { - signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - }, - }, - }, -} diff --git a/arch/nvim/.config/nvim/lua/plugins/whichkey.lua b/arch/nvim/.config/nvim/lua/plugins/whichkey.lua deleted file mode 100644 index 97e8b19..0000000 --- a/arch/nvim/.config/nvim/lua/plugins/whichkey.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - opts = { - icons = { mappings = false }, - delay = 300, - spec = { - { "f", group = "find" }, - { "b", group = "buffer" }, - { "s", group = "split" }, - { "r", group = "refactor" }, - { "c", group = "code" }, - { "cF", desc = "Toggle autoformat" }, - { "cf", desc = "Format buffer" }, - { "e", desc = "File explorer" }, - { "u", desc = "Undo tree" }, - { "bp", desc = "Pick buffer" }, - { "bo", desc = "Close others" }, - { "bc", desc = "Close (pick)" }, - }, - }, - keys = { - { "?", function() require("which-key").show({ global = false }) end, desc = "Buffer keymaps" }, - }, -} -- cgit v1.2.3