summaryrefslogtreecommitdiff
path: root/arch/nvim/.config
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-06-30 19:55:05 -0700
committersteven-na <noreply.github@stvnc.dev>2026-06-30 19:55:05 -0700
commit3bb4ec6ec4d5d4adaf15d22899788c3db407bdad (patch)
tree727b08af1d963e697dbc28f9fa72ce98a9effd6f /arch/nvim/.config
parent77f8963a603824f3f67ebadfe085b10b9026f378 (diff)
2 different vim versions
Diffstat (limited to 'arch/nvim/.config')
-rw-r--r--arch/nvim/.config/nvim/.stylua.toml3
-rw-r--r--arch/nvim/.config/nvim/init.lua27
-rw-r--r--arch/nvim/.config/nvim/lazy-lock.json32
-rw-r--r--arch/nvim/.config/nvim/lua/keymaps.lua41
-rw-r--r--arch/nvim/.config/nvim/lua/options.lua39
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/colorscheme.lua108
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/completion.lua60
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/editor.lua73
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/extras.lua107
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/formatting.lua60
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/fzf.lua30
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/linting.lua17
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/lsp.lua103
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/nav.lua16
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/treesitter.lua31
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/ui.lua106
-rw-r--r--arch/nvim/.config/nvim/lua/plugins/whichkey.lua25
17 files changed, 0 insertions, 878 deletions
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" }, "<Space>", "<Nop>", { silent = true })
-
--- Save
-map({ "n", "i" }, "<C-s>", "<cmd>w<CR>", { desc = "Save" })
-
--- Clear search highlight
-map("n", "<Esc>", "<cmd>nohlsearch<CR>")
-
--- Exit terminal mode
-map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal" })
-
--- Better up/down on wrapped lines
-map({ "n", "v" }, "j", "gj")
-map({ "n", "v" }, "k", "gk")
-
--- Buffer navigation
-map("n", "<S-h>", "<cmd>bprevious<CR>", { desc = "Prev buffer" })
-map("n", "<S-l>", "<cmd>bnext<CR>", { desc = "Next buffer" })
-map("n", "<leader>bd", "<cmd>bdelete<CR>", { desc = "Delete buffer" })
-
--- Splits
-map("n", "<leader>sv", "<C-w>v", { desc = "Split vertical" })
-map("n", "<leader>sh", "<C-w>s", { desc = "Split horizontal" })
-map("n", "<leader>se", "<C-w>=", { desc = "Equal splits" })
-map("n", "<leader>sx", "<cmd>close<CR>", { desc = "Close split" })
-
--- Move lines
-map("n", "<A-Down>", "<cmd>m .+1<CR>==", { desc = "Move line down" })
-map("n", "<A-Up>", "<cmd>m .-2<CR>==", { desc = "Move line up" })
-map("v", "<A-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selection down" })
-map("v", "<A-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selection up" })
-
--- Stay in visual after indent
-map("v", "<", "<gv")
-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", "<leader>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",
- ["<C-Space>"] = { "show", "show_documentation", "hide_documentation" },
- ["<C-e>"] = { "hide" },
- ["<CR>"] = { "accept", "fallback" },
- ["<Tab>"] = { expand_menu, "select_next", "fallback" },
- ["<S-Tab>"] = { "select_prev", "fallback" },
- ["<C-b>"] = { "scroll_documentation_up", "fallback" },
- ["<C-f>"] = { "scroll_documentation_down", "fallback" },
- ["<C-n>"] = { "select_next", "fallback" },
- ["<C-p>"] = { "select_prev", "fallback" },
- ["<C-k>"] = { "snippet_forward", "fallback" },
- ["<C-j>"] = { "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", "<Plug>(leap)", mode = { "n", "x", "o" }, desc = "Leap" },
- { "S", "<Plug>(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 = {
- ["<Up>"] = {},
- ["<Down>"] = {},
- ["<Left>"] = {},
- ["<Right>"] = {},
- },
- restricted_keys = {
- ["<Up>"] = { "n", "x" },
- ["<Down>"] = { "n", "x" },
- ["<Left>"] = { "n", "x" },
- ["<Right>"] = { "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 = {
- { "<leader>u", "<cmd>UndotreeToggle<CR>", desc = "Undo tree" },
- },
- },
- -- Buffer-based file explorer
- {
- "stevearc/oil.nvim",
- lazy = false,
- keys = {
- { "<leader>e", "<cmd>Oil<CR>", desc = "File explorer" },
- { "-", "<cmd>Oil<CR>", 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 <C-r> to center
- -- vim.keymap.set({ "n", "v" }, "<C-r>", 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 = {
- {
- "<leader>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",
- },
- {
- "<leader>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 = {
- { "<leader>ff", "<cmd>FzfLua files<CR>", desc = "Find files" },
- { "<leader>fg", "<cmd>FzfLua live_grep<CR>", desc = "Live grep" },
- { "<leader>fb", "<cmd>FzfLua buffers<CR>", desc = "Buffers" },
- { "<leader>fs", "<cmd>FzfLua grep_cword<CR>", desc = "Grep word under cursor" },
- { "<leader>fr", "<cmd>FzfLua oldfiles<CR>", desc = "Recent files" },
- { "<leader>fc", "<cmd>FzfLua commands<CR>", desc = "Commands" },
- { "<leader>fd", "<cmd>FzfLua diagnostics_document<CR>", desc = "Document diagnostics" },
- { "<leader>/", "<cmd>FzfLua blines<CR>", 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("<leader>rn", vim.lsp.buf.rename, "Rename")
- map("<leader>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("<leader>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 = {
- { "<C-Left>", "<cmd>TmuxNavigateLeft<CR>", desc = "Pane left", mode = { "n", "t" } },
- { "<C-Down>", "<cmd>TmuxNavigateDown<CR>", desc = "Pane down", mode = { "n", "t" } },
- { "<C-Up>", "<cmd>TmuxNavigateUp<CR>", desc = "Pane up", mode = { "n", "t" } },
- { "<C-Right>", "<cmd>TmuxNavigateRight<CR>", 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 = {
- { "<leader>bp", "<cmd>BufferLinePick<CR>", desc = "Pick buffer" },
- { "<leader>bo", "<cmd>BufferLineCloseOthers<CR>", desc = "Close others" },
- { "<leader>bc", "<cmd>BufferLinePickClose<CR>", 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 = {
- { "<leader>f", group = "find" },
- { "<leader>b", group = "buffer" },
- { "<leader>s", group = "split" },
- { "<leader>r", group = "refactor" },
- { "<leader>c", group = "code" },
- { "<leader>cF", desc = "Toggle autoformat" },
- { "<leader>cf", desc = "Format buffer" },
- { "<leader>e", desc = "File explorer" },
- { "<leader>u", desc = "Undo tree" },
- { "<leader>bp", desc = "Pick buffer" },
- { "<leader>bo", desc = "Close others" },
- { "<leader>bc", desc = "Close (pick)" },
- },
- },
- keys = {
- { "<leader>?", function() require("which-key").show({ global = false }) end, desc = "Buffer keymaps" },
- },
-}