From c1e58a905bbdddf109dd3b7473edb2e8076d708b Mon Sep 17 00:00:00 2001
From: ben <ben@nagy.contact>
Date: Sat, 3 May 2025 14:28:00 -0700
Subject: current neovim config (lua)

---
 config/nvim/init.lua                         |  22 ++++
 config/nvim/lazy-lock.json                   |  28 ++++
 config/nvim/lua/core/autocmds.lua            |  38 ++++++
 config/nvim/lua/core/keymaps.lua             |  57 +++++++++
 config/nvim/lua/core/options.lua             |  38 ++++++
 config/nvim/lua/core/statusline.lua          |  82 ++++++++++++
 config/nvim/lua/plugins/auto-pairs.lua       |   8 ++
 config/nvim/lua/plugins/colors.lua           | 183 +++++++++++++++++++++++++++
 config/nvim/lua/plugins/comment.lua          |  51 ++++++++
 config/nvim/lua/plugins/diffview.lua         |  14 ++
 config/nvim/lua/plugins/gitsigns.lua         | 113 +++++++++++++++++
 config/nvim/lua/plugins/init.lua             |  11 ++
 config/nvim/lua/plugins/lsp.lua              | 101 +++++++++++++++
 config/nvim/lua/plugins/markdown-preview.lua |  12 ++
 config/nvim/lua/plugins/telescope.lua        |  53 ++++++++
 config/nvim/lua/plugins/todo-comments.lua    |  55 ++++++++
 config/nvim/lua/plugins/treesitter.lua       |  31 +++++
 config/nvim/lua/plugins/undotree.lua         |  10 ++
 18 files changed, 907 insertions(+)
 create mode 100644 config/nvim/init.lua
 create mode 100644 config/nvim/lazy-lock.json
 create mode 100644 config/nvim/lua/core/autocmds.lua
 create mode 100644 config/nvim/lua/core/keymaps.lua
 create mode 100644 config/nvim/lua/core/options.lua
 create mode 100644 config/nvim/lua/core/statusline.lua
 create mode 100644 config/nvim/lua/plugins/auto-pairs.lua
 create mode 100644 config/nvim/lua/plugins/colors.lua
 create mode 100644 config/nvim/lua/plugins/comment.lua
 create mode 100644 config/nvim/lua/plugins/diffview.lua
 create mode 100644 config/nvim/lua/plugins/gitsigns.lua
 create mode 100644 config/nvim/lua/plugins/init.lua
 create mode 100644 config/nvim/lua/plugins/lsp.lua
 create mode 100644 config/nvim/lua/plugins/markdown-preview.lua
 create mode 100644 config/nvim/lua/plugins/telescope.lua
 create mode 100644 config/nvim/lua/plugins/todo-comments.lua
 create mode 100644 config/nvim/lua/plugins/treesitter.lua
 create mode 100644 config/nvim/lua/plugins/undotree.lua

(limited to 'config/nvim')

diff --git a/config/nvim/init.lua b/config/nvim/init.lua
new file mode 100644
index 0000000..3b8c4c3
--- /dev/null
+++ b/config/nvim/init.lua
@@ -0,0 +1,22 @@
+-- Bootstrap lazy.nvim
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not vim.loop.fs_stat(lazypath) then
+  vim.fn.system({
+    "git",
+    "clone",
+    "--filter=blob:none",
+    "https://github.com/folke/lazy.nvim.git",
+    "--branch=stable",
+    lazypath,
+  })
+end
+vim.opt.rtp:prepend(lazypath)
+
+vim.g.mapleader = " "
+vim.g.maplocalleader = " "
+
+require("core.options")
+require("core.keymaps")
+require("core.statusline").setup()
+require("core.autocmds")
+require("lazy").setup("plugins")
diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json
new file mode 100644
index 0000000..e99597b
--- /dev/null
+++ b/config/nvim/lazy-lock.json
@@ -0,0 +1,28 @@
+{
+  "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
+  "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
+  "base16-black-metal-scheme": { "branch": "master", "commit": "c7a32bec8105a1ceddb9fcc90b713dabde5e7e5e" },
+  "c-syntax.vim": { "branch": "master", "commit": "e0f36366b8ad6ba9eca32c9e50eb4d47f0eac197" },
+  "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
+  "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
+  "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
+  "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
+  "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
+  "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
+  "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
+  "gitsigns.nvim": { "branch": "main", "commit": "68114837e81ca16d06514c3a997c9102d1b25c15" },
+  "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
+  "lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" },
+  "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
+  "mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
+  "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
+  "nvim-autopairs": { "branch": "master", "commit": "d2f791ceeb26d04d87aa54343bc94e8ad8d7be1c" },
+  "nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" },
+  "nvim-lspconfig": { "branch": "master", "commit": "88157521e890fe7fdf18bee22438875edd6300a6" },
+  "nvim-treesitter": { "branch": "master", "commit": "306dd6e9dc806db1d79568d26e1c9b6c98b95fbc" },
+  "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
+  "telescope-undo.nvim": { "branch": "main", "commit": "2971cc9f193ec09e0c5de3563f99cbea16b63f10" },
+  "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
+  "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
+  "undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" }
+}
diff --git a/config/nvim/lua/core/autocmds.lua b/config/nvim/lua/core/autocmds.lua
new file mode 100644
index 0000000..3594112
--- /dev/null
+++ b/config/nvim/lua/core/autocmds.lua
@@ -0,0 +1,38 @@
+local augroup = vim.api.nvim_create_augroup
+local autocmd = vim.api.nvim_create_autocmd
+
+-- Compile LaTeX on Save
+autocmd("BufWritePost", {
+  pattern = "*.tex",
+  callback = function()
+    vim.fn.jobstart({ "pdflatex", vim.fn.expand("%:p") }, { stdout_buffered = true, stderr_buffered = true })
+  end,
+})
+
+-- Remove White Spaces on Save
+autocmd("BufWritePre", {
+	pattern = "*",
+	callback = function()
+		local currPos = vim.fn.getpos(".")
+		vim.cmd([[%s/\s\+$//e]])
+		vim.cmd([[%s/\n\+\%$//e]])
+		vim.fn.cursor(currPos[2], currPos[3])
+	end,
+})
+
+-- Stop Auto comemnting
+vim.api.nvim_create_autocmd("BufEnter", {
+  pattern = "*",
+  callback = function()
+    vim.opt.formatoptions:remove({ "r", "o" })
+    vim.opt_local.formatoptions:remove({ "r", "o" })
+  end,
+})
+
+-- let TabChars retain their assigned color
+vim.api.nvim_create_autocmd({"BufEnter", "TabNew", "WinEnter"}, {
+	pattern = "*",
+	callback = function()
+		vim.cmd("match TabChar /\t/")
+	end
+})
diff --git a/config/nvim/lua/core/keymaps.lua b/config/nvim/lua/core/keymaps.lua
new file mode 100644
index 0000000..3d6cc2a
--- /dev/null
+++ b/config/nvim/lua/core/keymaps.lua
@@ -0,0 +1,57 @@
+local keymap = vim.keymap
+
+-- <leader> -> \
+vim.g.mapleader = "\\"
+keymap.set("n", "<leader>pv", vim.cmd.Ex)
+
+-- alter indentation in visual mode
+keymap.set("v", "<", "<gv")
+keymap.set("v", ">", ">gv")
+
+-- Grab visual selection and place the line(s) anywhere
+keymap.set("v", "J", ":m '>+1<CR>gv=gv")
+keymap.set("v", "K", ":m '<-2<CR>gv=gv")
+
+-- Half-page Navigation, position preservation
+keymap.set("n", "<C-d>", "<C-d>zz")
+keymap.set("n", "<C-u>", "<C-u>zz")
+
+-- file-wide replace-substitution
+keymap.set("n", "<leader>r", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
+
+-- Make it executable
+keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
+
+-- Map CTRL-BS -> CTRL-W (delete prev. word)
+keymap.set("i", "<C-h>", "<C-\\><C-o>db", { noremap = true, silent = true })
+
+-- 2 fewer keystrokes to enter another file
+keymap.set("n", "E", ":e ")
+
+-- Get rid of this shit
+vim.api.nvim_set_keymap('n', 'q:', '<Nop>', { noremap = true, silent = true })
+
+-- Clear search highlight
+vim.api.nvim_set_keymap('n', '<Leader>cs', ':nohlsearch<CR><C-l>', { noremap = true, silent = true })
+
+
+--[[-- Tabs --]]
+
+-- Open a new tab
+keymap.set("n", "<M-n>", ":tabnew ", { noremap = true })
+
+-- Close the current tab
+keymap.set("n", "<C-n>", ":tabclose<CR>", { noremap = true, silent = true })
+
+-- Switch to the next tab (Normal, Insert, and Command modes)
+keymap.set("n", "<M-Tab>", ":<C-U>tabnext<CR>", { noremap = true })
+keymap.set("i", "<M-Tab>", "<C-\\><C-N>:tabnext<CR>", { noremap = true })
+keymap.set("c", "<M-Tab>", "<C-C>:tabnext<CR>", { noremap = true })
+
+-- Switch to the previous tab (Normal, Insert, and Command modes)
+keymap.set("n", "<S-Tab>", ":<C-U>tabprevious<CR>", { noremap = true })
+keymap.set("i", "<S-Tab>", "<C-\\><C-N>:tabprevious<CR>", { noremap = true })
+keymap.set("c", "<S-Tab>", "<C-C>:tabprevious<CR>", { noremap = true })
+
+-- Enable Spell Check
+keymap.set("n", "<leader>s", ":setlocal spell! spelllang=en_us<CR>", { silent = true })
diff --git a/config/nvim/lua/core/options.lua b/config/nvim/lua/core/options.lua
new file mode 100644
index 0000000..5796aef
--- /dev/null
+++ b/config/nvim/lua/core/options.lua
@@ -0,0 +1,38 @@
+local opt = vim.opt
+local cmd = vim.cmd
+
+-- Syntax and colors
+opt.termguicolors = true
+opt.background = "dark"
+opt.signcolumn = "yes"
+cmd("syntax on")
+
+-- Line Numbers
+opt.number = true
+opt.relativenumber = true
+
+-- Tabs
+opt.expandtab = false     -- Use tabs instead of spaces
+opt.tabstop = 4           -- Number of spaces a tab counts for
+opt.shiftwidth = 4        -- Number of spaces for auto-indentation
+opt.softtabstop = 4       -- Spaces used when hitting Tab or Backspace
+opt.smartindent = true
+opt.autoindent = true
+cmd("match TabChar /\t/")
+vim.opt.list = true
+vim.opt.listchars = { tab = ">." }
+
+-- File type detection
+vim.cmd("filetype on")
+vim.cmd("filetype plugin on")
+
+-- Mouse and clipboard
+vim.opt.mouse = ""
+vim.opt.clipboard = "unnamedplus"
+vim.api.nvim_set_keymap('v', 'yy', ':w !xclip -selection clipboard<CR><CR>',
+{ noremap = true, silent = true })
+
+-- MISC
+opt.swapfile = false
+opt.backup = false
+vim.opt.encoding = "utf-8"
diff --git a/config/nvim/lua/core/statusline.lua b/config/nvim/lua/core/statusline.lua
new file mode 100644
index 0000000..cc4bd09
--- /dev/null
+++ b/config/nvim/lua/core/statusline.lua
@@ -0,0 +1,82 @@
+local M = {}
+
+local branch_cache = ""
+local last_check = 0
+local check_interval = 1000 -- Check git branch every 1 second
+
+local function async_git_branch()
+    local check_time = vim.loop.now()
+    if check_time - last_check < check_interval then
+        return branch_cache
+    end
+    last_check = check_time
+
+    local stdout = vim.loop.new_pipe(false)
+    local stderr = vim.loop.new_pipe(false)
+
+    local handle
+    handle = vim.loop.spawn("git", {
+        args = { "branch", "--show-current" },
+        stdio = { nil, stdout, stderr }
+    }, function(code, signal)
+        stdout:close()
+        stderr:close()
+        handle:close()
+    end)
+
+    if handle then
+        stdout:read_start(vim.schedule_wrap(function(err, data)
+            if data then
+                branch_cache = data:gsub("\n", "")
+            end
+        end))
+    end
+
+    return branch_cache
+end
+
+function M.statusline_git()
+    local branch_name = async_git_branch()
+    return #branch_name > 0 and '  ' .. branch_name .. ' ' or ''
+end
+
+-- Rest of your statusline.lua remains exactly the same
+function M.setup()
+    vim.cmd('highlight clear StatusLine')
+    vim.cmd('highlight clear StatusLineNC')
+
+    local highlights = {
+        StatusLineGit      = { bg = "#161616", fg = "#D8DEE9" },
+        StatusLineBuffer   = { bg = "NONE",    fg = "#D8DEE9" },
+        StatusLine        = { bg = "NONE",    fg = "#D8DEE9" },
+        StatusLineFiletype = { bg = "NONE",    fg = "#D8DEE9" },
+        StatusLinePath     = { bg = "NONE",    fg = "#D8DEE9" },
+        StatusLineModified = { bg = "NONE",    fg = "#D8DEE9" },
+    }
+
+    for name, colors in pairs(highlights) do
+        vim.api.nvim_set_hl(0, name, colors)
+    end
+
+    vim.opt.statusline = table.concat({
+        "%#StatusLineGit#%{v:lua.require'core.statusline'.statusline_git()}",
+        "%#StatusLineBuffer# %n ",
+        "%#StatusLine#%{&ff} ",
+        "%#StatusLineFiletype#%y",
+        "%#StatusLinePath# %<%{expand('%:p:h')}/%f",
+        "%#StatusLineModified#%m",
+        "%=",
+        "%#StatusLine#%5l",
+        "/%L:%v ",
+        "%{char2nr(getline('.')[col('.')-1])} "
+    })
+end
+
+vim.api.nvim_create_autocmd("ColorScheme", {
+	pattern = "*",
+	callback = function()
+		M.setup()
+	end,
+})
+
+return M
diff --git a/config/nvim/lua/plugins/auto-pairs.lua b/config/nvim/lua/plugins/auto-pairs.lua
new file mode 100644
index 0000000..1b9b728
--- /dev/null
+++ b/config/nvim/lua/plugins/auto-pairs.lua
@@ -0,0 +1,8 @@
+return {
+	{
+		'windwp/nvim-autopairs',
+		event = "InsertEnter",
+		config = true,
+		lazy = false,
+	},
+}
diff --git a/config/nvim/lua/plugins/colors.lua b/config/nvim/lua/plugins/colors.lua
new file mode 100644
index 0000000..b27f10e
--- /dev/null
+++ b/config/nvim/lua/plugins/colors.lua
@@ -0,0 +1,183 @@
+return {
+	--[[-- PaperColor --]]
+
+	{
+		"NLKNguyen/papercolor-theme",
+		lazy = false,
+		priority = 1000,
+		config = function()
+			vim.opt.background = "dark"
+			vim.cmd.colorscheme "PaperColor"
+
+			vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "LineNr", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "Folded", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NonText", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "SpecialKey", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "VertSplit", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "Comment", { fg = "#ADD8E6", italic = true })
+			vim.api.nvim_set_hl(0, "TabChar", { fg = "#1A1A1A", ctermfg = "darkgray"})
+			vim.api.nvim_set_hl(0, "String", { fg = "#b58c4a" })
+			vim.api.nvim_set_hl(0, "cType", { fg = "NONE" })
+
+			--vim.api.nvim_set_hl(0, "Type", { fg = "NONE" , bold=false})
+			vim.api.nvim_set_hl(0, "Type", { fg = "#FFFF00" , bold=false})
+			vim.api.nvim_set_hl(0, "cType", { fg = "#FFFF00" , bold=false})
+			vim.api.nvim_set_hl(0, "Constant", { fg = "#d7875f"})
+			vim.api.nvim_set_hl(0, "Identifier", { fg = "NONE" })
+		end,
+	},
+
+	--[[-- Ice Cave --]]
+
+	--[[ {
+		"mcauley-penney/ice-cave.nvim",
+		config = function()
+			vim.cmd.colorscheme("ice-cave")
+		end,
+		priority = 1000
+	}, ]]
+
+	--[[ {
+		"metalelf0/base16-black-metal-scheme",
+		config = function()
+			vim.cmd.colorscheme("base16-black-metal")
+			-- vim.cmd.colorscheme("base16-black-metal-bathory")
+			-- vim.cmd.colorscheme("base16-black-metal-burzum")
+			-- vim.cmd.colorscheme("base16-black-metal-dark-funeral")
+			-- vim.cmd.colorscheme("base16-black-metal-gorgoroth")
+			-- vim.cmd.colorscheme("base16-black-metal-immortal")
+			-- vim.cmd.colorscheme("base16-black-metal-marduk")
+			-- vim.cmd.colorscheme("base16-black-metal-mayhem")
+			-- vim.cmd.colorscheme("base16-black-metal-venom")
+			-- vim.cmd.colorscheme("base16-black-metal-khold")
+			-- vim.cmd.colorscheme("base16-black-metal-nile")
+			vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "LineNr", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "Folded", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "NonText", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "SpecialKey", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "VertSplit", { bg = "NONE", ctermbg = "NONE" })
+			vim.api.nvim_set_hl(0, "Comment", { fg = "#ADD8E6", italic = true })
+			vim.api.nvim_set_hl(0, "TabChar", { fg = "#1A1A1A", ctermfg = "darkgray"})
+			vim.api.nvim_set_hl(0, "String", { fg = "#b58c4a" })
+			vim.api.nvim_set_hl(0, "cType", { fg = "NONE" })
+		end,
+		priority = 1000
+	}, ]]
+
+	--[[-- PaperColor Slim --]]
+
+	-- {
+		-- "pappasam/papercolor-theme-slim",
+		-- lazy = false,
+		-- priority = 1000,
+		-- config = function()
+			-- vim.opt.background = "dark"
+			--vim.cmd.colorscheme "PaperColorSlim"
+
+			-- vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "LineNr", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "Folded", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "NonText", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "SpecialKey", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "VertSplit", { bg = "NONE", ctermbg = "NONE" })
+			-- vim.api.nvim_set_hl(0, "Comment", { fg = "#ADD8E6", italic = true })
+			-- vim.api.nvim_set_hl(0, "TabChar", { fg = "#1A1A1A", ctermfg = "darkgray"})
+			-- vim.api.nvim_set_hl(0, "String", { fg = "#b58c4a" })
+
+			-- end,
+			-- },
+
+
+			--[[
+			{
+				"catppuccin/nvim",
+				config = function()
+					require("catppuccin").setup({
+						flavour = "auto", -- latte, frappe, macchiato, mocha
+						background = { -- :h background
+							light = "latte",
+							dark = "mocha",
+						},
+						transparent_background = false, -- disables setting the background color.
+						show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
+						term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
+						dim_inactive = {
+							enabled = false, -- dims the background color of inactive window
+							shade = "dark",
+							percentage = 0.15, -- percentage of the shade to apply to the inactive window
+						},
+						no_italic = false, -- Force no italic
+						no_bold = false, -- Force no bold
+						no_underline = false, -- Force no underline
+						styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
+							comments = { "italic" }, -- Change the style of comments
+							conditionals = { "italic" },
+							loops = {},
+							functions = {},
+							keywords = {},
+							strings = {},
+							variables = {},
+							numbers = {},
+							booleans = {},
+							properties = {},
+							types = {},
+							operators = {},
+							-- miscs = {}, -- Uncomment to turn off hard-coded styles
+						},
+						color_overrides = {},
+						custom_highlights = {},
+						default_integrations = true,
+						integrations = {
+							cmp = true,
+							gitsigns = true,
+							nvimtree = true,
+							treesitter = true,
+							notify = false,
+							mini = {
+								enabled = true,
+								indentscope_color = "",
+							},
+							-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
+						},
+					})
+
+					-- setup must be called before loading
+					--vim.cmd.colorscheme "catppuccin" -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
+					vim.cmd.colorscheme "catppuccin-macchiato"
+
+
+					vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" })
+				end,
+	},
+	--]]
+
+
+	--[[-- Additional Syntax Support --]]
+	{
+		"NLKNguyen/c-syntax.vim"
+	},
+
+	{
+		--"junegunn/rainbow_parentheses.vim",
+		--"luochen1990/rainbow",
+		--"kien/rainbow_parentheses.vim",
+
+		--[[ -- does work
+		"luochen1990/rainbow",
+		event = { 'BufReadPre', 'BufNewFile' },
+		init = function() vim.g.rainbow_active = 1 end,
+		config = function() vim.cmd('RainbowToggleOn') end,
+		--]]
+	},
+}
diff --git a/config/nvim/lua/plugins/comment.lua b/config/nvim/lua/plugins/comment.lua
new file mode 100644
index 0000000..f7fbda1
--- /dev/null
+++ b/config/nvim/lua/plugins/comment.lua
@@ -0,0 +1,51 @@
+return {
+	{
+		"numToStr/Comment.nvim",
+		lazy = false,
+		config = function()
+			require('Comment').setup({
+				---Add a space b/w comment and the line
+				padding = true,
+				---Whether the cursor should stay at its position
+				sticky = true,
+				---Lines to be ignored while (un)comment
+				ignore = nil,
+				---LHS of toggle mappings in NORMAL mode
+				toggler = {
+					---Line-comment toggle keymap
+					line = 'gcc',
+					---Block-comment toggle keymap
+					block = 'gbc',
+				},
+				---LHS of operator-pending mappings in NORMAL and VISUAL mode
+				opleader = {
+					---Line-comment keymap
+					line = 'gc',
+					---Block-comment keymap
+					block = 'gb',
+				},
+				---LHS of extra mappings
+				extra = {
+					---Add comment on the line above
+					above = 'gcO',
+					---Add comment on the line below
+					below = 'gco',
+					---Add comment at the end of line
+					eol = 'gcA',
+				},
+				---Enable keybindings
+				---NOTE: If given `false` then the plugin won't create any mappings
+				mappings = {
+					---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
+					basic = true,
+					---Extra mapping; `gco`, `gcO`, `gcA`
+					extra = true,
+				},
+				---Function to call before (un)comment
+				pre_hook = nil,
+				---Function to call after (un)comment
+				post_hook = nil,
+			})
+		end,
+	},
+}
diff --git a/config/nvim/lua/plugins/diffview.lua b/config/nvim/lua/plugins/diffview.lua
new file mode 100644
index 0000000..fcd28c9
--- /dev/null
+++ b/config/nvim/lua/plugins/diffview.lua
@@ -0,0 +1,14 @@
+return {
+	{
+		"sindrets/diffview.nvim",
+		lazy = false,
+		config = function()
+			-- TODO: keymaps
+			-- :DiffviewOpen
+			-- :DiffviewClose
+			-- :DiffviewToggleFiles
+			-- :DiffviewFileHistory
+			-- :DiffviewFileHistory %
+		end,
+	},
+}
diff --git a/config/nvim/lua/plugins/gitsigns.lua b/config/nvim/lua/plugins/gitsigns.lua
new file mode 100644
index 0000000..3f30f42
--- /dev/null
+++ b/config/nvim/lua/plugins/gitsigns.lua
@@ -0,0 +1,113 @@
+return {
+	{
+		"lewis6991/gitsigns.nvim",
+		lazy = false,
+		config = function()
+
+			require('gitsigns').setup {
+				signs = {
+					add          = { text = '+' },
+					--change       = { text = '┃' },
+					change       = { text = 'Δ' },
+					delete       = { text = '-' },
+					topdelete    = { text = '-' },
+					changedelete = { text = 'Δ-' },
+					untracked    = { text = '~' },
+				},
+				signs_staged = {
+					add          = { text = '+' },
+					--change       = { text = '┃' },
+					change       = { text = 'Δ' },
+					delete       = { text = '-' },
+					topdelete    = { text = '-' },
+					changedelete = { text = 'Δ-' },
+					untracked    = { text = '~' },
+				},
+				signs_staged_enable = true,
+				signcolumn = true,  -- Toggle with `:Gitsigns toggle_signs`
+				numhl      = false, -- Toggle with `:Gitsigns toggle_numhl`
+				linehl     = false, -- Toggle with `:Gitsigns toggle_linehl`
+				word_diff  = false, -- Toggle with `:Gitsigns toggle_word_diff`
+				watch_gitdir = {
+					follow_files = true
+				},
+				auto_attach = true,
+				attach_to_untracked = false,
+				current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
+				current_line_blame_opts = {
+					virt_text = true,
+					virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
+					delay = 1000,
+					ignore_whitespace = false,
+					virt_text_priority = 100,
+					use_focus = true,
+				},
+				current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
+				sign_priority = 6,
+				update_debounce = 100,
+				status_formatter = nil, -- Use default
+				max_file_length = 40000, -- Disable if file is longer than this (in lines)
+				preview_config = {
+					-- Options passed to nvim_open_win
+					border = 'single',
+					style = 'minimal',
+					relative = 'cursor',
+					row = 0,
+					col = 1
+				},
+
+				--[[-- Key Maps --]]
+
+				on_attach = function(bufnr)
+					local gitsigns = require('gitsigns')
+
+					local function map(mode, l, r, opts)
+						opts = opts or {}
+						opts.buffer = bufnr
+						vim.keymap.set(mode, l, r, opts)
+					end
+
+					-- Navigation
+					map('n', ']c', function()
+						if vim.wo.diff then
+							vim.cmd.normal({']c', bang = true})
+						else
+							gitsigns.nav_hunk('next')
+						end
+					end)
+
+					map('n', '[c', function()
+						if vim.wo.diff then
+							vim.cmd.normal({'[c', bang = true})
+						else
+							gitsigns.nav_hunk('prev')
+						end
+					end)
+					vim.api.nvim_set_hl(0, "GitSignsChangeDelete", { fg = "#E1341E", bg = "NONE" })
+					vim.api.nvim_set_hl(0, "GitSignsTopDelete", { fg = "#E1341E", bg = "NONE" })
+					vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#E1341E", bg = "NONE" })
+
+
+					-- Actions
+					--[[
+					map('n', '<leader>hs', gitsigns.stage_hunk)
+					map('n', '<leader>hr', gitsigns.reset_hunk)
+					map('v', '<leader>hs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
+					map('v', '<leader>hr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
+					map('n', '<leader>hS', gitsigns.stage_buffer)
+					map('n', '<leader>hu', gitsigns.undo_stage_hunk)
+					map('n', '<leader>hR', gitsigns.reset_buffer)
+					map('n', '<leader>hp', gitsigns.preview_hunk)
+					map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end)
+					map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
+					map('n', '<leader>hd', gitsigns.diffthis)
+					map('n', '<leader>hD', function() gitsigns.diffthis('~') end)
+					map('n', '<leader>td', gitsigns.toggle_deleted)
+					-- Text object
+					map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
+					--]]
+				end,
+			}
+		end,
+	}
+}
diff --git a/config/nvim/lua/plugins/init.lua b/config/nvim/lua/plugins/init.lua
new file mode 100644
index 0000000..ffd4623
--- /dev/null
+++ b/config/nvim/lua/plugins/init.lua
@@ -0,0 +1,11 @@
+return {
+	require("plugins.telescope"),
+	require("plugins.treesitter"),
+	require("plugins.lsp"),
+	require("plugins.colors"),
+	require("plugins.todo-comments"),
+	require("plugins.auto-pairs"),
+	require("plugins.gitsigns"),
+	require("plugins.comment"),
+	require("plugins.markdown-preview"),
+}
diff --git a/config/nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua
new file mode 100644
index 0000000..aa8b8df
--- /dev/null
+++ b/config/nvim/lua/plugins/lsp.lua
@@ -0,0 +1,101 @@
+return
+{
+	'VonHeikemen/lsp-zero.nvim',
+	lazy = false,
+	branch = 'v3.x',
+	dependencies = {
+		-- LSP Support
+		{'neovim/nvim-lspconfig'},
+		{'williamboman/mason.nvim'},
+		{'williamboman/mason-lspconfig.nvim'},
+		{'folke/todo-comments.nvim'}, -- doesn't load for some reason
+
+		-- Autocompletion
+		{'hrsh7th/nvim-cmp'},
+		{'hrsh7th/cmp-nvim-lsp'},
+		{'hrsh7th/cmp-buffer'},
+		{'hrsh7th/cmp-path'},
+		{'saadparwaiz1/cmp_luasnip'},
+		{'hrsh7th/cmp-nvim-lua'},
+
+		-- Snippets
+		{'L3MON4D3/LuaSnip'},
+		{'rafamadriz/friendly-snippets'},
+	},
+
+	config = function()
+		local lsp_zero = require('lsp-zero')
+
+		lsp_zero.on_attach(function(client, bufnr)
+			-- see :help lsp-zero-keybindings
+			-- to learn the available actions
+			lsp_zero.default_keymaps({buffer = bufnr})
+
+			vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
+			vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
+			vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
+			vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
+			vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
+			vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
+			vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
+		end)
+
+		-- to learn how to use mason.nvim with lsp-zero
+		-- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md
+		require('mason').setup({})
+		require('mason-lspconfig').setup({
+			ensure_installed = {
+				'lua_ls',
+				'clangd',
+				'texlab',
+			},
+			handlers = {
+				lsp_zero.default_setup,
+			},
+		})
+
+		-- Setup completion
+		local cmp = require('cmp')
+		local cmp_action = lsp_zero.cmp_action()
+
+		cmp.setup({
+			mapping = cmp.mapping.preset.insert({
+				['<CR>'] = cmp.mapping.confirm({select = false}),
+				['<C-Space>'] = cmp.mapping.complete(),
+				['<C-f>'] = cmp_action.luasnip_jump_forward(),
+				['<C-b>'] = cmp_action.luasnip_jump_backward(),
+				['<C-u>'] = cmp.mapping.scroll_docs(-4),
+				['<C-d>'] = cmp.mapping.scroll_docs(4),
+			}),
+			snippet = {
+				expand = function(args)
+					-- You need Neovim v0.10 to use vim.snippet
+					vim.snippet.expand(args.body)
+				end,
+			},
+		})
+
+		require('lspconfig').lua_ls.setup({
+			capabilities = lsp_capabilities,
+			settings = {
+				Lua = {
+					runtime = {
+						version = 'LuaJIT'
+					},
+					diagnostics = {
+						globals = {'vim'},
+						disable = { 'unused-function' },
+					},
+					workspace = {
+						library = {
+							vim.env.VIMRUNTIME,
+						}
+					}
+				}
+			}
+		})
+
+
+	end
+
+}
diff --git a/config/nvim/lua/plugins/markdown-preview.lua b/config/nvim/lua/plugins/markdown-preview.lua
new file mode 100644
index 0000000..1fd1ac3
--- /dev/null
+++ b/config/nvim/lua/plugins/markdown-preview.lua
@@ -0,0 +1,12 @@
+return {
+	{
+		"iamcco/markdown-preview.nvim",
+		cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
+		build = "cd app && yarn install",
+		lazy = false,
+		init = function()
+			vim.g.mkdp_filetypes = { "markdown" }
+		end,
+		ft = { "markdown" },
+	},
+}
diff --git a/config/nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua
new file mode 100644
index 0000000..2151a33
--- /dev/null
+++ b/config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,53 @@
+return {
+	{
+		'nvim-telescope/telescope.nvim', tag = '0.1.8',
+		dependencies = { 'nvim-lua/plenary.nvim' },
+		lazy = false,
+
+		config = function()
+			local builtin = require('telescope.builtin')
+			vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
+			vim.keymap.set('n', '<C-p>', builtin.git_files, { desc = 'hello world' })
+			vim.keymap.set('n', '<leader>cs', function()
+				builtin.grep_string({ search = vim.fn.input("Grep > ") });
+			end)
+
+			vim.keymap.set("n", "<leader>rw", function()
+				builtin.grep_string { search = vim.fn.expand "<cword>", }
+			end, { silent = true})
+		end
+	},
+
+	{
+		"debugloop/telescope-undo.nvim",
+		dependencies = { -- note how they're inverted to above example
+			{
+				"nvim-telescope/telescope.nvim",
+				dependencies = { "nvim-lua/plenary.nvim" },
+			},
+		},
+		keys = {
+			{ -- lazy style key map
+				"<leader>u",
+				"<cmd>Telescope undo<cr>",
+				desc = "undo history",
+			},
+		},
+		opts = {
+			-- don't use `defaults = { }` here, do this in the main telescope spec
+			extensions = {
+				undo = {
+					-- telescope-undo.nvim config, see below
+				},
+				-- no other extensions here, they can have their own spec too
+			},
+		},
+		config = function(_, opts)
+			-- Calling telescope's setup from multiple specs does not hurt, it will happily merge the
+			-- configs for us. We won't use data, as everything is in it's own namespace (telescope
+			-- defaults, as well as each extension).
+			require("telescope").setup(opts)
+			require("telescope").load_extension("undo")
+		end,
+	},
+}
diff --git a/config/nvim/lua/plugins/todo-comments.lua b/config/nvim/lua/plugins/todo-comments.lua
new file mode 100644
index 0000000..340dbcd
--- /dev/null
+++ b/config/nvim/lua/plugins/todo-comments.lua
@@ -0,0 +1,55 @@
+-- lua/plugins/todo-comments.lua
+return {
+	"folke/todo-comments.nvim",
+	dependencies = { "nvim-lua/plenary.nvim" },
+	event = { "BufReadPost", "BufNewFile" },
+	lazy = false,
+	config = function()
+		require("todo-comments").setup({
+			signs = true,
+			sign_priority = 8,
+
+			keywords = {
+				FIX = {
+					icon = " ",
+					color = "error",
+					alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- keywords that map to FIX
+				},
+				TODO = { icon = " ", color = "info" },
+				HACK = { icon = " ", color = "warning" },
+				WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
+				PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
+				NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
+				TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
+				DEBUG = { icon = "🐛", color = "info"},
+				FIX = { icon = "🔧", color = "#FF00FF"},
+
+			},
+			colors = {
+				error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
+				warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
+				info = { "DiagnosticInfo", "#2563EB" },
+				hint = { "DiagnosticHint", "#10B981" },
+				default = { "Identifier", "#7C3AED" },
+				test = { "Identifier", "#FF00FF" }
+			},
+			highlight = {
+				multiline = true, -- enable multine todo comments
+			}
+
+		})
+
+		-- Add some keymaps for todo-comments
+		vim.keymap.set("n", "]t", function()
+			require("todo-comments").jump_next()
+		end, { desc = "Next todo comment" })
+
+		vim.keymap.set("n", "[t", function()
+			require("todo-comments").jump_prev()
+		end, { desc = "Previous todo comment" })
+
+		-- Search todo comments
+		vim.keymap.set("n", "<leader>cf", ":TodoTelescope<CR>",
+		{ desc = "Find todo comments", silent = true })
+	end,
+}
diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..b7fe8fb
--- /dev/null
+++ b/config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,31 @@
+return {
+	{
+		"nvim-treesitter/nvim-treesitter",
+		build = ":TSUpdate",
+		event = { "BufReadPost", "BufNewFile" },
+		lazy = false,
+
+		config = function()
+			require("nvim-treesitter.configs").setup({
+				ensure_installed = {
+					--"c",
+					"bash",
+					"markdown",
+					"markdown_inline",
+					"bibtex",
+					"latex",
+					"vimdoc",
+				},
+				--ignore_installed = { "c" },
+				sync_install = false,
+				auto_install = true,
+
+				highlight = {
+					enable = true,
+					additional_vim_regex_highlighting = false,
+					disable = { "c", "cpp", "h" }
+				}
+			})
+		end,
+	},
+}
diff --git a/config/nvim/lua/plugins/undotree.lua b/config/nvim/lua/plugins/undotree.lua
new file mode 100644
index 0000000..16d437e
--- /dev/null
+++ b/config/nvim/lua/plugins/undotree.lua
@@ -0,0 +1,10 @@
+return {
+	{
+		"mbbill/undotree",
+		lazy = false,
+
+		config = function()
+			vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
+		end
+	},
+}
-- 
cgit v1.2.3