refactor(nvim): revamp entire setup

main
sgoudham 8 months ago
parent d7c512adbb
commit 922369a51d
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -0,0 +1 @@
vim.opt.shiftwidth = 4

@ -0,0 +1,2 @@
vim.opt.textwidth = 80
vim.opt.wrap = true

@ -1,69 +1,66 @@
{ {
"LazyVim": { "branch": "main", "commit": "aa1cccf230a01bd85d5173f7d87f782fd83caa88" }, "LazyVim": { "branch": "main", "commit": "c433ea7aa842c446edc2b1570998bf5440c68188" },
"LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" }, "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" },
"SchemaStore.nvim": { "branch": "main", "commit": "129914a81535b2c7296c05587c07ac8876fbd3e6" }, "SchemaStore.nvim": { "branch": "main", "commit": "be4d1084397c9b9d3d5a41bda871e6b20415bf48" },
"alpha-nvim": { "branch": "main", "commit": "e4fc5e29b731bdf55d204c5c6a11dc3be70f3b65" }, "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
"catppuccin": { "branch": "main", "commit": "490078b1593c6609e6a50ad5001e7902ea601824" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot-cmp": { "branch": "master", "commit": "d631b3afbf26bb17d6cf2b3cd8f3d79e7d5eeca1" }, "conform.nvim": { "branch": "master", "commit": "c0e0e80f0c233cb3a249f719a44324c660163a3f" },
"copilot.lua": { "branch": "master", "commit": "50ca36fd766db4d444094de81f5e131b6628f48f" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" }, "copilot.lua": { "branch": "master", "commit": "71382c2efec76647287d46a4fbe0ec8c9809e2ee" },
"dressing.nvim": { "branch": "master", "commit": "169877dbcae54b23b464b219e053e92854bbb37f" }, "crates.nvim": { "branch": "main", "commit": "2bd990871f0aef159933bd5fe6da421690a832b9" },
"friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" }, "dashboard-nvim": { "branch": "master", "commit": "c045eb24334324fb39ad5ede0b5d15a74a5d229e" },
"gitsigns.nvim": { "branch": "main", "commit": "bae45ef449d8811061cc940459e70e883a3aa83a" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
"harpoon": { "branch": "harpoon2", "commit": "95c04787c450357ec738b3d8da4b395c808a7a1e" }, "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" },
"indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"ltex_extra.nvim": { "branch": "master", "commit": "9bed99b2b8488cc2daf66c76d2e0cf051ee80d13" }, "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "ltex_extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "e4d56b400e9757b1dc77d620fd3069396e92d5fc" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason.nvim": { "branch": "main", "commit": "74eac861b013786bf231b204b4ba9a7d380f4bd9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "2b3d247fce06f53934174f5dfe0362c42d65c00c" },
"mini.ai": { "branch": "main", "commit": "5218ea75e635df78a807bc9d5a7162594fb76d02" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "3614a39aae98ccd34124b072939d6283853b3dd2" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" }, "mini.ai": { "branch": "main", "commit": "3ad9d455a91b8bf3c24d4e50518d9a6b9dddb42c" },
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" }, "mini.comment": { "branch": "main", "commit": "b0b359ada4293cdcea7ab4072dfd5b031aac3f8e" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "7951701fd21291ac473ea92d3fd57ec5c8bf10bb" }, "mini.indentscope": { "branch": "main", "commit": "ca129b71edb672d30b8d7ec3138106db1b1f6a8b" },
"neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" }, "mini.nvim": { "branch": "main", "commit": "d1413e1cacaacd29e420b9482754e762076e64ac" },
"neodev.nvim": { "branch": "main", "commit": "81a893eb94d502b2cbb08ed3871eeaadfd240131" }, "mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" },
"neogit": { "branch": "master", "commit": "5aa0880ef6fdbe3f6ca958c06ab9f1a927358922" }, "mini.surround": { "branch": "main", "commit": "5ceb6a12d3761bc719fbdad5432c89333deb1498" },
"noice.nvim": { "branch": "main", "commit": "894db25ec726d32047799d4d0a982b701bec453b" }, "neoconf.nvim": { "branch": "main", "commit": "435d70c1bc5a5bd21ecb98163baa8262480c4019" },
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "neodev.nvim": { "branch": "main", "commit": "2793ba3127c2c93ee486b9072a3ef129eeb950cc" },
"null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, "neogit": { "branch": "master", "commit": "a3f23af6f1b12938745092c4b427c732c79effe7" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nvim-cmp": { "branch": "main", "commit": "3b9f28061a67b19cadc13946de981426a6425e4a" }, "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-dap": { "branch": "master", "commit": "1c63f37f95cd4fb54512898168138d9a75d1516a" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-dap-go": { "branch": "main", "commit": "208f0e685b48a98bec2cdd8648559c4274b84ca2" }, "nvim-dap": { "branch": "master", "commit": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5" },
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, "nvim-dap-python": { "branch": "master", "commit": "f5b6f3a90aae0284b61fb3565e575267c19a16e6" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, "nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" },
"nvim-lspconfig": { "branch": "master", "commit": "a981d4447b92c54a4d464eb1a76b799bc3f9a771" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" },
"nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" }, "nvim-jdtls": { "branch": "master", "commit": "4f4de4d80e1df43d58e5e21677fca4c63676664d" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-lint": { "branch": "master", "commit": "76af3422e3c82ea40adf9ade1ccf1dc1eb361789" },
"nvim-spectre": { "branch": "master", "commit": "5b39919a2947b1266b3aa34d0b0b14c35523bc69" }, "nvim-lspconfig": { "branch": "master", "commit": "9a6279953c82d01b58825a46ede032ab246a5983" },
"nvim-treesitter": { "branch": "master", "commit": "15129f6d70a4d7adc380abe57a64af93478f72e5" }, "nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" }, "nvim-spectre": { "branch": "master", "commit": "d1ce28b6dc287a6f673461218f3326f0266d75f7" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" }, "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" },
"nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" }, "nvim-ts-autotag": { "branch": "main", "commit": "a65b202cfd08e0e69e531eab737205ff5bc082a4" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "2d92125620417fbea82ec30303823e3cd69e90e8" }, "telescope.nvim": { "branch": "master", "commit": "7b5c5f56a21e82fdcfe5b250278b8dfc4b1cbab4" },
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"toggleterm.nvim": { "branch": "main", "commit": "12cba0a1967b4f3f31903484dec72a6100dcf515" }, "toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" },
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" }, "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" },
"typescript.nvim": { "branch": "main", "commit": "de304087e6e49981fde01af8ccc5b21e8519306f" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"venv-selector.nvim": { "branch": "main", "commit": "cc312074371aff5b0d8d481b80c9c4de2a5287d7" }, "venv-selector.nvim": { "branch": "main", "commit": "fcb30164f2c4f8a34a305ead3247954a1fd8634f" },
"vim-illuminate": { "branch": "master", "commit": "5ed17582a8e97bf0a0c617c3cf762e98f87b9859" },
"vim-just": { "branch": "main", "commit": "ee884dc7d45251d92f5972c4556c12fc101419c0" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vimtex": { "branch": "master", "commit": "877de3ba5de5f766e5bfa1c3fb0d2ecfcd18f868" }, "vimtex": { "branch": "master", "commit": "f36e5856d85ff97aced152020ac92e3e3a10096b" }
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
} }

@ -1,25 +1,25 @@
-- Keymaps are automatically loaded on the VeryLazy event local function map(modes, lhs, rhs, opts)
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- NOTE: Use `<C-H>`, `<C-Up>`, `<M-h>` casing (instead of `<C-h>`, `<C-up>`,
-- `<M-H>`) to match the `lhs` of keymap info. Otherwise it will say that
-- Otherwise it will just say that
-- mapping doesn't exist when in fact it does.
if type(modes) == "string" then
modes = { modes }
end
for _, mode in ipairs(modes) do
opts = vim.tbl_deep_extend("force", { silent = true }, opts or {})
vim.keymap.set(mode, lhs, rhs, opts)
end
end
local function unmap(mode, key) local function unmap(mode, key)
vim.keymap.del(mode, key, {}) vim.keymap.del(mode, key, {})
end end
local function map(mode, lhs, rhs, opts) local Util = require("lazyvim.util")
local keys = require("lazy.core.handler").handlers.keys
---@cast keys LazyKeysHandler
-- do not create the keymap if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
if opts.remap and not vim.g.vscode then
opts.remap = nil
end
vim.keymap.set(mode, lhs, rhs, opts)
end
end
-- Unbind "entering normal mode" when in terminal -- Unbind stuff relating to terminal
unmap("t", "<esc><esc>") unmap("t", "<esc><esc>")
-- Unbind stuff relating to splitting windows -- Unbind stuff relating to splitting windows
unmap("n", "<leader>ww") unmap("n", "<leader>ww")
@ -27,31 +27,61 @@ unmap("n", "<leader>w-")
unmap("n", "<leader>w|") unmap("n", "<leader>w|")
unmap("n", "<leader>wd") unmap("n", "<leader>wd")
unmap("n", "<leader>bb") unmap("n", "<leader>bb")
require("which-key").register({
["<leader>w"] = "which_key_ignore",
})
-- Restore "H" & "L" from neovim -- Restore "H" & "L" from neovim
unmap("n", "H") unmap("n", "H")
unmap("n", "L") unmap("n", "L")
-- Unbind moving lines with ALT in INSERT/VISUAL mode -- Unbind moving lines with ALT in INSERT/VISUAL mode
unmap({"i", "v"}, "<M-j>") unmap({ "i", "v" }, "<M-j>")
unmap({"i", "v"}, "<M-k>") unmap({ "i", "v" }, "<M-k>")
-- Move ":Lazy" from "<leader>l" to "<leader>cm" -- Unbind Telescope stuff
unmap("n", "<leader>fn")
-- Idk what this does "Keywordprg"
unmap("n", "<leader>K")
-- Remove the default quit
unmap("n", "<leader>qq")
-- I can just type :Lazy
unmap("n", "<leader>l") unmap("n", "<leader>l")
map("n", "<leader>cl", "<cmd>Lazy<cr>", { desc = "Lazy" })
map("n", "0", "0^", { desc = "which_key_ignore " }) -- Rebind format from cf to lf
map("n", "<CR>", "o<ESC>", { desc = "which_key_ignore " }) unmap({ "n", "v" }, "<leader>cf")
map("n", "<C-u>", "<C-u>zz", { desc = "which_key_ignore " }) map({ "n", "v" }, "<leader>lf", function()
map("n", "<C-d>", "<C-d>zz", { desc = "which_key_ignore " }) Util.format({ force = true })
end, { desc = "Format" })
-- Copy/paste with system clipboard
map({ "n", "x" }, "gy", '"+y', { desc = "Copy to system clipboard" })
map("n", "gp", '"+p', { desc = "Paste from system clipboard" })
-- - Paste in Visual with `P` to not copy selected text (`:h v_P`)
map("x", "gp", '"+P', { desc = "Paste from system clipboard" })
-- I use gl for this
unmap("n", "<leader>cd")
map("n", "gl", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
-- Configure diagnostics with borders
local diagnostic_goto = function(next, severity)
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
severity = severity and vim.diagnostic.severity[severity] or nil
return function()
go({ severity = severity, float = { border = "rounded" } })
end
end
map("n", "]d", diagnostic_goto(true), { desc = "Next Diagnostic" })
map("n", "[d", diagnostic_goto(false), { desc = "Prev Diagnostic" })
map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
map("n", "<leader>w", "<cmd>w<cr>", { desc = "which_key_ignore", nowait = true }) map("n", "0", "0^", { desc = "which_key_ignore" })
map("n", "<leader>Q", "<cmd>qa<cr>", { desc = "which_key_ignore" }) map("n", "<CR>", "o<ESC>", { desc = "which_key_ignore" })
map("n", "<leader>q", "<cmd>q<cr>", { desc = "which_key_ignore", nowait = true }) map("n", "<S-CR>", "o<ESC>", { desc = "which_key_ignore" })
map("n", "<C-u>", "<C-u>zz", { desc = "which_key_ignore" })
map("n", "<C-d>", "<C-d>zz", { desc = "which_key_ignore" })
-- Clipboard map("n", "<leader>w", "<CMD>w<CR>", { desc = "Write", nowait = true })
map("n", "<leader>y", [["+y]], { desc = "which_key_ignore" }) map("n", "<leader>Q", "<CMD>qa<CR>", { desc = "Quit All" })
map("n", "<leader>p", [["+p]], { desc = "which_key_ignore" }) map("n", "<leader>q", "<CMD>q<CR>", { desc = "Quit", nowait = true })
map("n", "<M-h>", "<C-w>h", { desc = "Go to left window", remap = true }) map("n", "<M-h>", "<C-w>h", { desc = "Go to left window", remap = true })
map("n", "<M-j>", "<C-w>j", { desc = "Go to lower window", remap = true }) map("n", "<M-j>", "<C-w>j", { desc = "Go to lower window", remap = true })

@ -1,24 +1,34 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim -- bootstrap lazy.nvim
-- stylua: ignore vim.fn.system({
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) "git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath) vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({ require("lazy").setup({
spec = { spec = {
-- LazyVim plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- My Plugins
{ import = "plugins" },
-- LazyVim Extras
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.lang.rust" }, { import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.util.project" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.lang.typescript" }, { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.elixir" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.coding.copilot" },
{ import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.python" },
{ import = "plugins" }, { import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.dap.core" },
-- Can't figure out how to force reordering of the completions so just gonna disable it for now
-- { import = "lazyvim.plugins.extras.coding.copilot" },
}, },
defaults = { defaults = {
lazy = false, lazy = false,
@ -39,3 +49,5 @@ require("lazy").setup({
}, },
}, },
}) })
vim.cmd.colorscheme("catppuccin")

@ -7,4 +7,5 @@ vim.opt.laststatus = 3
vim.opt.cmdheight = 0 vim.opt.cmdheight = 0
vim.opt.updatetime = 100 vim.opt.updatetime = 100
vim.opt.list = false vim.opt.list = false
vim.opt.foldlevel = 3 vim.opt.foldlevel = 999
vim.g.autoformat = false

@ -2,31 +2,32 @@ return {
{ {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
no_italic = true,
priority = 10000, priority = 10000,
opts = { opts = {
flavour = "latte", flavour = "latte",
-- styles = {
-- comments = { "italic" },
-- },
integrations = {
telescope = {
style = "nvchad",
},
},
custom_highlights = function(c) custom_highlights = function(c)
local u = require("catppuccin.utils.colors") local u = require("catppuccin.utils.colors")
return { return {
-- ["@parameter"] = { style = {} },
-- Parameter = { style = {} },
-- ["@conditional"] = { style = {} },
-- Conditional = { style = {} },
-- ["@namespace"] = { style = {} },
MiniIndentscopeSymbol = { fg = c.pink },
NoiceCmdLinePopupTitle = { fg = c.base, bg = c.blue }, NoiceCmdLinePopupTitle = { fg = c.base, bg = c.blue },
NoiceCmdlinePopup = { bg = c.mantle }, NoiceCmdlinePopup = { bg = c.base },
NoiceCmdlinePopupBorder = { bg = c.mantle, fg = c.mantle }, NoiceCmdlinePopupBorder = { fg = c.blue },
-- Making the background of mini.files lighter
MiniFilesNormal = { bg = c.base },
-- Make the indentline nicer on the eyes
MiniIndentscopeSymbol = { fg = c.pink },
-- Setting the borders and background of the completion/documentation menu
BorderBG = { fg = c.blue },
PmenuSel = { bg = c.mantle },
-- Setting the background of the lsp.buf.hover() and other floats
NormalFloat = { bg = c.base },
-- Setting the background of the lsp diagnostics - stuff like [d, [w
TroubleNormal = { bg = c.base },
-- Markdown headlines
Headline1 = { bg = c.transparent },
-- Neogit -- Neogit
-- NeogitUnstagedchanges = { bg = c.base }, -- NeogitUnstagedchanges = { bg = c.base },

@ -1,44 +1,14 @@
return { return {
{ { "ggandor/leap.nvim", enabled = false, keys = false, config = function() end },
"ggandor/leap.nvim", { "folke/flash.nvim", enabled = false, keys = false, config = function() end },
enabled = false, { "ggandor/flit.nvim", enabled = false, keys = false, config = function() end },
keys = false, { "akinsho/bufferline.nvim", enabled = false, keys = false, config = function() end },
config = function() end, { "echasnovski/mini.bufremove", enabled = false, keys = false, config = function() end },
}, { "nvim-treesitter/nvim-treesitter-context", enabled = false, keys = false, config = function() end },
{ { "nvim-neo-tree/neo-tree.nvim", enabled = false, keys = false, config = function() end },
"folke/flash.nvim", { "RRethy/vim-illuminate", enabled = false, keys = false, config = function() end },
enabled = false, { "folke/persistence.nvim", enabled = false, keys = false, config = function() end },
keys = false, { "folke/which-key.nvim", enabled = false, keys = false, config = function() end },
config = function() end, { "nvimdev/dashboard-nvim", enabled = false, keys = false, config = function() end },
}, { "lukas-reineke/headlines.nvim", enabled = false, keys = false, config = function() end },
{
"folke/tokyonight.nvim",
enabled = false,
keys = false,
config = function() end,
},
{
"ggandor/flit.nvim",
enabled = false,
keys = false,
config = function() end,
},
{
"akinsho/bufferline.nvim",
enabled = false,
keys = false,
config = function() end,
},
{
"echasnovski/mini.bufremove",
enabled = false,
keys = false,
config = function() end,
},
{
"echasnovski/mini.pairs",
enabled = false,
keys = false,
config = function() end,
},
} }

@ -1,12 +1,33 @@
return { return {
{ -- do not lazyload
-- and don't use default section operators!
"nvim-lualine/lualine.nvim",
lazy = false,
event = function()
return {}
end,
opts = function(_, opts)
opts.options.section_separators = ""
end,
},
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
init = function()
-- "I" keeps the startup message, which I've grown to like over time
vim.opt.shortmess:append({ W = true, I = false, c = true, C = true })
end,
},
{
"stevearc/conform.nvim",
opts = { opts = {
colorscheme = "catppuccin", formatters_by_ft = {
markdown = { "mdformat" },
},
}, },
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
lazy = false,
opts = function(_, opts) opts = function(_, opts)
table.insert(opts.routes, { table.insert(opts.routes, {
filter = { filter = {
@ -27,52 +48,9 @@ return {
}, },
opts = { skip = true }, opts = { skip = true },
}) })
opts.presets.lsp_doc_border = false opts.presets.lsp_doc_border = true
end,
},
{
"folke/persistence.nvim",
keys = function()
-- stylua: ignore
return {
{ "<leader>as", function() require("persistence").load() end, desc = "Restore Session", },
{ "<leader>al", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session", },
{ "<leader>ad", function() require("persistence").stop() end, desc = "Don't Save Current Session", },
}
end, end,
}, },
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
enable_normal_mode_for_inputs = true,
window = { mappings = { ["o"] = "open" } },
},
},
{
"NeogitOrg/neogit",
dependencies = "nvim-lua/plenary.nvim",
opts = {
disable_commit_confirmation = true,
},
keys = {
{ "<leader>gg", "<cmd>Neogit kind=replace<cr>", desc = "Open Neogit" },
{ "<leader>gG", "<cmd>Neogit cwd=%:p:h<cr>", desc = "Open Neogit (cwd)" },
},
},
{
"ahmedkhalf/project.nvim",
opts = {
detection_methods = { "pattern" },
},
event = "VeryLazy",
config = function(_, opts)
require("project_nvim").setup(opts)
require("telescope").load_extension("projects")
end,
keys = {
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
},
},
{ {
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
opts = { opts = {
@ -100,42 +78,4 @@ return {
shell = "fish", shell = "fish",
}, },
}, },
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources, {
nls.builtins.formatting.black,
-- nls.builtins.diagnostics.ruff,
})
end,
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = "nvim-lua/plenary.nvim",
keys = function()
local harpoon = require("harpoon")
harpoon:setup()
-- stylua: ignore
return {
{ "<leader>bm", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, desc = "Open Harpoon Menu", },
{ "<leader>bb", function() harpoon:list():append() end, desc = "Add To Harpoon", },
{ "<leader>1", function() harpoon:list():select(1) end },
{ "<leader>2", function() harpoon:list():select(2) end },
{ "<leader>3", function() harpoon:list():select(3) end },
{ "<leader>4", function() harpoon:list():select(4) end },
}
end,
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {}, -- this is equivalent to setup({}) function
},
{
"NoahTheDuke/vim-just",
event = { "BufReadPre", "BufNewFile" },
ft = { "\\cjustfile", "*.just", ".justfile" },
},
} }

@ -0,0 +1,22 @@
return {
{
"NeogitOrg/neogit",
dependencies = "nvim-lua/plenary.nvim",
opts = {
disable_commit_confirmation = true,
},
keys = {
{ "<leader>gg", "<cmd>Neogit kind=replace<cr>", desc = "Open Neogit" },
{ "<leader>gG", "<cmd>Neogit cwd=%:p:h<cr>", desc = "Open Neogit (cwd)" },
},
},
{
"lewis6991/gitsigns.nvim",
event = "LazyFile",
keys = {
{ "]h", "<CMD>Gitsigns next_hunk<CR>zz", desc = "Next Hunk" },
{ "[h", "<CMD>Gitsigns prev_hunk<CR>zz", desc = "Prev Hunk" },
{ "<leader>ghP", "<CMD>Gitsigns preview_hunk<CR>zz", desc = "Preview Hunk" },
},
},
}

@ -0,0 +1,210 @@
local Util = require("lazyvim.util")
-- This is the same as in lspconfig.server_configurations.jdtls, but avoids
-- needing to require that when this module loads.
local java_filetypes = { "java" }
-- Utility function to extend or override a config table, similar to the way
-- that Plugin.opts works.
---@param config table
---@param custom function | table | nil
local function extend_or_override(config, custom, ...)
if type(custom) == "function" then
config = custom(config, ...) or config
elseif custom then
config = vim.tbl_deep_extend("force", config, custom) --[[@as table]]
end
return config
end
return {
-- Ensure java debugger and test packages are installed.
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" })
end,
},
},
},
-- Configure nvim-lspconfig to install the server automatically via mason, but
-- defer actually starting it to our configuration of nvim-jtdls below.
{
"neovim/nvim-lspconfig",
opts = {
-- make sure mason installs the server
servers = {
jdtls = {},
},
setup = {
jdtls = function()
return true -- avoid duplicate servers
end,
},
},
},
-- Set up nvim-jdtls to attach to java files.
{
"mfussenegger/nvim-jdtls",
ft = java_filetypes,
opts = function()
return {
-- How to find the root dir for a given filename. The default comes from
-- lspconfig which provides a function specifically for java projects.
root_dir = require("lspconfig.server_configurations.jdtls").default_config.root_dir,
-- How to find the project name for a given root dir.
project_name = function(root_dir)
return root_dir and vim.fs.basename(root_dir)
end,
-- Where are the config and workspace dirs for a project?
jdtls_config_dir = function(project_name)
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/config"
end,
jdtls_workspace_dir = function(project_name)
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/workspace"
end,
-- How to run jdtls. This can be overridden to a full java command-line
-- if the Python wrapper script doesn't suffice.
cmd = { vim.fn.exepath("jdtls") },
full_cmd = function(opts)
local fname = vim.api.nvim_buf_get_name(0)
local root_dir = opts.root_dir(fname)
local project_name = opts.project_name(root_dir)
local cmd = vim.deepcopy(opts.cmd)
if project_name then
vim.list_extend(cmd, {
"-configuration",
opts.jdtls_config_dir(project_name),
"-data",
opts.jdtls_workspace_dir(project_name),
})
end
return cmd
end,
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
dap = { hotcodereplace = "auto", config_overrides = {} },
test = true,
}
end,
config = function()
local opts = Util.opts("nvim-jdtls") or {}
-- Find the extra bundles that should be passed on the jdtls command-line
-- if nvim-dap is enabled with java debug/test.
local mason_registry = require("mason-registry")
local bundles = {} ---@type string[]
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
local java_dbg_path = java_dbg_pkg:get_install_path()
local jar_patterns = {
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
}
-- java-test also depends on java-debug-adapter.
if opts.test and mason_registry.is_installed("java-test") then
local java_test_pkg = mason_registry.get_package("java-test")
local java_test_path = java_test_pkg:get_install_path()
vim.list_extend(jar_patterns, {
java_test_path .. "/extension/server/*.jar",
})
end
for _, jar_pattern in ipairs(jar_patterns) do
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
table.insert(bundles, bundle)
end
end
end
local function attach_jdtls()
local fname = vim.api.nvim_buf_get_name(0)
-- Configuration can be augmented and overridden by opts.jdtls
local config = extend_or_override({
cmd = opts.full_cmd(opts),
root_dir = opts.root_dir(fname),
init_options = {
bundles = bundles,
},
-- enable CMP capabilities
capabilities = require("cmp_nvim_lsp").default_capabilities(),
}, opts.jdtls)
-- Existing server will be reused if the root_dir matches.
require("jdtls").start_or_attach(config)
-- not need to require("jdtls.setup").add_commands(), start automatically adds commands
end
-- Attach the jdtls for each java buffer. HOWEVER, this plugin loads
-- depending on filetype, so this autocmd doesn't run for the first file.
-- For that, we call directly below.
vim.api.nvim_create_autocmd("FileType", {
pattern = java_filetypes,
callback = attach_jdtls,
})
-- Setup keymap and dap after the lsp is fully attached.
-- https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration
-- https://neovim.io/doc/user/lsp.html#LspAttach
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == "jdtls" then
-- ["<leader>cx"] = { name = "+extract" },
-- ["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" },
-- ["<leader>cxc"] = { require("jdtls").extract_constant, "Extract Constant" },
-- ["gs"] = { require("jdtls").super_implementation, "Goto Super" },
-- ["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" },
-- ["<leader>co"] = { require("jdtls").organize_imports, "Organize Imports" },
-- ["<leader>c"] = { name = "+code" },
-- ["<leader>cx"] = { name = "+extract" },
-- ["<leader>cxm"] = {
-- [[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
-- "Extract Method",
-- },
-- ["<leader>cxv"] = {
-- [[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
-- "Extract Variable",
-- },
-- ["<leader>cxc"] = {
-- [[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
-- "Extract Constant",
-- },
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger
require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs()
-- Java Test require Java debugger to work
if opts.test and mason_registry.is_installed("java-test") then
-- custom keymaps for Java test runner (not yet compatible with neotest)
-- ["<leader>t"] = { name = "+test" },
-- ["<leader>tt"] = { require("jdtls.dap").test_class, "Run All Test" },
-- ["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" },
-- ["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
end
end
-- User can set additional keymaps in opts.on_attach
if opts.on_attach then
opts.on_attach(args)
end
end
end,
})
-- Avoid race condition by calling attach the first time, since the autocmd won't fire.
attach_jdtls()
end,
},
}

@ -5,6 +5,7 @@ return {
if type(opts.ensure_installed) == "table" then if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { vim.list_extend(opts.ensure_installed, {
"nix", "nix",
"java",
}) })
end end
opts.indent = { opts.indent = {
@ -15,6 +16,13 @@ return {
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = {
{
"barreiroleo/ltex_extra.nvim",
ft = { "markdown", "tex" },
dependencies = { "neovim/nvim-lspconfig" },
},
},
---@class PluginLspOpts ---@class PluginLspOpts
init = function() init = function()
local keys = require("lazyvim.plugins.lsp.keymaps").get() local keys = require("lazyvim.plugins.lsp.keymaps").get()
@ -30,17 +38,12 @@ return {
local leader_c = "<leader>c" local leader_c = "<leader>c"
local leader_l = "<leader>l" local leader_l = "<leader>l"
swap_prefix(leader_c, leader_l) swap_prefix(leader_c, leader_l)
require("which-key").register({
[leader_c] = "pkgs",
[leader_l] = "code",
})
keys[#keys + 1] = { "gl", vim.diagnostic.open_float, "Line Diagnostics" } keys[#keys + 1] = { "gy", false }
end, end,
opts = { opts = {
diagnostics = { underline = false, update_in_insert = true }, diagnostics = { underline = false, update_in_insert = true },
inlay_hints = { enabled = true }, inlay_hints = { enabled = true },
autoformat = false,
---@type lspconfig.options ---@type lspconfig.options
servers = { servers = {
lua_ls = { lua_ls = {
@ -51,13 +54,13 @@ return {
}, },
}, },
setup = { setup = {
ltex = function(_, opts) ltex = function(_, _)
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args) callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id) local client = vim.lsp.get_client_by_id(args.data.client_id)
if client.name == "ltex" then if client.name == "ltex" then
require("ltex_extra").setup({ require("ltex_extra").setup({
load_langs = { "en-GB" }, -- languages for witch dictionaries will be loaded load_langs = { "en-GB" }, -- languages for which dictionaries will be loaded
init_check = true, -- whether to load dictionaries on startup init_check = true, -- whether to load dictionaries on startup
path = vim.fn.stdpath("data") .. "/spell", -- path to store dictionaries. path = vim.fn.stdpath("data") .. "/spell", -- path to store dictionaries.
}) })
@ -67,6 +70,9 @@ return {
end, end,
}, },
}, },
config = function()
require("lspconfig.ui.windows").default_options.border = "rounded"
end,
}, },
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
@ -86,13 +92,18 @@ return {
}) })
end end
end, end,
keys = {
{ "<leader>cm", false },
},
}, },
{ {
"hrsh7th/nvim-cmp", "stevearc/conform.nvim",
dependencies = { keys = {
"hrsh7th/cmp-emoji", { "<leader>cF", false },
}, },
},
{
"hrsh7th/nvim-cmp",
---@param opts cmp.ConfigSchema ---@param opts cmp.ConfigSchema
opts = function(_, opts) opts = function(_, opts)
local has_words_before = function() local has_words_before = function()
@ -104,18 +115,30 @@ return {
local luasnip = require("luasnip") local luasnip = require("luasnip")
local cmp = require("cmp") local cmp = require("cmp")
opts.window = {
completion = cmp.config.window.bordered({
winhighlight = "Normal:Normal,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None",
}),
documentation = cmp.config.window.bordered({
winhighlight = "Normal:Normal,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None",
}),
}
opts.experimental.ghost_text = false opts.experimental.ghost_text = false
opts.mapping = vim.tbl_extend("force", opts.mapping, { opts.mapping = {
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<C-e>"] = cmp.mapping.abort(),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<M-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), ["<M-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<M-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), ["<M-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<M-p>"] = cmp.mapping.scroll_docs(-4), ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<M-n>"] = cmp.mapping.scroll_docs(4), ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
-- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior
cmp.select_next_item() cmp.confirm({ select = true })
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region -- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
elseif has_words_before() then elseif has_words_before() then
@ -133,23 +156,25 @@ return {
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
}) ["<CR>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
else
fallback()
end
end,
s = cmp.mapping.confirm({ select = true }),
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
}),
}
opts.sources = {
{ name = "nvim_lsp", priority = 200 },
{ name = "path", priority = 150 },
{ name = "buffer", priority = 125 },
}
end, end,
}, },
{
"echasnovski/mini.surround",
opts = {
mappings = {
add = "gsa",
delete = "gsd",
find = "gsf",
find_left = "gsF",
highlight = "gsh",
replace = "gsr",
update_n_lines = "gsn",
},
},
},
{ {
"simrat39/rust-tools.nvim", "simrat39/rust-tools.nvim",
opts = { opts = {
@ -162,20 +187,4 @@ return {
vim.g.vimtex_mappings_enabled = 0 vim.g.vimtex_mappings_enabled = 0
end, end,
}, },
{
"barreiroleo/ltex_extra.nvim",
dependencies = { "neovim/nvim-lspconfig" },
-- opts = {
-- load_langs = { "en-GB" },
-- path = vim.fn.stdpath("data") .. "/dictionary",
-- },
},
{
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
setup = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
} }

@ -0,0 +1,56 @@
return {
"echasnovski/mini.nvim",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("mini.clue").setup({
triggers = {
-- Leader triggers
{ mode = "n", keys = "<Leader>" },
{ mode = "x", keys = "<Leader>" },
-- `g` key
{ mode = "n", keys = "g" },
{ mode = "x", keys = "g" },
},
window = {
delay = 800,
},
})
require("mini.cursorword").setup({
delay = 0,
})
require("mini.extra").setup()
require("mini.files").setup()
local hipatterns = require("mini.hipatterns")
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
hack = { pattern = "%f[%w]()HACK()%f[%W]", group = "MiniHipatternsHack" },
todo = { pattern = "%f[%w]()TODO()%f[%W]", group = "MiniHipatternsTodo" },
note = { pattern = "%f[%w]()NOTE()%f[%W]", group = "MiniHipatternsNote" },
-- Highlight hex color strings (`#rrggbb`) using that color
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
require("mini.pick").setup()
end,
keys = {
{
"-",
function()
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
end,
desc = "File Navigation (file)",
},
{
"_",
function()
require("mini.files").open(vim.loop.cwd(), true)
end,
desc = "File Navigation (cwd)",
},
},
}

@ -1,3 +1,3 @@
indent_type = "Spaces" indent_type = "Spaces"
indent_width = 2 indent_width = 2
column_width = 120 column_width = 120

Loading…
Cancel
Save