From b0387c6965afe825880c4891695717ea06293316 Mon Sep 17 00:00:00 2001 From: The Menace Sauce Date: Thu, 5 Feb 2026 10:47:39 -0500 Subject: [PATCH] Everything I've got so far I'm gitting it for real --- init.lua | 4 + lazy-lock.json | 34 +++ lua/current-theme.lua | 1 + lua/themenacesauce/core/init.lua | 7 + lua/themenacesauce/core/keymaps.lua | 18 ++ lua/themenacesauce/core/options.lua | 29 ++ lua/themenacesauce/lazy.lua | 35 +++ lua/themenacesauce/plugins/auto-pairs.lua | 26 ++ lua/themenacesauce/plugins/auto-sessions.lua | 14 + lua/themenacesauce/plugins/colorscheme.lua | 257 ++++++++++++++++++ lua/themenacesauce/plugins/harpoon.lua | 34 +++ lua/themenacesauce/plugins/init.lua | 3 + lua/themenacesauce/plugins/lualine.lua | 94 +++++++ lua/themenacesauce/plugins/mini.lua | 119 ++++++++ lua/themenacesauce/plugins/oil.lua | 33 +++ lua/themenacesauce/plugins/snacks.lua | 175 ++++++++++++ lua/themenacesauce/plugins/telescope.lua | 51 ++++ lua/themenacesauce/plugins/todo-comments.lua | 61 +++++ lua/themenacesauce/plugins/treesitter.lua | 91 +++++++ lua/themenacesauce/plugins/trouble.lua | 22 ++ lua/themenacesauce/plugins/undotree.lua | 6 + lua/themenacesauce/plugins/vimbegood.lua | 7 + .../plugins/vimtmuxnavigator.lua | 19 ++ 23 files changed, 1140 insertions(+) create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/current-theme.lua create mode 100644 lua/themenacesauce/core/init.lua create mode 100644 lua/themenacesauce/core/keymaps.lua create mode 100644 lua/themenacesauce/core/options.lua create mode 100644 lua/themenacesauce/lazy.lua create mode 100644 lua/themenacesauce/plugins/auto-pairs.lua create mode 100644 lua/themenacesauce/plugins/auto-sessions.lua create mode 100644 lua/themenacesauce/plugins/colorscheme.lua create mode 100644 lua/themenacesauce/plugins/harpoon.lua create mode 100644 lua/themenacesauce/plugins/init.lua create mode 100644 lua/themenacesauce/plugins/lualine.lua create mode 100644 lua/themenacesauce/plugins/mini.lua create mode 100644 lua/themenacesauce/plugins/oil.lua create mode 100644 lua/themenacesauce/plugins/snacks.lua create mode 100644 lua/themenacesauce/plugins/telescope.lua create mode 100644 lua/themenacesauce/plugins/todo-comments.lua create mode 100644 lua/themenacesauce/plugins/treesitter.lua create mode 100644 lua/themenacesauce/plugins/trouble.lua create mode 100644 lua/themenacesauce/plugins/undotree.lua create mode 100644 lua/themenacesauce/plugins/vimbegood.lua create mode 100644 lua/themenacesauce/plugins/vimtmuxnavigator.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..1145424 --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +require("themenacesauce.core") +require("themenacesauce.lazy") + +require("current-theme") diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..f5b4a33 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,34 @@ +{ + "auto-session": { "branch": "main", "commit": "292492ab7af4bd8b9e37e28508bc8ce995722fd5" }, + "folkeTokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, + "gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" }, + "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, + "kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, + "mini.comment": { "branch": "main", "commit": "a0c721115faff8d05505c0a12dab410084d9e536" }, + "mini.files": { "branch": "main", "commit": "fafacfecdd6c5a66bb10d173a749f3c098e84498" }, + "mini.nvim": { "branch": "main", "commit": "f28cd08c8be826355d64080400fab1764c9693dd" }, + "mini.splitjoin": { "branch": "main", "commit": "9fcd8856efb95a505090c3225726466494076127" }, + "mini.surround": { "branch": "main", "commit": "d648a5601e1c48f175b07d10eba141da338a0a2a" }, + "mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" }, + "nvim-treesitter": { "branch": "main", "commit": "70a9fecaf5aeae70c765d4c51a8038165a91aa06" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" }, + "oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" }, + "snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }, + "solarized-osaka.nvim": { "branch": "main", "commit": "f0c2f0ba0bd56108d53c9bfae4bb28ff6c67bbdb" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-themes": { "branch": "main", "commit": "65721365bd7a04a6c9679e76b6387b60320fd5f3" }, + "telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "undotree": { "branch": "master", "commit": "fc28931fbfba66ab75d9af23fe46ffbbb9de6e8c" }, + "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" }, + "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" } +} diff --git a/lua/current-theme.lua b/lua/current-theme.lua new file mode 100644 index 0000000..07245e4 --- /dev/null +++ b/lua/current-theme.lua @@ -0,0 +1 @@ +vim.cmd("colorscheme rose-pine") \ No newline at end of file diff --git a/lua/themenacesauce/core/init.lua b/lua/themenacesauce/core/init.lua new file mode 100644 index 0000000..7d111f9 --- /dev/null +++ b/lua/themenacesauce/core/init.lua @@ -0,0 +1,7 @@ +require("themenacesauce.core.options") +require("themenacesauce.core.keymaps") + + + + + diff --git a/lua/themenacesauce/core/keymaps.lua b/lua/themenacesauce/core/keymaps.lua new file mode 100644 index 0000000..10dcb3d --- /dev/null +++ b/lua/themenacesauce/core/keymaps.lua @@ -0,0 +1,18 @@ +local opts = { noremap = true, silent = true } + +vim.g.mapleader = " " +vim.g.maplocalleader = " " + + +local M = {} + +M.general = { + n = { + [""] = { " TmuxNavigateLeft", "window left"}, + [""] = { " TmuxNavigateRight", "window right"}, + [""] = { " TmuxNavigateDown", "window down"}, + [""] = { " TmuxNavigateUp", "window up"}, +} +} + + diff --git a/lua/themenacesauce/core/options.lua b/lua/themenacesauce/core/options.lua new file mode 100644 index 0000000..38fda60 --- /dev/null +++ b/lua/themenacesauce/core/options.lua @@ -0,0 +1,29 @@ +vim.cmd("let g:netrw_banner = 0") + +-- sets Vim Option Numberlines to true and then enables relative numberline. +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.expandtab = true +vim.opt.autoindent = true +vim.opt.smartindent = true +vim.opt.wrap = false + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undofile = true + + +vim.opt.incsearch = true +vim.opt.inccommand = "split" +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- lets you copy text from NVim into others apps. +-- vim.opt.clipboard:append("unnamedplus") +-- highlights the files you search for. +vim.opt.hlsearch = true + +vim.opt.mouse = "a" +vim.g.editorconfig = true + diff --git a/lua/themenacesauce/lazy.lua b/lua/themenacesauce/lazy.lua new file mode 100644 index 0000000..c510dbc --- /dev/null +++ b/lua/themenacesauce/lazy.lua @@ -0,0 +1,35 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "themenacesauce.plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "rose-pine" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/lua/themenacesauce/plugins/auto-pairs.lua b/lua/themenacesauce/plugins/auto-pairs.lua new file mode 100644 index 0000000..e3f2a05 --- /dev/null +++ b/lua/themenacesauce/plugins/auto-pairs.lua @@ -0,0 +1,26 @@ +return { + "windwp/nvim-autopairs", + event = {"InsertEnter"}, + dependencies = { + "hrsh7th/nvim-cmp", + }, + + config = function() + local autopairs = require("nvim-autopairs") + + autopairs.setup({ + check_ts = true, + ts_config = { + lua = {"string"}, + javascript = {"template_string"}, + java = false, + }, + }) + + local cmp_autopairs = require("nvim-autopairs.completion.cmp") + local cmp = require("cmp") + + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + + end, +} diff --git a/lua/themenacesauce/plugins/auto-sessions.lua b/lua/themenacesauce/plugins/auto-sessions.lua new file mode 100644 index 0000000..b61e255 --- /dev/null +++ b/lua/themenacesauce/plugins/auto-sessions.lua @@ -0,0 +1,14 @@ +return { + "rmagatti/auto-session", + config = function() + local auto_session = require("auto-session") + + auto_session.setup({ + auto_restore_enabled = false, + auto_session_suppress_dirs = { "~/", "~/Dev", "~/Downloads", "~/Documents", "~/Desktop" }, + }) + + vim.keymap.set( "n", "wr", "AutoSession restore", { desc = "Restore session for cwd" }) --restore last workspace session for current directory + vim.keymap.set("n", "ws", "AutoSession save", { desc = "Save session for auto session root dir" }) -- save workspace session for current directory + end +} diff --git a/lua/themenacesauce/plugins/colorscheme.lua b/lua/themenacesauce/plugins/colorscheme.lua new file mode 100644 index 0000000..7442698 --- /dev/null +++ b/lua/themenacesauce/plugins/colorscheme.lua @@ -0,0 +1,257 @@ +return { + -- NOTE: Rose pine + { + "rose-pine/neovim", + name = "rose-pine", + -- priority = 1000, + config = function() + require("rose-pine").setup({ + variant = "main", -- auto, main, moon, or dawn + dark_variant = "main", -- main, moon, or dawn + dim_inactive_windows = false, + -- disable_background = true, + -- disable_nc_background = false, + -- disable_float_background = false, + -- extend_background_behind_borders = false, + styles = { + bold = true, + italic = false, + transparency = true, + }, + highlight_groups = { + ColorColumn = { bg = "#1C1C21" }, + Normal = { bg = "none" }, -- Main background remains transparent + Pmenu = { bg = "", fg = "#e0def4" }, -- Completion menu background + PmenuSel = { bg = "#4a465d", fg = "#f8f5f2" }, -- Highlighted completion item + PmenuSbar = { bg = "#191724" }, -- Scrollbar background + PmenuThumb = { bg = "#9ccfd8" }, -- Scrollbar thumb + }, + enable = { + terminal = false, + legacy_highlights = false, -- Improve compatibility for previous versions of Neovim + migrations = true, -- Handle deprecated options automatically + }, + + }) + + -- HACK: set this on the color you want to be persistent + -- when quit and reopening nvim + -- vim.cmd("colorscheme rose-pine") + end, + }, + -- NOTE: gruvbox + { + "ellisonleao/gruvbox.nvim", + -- priority = 1000 , + config = function() + require("gruvbox").setup({ + terminal_colors = true, -- add neovim terminal colors + undercurl = true, + underline = true, + bold = true, + italic = { + strings = false, + emphasis = false, + comments = false, + folds = false, + operators = false, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = { + Pmenu = { bg = "" }, -- Completion menu background + }, + dim_inactive = false, + transparent_mode = true, + }) + end, + }, + -- NOTE: Kanagwa + { + "rebelot/kanagawa.nvim", + config = function() + require('kanagawa').setup({ + compile = false, -- enable compiling the colorscheme + undercurl = true, -- enable undercurls + commentStyle = { italic = true }, + functionStyle = {}, + keywordStyle = { italic = false }, + statementStyle = { bold = true }, + typeStyle = {}, + transparent = true, -- do not set background color + dimInactive = false, -- dim inactive window `:h hl-NormalNC` + terminalColors = true, -- define vim.g.terminal_color_{0,17} + colors = { -- add/modify theme and palette colors + palette = {}, + theme = { + wave = {}, + dragon = {}, + all = { + ui = { + bg_gutter = "none", + border = "rounded" + } + } + }, + }, + overrides = function(colors) -- add/modify highlights + local theme = colors.theme + return { + NormalFloat = { bg = "none" }, + FloatBorder = { bg = "none" }, + FloatTitle = { bg = "none" }, + Pmenu = { fg = theme.ui.shade0, bg = "NONE", blend = vim.o.pumblend }, -- add `blend = vim.o.pumblend` to enable transparency + PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 }, + PmenuSbar = { bg = theme.ui.bg_m1 }, + PmenuThumb = { bg = theme.ui.bg_p2 }, + + -- Save an hlgroup with dark background and dimmed foreground + -- so that you can use it where your still want darker windows. + -- E.g.: autocmd TermOpen * setlocal winhighlight=Normal:NormalDark + NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 }, + + -- Popular plugins that open floats will link to NormalFloat by default; + -- set their background accordingly if you wish to keep them dark and borderless + LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim }, + MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim }, + TelescopeTitle = { fg = theme.ui.special, bold = true }, + TelescopePromptBorder = { fg = theme.ui.special, }, + TelescopeResultsNormal = { fg = theme.ui.fg_dim, }, + TelescopeResultsBorder = { fg = theme.ui.special, }, + TelescopePreviewBorder = { fg = theme.ui.special }, + } + end, + theme = "wave", -- Load "wave" theme when 'background' option is not set + background = { -- map the value of 'background' option to a theme + dark = "wave", -- try "dragon" ! + }, + }) + end + }, + -- NOTE: neosolarized + { + "craftzdog/solarized-osaka.nvim", + lazy = false, + config = function() + require("solarized-osaka").setup({ + transparent = true, + terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) + styles = { + -- Style to be applied to different syntax groups + -- Value is any valid attr-list value for `:help nvim_set_hl` + comments = { italic = true }, + keywords = { italic = false }, + functions = {}, + variables = {}, + -- Background styles. Can be "dark", "transparent" or "normal" + sidebars = "dark", -- style for sidebars, see below + floats = "dark", -- style for floating windows + }, + sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` + day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors + hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. + dim_inactive = false, -- dims inactive windows + lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold + on_highlights = function(hl, c) + local prompt = "#2d3149" + hl.TelescopeNormal = { + bg = c.bg_dark, + fg = c.fg_dark, + } + hl.TelescopeBorder = { + bg = c.bg_dark, + fg = c.bg_dark, + } + hl.TelescopePromptNormal = { + bg = c.bg_dark, + } + hl.TelescopePromptBorder = { + bg = c.bg_dark, + fg = c.bg_dark, + } + hl.TelescopePromptTitle = { + bg = prompt, + fg = "#2C94DD", + } + hl.TelescopePreviewTitle = { + bg = c.bg_dark, + fg = c.bg_dark, + } + hl.TelescopeResultsTitle = { + bg = c.bg_dark, + fg = c.bg_dark, + } + end, + }) + end + }, + -- NOTE : tokyonight + { + "folke/tokyonight.nvim", + name = "folkeTokyonight", + -- priority = 1000, + config = function() + local transparent = true + local bg = "#011628" + local bg_dark = "#011423" + local bg_highlight = "#143652" + local bg_search = "#0A64AC" + local bg_visual = "#275378" + local fg = "#CBE0F0" + local fg_dark = "#B4D0E9" + local fg_gutter = "#627E97" + local border = "#547998" + + require("tokyonight").setup({ + style = "night", + transparent = transparent, + + styles = { + comments = { italic = false }, + keywords = { italic = false }, + sidebars = transparent and "transparent" or "dark", + floats = transparent and "transparent" or "dark", + }, + on_colors = function(colors) + colors.bg = transparent and colors.none or bg + colors.bg_dark = transparent and colors.none or bg_dark + colors.bg_float = transparent and colors.none or bg_dark + colors.bg_highlight = bg_highlight + colors.bg_popup = bg_dark + colors.bg_search = bg_search + colors.bg_sidebar = transparent and colors.none or bg_dark + colors.bg_statusline = transparent and colors.none or bg_dark + colors.bg_visual = bg_visual + colors.border = border + colors.fg = fg + colors.fg_dark = fg_dark + colors.fg_float = fg + colors.fg_gutter = fg_gutter + colors.fg_sidebar = fg_dark + end, + }) + -- vim.cmd("colorscheme tokyonight") + -- NOTE: Auto switch to tokyonight for markdown files only + -- vim.api.nvim_create_autocmd("FileType", { + -- pattern = { "markdown" }, + -- callback = function() + -- -- Ensure the theme switch only happens once for a buffer + -- local buffer = vim.api.nvim_get_current_buf() + -- if not vim.b[buffer].tokyonight_applied then + -- if vim.fn.expand("%:t") ~= "" and vim.api.nvim_buf_get_option(0, "buftype") ~= "nofile" then + -- vim.cmd("colorscheme tokyonight") + -- end + -- vim.b[buffer].tokyonight_applied = true + -- end + -- end, + -- }) + end, + }, +} + diff --git a/lua/themenacesauce/plugins/harpoon.lua b/lua/themenacesauce/plugins/harpoon.lua new file mode 100644 index 0000000..fbddfdd --- /dev/null +++ b/lua/themenacesauce/plugins/harpoon.lua @@ -0,0 +1,34 @@ +return { + "thePrimeagen/harpoon", + enabled = true, + branch = "harpoon2", + dependencies = { + "nvim-lua/plenary.nvim", + }, + + config = function() + local harpoon = require("harpoon") + + harpoon:setup({ + global_settings = { + save_on_toggle = true, + save_on_change = true, + }, + }) + + -- Harpoon Nav Interface + vim.keymap.set("n", "a", function() harpoon:list():add() end, { desc = "Harpoon add files" }) + vim.keymap.set("n", "", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) + + -- Harpoon marked files + vim.keymap.set("n", "", function() harpoon:list():select(1) end) + vim.keymap.set("n", "", function() harpoon:list():select(2) end) + vim.keymap.set("n", "", function() harpoon:list():select(3) end) + vim.keymap.set("n", "", function() harpoon:list():select(4) end) + + -- Toggle previous & next buffers stored within Harpoon list + vim.keymap.set("n", "", function() harpoon:list():prev() end) + vim.keymap.set("n", "", function() harpoon:list():next() end) + end + +} diff --git a/lua/themenacesauce/plugins/init.lua b/lua/themenacesauce/plugins/init.lua new file mode 100644 index 0000000..c144133 --- /dev/null +++ b/lua/themenacesauce/plugins/init.lua @@ -0,0 +1,3 @@ +return { + "nvim.lua/plenary.nvim", +} diff --git a/lua/themenacesauce/plugins/lualine.lua b/lua/themenacesauce/plugins/lualine.lua new file mode 100644 index 0000000..70434b2 --- /dev/null +++ b/lua/themenacesauce/plugins/lualine.lua @@ -0,0 +1,94 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local lualine = require("lualine") + local lazy_status = require("lazy.status") -- to configure lazy pending updates count + + local colors = { + color0 = "#092236", + color1 = "#ff5874", + color2 = "#c3ccdc", + color3 = "#1c1e26", + color6 = "#a1aab8", + color7 = "#828697", + color8 = "#ae81ff", + } + + local my_lualine_theme = { + replace = { + a = { fg = colors.color0, bg = colors.color1, gui = "bold" }, + b = { fg = colors.color2, bg = colors.color3 }, + }, + inactive = { + a = { fg = colors.color6, bg = colors.color3, gui = "bold" }, + b = { fg = colors.color6, bg = colors.color3 }, + c = { fg = colors.color6, bg = colors.color3 }, + }, + normal = { + a = { fg = colors.color0, bg = colors.color7, gui = "bold" }, + b = { fg = colors.color2, bg = colors.color3 }, + c = { fg = colors.color2, bg = colors.color3 }, + }, + visual = { + a = { fg = colors.color0, bg = colors.color8, gui = "bold" }, + b = { fg = colors.color2, bg = colors.color3 }, + }, + insert = { + a = { fg = colors.color0, bg = colors.color2, gui = "bold" }, + b = { fg = colors.color2, bg = colors.color3 }, + }, + } + + local mode = { + 'mode', + fmt = function(str) + -- return ' ' + -- displays only the first character of the mode + return ' ' .. str + end, + } + + local diff = { + 'diff', + colored = true, + symbols = { added = ' ', modified = ' ', removed = ' ' }, -- changes diff symbols + -- cond = hide_in_width, + } + + local filename = { + 'filename', + file_status = true, + path = 0, + } + + local branch = {'branch', icon = {'', color={fg='#A6D4DE'}}, '|'} + + + lualine.setup({ + icons_enabled = true, + options = { + theme = my_lualine_theme, + component_separators = { left = "|", right = "|" }, + section_separators = { left = "|", right = "" }, + }, + sections = { + lualine_a = { mode }, + lualine_b = { branch }, + lualine_c = { diff, filename }, + lualine_x = { + { + -- require("noice").api.statusline.mode.get, + -- cond = require("noice").api.statusline.mode.has, + lazy_status.updates, + cond = lazy_status.has_updates, + color = { fg = "#ff9e64" }, + }, + -- { "encoding",}, + -- { "fileformat" }, + { "filetype" }, + }, + }, + }) + end, +} diff --git a/lua/themenacesauce/plugins/mini.lua b/lua/themenacesauce/plugins/mini.lua new file mode 100644 index 0000000..a2e455c --- /dev/null +++ b/lua/themenacesauce/plugins/mini.lua @@ -0,0 +1,119 @@ +return { + -- Mini Nvim + {"echasnovski/mini.nvim", version = false }, + + { + 'echasnovski/mini.comment', + version = false, + dependencies = { + "JoosepAlviste/nvim-ts-context-commentstring", + }, + config = function() + --disable the autocommand from ts-context-commentstring + require('ts_context_commentstring').setup { + enable_autocmd = false, + } + require("mini.comment").setup { + --tsx, jsx, html, svelte comment support + options = { + custom_commentstring = function() + return require('ts_context_commentstring.internal').calculate_commentstring({ key = + 'commentstring' }) + or vim.bo.commentstring + end, + }, + } + end, + }, + + -- File Explorer (works wil Oil File Explorer) + { + 'echasnovski/mini.files', + config = function() + local MiniFiles = require("mini.files") + MiniFiles.setup({ + mappings = { + go_in = "", -- Map both Enter and L to enter directories or open files + go_in_plus = "L", --Open + go_out = "-", --Previous folder + go_out_plus = "H", --Close folder + }, + }) + vim.keymap.set("n", "ee", "lua MiniFiles.open()", { desc = "Toggle mini file explorer" }) -- toggle file explorer + vim.keymap.set("n", "ef", function() + MiniFiles.open(vim.api.nvim_buf_get_name(0), false) + MiniFiles.reveal_cwd() + end, { desc = "Toggle into currently opened file" }) + end + }, + { + 'echasnovski/mini.surround', + event = { "BufReadPre", "BufNewFile" }, + opts = { + custom_surroundings = nil, + + highlight_duration = 300, + + -- INFO: + --saiw surround with no whitespace + --saw surround with whitespace + mappings = { + add = 'sa', + delete = 'ds', + find = 'sf', + find_left = 'sF', + highlight = 'sh', + replace = 'sr', + update_n_lines = 'sn', + + suffix_last = 'l', -- Suffix to search with "previous" method + suffix_next = 'n', -- Suffix to search with "next" method + }, + + n_lines = 20, + + respect_selection_type = false, + + + search_method = 'cover', + + silent = false, + }, + + -- Get rid of whitespace + { + "echasnovski/mini.trailspace", + event = { "BufReadPost", "BufNewFile" }, + config = function() + local miniTrailspace = require("mini.trailspace") + + miniTrailspace.setup({ + only_in_normal_buffers = true, + }) + + vim.keymap.set("n", "cw", function() minTrailspace.trim() end, { desc = "Erase Whitespace" }) + + vim.api.nvim_create_autocmd("CursorMoved", { + pattern = "*", + callback = function() + require("mini.trailspace").unhighlight() + end, + }) + end + }, + { + "echasnovski/mini.splitjoin", + config = function() + local miniSplitJoin = require("mini.splitjoin") + + miniSplitJoin.setup({ + mappings = { toggle = ""}, + }) + + vim.keymap.set({ "n", "x", }, "sj", function() miniSplitJoin.join() end, { desc = "Join arguments" }) + vim.keymap.set({ "n", "x", }, "sk", function() miniSplitJoin.split() end, { desc = "Split arguments"}) + end, + } +} +} + diff --git a/lua/themenacesauce/plugins/oil.lua b/lua/themenacesauce/plugins/oil.lua new file mode 100644 index 0000000..10b2a63 --- /dev/null +++ b/lua/themenacesauce/plugins/oil.lua @@ -0,0 +1,33 @@ +return { + "stevearc/oil.nvim", + dependencies = {"nvim-tree/nvim-web-devicons"}, + config = function() + require("oil").setup({ + default_file_explorer = true, -- starts up nvim with oil as the default explorer instead of netrw, + columns = { }, + keymaps = { + [""] = false, + [""] = false, -- Ctrl c will not exit + [""] = "action.select.split", -- Alt h to split window + ["q"] = "actions.close", + }, + delete_to_trash = true, + view_options = { + show_hidden = true, + }, + skip_confirm_for_simple_edits = true, + }) + + --keymaps for oil + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) -- opens parent dir over current active window + vim.keymap.set("n", "-", require("oil").toggle_float, { desc = "toggle float oil" }) -- opens parent directory over current active window + + vim.api.nvim_create_autocmd("FileType", { + pattern = "oil", + callback = function() + vim.opt_local.cursorline = true + end, + }) + + end +} diff --git a/lua/themenacesauce/plugins/snacks.lua b/lua/themenacesauce/plugins/snacks.lua new file mode 100644 index 0000000..e58a15d --- /dev/null +++ b/lua/themenacesauce/plugins/snacks.lua @@ -0,0 +1,175 @@ +return { + -- HACK: docs @ https://github.com/folke/snacks.nvim/blob/main/docs + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + -- NOTE: Options + opts = { + styles = { + input = { + keys = { + n_esc = { "", { "cmp_close", "cancel" }, mode = "n", expr = true }, + i_esc = { "", { "cmp_close", "stopinsert" }, mode = "i", expr = true }, + }, + } + }, + -- Snacks Modules + input = { + enabled = true, + }, + quickfile = { + enabled = true, + exclude = { "latex" }, + }, + -- HACK: read picker docs @ https://github.com/folke/snacks.nvim/blob/main/docs/picker.md + picker = { + enabled = true, + matchers = { + frecency = true, + cwd_bonus = false, + }, + exclude = { + ".git", + "node_modules", + "dist", + "build", + }, + formatters = { + file = { + filename_first = true, + filename_only = false, + icon_width = 2, + }, + }, + layout = { + -- presets options : "default" , "ivy" , "ivy-split" , "telescope" , "vscode", "select" , "sidebar" + -- override picker layout in keymaps function as a param below + preset = "telescope", -- defaults to this layout unless overidden + cycle = false, + }, + layouts = { + select = { + preview = false, + layout = { + backdrop = false, + width = 0.6, + min_width = 80, + height = 0.4, + min_height = 10, + box = "vertical", + border = "rounded", + title = "{title}", + title_pos = "center", + { win = "input", height = 1, border = "bottom" }, + { win = "list", border = "none" }, + { win = "preview", title = "{preview}", width = 0.6, height = 0.4, border = "top" }, + } + }, + telescope = { + reverse = true, -- set to false for search bar to be on top + layout = { + box = "horizontal", + backdrop = false, + width = 0.8, + height = 0.9, + border = "none", + { + box = "vertical", + { win = "list", title = " Results ", title_pos = "center", border = "rounded" }, + { win = "input", height = 1, border = "rounded", title = "{title} {live} {flags}", title_pos = "center" }, + }, + { + win = "preview", + title = "{preview:Preview}", + width = 0.50, + border = "rounded", + title_pos = "center", + }, + }, + }, + ivy = { + layout = { + box = "vertical", + backdrop = false, + width = 0, + height = 0.4, + position = "bottom", + border = "top", + title = " {title} {live} {flags}", + title_pos = "left", + { win = "input", height = 1, border = "bottom" }, + { + box = "horizontal", + { win = "list", border = "none" }, + { win = "preview", title = "{preview}", width = 0.5, border = "left" }, + }, + }, + }, + } + }, + image = { + enabled = function() + return vim.bo.filetype == "markdown" + end, + doc = { + float = false, -- show image on cursor hover + inline = false, -- show image inline + max_width = 50, + max_height = 30, + wo = { + wrap = false, + }, + }, + convert = { + notify = true, + command = "magick" + }, + img_dirs = { "img", "images", "assets", "static", "public", "media", "attachments","Archives/All-Vault-Images/", "~/Library", "~/Downloads" }, + }, + dashboard = { + enabled = true, + sections = { + { section = "header" }, + { section = "keys", gap = 1, padding = 1 }, + { section = "startup" }, + { + section = "terminal", + cmd = "ascii-image-converter ~/Pictures/imagesForLinux/Pfp.png -C -c", + random = 15, + pane = 2, + indent = 15, + height = 30, + }, + }, + }, + }, + keys = { + { "lg", function() require("snacks").lazygit() end, desc = "Lazygit" }, + { "gl", function() require("snacks").lazygit.log() end, desc = "Lazygit Logs" }, + -- { "es", function() require("snacks").explorer() end, desc = "Open Snacks Explorer" }, + { "rN", function() require("snacks").rename.rename_file() end, desc = "Fast Rename Current File" }, + { "dB", function() require("snacks").bufdelete() end, desc = "Delete or Close Buffer (Confirm)" }, + + -- Snacks Picker + { "pf", function() require("snacks").picker.files() end, desc = "Find Files (Snacks Picker)" }, + { "pc", function() require("snacks").picker.files({cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, + { "ps", function() require("snacks").picker.grep() end, desc = "Grep word" }, + { "pws", function() require("snacks").picker.grep_word() end, desc = "Search Visual Selection or Word", mode = {"n", "x" } }, + { "pk", function() require("snacks").picker.keymaps({ layout = "ivy" }) end, desc = "Search Keymaps (Snacks Picker)" }, + + { "gbr", function() require("snacks").picker.git_branches({ layout = "select" }) end, desc = "Pick and Switch Git Branches" }, + { "th", function() require("snacks").picker.colorschemes({ layout = "ivy" }) end, desc = "Pick Color Schemes"}, + { "vh", function() require("snacks").picker.help() end, desc = "Help Pages" }, + } + }, + { + "folke/todo-comments.nvim", + event = { "BufReadPre", "BufNewFile"}, + keys = { + { "pt", function() require("snacks").picker.todo_comments() end, desc = "Todo" }, + { "pT", function() require("snacks").picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + } + }, +} + diff --git a/lua/themenacesauce/plugins/telescope.lua b/lua/themenacesauce/plugins/telescope.lua new file mode 100644 index 0000000..988bc50 --- /dev/null +++ b/lua/themenacesauce/plugins/telescope.lua @@ -0,0 +1,51 @@ +return { + "nvim-telescope/telescope.nvim", + branch = "master", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-tree/nvim-web-devicons", + "andrew-george/telescope-themes", + }, + + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + local builtin = require("telescope.builtin") + + telescope.load_extension("fzf") + telescope.load_extension("themes") + + telescope.setup({ + defaults = { + path_display = { "smart" }, + mappings = { + i = { + [""] = actions.move_selection_previous, + [""] = actions.move_selection_next, + }, + }, + extensions = { + themes = { + enable_previewer = true, + enable_live_preview = true, + persist = { + enabled = true, + path = vim.fn.stdpath("config") .. "/lua/colorscheme.lua", + } + } + } + } + }) + + -- Keymaps + vim.keymap.set("n", "pr", "Telescope oldfiles", { desc = "Fuzzy find recent files" }) + vim.keymap.set("n", "pWs", function() + local word = vim.fn.expand("") + builtin.grep_string({ search = word }) + end, { desc = "Find Connected Words under cursor" }) + + vim.keymap.set("n", "ths", "Telescope themes", { noremap = true, silent = true, desc = "Theme Switcher" }) + +end, +} diff --git a/lua/themenacesauce/plugins/todo-comments.lua b/lua/themenacesauce/plugins/todo-comments.lua new file mode 100644 index 0000000..857e9f4 --- /dev/null +++ b/lua/themenacesauce/plugins/todo-comments.lua @@ -0,0 +1,61 @@ +return { + "folke/todo-comments.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { "nvim-lua/plenary.nvim"}, + config = function() + local todo_comments = require("todo-comments") + + todo_comments.setup({ + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + -- signs = false, -- configure signs for some keywords individually + }, + TODO = { icon = " ", color = "info" , alt = {"Personal"} }, + HACK = { icon = " ", color = "warning", alt = { "DON SKIP" } }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO", "READ", "COLORS", "Custom" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + FORGETNOT = { icon = " ", color = "hint" }, + }, + -- Patterns for hl markdown support + highlight = { + multiline = true, + multiline_pattern = "^.", + multiline_context = 10, + before = "", + keyword = "wide", + after = "fg", + pattern = { + [[.*<(KEYWORDS)\s*:]], -- default pattern + [[]], -- HTML comments with colon + [[]], -- HTML comments without colon + }, + comments_only = false, -- highlighting outside of comments + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + pattern = [[\b(KEYWORDS)\b]], + }, + }) + + -- keymaps + vim.keymap.set("n", "]t", function() + todo_comments.jump_next() + end, { desc = "Next todo comment" }) + + vim.keymap.set("n", "[t", function() + todo_comments.jump_prev() + end, { desc = "Previous todo comment" }) + end, +} diff --git a/lua/themenacesauce/plugins/treesitter.lua b/lua/themenacesauce/plugins/treesitter.lua new file mode 100644 index 0000000..cfdf953 --- /dev/null +++ b/lua/themenacesauce/plugins/treesitter.lua @@ -0,0 +1,91 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", + config = function() + -- import nvim-treesitter plugin + local treesitter = require("nvim-treesitter") + + -- configure treesitter + treesitter.setup({ -- enable syntax highlighting + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + -- enable indentation + indent = { enable = true }, + + -- ensure these languages parsers are installed + ensure_installed = { + "json", + "javascript", + "typescript", + "tsx", + "go", + "yaml", + "html", + "css", + "python", + "http", + "prisma", + "markdown", + "markdown_inline", + "svelte", + "graphql", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "query", + "vimdoc", + "c", + "java", + "rust", + "ron", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + -- scope_incremental = false, + node_decremental = "", + }, + }, + }) + -- force start treesitter for all filetypes + vim.api.nvim_create_autocmd('FileType', { + pattern = '*', + callback = function() + pcall(vim.treesitter.start) + end, + }) + end, + }, + -- NOTE: js,ts,jsx,tsx Auto Close Tags + { + "windwp/nvim-ts-autotag", + enabled = true, + ft = { "html", "xml", "javascript", "typescript", "javascriptreact", "typescriptreact", "svelte" }, + config = function() + -- Independent nvim-ts-autotag setup + require("nvim-ts-autotag").setup({ + opts = { + enable_close = true, -- Auto-close tags + enable_rename = true, -- Auto-rename pairs + enable_close_on_slash = false, -- Disable auto-close on trailing `xw", "Trouble diagnostics toggle", desc = "Open trouble workspace diagnostics" }, + { + "xd", + "Trouble diagnostics toggle filter.buf=0", + desc = "Open trouble document diagnostics", + }, + { "xq", "Trouble quickfix toggle", desc = "Open trouble quickfix list" }, + { "xl", "Trouble loclist toggle", desc = "Open trouble location list" }, + { "xt", "Trouble todo toggle", desc = "Open todos in trouble" }, + }, +} diff --git a/lua/themenacesauce/plugins/undotree.lua b/lua/themenacesauce/plugins/undotree.lua new file mode 100644 index 0000000..0ac8e83 --- /dev/null +++ b/lua/themenacesauce/plugins/undotree.lua @@ -0,0 +1,6 @@ +return { + "mbbill/undotree", + config = function() + vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) + end, +} diff --git a/lua/themenacesauce/plugins/vimbegood.lua b/lua/themenacesauce/plugins/vimbegood.lua new file mode 100644 index 0000000..d31063f --- /dev/null +++ b/lua/themenacesauce/plugins/vimbegood.lua @@ -0,0 +1,7 @@ +return { +"thePrimeagen/vim-be-good", +cmd = "VimBeGood", +config = function() +require("VimBeGood").setup {} +end, +} diff --git a/lua/themenacesauce/plugins/vimtmuxnavigator.lua b/lua/themenacesauce/plugins/vimtmuxnavigator.lua new file mode 100644 index 0000000..b4170cf --- /dev/null +++ b/lua/themenacesauce/plugins/vimtmuxnavigator.lua @@ -0,0 +1,19 @@ +return +{ + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + "TmuxNavigatorProcessList", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, +}