diff --git a/lazy-lock.json b/lazy-lock.json index d08ab61..8191582 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -18,8 +18,32 @@ "gitsigns.nvim": { "branch": "main", "commit": "6668f379ca634c36b8e11453118590b91bf8b295" }, "grug-far.nvim": { "branch": "main", "commit": "f86a07ee814d9eff3c08a7ce1041e502c32872c5" }, "gruvbox.nvim": { "branch": "main", "commit": "61b0b3be2f0cfd521667403a0367298144d6c165" }, + "LspUI.nvim": { "branch": "main", "commit": "f20d4e2623e69649e9f92ac4c24b6f930976a7fa" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "SchemaStore.nvim": { "branch": "main", "commit": "4ca0a3d3f77de2cc5efa497e75ab0e649cc0f66c" }, + "action-hints.nvim": { "branch": "main", "commit": "ab10fef255dd4bc933c92d8f9969828f2f856e71" }, + "activate.nvim": { "branch": "main", "commit": "3af72fe96caee3c7832fec241fbbc59398c8d6fd" }, + "arrow.nvim": { "branch": "master", "commit": "5438c977e729a29d96bd54c8da3103154e80dbd1" }, + "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, + "bmessages.nvim": { "branch": "main", "commit": "985c6973bc27888598a03f4766a2481248a599b2" }, + "buffer-vacuum": { "branch": "main", "commit": "9ec0ea4ee93bb1faa0419d6890daf9e45c436ea6" }, + "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "cheatsheet.nvim": { "branch": "master", "commit": "8ee4d76b6f902c4017dc28eddd79d925dfc55066" }, + "distant.nvim": { "branch": "v0.3", "commit": "67d6b066e8490725718b79f643966f4eafc7da3c" }, + "drop.nvim": { "branch": "main", "commit": "d2376ac1635eb71af699eda603f3dfe87c29a70d" }, + "eagle.nvim": { "branch": "main", "commit": "4105db74a1a0809b968661ec8d8531724fc66241" }, + "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "flatten.nvim": { "branch": "main", "commit": "b17a3e65c2e4e2ecd1345a2d08435e80f982c4a6" }, + "fzf-lua": { "branch": "main", "commit": "ae9378a48fcf07475d93b3dc7775c2aab0b9fa7b" }, + "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, + "glance.nvim": { "branch": "master", "commit": "cb19b86349cbe634eec0ea768b9a27fdd6d24f34" }, + "goto-preview": { "branch": "main", "commit": "4751e70a6ebce4fb78327b097cb8fdff55f38f3a" }, + "grug-far.nvim": { "branch": "main", "commit": "309ecac6e6240d37c0be3c567d9f7cc95f63d255" }, + "gruvbox.nvim": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" }, "highlight-undo.nvim": { "branch": "main", "commit": "a5e2e2d43f6d131bf526619baeeeec32397b0789" }, + "hologram.nvim": { "branch": "main", "commit": "f5194f71ec1578d91b2e3119ff08e574e2eab542" }, "hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" }, + "img-clip.nvim": { "branch": "main", "commit": "11f068e3deea5643330146bdda2e852779dcd19c" }, "lazy-reload.nvim": { "branch": "main", "commit": "5b781fbd4e5eaa4002f5bd52ceb1febf07d5ecbf" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, @@ -44,7 +68,31 @@ "nvim-jdtls": { "branch": "master", "commit": "a5c6f38f8151d7b4f5b32c005a95022fa66f4c9d" }, "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, "nvim-lspconfig": { "branch": "master", "commit": "6b63bdf2399b9bedf93297d98419550523a9ad68" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lsp_signature.nvim": { "branch": "master", "commit": "02a2784275e05fba89395e1d5e147d7a2b4877d2" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, + "marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" }, + "mini.ai": { "branch": "main", "commit": "6e01c0e5a15554852546fac9853960780ac52ed4" }, + "mini.animate": { "branch": "main", "commit": "13e170c13030b043aa8ad4311012ec0eaba0d5c7" }, + "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, + "mini.nvim": { "branch": "main", "commit": "3a354c754656538ad76d1add93ca21e75b7f3181" }, + "mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" }, + "navimark.nvim": { "branch": "main", "commit": "3be104b05245800bd3731b6a2577d255cf9f55c9" }, + "neo-tree.nvim": { "branch": "main", "commit": "1655119b2057838691467f8a640070462c9b7048" }, + "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "neogit": { "branch": "master", "commit": "12f78aaabb37b4946254dd5e47cf7b552904937a" }, + "neorg": { "branch": "main", "commit": "ed43ed58116caa0a17bbbc7aa663e32bf94bc531" }, + "neovim-project": { "branch": "main", "commit": "3ca01f19a6405334bf1f652126e63f1229ad0e74" }, + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" }, + "nvim-dev-container": { "branch": "main", "commit": "ba9666bdaec23cfe8087c0b6bb0a15c93ec8ba87" }, + "nvim-lightbulb": { "branch": "master", "commit": "f7f61c47af5bf701b1f4af127bc565ab6491acbf" }, + "nvim-lspconfig": { "branch": "master", "commit": "a3f8422b752e03334dbaf4a46940d8aee0acdebf" }, + "nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-rulebook": { "branch": "main", "commit": "daeb662a331af495a0ff98ca8bd6bc66b5f97db8" }, "nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" }, "nvim-treesitter": { "branch": "master", "commit": "1adcd5711929e44d1bc9e59fbf7d94656cf6d389" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ab0950c53d1ae04da8e488aa762b450d5241dca2" }, @@ -59,10 +107,21 @@ "smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" }, "smart-splits.nvim": { "branch": "master", "commit": "4a231987665d3c6e02ca88833d050e918afe3e1e" }, "snacks.nvim": { "branch": "main", "commit": "5eac729fa290248acfe10916d92a5ed5e5c0f9ed" }, + "nvim-treesitter": { "branch": "master", "commit": "99487eb34a397befce8182ff63347a21c5f4b881" }, + "nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" }, + "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, + "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, + "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, + "precognition.nvim": { "branch": "main", "commit": "24f2cc51dccecec4cf3de04bfbd14f5b9e79df0b" }, + "pretty_hover": { "branch": "master", "commit": "5f475e65e5272501f4ab05e6520b0e94fc59c6db" }, + "snacks.nvim": { "branch": "main", "commit": "07f4b9adff7af45a7e0eb22d85a422e32ed4b1ca" }, "sniprun": { "branch": "master", "commit": "151ada2c984aee1feb45c7e3c2abb19f597ecbd0" }, "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, + "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telekasten.nvim": { "branch": "main", "commit": "6a10a7929421d6e696e46bbc5aa5627a8cbcf61d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, @@ -76,4 +135,13 @@ "web-dev.nvim": { "branch": "main", "commit": "f9f71e9ba8652e25c88590b0ec2399425c901313" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, "zk-nvim": { "branch": "main", "commit": "50d92038d22ad9a537dcfd463c38527591430df6" } + "themery.nvim": { "branch": "main", "commit": "bfa58f4b279d21cb515b28023e1b68ec908584b2" }, + "tiny-code-action.nvim": { "branch": "main", "commit": "cc2f6045e67e01355c49fea10568baba856e844a" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "whip.nvim": { "branch": "main", "commit": "3454e25414f0464750661b3570b47441f43bde9e" }, + "wtf.nvim": { "branch": "main", "commit": "16eec1f32c3608bd8519e9e520041fe34201abb0" } } diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 27e9e06..fb1d645 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -1,3 +1,98 @@ -- Autocmds are automatically loaded on the VeryLazy event -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Add any additional autocmds here +-- autocmds.lua +local function create_dev_output() + local group = vim.api.nvim_create_augroup("DevOutput", { clear = true }) + + -- Create the command + vim.api.nvim_create_user_command("DevOutput", function() + local buf = vim.api.nvim_create_buf(false, true) + vim.api.nvim_command("split") + vim.api.nvim_win_set_buf(0, buf) + vim.api.nvim_command("wincmd J") + vim.api.nvim_buf_set_name(buf, "[Development Output]") + vim.api.nvim_buf_set_option(buf, "buftype", "nofile") + vim.api.nvim_buf_set_option(buf, "swapfile", false) + vim.api.nvim_buf_set_option(buf, "bufhidden", "hide") + vim.api.nvim_buf_set_option(buf, "filetype", "DevOutput") + vim.api.nvim_win_set_height(0, 10) + return buf + end, {}) + + -- Make the dev_print function globally available + _G.dev_print = function(msg) + local bufnr = nil + for _, buf in ipairs(vim.api.nvim_list_bufs()) do + if vim.api.nvim_buf_get_name(buf):match("Development Output") then + bufnr = buf + break + end + end + + if not bufnr then + bufnr = vim.api.nvim_exec2("DevOutput", { output = true }).output + end + + local timestamp = os.date("%H:%M:%S") + local formatted_msg = string.format("[%s] %s", timestamp, msg) + vim.api.nvim_buf_set_lines(bufnr, -1, -1, false, { formatted_msg }) + + for _, win in ipairs(vim.api.nvim_list_wins()) do + if vim.api.nvim_win_get_buf(win) == bufnr then + vim.api.nvim_win_set_cursor( + win, + { vim.api.nvim_buf_line_count(bufnr), 0 } + ) + break + end + end + end + + -- Optional: Add any autocmds related to the output window + vim.api.nvim_create_autocmd("FileType", { + group = group, + pattern = "DevOutput", + callback = function() + -- Set any buffer-local options for DevOutput buffers + vim.opt_local.wrap = true + vim.opt_local.number = true + end, + }) +end + +-- Initialize the dev output setup +create_dev_output() + +local augroup = vim.api.nvim_create_augroup("UserConfig", { clear = true }) + +-- Highlight on yank +vim.api.nvim_create_autocmd("TextYankPost", { + group = augroup, + callback = function() + vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 }) + end, +}) + +-- Return to last edit position when opening files +vim.api.nvim_create_autocmd("BufReadPost", { + group = augroup, + callback = function() + local mark = vim.api.nvim_buf_get_mark(0, '"') + local lcount = vim.api.nvim_buf_line_count(0) + if mark[1] > 0 and mark[1] <= lcount then + pcall(vim.api.nvim_win_set_cursor, 0, mark) + end + end, +}) + +-- Remove trailing whitespace on save +vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + pattern = "*", + callback = function() + local save_cursor = vim.fn.getpos(".") + vim.cmd([[%s/\s\+$//e]]) + vim.fn.setpos(".", save_cursor) + end, +}) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 69b0954..67d7032 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -8,12 +8,47 @@ -- "SomeCommandName", -- Replace "SomeCommandName" with your desired command -- { noremap = true, silent = true } -- ) - - vim.api.nvim_set_keymap( "n", - "qw", - "SessionManager save_current_session", + "<^P>", + "lua dev_print('Key combo detected!')", { noremap = true, silent = true } ) +-- load the session for the current directory +vim.keymap.set("n", "qs", function() + require("persistence").load() +end) + +-- select a session to load +vim.keymap.set("n", "qS", function() + require("persistence").select() +end) + +-- load the last session +vim.keymap.set("n", "ql", function() + require("persistence").load({ last = true }) +end) + +-- stop Persistence => session won't be saved on exit +vim.keymap.set("n", "qd", function() + require("persistence").stop() +end) + +vim.keymap.set("n", "gD", "Glance definitions") +vim.keymap.set("n", "gR", "Glance references") +vim.keymap.set("n", "gY", "Glance type_definitions") +vim.keymap.set("n", "gM", "Glance implementations") + +vim.keymap.set("n", "ri", function() + require("rulebook").ignoreRule() +end) +vim.keymap.set("n", "rl", function() + require("rulebook").lookupRule() +end) +vim.keymap.set("n", "ry", function() + require("rulebook").yankDiagnosticCode() +end) +vim.keymap.set({ "n", "x" }, "rf", function() + require("rulebook").suppressFormatter() +end) diff --git a/lua/config/options.lua b/lua/config/options.lua index 17942e5..eaf808e 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -2,6 +2,40 @@ -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua -- Add any additional options here vim.opt.wrap = true -vim.g.perl_host_prog = '/usr/bin/perl' +vim.g.perl_host_prog = "/usr/bin/perl" vim.g.loaded_perl_provider = 0 +vim.opt.number = true -- Show line numbers +vim.opt.relativenumber = true -- Show relative line numbers +vim.opt.cursorline = true -- Highlight current line +vim.opt.expandtab = true -- Use spaces instead of tabs +vim.opt.tabstop = 2 -- Number of spaces tabs count for +vim.opt.shiftwidth = 2 -- Size of an indent +vim.opt.smartindent = true -- Insert indents automatically +vim.opt.wrap = true -- Don't wrap lines +vim.opt.ignorecase = true -- Ignore case in search +vim.opt.smartcase = true -- Don't ignore case with capitals +vim.opt.termguicolors = true -- True color support +vim.opt.updatetime = 250 -- Faster completion +vim.opt.timeoutlen = 300 -- Faster key mapping +vim.opt.clipboard = "unnamedplus" -- Use system clipboard +vim.opt.scrolloff = 8 -- Lines of context +vim.opt.mouse = "a" -- Enable mouse mode +vim.opt.breakindent = true -- Wrapped lines preserve indent +vim.opt.undofile = true -- Persistent undo +vim.opt.signcolumn = "yes" -- Always show sign column +vim.opt.splitbelow = true -- Split below +vim.opt.splitright = true -- Split right +vim.opt.laststatus = 3 -- Global statusline +vim.opt.completeopt = { "menu", "menuone", "noselect" } +-- SSH-specific optimizations +vim.opt.shadafile = "NONE" -- Don't write shada file (reducing network traffic) +vim.opt.backup = false -- Don't use backup files +vim.opt.writebackup = false -- Don't backup before overwriting +vim.opt.swapfile = false -- Don't use swap files +vim.opt.undofile = false -- Don't use persistent undo +vim.g.loaded_ruby_provider = 0 -- Disable ruby provider +vim.g.loaded_perl_provider = 0 -- Disable perl provider +vim.g.loaded_python3_provider = 0 -- Disable python3 provider +vim.g.loaded_node_provider = 0 -- Disable node provider +vim.opt.hidden = false diff --git a/lua/plugins/action-hints.lua b/lua/plugins/action-hints.lua new file mode 100644 index 0000000..ac650ff --- /dev/null +++ b/lua/plugins/action-hints.lua @@ -0,0 +1,12 @@ +return { + "roobert/action-hints.nvim", + config = function() + require("action-hints").setup({ + template = { + definition = { text = " ⊛", color = "#add8e6" }, + references = { text = " ↱%s", color = "#ff6666" }, + }, + use_virtual_text = true, + }) + end, +} diff --git a/lua/plugins/arrow.lua b/lua/plugins/arrow.lua new file mode 100644 index 0000000..41df1e7 --- /dev/null +++ b/lua/plugins/arrow.lua @@ -0,0 +1,13 @@ +return { + "otavioschwanck/arrow.nvim", + dependencies = { + { "nvim-tree/nvim-web-devicons" }, + -- or if using `mini.icons` + -- { "echasnovski/mini.icons" }, + }, + opts = { + show_icons = true, + leader_key = ";", -- Recommended to be a single key + buffer_leader_key = "m", -- Per Buffer Mappings + }, +} diff --git a/lua/plugins/bmessages.lua b/lua/plugins/bmessages.lua new file mode 100644 index 0000000..8a58af3 --- /dev/null +++ b/lua/plugins/bmessages.lua @@ -0,0 +1,5 @@ +return { + "ariel-frischer/bmessages.nvim", + event = "CmdlineEnter", + opts = {}, +} diff --git a/lua/plugins/buffer-vacuum.lua b/lua/plugins/buffer-vacuum.lua new file mode 100644 index 0000000..5016f26 --- /dev/null +++ b/lua/plugins/buffer-vacuum.lua @@ -0,0 +1,6 @@ +return { + { + "ChuufMaster/buffer-vacuum", + opts = {}, + }, +} diff --git a/lua/plugins/cheatsheet.lua b/lua/plugins/cheatsheet.lua new file mode 100644 index 0000000..b6bd060 --- /dev/null +++ b/lua/plugins/cheatsheet.lua @@ -0,0 +1,36 @@ +return { + "doctorfree/cheatsheet.nvim", + event = "VeryLazy", + dependencies = { + { "nvim-telescope/telescope.nvim" }, + { "nvim-lua/popup.nvim" }, + { "nvim-lua/plenary.nvim" }, + }, + config = function() + local ctactions = require("cheatsheet.telescope.actions") + require("cheatsheet").setup({ + bundled_cheetsheets = { + enabled = { "default", "lua", "markdown", "regex", "netrw", "unicode" }, + disabled = { "nerd-fonts" }, + }, + bundled_plugin_cheatsheets = { + enabled = { + "auto-session", + "goto-preview", + "octo.nvim", + "telescope.nvim", + "vim-easy-align", + "vim-sandwich", + }, + disabled = { "gitsigns" }, + }, + include_only_installed_plugins = true, + telescope_mappings = { + [""] = ctactions.select_or_fill_commandline, + [""] = ctactions.select_or_execute, + [""] = ctactions.copy_cheat_value, + [""] = ctactions.edit_user_cheatsheet, + }, + }) + end, +} diff --git a/lua/plugins/distant.lua b/lua/plugins/distant.lua new file mode 100644 index 0000000..7791f65 --- /dev/null +++ b/lua/plugins/distant.lua @@ -0,0 +1,7 @@ +return { + "chipsenkbeil/distant.nvim", + branch = "v0.3", + config = function() + require("distant"):setup() + end, +} diff --git a/lua/plugins/eagle.lua b/lua/plugins/eagle.lua new file mode 100644 index 0000000..543d065 --- /dev/null +++ b/lua/plugins/eagle.lua @@ -0,0 +1,6 @@ +return { + "soulis-1256/eagle.nvim", + opts = { + --override the default values found in config.lua + }, +} diff --git a/lua/plugins/flatten.lua b/lua/plugins/flatten.lua new file mode 100644 index 0000000..ae305e7 --- /dev/null +++ b/lua/plugins/flatten.lua @@ -0,0 +1,9 @@ +return { + "willothy/flatten.nvim", + config = true, + -- or pass configuration with + -- opts = { } + -- Ensure that it runs first to minimize delay when opening file from terminal + lazy = false, + priority = 1001, +} diff --git a/lua/plugins/glance.lua b/lua/plugins/glance.lua new file mode 100644 index 0000000..acd8ec8 --- /dev/null +++ b/lua/plugins/glance.lua @@ -0,0 +1,4 @@ +return { + "dnlhc/glance.nvim", + cmd = "Glance", +} diff --git a/lua/plugins/goto-preview.lua b/lua/plugins/goto-preview.lua new file mode 100644 index 0000000..fa2736d --- /dev/null +++ b/lua/plugins/goto-preview.lua @@ -0,0 +1,5 @@ +return { + "rmagatti/goto-preview", + event = "BufEnter", + config = true, -- necessary as per https://github.com/rmagatti/goto-preview/issues/88 +} diff --git a/lua/plugins/hologram.lua b/lua/plugins/hologram.lua new file mode 100644 index 0000000..728dc96 --- /dev/null +++ b/lua/plugins/hologram.lua @@ -0,0 +1 @@ +return { "edluffy/hologram.nvim" } diff --git a/lua/plugins/img-clip.lua b/lua/plugins/img-clip.lua new file mode 100644 index 0000000..6dd1629 --- /dev/null +++ b/lua/plugins/img-clip.lua @@ -0,0 +1,16 @@ +return { + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + -- add options here + -- or leave it empty to use the default settings + }, + keys = { + -- suggested keymap + { + "p", + "PasteImage", + desc = "Paste image from system clipboard", + }, + }, +} diff --git a/lua/plugins/lightspeed_nvim.lua b/lua/plugins/lightspeed_nvim.lua new file mode 100644 index 0000000..63e09de --- /dev/null +++ b/lua/plugins/lightspeed_nvim.lua @@ -0,0 +1,14 @@ +-- No example configuration was found for this plugin. +-- +-- For detailed information on configuring this plugin, please refer to its +-- official documentation: +-- +-- https://github.com/ggandor/lightspeed.nvim +-- +-- If you wish to use this plugin, you can optionally modify and then uncomment +-- the configuration below. + +return { + "ggandor/lightspeed.nvim", +} + diff --git a/lua/plugins/lsp-signature.lua b/lua/plugins/lsp-signature.lua new file mode 100644 index 0000000..1d04404 --- /dev/null +++ b/lua/plugins/lsp-signature.lua @@ -0,0 +1,7 @@ +return { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = { + -- cfg options + }, +} diff --git a/lua/plugins/lsp-ui.lua b/lua/plugins/lsp-ui.lua new file mode 100644 index 0000000..35f3435 --- /dev/null +++ b/lua/plugins/lsp-ui.lua @@ -0,0 +1,9 @@ +return { + "jinzhongjia/LspUI.nvim", + branch = "main", + config = function() + require("LspUI").setup({ + -- config options go here + }) + end, +} diff --git a/lua/plugins/marks.lua b/lua/plugins/marks.lua new file mode 100644 index 0000000..c5c76f2 --- /dev/null +++ b/lua/plugins/marks.lua @@ -0,0 +1,5 @@ +return { + "chentoast/marks.nvim", + event = "VeryLazy", + opts = {}, +} diff --git a/lua/plugins/mason-lsp-config.lua b/lua/plugins/mason-lsp-config.lua index 7cb62ae..c50395a 100644 --- a/lua/plugins/mason-lsp-config.lua +++ b/lua/plugins/mason-lsp-config.lua @@ -6,28 +6,42 @@ return { ui = { border = "rounded", }, + -- Add required fields + PATH = "prepend", -- Adjust how Mason modifies the system path + log_level = vim.log.levels.INFO, + max_concurrent_installers = 4, + registries = { + "github:mason-org/mason-registry", + }, + providers = { + "mason.providers.client", + }, + github = { + download_url_template = "https://github.com/%s/releases/download/%s/%s", + }, + pip = { + upgrade_pip = false, + }, }) end, }, - { "williamboman/mason-lspconfig.nvim", dependencies = { "williamboman/mason.nvim" }, config = function() require("mason-lspconfig").setup({ ensure_installed = { - "lua_ls", -- Lua - "pyright", -- Python - "tsserver", -- TypeScript/JavaScript - "clangd", -- C/C++ + "lua_ls", -- Lua + "pyright", -- Python + "tsserver", -- TypeScript/JavaScript + "clangd", -- C/C++ "rust_analyzer", -- Rust - "gopls", -- Go + "gopls", -- Go }, automatic_installation = true, }) end, }, - { "neovim/nvim-lspconfig", dependencies = { "williamboman/mason-lspconfig.nvim" }, @@ -66,15 +80,39 @@ return { local opts = { buffer = event.buf, noremap = true, silent = true } -- Keymaps - vim.keymap.set("n", "gd", "lua vim.lsp.buf.definition()", opts) - vim.keymap.set("n", "gr", "lua vim.lsp.buf.references()", opts) + vim.keymap.set( + "n", + "gd", + "lua vim.lsp.buf.definition()", + opts + ) + vim.keymap.set( + "n", + "gr", + "lua vim.lsp.buf.references()", + opts + ) vim.keymap.set("n", "K", "lua vim.lsp.buf.hover()", opts) - vim.keymap.set("n", "rn", "lua vim.lsp.buf.rename()", opts) - vim.keymap.set("n", "ca", "lua vim.lsp.buf.code_action()", opts) - vim.keymap.set("n", "f", "lua vim.lsp.buf.format({ async = true })", opts) + vim.keymap.set( + "n", + "rn", + "lua vim.lsp.buf.rename()", + opts + ) + vim.keymap.set( + "n", + "ca", + "lua vim.lsp.buf.code_action()", + opts + ) + vim.keymap.set( + "n", + "f", + "lua vim.lsp.buf.format({ async = true })", + opts + ) end, }) end, }, } - diff --git a/lua/plugins/nav-buddy.lua b/lua/plugins/nav-buddy.lua new file mode 100644 index 0000000..fd66e4f --- /dev/null +++ b/lua/plugins/nav-buddy.lua @@ -0,0 +1,14 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + { + "SmiteshP/nvim-navbuddy", + dependencies = { + "SmiteshP/nvim-navic", + "MunifTanjim/nui.nvim", + }, + opts = { lsp = { auto_attach = true } }, + }, + }, + -- your lsp config or other stuff +} diff --git a/lua/plugins/navi-mark.lua b/lua/plugins/navi-mark.lua new file mode 100644 index 0000000..fc9d779 --- /dev/null +++ b/lua/plugins/navi-mark.lua @@ -0,0 +1,10 @@ +return { + "zongben/navimark.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + "nvim-lua/plenary.nvim", + }, + config = function() + require("navimark").setup() + end, +} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..35451a5 --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,6 @@ +return { + "nvim-neorg/neorg", + lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default + version = "*", -- Pin Neorg to the latest stable release + config = true, +} diff --git a/lua/plugins/nvim-lightbulb.lua b/lua/plugins/nvim-lightbulb.lua new file mode 100644 index 0000000..3e709fb --- /dev/null +++ b/lua/plugins/nvim-lightbulb.lua @@ -0,0 +1 @@ +return { "kosayoda/nvim-lightbulb" } diff --git a/lua/plugins/nvim-rulebook.lua b/lua/plugins/nvim-rulebook.lua new file mode 100644 index 0000000..513fa22 --- /dev/null +++ b/lua/plugins/nvim-rulebook.lua @@ -0,0 +1 @@ +return { "chrisgrieser/nvim-rulebook" } diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..4774e4a --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,34 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + ft = "markdown", + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: + -- event = { + -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" + -- -- refer to `:h file-pattern` for more examples + -- "BufReadPre path/to/my-vault/*.md", + -- "BufNewFile path/to/my-vault/*.md", + -- }, + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + + -- see below for full list of optional dependencies 👇 + }, + opts = { + workspaces = { + -- { + -- name = "personal", + -- path = "~/vaults/personal", + -- }, + -- { + -- name = "work", + -- path = "~/vaults/work", + -- }, + }, + + -- see below for full list of options 👇 + }, +} diff --git a/lua/plugins/persistence.lua b/lua/plugins/persistence.lua new file mode 100644 index 0000000..1bffdd0 --- /dev/null +++ b/lua/plugins/persistence.lua @@ -0,0 +1,8 @@ +-- Lua +return { + "folke/persistence.nvim", + event = "BufReadPre", -- this will only start session saving when an actual file was opened + opts = { + -- add any custom options here + }, +} diff --git a/lua/plugins/precognition.lua b/lua/plugins/precognition.lua new file mode 100644 index 0000000..5c3c2e3 --- /dev/null +++ b/lua/plugins/precognition.lua @@ -0,0 +1,30 @@ +return { + "tris203/precognition.nvim", + --event = "VeryLazy", + opts = { + startVisible = true, + showBlankVirtLine = true, + highlightColor = { link = "Comment" }, + hints = { + Caret = { text = "^", prio = 2 }, + Dollar = { text = "$", prio = 1 }, + MatchingPair = { text = "%", prio = 5 }, + Zero = { text = "0", prio = 1 }, + w = { text = "w", prio = 10 }, + b = { text = "b", prio = 9 }, + e = { text = "e", prio = 8 }, + W = { text = "W", prio = 7 }, + B = { text = "B", prio = 6 }, + E = { text = "E", prio = 5 }, + }, + gutterHints = { + G = { text = "G", prio = 10 }, + gg = { text = "gg", prio = 9 }, + PrevParagraph = { text = "{", prio = 8 }, + NextParagraph = { text = "}", prio = 8 }, + }, + -- disabled_fts = { + -- "startify", + -- }, + }, +} diff --git a/lua/plugins/spaceport_nvim.lua b/lua/plugins/spaceport_nvim.lua new file mode 100644 index 0000000..429b6ce --- /dev/null +++ b/lua/plugins/spaceport_nvim.lua @@ -0,0 +1,13 @@ +-- No example configuration was found for this plugin. +-- +-- For detailed information on configuring this plugin, please refer to its +-- official documentation: +-- +-- https://github.com/CWood-sdf/spaceport.nvim +-- +-- If you wish to use this plugin, you can optionally modify and then uncomment +-- the configuration below. + +return { + -- "CWood-sdf/spaceport.nvim" +} \ No newline at end of file diff --git a/lua/plugins/tailwind-css-colorizer-comp.lua b/lua/plugins/tailwind-css-colorizer-comp.lua new file mode 100644 index 0000000..1d4145a --- /dev/null +++ b/lua/plugins/tailwind-css-colorizer-comp.lua @@ -0,0 +1,9 @@ +return { + "roobert/tailwindcss-colorizer-cmp.nvim", + -- optionally, override the default options: + config = function() + require("tailwindcss-colorizer-cmp").setup({ + color_square_width = 2, + }) + end, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 64447d8..dc78db6 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -37,10 +37,25 @@ return { { "telescope.nvim", dependencies = { + "nvim-lua/plenary.nvim", "nvim-telescope/telescope-fzf-native.nvim", build = "make", config = function() - require("telescope").load_extension("fzf") + local telescope = require("telescope") + local builtin = require("telescope.builtin") + + -- Load fzf extension + telescope.load_extension("fzf") + + -- Configure telescope settings + telescope.setup({ + defaults = { + layout_strategy = "horizontal", + sorting_strategy = "ascending", + layout_config = { prompt_position = "top" }, + winblend = 0, + }, + }) end, }, }, diff --git a/lua/plugins/themery.lua b/lua/plugins/themery.lua new file mode 100644 index 0000000..c07bfcf --- /dev/null +++ b/lua/plugins/themery.lua @@ -0,0 +1,9 @@ +return { + "zaldih/themery.nvim", + lazy = false, + config = function() + require("themery").setup({ + -- add the config here + }) + end, +} diff --git a/lua/plugins/tiny-code-action.lua b/lua/plugins/tiny-code-action.lua new file mode 100644 index 0000000..0eb3d6c --- /dev/null +++ b/lua/plugins/tiny-code-action.lua @@ -0,0 +1,11 @@ +return { + "rachartier/tiny-code-action.nvim", + dependencies = { + { "nvim-lua/plenary.nvim" }, + { "nvim-telescope/telescope.nvim" }, + }, + event = "LspAttach", + config = function() + require("tiny-code-action").setup() + end, +} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index e645ecd..2915bc9 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -3,15 +3,16 @@ return { -- { "akinsho/toggleterm.nvim", version = "*", config = true }, -- or { - 'akinsho/toggleterm.nvim', - version = "*", - opts = {--[[ things you want to change go here]] + "akinsho/toggleterm.nvim", + version = "*", + opts = { --[[ things you want to change go here]] direction = "vertical", + shell = "/opt/homebrew/bin/tmux", }, config = function() - local toggleterm = require('toggleterm') - toggleterm.setup() - vim.cmd [[ + local toggleterm = require("toggleterm") + toggleterm.setup() + vim.cmd([[ tnoremap exe v:count1 . "ToggleTerm" " By applying the mappings this way you can pass a count to your @@ -19,7 +20,7 @@ return { " For example: 2 will open terminal 2 nnoremap exe v:count1 . "ToggleTerm" inoremap exe v:count1 . "ToggleTerm" - ]] - end, - } -} + ]]) + end, + }, +} diff --git a/lua/plugins/whip.lua b/lua/plugins/whip.lua new file mode 100644 index 0000000..73441bb --- /dev/null +++ b/lua/plugins/whip.lua @@ -0,0 +1,30 @@ +-- example lazy nvim config +return { + "slugbyte/whip.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + }, + config = function() + local whip = require("whip") + whip.setup({ + -- its probs a good idea to have a dir dedicated to your scratchpads + dir = "~/your/whip/dir/goes-here", + }) + vim.keymap.set("", "wo", whip.open, { desc = "[W]hip [O]pen" }) + vim.keymap.set("", "wm", whip.make, { desc = "[W]hip [M]ake" }) + vim.keymap.set("", "wd", whip.drop, { desc = "[W]hip [D]rop" }) + vim.keymap.set( + "", + "wf", + whip.find_file, + { desc = "[W]hip [F]ile Search" } + ) + vim.keymap.set( + "", + "wg", + whip.find_grep, + { desc = "[W]hip [G]rep Search" } + ) + end, +} diff --git a/lua/plugins/wtf.lua b/lua/plugins/wtf.lua new file mode 100644 index 0000000..9005db8 --- /dev/null +++ b/lua/plugins/wtf.lua @@ -0,0 +1,41 @@ +return { + "piersolenski/wtf.nvim", + dependencies = { + "MunifTanjim/nui.nvim", + }, + opts = {}, + keys = { + { + "wa", + mode = { "n", "x" }, + function() + require("wtf").ai() + end, + desc = "Debug diagnostic with AI", + }, + { + mode = { "n" }, + "ws", + function() + require("wtf").search() + end, + desc = "Search diagnostic with Google", + }, + { + mode = { "n" }, + "wh", + function() + require("wtf").history() + end, + desc = "Populate the quickfix list with previous chat history", + }, + { + mode = { "n" }, + "wg", + function() + require("wtf").grep_history() + end, + desc = "Grep previous chat history with Telescope", + }, + }, +}