my neovim config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: create the base

Stolen from: https://github.com/0x61nas/nixfiles/tree/63b0a0c2e881c531eb3dc47b1c84ace3ca42236f/dev/nvim

+3873
+15
init.lua
··· 1 + -- Global Settings And Remaps 2 + require("settings") 3 + require("keybinds") 4 + require("autocommands") 5 + if vim.g.neovide then require("neovide") end 6 + 7 + vim.loader.enable() 8 + 9 + require("core.opts") 10 + 11 + local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 12 + 13 + require("core.utils").bootstrap(lazy_path) 14 + 15 + return require("lazy").setup("plugins")
+80
lazy-lock.json
··· 1 + { 2 + "CamelCaseMotion": { "branch": "master", "commit": "de439d7c06cffd0839a29045a103fe4b44b15cdc" }, 3 + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, 4 + "CopilotChat.nvim": { "branch": "canary", "commit": "bddda2aaf66d34bf6dbae8af26166187a4343cca" }, 5 + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, 6 + "Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" }, 7 + "cmp-async-path": { "branch": "main", "commit": "03fac5dfd6f7880be2c059d58bebe007f0d6d8ee" }, 8 + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 9 + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, 10 + "cmp-git": { "branch": "main", "commit": "50d526dff0f6bc441b51fc269d9fdc99a50c76af" }, 11 + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, 12 + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, 13 + "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, 14 + "crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" }, 15 + "edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" }, 16 + "flit.nvim": { "branch": "main", "commit": "1ef72de6a02458d31b10039372c8a15ab8989e0d" }, 17 + "formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" }, 18 + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, 19 + "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, 20 + "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" }, 21 + "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, 22 + "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, 23 + "import-cost.nvim": { "branch": "main", "commit": "332b9870c7b22dcfb297a0be7d7a87c148181694" }, 24 + "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, 25 + "kulala.nvim": { "branch": "main", "commit": "2cdc64d6c494af3bbee2be44218cc105ad43e8f9" }, 26 + "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, 27 + "leap.nvim": { "branch": "main", "commit": "c6bfb191f1161fbabace1f36f578a20ac6c7642c" }, 28 + "lspsaga.nvim": { "branch": "main", "commit": "4ce44df854f447cf0a8972e5387b3aeb5efc798b" }, 29 + "lua-async-await": { "branch": "main", "commit": "652d94df34e97abe2d4a689edbc4270e7ead1a98" }, 30 + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, 31 + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, 32 + "neo-tree.nvim": { "branch": "main", "commit": "0774fa2085c62a147fcc7b56f0ac37053cc80217" }, 33 + "neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" }, 34 + "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, 35 + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, 36 + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, 37 + "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, 38 + "nvim-dap": { "branch": "master", "commit": "20a4859ebde1c9bc8e96f8cc11a20667e7fdd516" }, 39 + "nvim-java": { "branch": "main", "commit": "b3174e41ab51867123d8663eced53b33f1548522" }, 40 + "nvim-java-core": { "branch": "main", "commit": "5b03dca22fee76524a89e1c2dc1d73a9f0b1a3bb" }, 41 + "nvim-java-dap": { "branch": "main", "commit": "55f239532f7a3789d21ea68d1e795abc77484974" }, 42 + "nvim-java-refactor": { "branch": "main", "commit": "ea1420fed5463c9cc976c2b4175f434b3646f0f7" }, 43 + "nvim-java-test": { "branch": "main", "commit": "7f0f40e9c5b7eab5096d8bec6ac04251c6e81468" }, 44 + "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, 45 + "nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" }, 46 + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, 47 + "nvim-tree.lua": { "branch": "master", "commit": "cb57691536702ea479afd294657f6a589d0faae1" }, 48 + "nvim-treesitter": { "branch": "master", "commit": "4770d9a1a77b0cc2b723c646c3dbe43a9133e5db" }, 49 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, 50 + "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, 51 + "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, 52 + "octo.nvim": { "branch": "master", "commit": "fd50872494abd1cb580c604f1f52aae2257f7220" }, 53 + "outline.nvim": { "branch": "main", "commit": "3725c652f276b486a20423829af389d84a0c15fe" }, 54 + "pears.nvim": { "branch": "master", "commit": "14e6c47c74768b74190a529e41911ae838c45254" }, 55 + "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, 56 + "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, 57 + "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, 58 + "spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" }, 59 + "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, 60 + "tailwind-fold.nvim": { "branch": "main", "commit": "28a4190a97af3c5cc4885c228ec61e331d1296ea" }, 61 + "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, 62 + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, 63 + "telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" }, 64 + "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, 65 + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, 66 + "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, 67 + "vim-fish-syntax": { "branch": "master", "commit": "e229becbf4bbee21cc78cd2cf24f57112e33c02a" }, 68 + "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }, 69 + "vim-jsx-pretty": { "branch": "master", "commit": "6989f1663cc03d7da72b5ef1c03f87e6ddb70b41" }, 70 + "vim-just": { "branch": "main", "commit": "8ed1e472b72b739bd852d2b9a2d688b3da015cf5" }, 71 + "vim-markdown": { "branch": "master", "commit": "a657e697376909c41475a686eeef7fc7a4972d94" }, 72 + "vim-mustache-handlebars": { "branch": "master", "commit": "0153fe03a919add2d6cf2d41b2d5b6e1188bc0e0" }, 73 + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, 74 + "vim-svelte": { "branch": "main", "commit": "0e93ec53c3667753237282926fec626785622c1c" }, 75 + "vim-terraform": { "branch": "master", "commit": "24de93afb05078bac6a2e966402cc1f672277708" }, 76 + "vim-toml": { "branch": "main", "commit": "d36caa6b1cf508a4df1c691f915572fc02143258" }, 77 + "vimtex": { "branch": "master", "commit": "ec3b648af5092372ddd72404fb5db46b2f78beb5" }, 78 + "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, 79 + "yaml.nvim": { "branch": "main", "commit": "615985c1886644a4b2c0eebf985c1d1ae8257dd1" } 80 + }
+109
lua/autocommands.lua
··· 1 + local augroup = vim.api.nvim_create_augroup 2 + local autocmd = vim.api.nvim_create_autocmd 3 + 4 + -- groff 5 + local groff = augroup("groff", {}) 6 + autocmd("BufWritePost", { 7 + pattern = { "*.ms" }, 8 + command = "silent !pdfroff -ms % -e -t -p > %:r.pdf", 9 + group = groff, 10 + }) 11 + 12 + -- -- leap 13 + -- autocmd("ColorScheme", { 14 + -- pattern = {"*"}, 15 + -- callback = function() 16 + -- require('leap').init_highlight(true) 17 + -- end 18 + -- }) 19 + -- 20 + -- Intention 21 + local indention = augroup("indentaion", {}) 22 + autocmd("FileType", { 23 + pattern = { 24 + "html", 25 + "htmldjango", 26 + "css", 27 + "scss", 28 + "javascript", 29 + "javascriptreact", 30 + "typescript", 31 + "nix", 32 + "typescriptreact", 33 + "lua", 34 + "markdown", 35 + "jinja", 36 + "html.mustache", 37 + "html.handlebars", 38 + "prisma", 39 + }, 40 + command = "setlocal tabstop=2 softtabstop=2 shiftwidth=2", 41 + group = indention, 42 + }) 43 + 44 + -- Highlight yanked text 45 + local highlightYank = augroup("highlightYank", {}) 46 + autocmd("TextYankPost", { 47 + callback = function() vim.highlight.on_yank({ higroup = "Visual", timeout = 300 }) end, 48 + group = highlightYank, 49 + }) 50 + 51 + -- Center Screen On Insert 52 + local centerScreen = augroup("centerScreen", {}) 53 + autocmd("InsertEnter", { pattern = "*", command = "norm zz", group = centerScreen }) 54 + 55 + -- -- setting up the keyboard 56 + -- local keys = augroup("caps", {}) 57 + -- autocmd("VimEnter", {pattern = "*", command = "silent !setxkbmap -option caps:escape", group=keys}) 58 + -- autocmd("VimEnter", {pattern = "*", command = "silent !xset r rate 210 40", group=keys}) 59 + 60 + -- Opens PDF/Media files in PDFVIWER/BROWSER which is defined in the environment variables 61 + -- instead of viewing the binary in Neovim 62 + -- TODO: Add support for other file types & commands 63 + local openMediaFiles = augroup("openMediaFiles", {}) 64 + autocmd("BufReadPost", { 65 + pattern = { "*.pdf" }, 66 + callback = function() 67 + local command 68 + 69 + ---@diagnostic disable-next-line: param-type-mismatch 70 + if pcall(os.getenv("PDFVIWER")) then 71 + command = os.getenv("PDFVIWER") 72 + else 73 + command = os.getenv("BROWSER") 74 + end 75 + 76 + vim.fn.jobstart(string.format("%s '%s'", command, vim.fn.expand("%")), { detach = true }) 77 + vim.api.nvim_buf_delete(0, {}) 78 + end, 79 + group = openMediaFiles, 80 + }) 81 + 82 + autocmd("BufReadPost", { 83 + pattern = { "*.png", "*.webp", "*.jpg", "*.jpeg", "*.mp4" }, 84 + callback = function() 85 + local command = os.getenv("BROWSER") 86 + vim.fn.jobstart(string.format("%s '%s'", command, vim.fn.expand("%")), { detach = true }) 87 + vim.api.nvim_buf_delete(0, {}) 88 + end, 89 + group = openMediaFiles, 90 + }) 91 + 92 + -- Save/restore code folds 93 + local saveFolds = augroup("saveFolds", {}) 94 + autocmd("BufWritePost", { pattern = "?*", command = "silent mkview", group = saveFolds }) 95 + autocmd("BufReadPost", { pattern = "?*", command = "silent! loadview", group = saveFolds }) 96 + 97 + -- Clear Message Area (Not Working :/) 98 + -- vim.cmd([[ 99 + -- function! s:empty_message(timer) 100 + -- if mode() ==# 'n' 101 + -- echon '' 102 + -- endif 103 + -- endfunction 104 + 105 + -- augroup cmd_msg_cls 106 + -- autocmd! 107 + -- autocmd CmdlineLeave : call timer_start(5000, funcref('s:empty_message')) 108 + -- augroup END 109 + -- ]])
+445
lua/config/snippets.lua
··· 1 + local ls = require("luasnip") 2 + local fmt = require("luasnip.extras.fmt").fmt 3 + local rep = require("luasnip.extras").rep 4 + 5 + -- some shorthands... 6 + local snip = ls.snippet 7 + local node = ls.snippet_node 8 + local text = ls.text_node 9 + local insert = ls.insert_node 10 + local func = ls.function_node 11 + local choice = ls.choice_node 12 + local dynamicn = ls.dynamic_node 13 + 14 + ls.config.set_config({ 15 + history = true, 16 + -- treesitter-hl has 100, use something higher (default is 200). 17 + ext_base_prio = 200, 18 + -- minimal increase in priority. 19 + ext_prio_increase = 1, 20 + enable_autosnippets = false, 21 + store_selection_keys = "<TAB>", 22 + }) 23 + 24 + local function get_line_iter(str) 25 + if str:sub(-1) ~= "\n" then str = str .. "\n" end 26 + 27 + return str:gmatch("(.-)\n") 28 + end 29 + local function box_trim_lines(str) 30 + local new_str = "" 31 + 32 + for line in get_line_iter(str) do 33 + line = line:gsub("^%s+", "") 34 + line = string.gsub(line, "%s+$", "") 35 + new_str = new_str .. "\n" .. line 36 + end 37 + 38 + return new_str 39 + end 40 + 41 + local date = function() return { os.date("%Y-%m-%d") } end 42 + 43 + local filename = function() return { vim.fn.expand("%:p") } end 44 + 45 + -- Make sure to not pass an invalid command, as io.popen() may write over nvim-text. 46 + local function bash(_, _, command) 47 + local file = io.popen(command, "r") 48 + local res = {} 49 + for line in file:lines() do 50 + table.insert(res, line) 51 + end 52 + return res 53 + end 54 + 55 + local function get_port_snip(args) 56 + if #args < 1 and not args[1][1] then return node(nil, text("hello world")) end 57 + 58 + local type = args[1][1] 59 + local indent = " " 60 + 61 + if type == "NodePort" or type == "LoadBalancer" then 62 + return node( 63 + nil, 64 + fmt( 65 + box_trim_lines([[ 66 + - port: {} 67 + {}targetPort: {} 68 + {}nodePort: {} 69 + ]]), 70 + { 71 + insert(1, "30000"), 72 + indent, 73 + insert(2, "80"), 74 + indent, 75 + insert(3, "30000"), 76 + } 77 + ) 78 + ) 79 + end 80 + 81 + if type == "ClusterIP" then 82 + return node( 83 + nil, 84 + fmt( 85 + [[ 86 + - port: {} 87 + {}targetPort: {} 88 + ]], 89 + { 90 + insert(1, "30000"), 91 + indent, 92 + insert(2, "80"), 93 + } 94 + ) 95 + ) 96 + end 97 + end 98 + 99 + ls.add_snippets(nil, { 100 + all = { 101 + snip({ 102 + trig = "date", 103 + namr = "Date", 104 + dscr = "Date in the form of YYYY-MM-DD", 105 + }, { 106 + func(date, {}), 107 + }), 108 + snip({ 109 + trig = "pwd", 110 + namr = "PWD", 111 + dscr = "Path to current working directory", 112 + }, { 113 + func(bash, {}, { user_args = { "pwd" } }), 114 + }), 115 + snip({ 116 + trig = "filename", 117 + namr = "Filename", 118 + dscr = "Absolute path to file", 119 + }, { 120 + func(filename, {}), 121 + }), 122 + snip({ 123 + trig = "signature", 124 + namr = "Signature", 125 + dscr = "Name and Surname", 126 + }, { 127 + text("Anas Elgarhy"), 128 + insert(0), 129 + }), 130 + }, 131 + sh = { 132 + snip("shebang", { 133 + text({ "#!/bin/sh", "" }), 134 + insert(0), 135 + }), 136 + }, 137 + python = { 138 + snip("shebang", { 139 + text({ "#!/usr/bin/env python", "" }), 140 + insert(0), 141 + }), 142 + }, 143 + lua = { 144 + snip("shebang", { 145 + text({ "#!/usr/bin/lua", "", "" }), 146 + insert(0), 147 + }), 148 + snip("req", { 149 + text("require('"), 150 + insert(1, "Module-name"), 151 + text("')"), 152 + insert(0), 153 + }), 154 + snip("func", { 155 + text("function("), 156 + insert(1, "Arguments"), 157 + text({ ")", "\t" }), 158 + insert(2), 159 + text({ "", "end", "" }), 160 + insert(0), 161 + }), 162 + snip("forp", { 163 + text("for "), 164 + insert(1, "k"), 165 + text(", "), 166 + insert(2, "v"), 167 + text(" in pairs("), 168 + insert(3, "table"), 169 + text({ ") do", "\t" }), 170 + insert(4), 171 + text({ "", "end", "" }), 172 + insert(0), 173 + }), 174 + snip("fori", { 175 + text("for "), 176 + insert(1, "k"), 177 + text(", "), 178 + insert(2, "v"), 179 + text(" in ipairs("), 180 + insert(3, "table"), 181 + text({ ") do", "\t" }), 182 + insert(4), 183 + text({ "", "end", "" }), 184 + insert(0), 185 + }), 186 + snip("if", { 187 + text("if "), 188 + insert(1), 189 + text({ " then", "\t" }), 190 + insert(2), 191 + text({ "", "end", "" }), 192 + insert(0), 193 + }), 194 + snip("M", { 195 + text({ "local M = {}", "", "" }), 196 + insert(0), 197 + text({ "", "", "return M" }), 198 + }), 199 + }, 200 + markdown = { 201 + -- Select link, press C-s, enter link to receive snippet 202 + snip({ 203 + trig = "link", 204 + namr = "markdown_link", 205 + dscr = "Create markdown link [txt](url)", 206 + }, { 207 + text("["), 208 + insert(1), 209 + text("]("), 210 + func(function(_, snip) return snip.env.TM_SELECTED_TEXT[1] or {} end, {}), 211 + text(")"), 212 + insert(0), 213 + }), 214 + snip({ 215 + trig = "codewrap", 216 + namr = "markdown_code_wrap", 217 + dscr = "Create markdown code block from existing text", 218 + }, { 219 + text("``` "), 220 + insert(1, "Language"), 221 + text({ "", "" }), 222 + func(function(_, snip) 223 + local tmp = {} 224 + tmp = snip.env.TM_SELECTED_TEXT 225 + tmp[0] = nil 226 + return tmp or {} 227 + end, {}), 228 + text({ "", "```", "" }), 229 + insert(0), 230 + }), 231 + snip({ 232 + trig = "codeempty", 233 + namr = "markdown_code_empty", 234 + dscr = "Create empty markdown code block", 235 + }, { 236 + text("``` "), 237 + insert(1, "Language"), 238 + text({ "", "" }), 239 + insert(2, "Content"), 240 + text({ "", "```", "" }), 241 + insert(0), 242 + }), 243 + snip({ 244 + trig = "meta", 245 + namr = "Metadata", 246 + dscr = "Yaml metadata format for markdown", 247 + }, { 248 + text({ "---", "title: " }), 249 + insert(1, "note_title"), 250 + text({ "", "author: " }), 251 + insert(2, "author"), 252 + text({ "", "date: " }), 253 + func(date, {}), 254 + text({ "", "cathegories: [" }), 255 + insert(3, ""), 256 + text({ "]", "lastmod: " }), 257 + func(date, {}), 258 + text({ "", "tags: [" }), 259 + insert(4), 260 + text({ "]", "comments: true", "---", "" }), 261 + insert(0), 262 + }), 263 + }, 264 + go = { 265 + snip("test", { 266 + text("func "), 267 + insert(1, "Name"), 268 + text("(t *testing.T)"), 269 + text({ " {", "" }), 270 + text("\t"), 271 + insert(0), 272 + text({ "", "}" }), 273 + }), 274 + snip("typei", { 275 + text("type "), 276 + insert(1, "Name"), 277 + text({ " interface {", "" }), 278 + text("\t"), 279 + insert(0), 280 + text({ "", "}" }), 281 + }), 282 + snip("types", { 283 + text("type "), 284 + insert(1, "Name"), 285 + text({ " struct {", "" }), 286 + text("\t"), 287 + insert(0), 288 + text({ "", "}" }), 289 + }), 290 + snip("func", { 291 + text("func "), 292 + insert(1, "Name"), 293 + text("("), 294 + insert(2), 295 + text(")"), 296 + insert(3), 297 + text({ " {", "" }), 298 + text("\t"), 299 + insert(0), 300 + text({ "", "}" }), 301 + }), 302 + snip("if", { 303 + text("if "), 304 + insert(1, "true"), 305 + text({ " {", "" }), 306 + text("\t"), 307 + insert(0), 308 + text({ "", "}" }), 309 + }), 310 + 311 + snip("fori", { 312 + text("for "), 313 + insert(1, "i := 0"), 314 + text(";"), 315 + insert(2, "i < 10"), 316 + text(";"), 317 + insert(3, "i++"), 318 + text({ " {", "" }), 319 + text("\t"), 320 + insert(0), 321 + text({ "", "}" }), 322 + }), 323 + snip("forr", { 324 + text("for "), 325 + insert(1, "k, v"), 326 + text(" := range "), 327 + insert(2, "expr"), 328 + text({ " {", "" }), 329 + text("\t"), 330 + insert(0), 331 + text({ "", "}" }), 332 + }), 333 + }, 334 + yaml = { 335 + snip( 336 + { 337 + trig = "pod", 338 + namr = "k8s Pod", 339 + dscr = "Kubernetes Pod definition", 340 + }, 341 + fmt( 342 + [[ 343 + apiVersion: v1 344 + kind: Pod 345 + metadata: 346 + name: {} 347 + labels: 348 + {}: {} 349 + spec: 350 + containers: 351 + - name: {} 352 + image: {}:{} 353 + ports: 354 + - containerPort: {} 355 + ]], 356 + { 357 + insert(1, "nginx"), 358 + insert(2, "run"), 359 + insert(3, "nginx"), 360 + insert(4, "nginx"), 361 + insert(5, "nginx"), 362 + insert(6, "latest"), 363 + insert(7, "80"), 364 + } 365 + ) 366 + ), 367 + snip( 368 + { 369 + trig = "deploy", 370 + namr = "k8s Deployment", 371 + dscr = "Kubernetes Deployment definition", 372 + }, 373 + fmt( 374 + [[ 375 + apiVersion: apps/v1 376 + kind: Deployment 377 + metadata: 378 + name: {} 379 + labels: 380 + {} 381 + spec: 382 + replicas: {} 383 + selector: 384 + matchLabels: 385 + {} 386 + template: 387 + metadata: 388 + labels: 389 + {} 390 + spec: 391 + containers: 392 + - name: {} 393 + image: {}:{} 394 + ports: 395 + - containerPort: {} 396 + ]], 397 + { 398 + insert(1, "name"), 399 + insert(2, "label"), 400 + insert(3, "1"), 401 + insert(4, "label"), 402 + rep(4), 403 + insert(5, "container_name"), 404 + insert(6, "image"), 405 + insert(7, "1.0"), 406 + insert(8, "80"), 407 + } 408 + ) 409 + ), 410 + snip( 411 + { 412 + trig = "service", 413 + namr = "k8s Service", 414 + dscr = "Kubernetes Service definition", 415 + }, 416 + fmt( 417 + [[ 418 + apiVersion: v1 419 + kind: Service 420 + metadata: 421 + name: {} 422 + labels: 423 + {} 424 + spec: 425 + selector: 426 + {} 427 + type: {} 428 + ports: 429 + {} 430 + ]], 431 + { 432 + insert(1, "name"), 433 + insert(2), 434 + insert(3), 435 + choice(4, { 436 + text("ClusterIP"), 437 + text("NodePort"), 438 + text("LoadBalancer"), 439 + }), 440 + dynamicn(5, get_port_snip, { 4 }), 441 + } 442 + ) 443 + ), 444 + }, 445 + })
+64
lua/core/opts.lua
··· 1 + -- I'm lazy 2 + local opt = vim.opt 3 + 4 + -- Nice Number Line 5 + opt.relativenumber = true 6 + opt.number = true 7 + 8 + -- Tabs & Spaces 9 + opt.expandtab = false 10 + opt.tabstop = 2 11 + opt.softtabstop = 2 12 + opt.shiftwidth = 2 13 + opt.smartindent = true 14 + opt.autoindent = true 15 + 16 + -- Searching 17 + opt.ignorecase = true 18 + opt.smartcase = true 19 + opt.hlsearch = true 20 + opt.incsearch = true 21 + 22 + -- Column Settings 23 + opt.signcolumn = "yes" 24 + opt.colorcolumn = "120" 25 + opt.wrap = false 26 + 27 + -- Cursor Settings 28 + opt.cursorline = true 29 + -- opt.guicursor = "n-v-c-sm:block,ci-ve:ver25,r-cr-o:hor20,i:underline" .. 30 + -- ",a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" .. 31 + -- ",sm:block-blinkwait175-blinkoff150-blinkon175" 32 + 33 + -- Window Settings 34 + opt.splitbelow = true 35 + opt.splitright = true 36 + opt.lazyredraw = true 37 + opt.showtabline = 2 38 + 39 + -- Spelling 40 + opt.spell = true 41 + opt.spelloptions = "camel" 42 + 43 + -- Other 44 + opt.mouse = "a" 45 + opt.showmode = false 46 + opt.termguicolors = true 47 + opt.hidden = true 48 + -- opt.clipboard = "unnamedplus" 49 + opt.formatoptions = "cjql" 50 + opt.laststatus = 3 51 + opt.completeopt = { "menu", "menuone", "preview" } 52 + opt.conceallevel = 2 53 + opt.concealcursor = "" 54 + -- opt.updatetime = 100 55 + 56 + -- Backup -- I have power issues :/ 57 + opt.backup = true 58 + opt.swapfile = true 59 + opt.undodir = os.getenv("HOME") .. "/.cache/undodir" 60 + opt.undofile = true 61 + 62 + -- arabic support 63 + opt.encoding = "utf-8" 64 + opt.termbidi = true
+53
lua/core/utils.lua
··· 1 + local M = {} 2 + 3 + M.bootstrap = function(lazy_path) 4 + if not vim.loop.fs_stat(lazy_path) then 5 + vim.fn.system({ 6 + "git", 7 + "clone", 8 + "--filter=blob:none", 9 + "https://github.com/folke/lazy.nvim.git", 10 + "--branch=stable", -- latest stable release 11 + lazy_path, 12 + }) 13 + end 14 + vim.opt.rtp:prepend(lazy_path) 15 + end 16 + 17 + local cmds = { "nu!", "rnu!", "nonu!" } 18 + local current_index = 1 19 + 20 + function M.toggle_numbering() 21 + current_index = current_index % #cmds + 1 22 + vim.cmd("set " .. cmds[current_index]) 23 + local signcolumn_setting = "auto" 24 + if cmds[current_index] == "nonu!" then signcolumn_setting = "yes:4" end 25 + vim.opt.signcolumn = signcolumn_setting 26 + end 27 + 28 + --- Toggle inlay hints 29 + function M.toggle_inlay_hint() 30 + local is_enabled = vim.lsp.inlay_hint.is_enabled() 31 + vim.lsp.inlay_hint.enable(not is_enabled) 32 + end 33 + 34 + -- Custom formatting function for Lua 35 + function M.custom_lua_format() 36 + local buf = vim.api.nvim_get_current_buf() 37 + local filepath = vim.api.nvim_buf_get_name(buf) 38 + 39 + -- Save the buffer before formatting 40 + vim.api.nvim_command("write") 41 + 42 + -- Execute lua-format command 43 + local cmd = string.format( 44 + "lua-format -i --indent-width=2 --no-use-tab --keep-simple-function-one-line --keep-simple-control-block-one-line --single-quote-to-double-quote --spaces-inside-table-braces --spaces-around-equals-in-field %s", 45 + filepath 46 + ) 47 + os.execute(cmd) 48 + 49 + -- Reload the buffer to reflect the changes 50 + vim.api.nvim_command("edit") 51 + end 52 + 53 + return M
+102
lua/keybinds.lua
··· 1 + local map = vim.keymap.set 2 + local cmd = vim.cmd 3 + 4 + -- Easy wq 5 + cmd(":command! WQ wq") 6 + cmd(":command! WQ wq") 7 + cmd(":command! Wq wq") 8 + cmd(":command! Wqa xall") 9 + cmd(":command! Waq xall") 10 + cmd(":command! WA wa") 11 + cmd(":command! Wa wa") 12 + cmd(":command! W w") 13 + cmd(":command! Q q") 14 + 15 + -- Set up <Space> to be the leader key 16 + map("n", "<Space>", "<NOP>", { noremap = true, silent = true }) 17 + vim.g.mapleader = " " 18 + 19 + -- Easy : 20 + map("n", ";", ":", { noremap = true }) 21 + 22 + -- Easy Resize 23 + map("n", "<M-c>", ":vertical resize -2<CR>", { noremap = true }) 24 + map("n", "<M-k>", ":resize +2<CR>", { noremap = true }) 25 + -- map("n", "<M-k>", ":resize -2<CR>", {noremap = true}) 26 + map("n", "<M-d>", ":vertical resize +2<CR>", { noremap = true }) 27 + 28 + -- Easy Capitalization 29 + map("n", "<F7>", "<Esc>V:s/\\v<(.)(\\w*)/\\u\\1\\L\\2/g<CR>:noh<CR>", {}) 30 + map("v", "<F7>", "<Esc>V:s/\\v<(.)(\\w*)/\\u\\1\\L\\2/g<CR>:noh<CR>", {}) 31 + map("i", "<F7>", "<Esc>V:s/\\v<(.)(\\w*)/\\u\\1\\L\\2/g<CR>:noh<CR>i", {}) 32 + 33 + -- The Best Thing In vscode But Better 34 + map("v", "U", ":m '<-2<CR>gv=gv") 35 + map("v", "Y", ":m '>+1<CR>gv=gv") 36 + 37 + -- Replace The Current Word 38 + -- map.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) 39 + 40 + -- The BEST MAP 41 + map("x", "<Leader>p", '"_dP') 42 + 43 + -- STOP USING THE ARROW KEYS !! 44 + -- map('n', '<Up>', [[:echoerr "Do not do that!!"<cr>]], {noremap = true}) 45 + -- map('n', '<Down>', [[:echoerr "Do not do that!!"<cr>]], {noremap = true}) 46 + -- map('n', '<Left>', [[:echoerr "Do not do that!!"<cr>]], {noremap = true}) 47 + -- map('n', '<Right>', [[:echoerr "Do not do that!!"<cr>]], {noremap = true}) 48 + 49 + -- I use Dvorak layout, so.. no hjkl :| 50 + -- Instead, I will use -kcd 51 + local modes = { "n", "v", "s", "o" } -- Normal, visual, select, operator-pending 52 + local keys = { { "h", "-" }, { "j", "c" }, { "l", "d" } } 53 + for _, mode in ipairs(modes) do 54 + for _, key in ipairs(keys) do 55 + map(mode, key[1], key[2], { noremap = true }) 56 + map(mode, key[2], key[1], { noremap = true }) 57 + end 58 + end 59 + 60 + -- Keybinds Reloading Init Files 61 + map("n", "<Leader>vr", "<Cmd>luafile $MYVIMRC<CR>", { noremap = true }) 62 + 63 + -- Deleting Words With <C-Bs> 64 + map("i", "", "<C-w>", { noremap = true, silent = true }) 65 + map("c", "", "<C-w>", { noremap = true, silent = true }) 66 + map("i", "<C-BS>", "<C-w>", { noremap = true, silent = true }) 67 + map("c", "<C-BS>", "<C-w>", { noremap = true }) 68 + 69 + -- Better Indent/Unintend Lines And Blocks Of Text 70 + map("n", ">", ">>", { noremap = true, silent = true }) 71 + map("n", "<", "<<", { noremap = true, silent = true }) 72 + map("v", ">", ">gv", { noremap = true, silent = true }) 73 + map("v", "<", "<gv", { noremap = true, silent = true }) 74 + 75 + -- Make Y Actually Make Sense 76 + map("n", "Y", "yg$", { noremap = true, silent = true }) 77 + 78 + -- Buffer Navigation 79 + map("n", "<Leader><Tab>", ":bn<CR>", { noremap = true, silent = true }) 80 + map("n", "<Leader><S-Tab>", ":bp<CR>", { noremap = true, silent = true }) 81 + 82 + -- Buffer Deletion 83 + map("n", "<Leader>bd", ":bd<CR>", { noremap = true, silent = true }) 84 + 85 + -- Window Navigation 86 + map("n", "<C-h>", "<C-w>h", { noremap = true, silent = true }) 87 + map("n", "<C-j>", "<C-w>j", { noremap = true, silent = true }) 88 + map("n", "<C-k>", "<C-w>k", { noremap = true, silent = true }) 89 + map("n", "<C-l>", "<C-w>l", { noremap = true, silent = true }) 90 + 91 + -- Ctrl + W Close The Window 92 + -- map('n', '<C-w>', ':bd!<CR>', { noremap = true, silent = true }) 93 + -- map('i', '<C-w>', ':bd!<CR>', { noremap = true, silent = true }) 94 + 95 + -- split 96 + map("n", "<leader>wv", ":vsplit<CR>", { noremap = true }) 97 + map("n", "<leader>ws", ":split<CR>", { noremap = true }) 98 + 99 + -- Other 100 + map("n", "<Leader>l", ":noh<CR>", { noremap = true }) -- Clear highlights 101 + map("n", "<leader>o", ":pu =''<CR>", { noremap = true }) -- Insert a newline and back to normal mode 102 + map("n", "<leader>O", ":pu! =''<CR>", { noremap = true }) -- Insert a newline and back to normal mode
+1
lua/neovide.lua
··· 1 + vim.o.guifont = "JetBrains_Mono,Noto_Color_Emoji,Noto_Kufi_Arabic:h10"
+15
lua/plugins/camelcase-motion.lua
··· 1 + return { 2 + "bkad/CamelCaseMotion", 3 + lazy = false, 4 + keys = { 5 + { "w", "<Plug>CamelCaseMotion_w", { silent = true }, desc = "", mode = "n" }, 6 + { "b", "<Plug>CamelCaseMotion_b", { silent = true }, desc = "", mode = "n" }, 7 + { "e", "<Plug>CamelCaseMotion_e", { silent = true }, desc = "", mode = "n" }, 8 + { "ge", "<Plug>CamelCaseMotion_ge", { silent = true }, desc = "", mode = "n" }, 9 + 10 + { "w", "<Plug>CamelCaseMotion_w", { silent = true }, desc = "", mode = "v" }, 11 + { "b", "<Plug>CamelCaseMotion_b", { silent = true }, desc = "", mode = "v" }, 12 + { "ge", "<Plug>CamelCaseMotion_ge", { silent = true }, desc = "", mode = "v" }, 13 + { "e", "<Plug>CamelCaseMotion_e", { silent = true }, desc = "", mode = "v" }, 14 + }, 15 + }
+112
lua/plugins/cmp-git.lua
··· 1 + return { 2 + "petertriho/cmp-git", 3 + dependencies = { 4 + "nvim-lua/plenary.nvim", 5 + }, 6 + init = function() table.insert(require("cmp").get_config().sources, { name = "git" }) end, 7 + config = function() 8 + local format = require("cmp_git.format") 9 + local sort = require("cmp_git.sort") 10 + 11 + require("cmp_git").setup({ 12 + -- defaults 13 + filetypes = { "gitcommit", "octo" }, 14 + remotes = { "upstream", "origin" }, -- in order of most to least prioritized 15 + enableRemoteUrlRewrites = false, -- enable git url rewrites, see https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf 16 + git = { 17 + commits = { 18 + limit = 100, 19 + sort_by = sort.git.commits, 20 + format = format.git.commits, 21 + }, 22 + }, 23 + github = { 24 + hosts = {}, -- list of private instances of github 25 + issues = { 26 + fields = { "title", "number", "body", "updatedAt", "state" }, 27 + filter = "all", -- assigned, created, mentioned, subscribed, all, repos 28 + limit = 100, 29 + state = "open", -- open, closed, all 30 + sort_by = sort.github.issues, 31 + format = format.github.issues, 32 + }, 33 + mentions = { 34 + limit = 100, 35 + sort_by = sort.github.mentions, 36 + format = format.github.mentions, 37 + }, 38 + pull_requests = { 39 + fields = { "title", "number", "body", "updatedAt", "state" }, 40 + limit = 100, 41 + state = "open", -- open, closed, merged, all 42 + sort_by = sort.github.pull_requests, 43 + format = format.github.pull_requests, 44 + }, 45 + }, 46 + gitlab = { 47 + hosts = {}, -- list of private instances of gitlab 48 + issues = { 49 + limit = 100, 50 + state = "opened", -- opened, closed, all 51 + sort_by = sort.gitlab.issues, 52 + format = format.gitlab.issues, 53 + }, 54 + mentions = { 55 + limit = 100, 56 + sort_by = sort.gitlab.mentions, 57 + format = format.gitlab.mentions, 58 + }, 59 + merge_requests = { 60 + limit = 100, 61 + state = "opened", -- opened, closed, locked, merged 62 + sort_by = sort.gitlab.merge_requests, 63 + format = format.gitlab.merge_requests, 64 + }, 65 + }, 66 + trigger_actions = { 67 + { 68 + debug_name = "git_commits", 69 + trigger_character = ":", 70 + action = function(sources, trigger_char, callback, params, git_info) 71 + return sources.git:get_commits(callback, params, trigger_char) 72 + end, 73 + }, 74 + { 75 + debug_name = "gitlab_issues", 76 + trigger_character = "#", 77 + action = function(sources, trigger_char, callback, params, git_info) 78 + return sources.gitlab:get_issues(callback, git_info, trigger_char) 79 + end, 80 + }, 81 + { 82 + debug_name = "gitlab_mentions", 83 + trigger_character = "@", 84 + action = function(sources, trigger_char, callback, params, git_info) 85 + return sources.gitlab:get_mentions(callback, git_info, trigger_char) 86 + end, 87 + }, 88 + { 89 + debug_name = "gitlab_mrs", 90 + trigger_character = "!", 91 + action = function(sources, trigger_char, callback, params, git_info) 92 + return sources.gitlab:get_merge_requests(callback, git_info, trigger_char) 93 + end, 94 + }, 95 + { 96 + debug_name = "github_issues_and_pr", 97 + trigger_character = "#", 98 + action = function(sources, trigger_char, callback, params, git_info) 99 + return sources.github:get_issues_and_prs(callback, git_info, trigger_char) 100 + end, 101 + }, 102 + { 103 + debug_name = "github_mentions", 104 + trigger_character = "@", 105 + action = function(sources, trigger_char, callback, params, git_info) 106 + return sources.github:get_mentions(callback, git_info, trigger_char) 107 + end, 108 + }, 109 + }, 110 + }) 111 + end, 112 + }
+114
lua/plugins/cmp.lua
··· 1 + return { 2 + "hrsh7th/nvim-cmp", 3 + dependencies = { 4 + "hrsh7th/cmp-nvim-lsp", 5 + "hrsh7th/cmp-buffer", 6 + -- 'hrsh7th/cmp-path', 7 + "https://codeberg.org/FelipeLema/cmp-async-path", 8 + "hrsh7th/cmp-cmdline", 9 + "L3MON4D3/LuaSnip", 10 + "saadparwaiz1/cmp_luasnip", 11 + }, 12 + event = { "LspAttach", "InsertCharPre" }, 13 + config = function() 14 + local cmp = require("cmp") 15 + cmp.setup({ 16 + snippet = { 17 + expand = function(args) require("luasnip").lsp_expand(args.body) end, 18 + }, 19 + mapping = cmp.mapping.preset.insert({ 20 + ["<Tab>"] = cmp.mapping(function(fallback) 21 + if cmp.visible() then 22 + cmp.select_next_item() 23 + else 24 + fallback() 25 + end 26 + end, { "i", "s" }), 27 + ["<S-Tab>"] = cmp.mapping(function(fallback) 28 + if cmp.visible() then 29 + cmp.select_prev_item() 30 + else 31 + fallback() 32 + end 33 + end, { "i", "s" }), 34 + ["<C-;>"] = cmp.mapping.abort(), 35 + ["<C-k>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 36 + 37 + ["<C-g>"] = cmp.mapping(function() 38 + if not cmp.visible() then cmp.complete() end 39 + cmp.abort() 40 + end, { "i", "s" }), 41 + ["<c-y>"] = cmp.mapping(function(fallback) 42 + if not cmp.visible() then fallback() end 43 + cmp.scroll_docs(-1) 44 + end, { "i", "s" }), 45 + ["<c-e>"] = cmp.mapping(function(fallback) 46 + if not cmp.visible() then fallback() end 47 + cmp.scroll_docs(1) 48 + end, { "i", "s" }), 49 + ["<c-p>"] = cmp.mapping(function(fallback) 50 + if not cmp.visible() then fallback() end 51 + cmp.select_prev_item() 52 + end, { "i", "s" }), 53 + ["<c-n>"] = cmp.mapping(function(fallback) 54 + if not cmp.visible() then fallback() end 55 + cmp.select_next_item() 56 + end, { "i", "s" }), 57 + ["<cr>"] = cmp.mapping(function(fallback) 58 + if cmp.get_selected_entry() == nil then fallback() end 59 + cmp.confirm() 60 + end, { "i", "s" }), 61 + }), 62 + 63 + sources = cmp.config.sources({ 64 + { name = "async_path", max_item_count = 20 }, 65 + { 66 + name = "nvim_lsp", 67 + max_item_count = 80, 68 + }, 69 + { 70 + name = "buffer", 71 + max_item_count = 20, 72 + option = { 73 + get_bufnrs = function() 74 + return vim.tbl_map(function(win) return vim.api.nvim_win_get_buf(win) end, vim.api.nvim_list_wins()) 75 + end, 76 + }, 77 + }, 78 + { name = "luasnip" }, -- For luasnip users. 79 + -- { name = 'ultisnips' }, -- For ultisnips users. 80 + -- { name = 'snippy' }, -- For snippy users. 81 + -- { name = 'crates' }, 82 + }), 83 + -- eof 84 + }) 85 + 86 + -- Set configuration for specific filetype. 87 + cmp.setup.filetype("gitcommit", { 88 + sources = cmp.config.sources({ 89 + { name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). 90 + }, { 91 + { name = "buffer" }, 92 + }), 93 + }) 94 + 95 + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). 96 + cmp.setup.cmdline({ "/", "?" }, { 97 + mapping = cmp.mapping.preset.cmdline(), 98 + sources = { 99 + { name = "buffer" }, 100 + }, 101 + }) 102 + 103 + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 104 + cmp.setup.cmdline(":", { 105 + mapping = cmp.mapping.preset.cmdline(), 106 + sources = cmp.config.sources({ 107 + { name = "path" }, 108 + }, { 109 + { name = "cmdline" }, 110 + }), 111 + matching = { disallow_symbol_nonprefix_matching = false }, 112 + }) 113 + end, 114 + }
+56
lua/plugins/comment.lua
··· 1 + return { 2 + "numToStr/Comment.nvim", 3 + init = function() require("ts_context_commentstring").setup({}) end, 4 + config = function() 5 + require("Comment").setup({ 6 + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), 7 + }) 8 + end, 9 + lazy = true, 10 + event = "VeryLazy", 11 + keys = { 12 + { 13 + "<C-_>", 14 + ":lua require('Comment.api').toggle.linewise.current()<CR>", 15 + { noremap = true, silent = true }, 16 + desc = "", 17 + mode = "n", 18 + }, 19 + { 20 + "<C-_>", 21 + '<ESC><CMD>lua require("Comment.api").toggle.linewise(vim.fn.visualmode())<CR>', 22 + { noremap = true, silent = true }, 23 + desc = "", 24 + mode = "x", 25 + }, 26 + { 27 + "<C-_>", 28 + ":lua require('Comment.api').toggle.linewise.current() <CR>", 29 + { noremap = true, silent = true }, 30 + desc = "", 31 + mode = "i", 32 + }, -- same as above but fixes some weird issues 33 + { 34 + "<C-/>", 35 + ":lua require('Comment.api').toggle.linewise.current()<CR>", 36 + { noremap = true, silent = true }, 37 + desc = "", 38 + mode = "n", 39 + }, 40 + { 41 + "<C-/>", 42 + '<ESC><CMD>lua require("Comment.api").toggle.linewise(vim.fn.visualmode())<CR>', 43 + { noremap = true, silent = true }, 44 + desc = "", 45 + mode = "x", 46 + }, 47 + { 48 + "<C-/>", 49 + ":lua require('Comment.api').toggle.linewise.current() <CR>", 50 + { noremap = true, silent = true }, 51 + desc = "", 52 + mode = "i", 53 + }, 54 + }, 55 + dependencies = { "JoosepAlviste/nvim-ts-context-commentstring" }, 56 + }
+81
lua/plugins/conform.lua
··· 1 + return { 2 + "stevearc/conform.nvim", 3 + event = { "BufWritePre" }, 4 + cmd = { "ConformInfo" }, 5 + keys = { 6 + { 7 + "<leader>cf", 8 + function() require("conform").format({ async = true }) end, 9 + mode = "", 10 + desc = "Format buffer", 11 + }, 12 + }, 13 + opts = { 14 + -- Map of filetype to formatters 15 + formatters_by_ft = { 16 + lua = { "stylua" }, 17 + -- Conform will run multiple formatters sequentially 18 + go = { "goimports", "gofmt" }, 19 + -- You can also customize some of the format options for the filetype 20 + rust = { "rustfmt", lsp_format = "fallback" }, 21 + -- You can use a function here to determine the formatters dynamically 22 + python = function(bufnr) 23 + if require("conform").get_formatter_info("ruff_format", bufnr).available then 24 + return { "ruff_format" } 25 + else 26 + return { "isort", "black" } 27 + end 28 + end, 29 + nix = { "nixfmt" }, 30 + ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, 31 + ["markdown.mdx"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, 32 + -- Use the "*" filetype to run formatters on all filetypes. 33 + -- ["*"] = { "codespell" }, 34 + -- Use the "_" filetype to run formatters on filetypes that don't 35 + -- have other format 36 + ["_"] = { "trim_whitespace" }, 37 + }, 38 + -- Set this to change the default values when calling conform.format() 39 + -- This will also affect the default values for format_on_save/format_after_save 40 + default_format_opts = { lsp_format = "fallback" }, 41 + -- If this is set, Conform will run the formatter asynchronously after save. 42 + -- It will pass the table to conform.format(). 43 + -- This can also be a function that returns the table. 44 + format_after_save = { lsp_format = "fallback" }, 45 + -- Set the log level. Use `:ConformInfo` to see the location of the log file. 46 + log_level = vim.log.levels.ERROR, 47 + -- Conform will notify you when a formatter errors 48 + notify_on_error = true, 49 + -- Conform will notify you when no formatters are available for the buffer 50 + notify_no_formatters = true, 51 + -- Custom formatters and overrides for built-in formatters 52 + formatters = { 53 + stylua = { 54 + prepend_args = { 55 + "--call-parentheses", 56 + "Always", 57 + "--collapse-simple-statement", 58 + "Always", 59 + "--indent-type", 60 + "Tabs", 61 + "--indent-width", 62 + "2", 63 + "--sort-requires", 64 + }, 65 + }, 66 + ["markdown-toc"] = { 67 + condition = function(_, ctx) 68 + for _, line in ipairs(vim.api.nvim_buf_get_lines(ctx.buf, 0, -1, false)) do 69 + if line:find("<!%-%- toc %-%->") then return true end 70 + end 71 + end, 72 + }, 73 + ["markdownlint-cli2"] = { 74 + condition = function(_, ctx) 75 + local diag = vim.tbl_filter(function(d) return d.source == "markdownlint" end, vim.diagnostic.get(ctx.buf)) 76 + return #diag > 0 77 + end, 78 + }, 79 + }, 80 + }, 81 + }
+241
lua/plugins/copilot-chat.lua
··· 1 + local prompts = { 2 + -- Code related prompts 3 + Explain = "Please explain how the following code works.", 4 + Review = "Please review the following code and provide suggestions for improvement.", 5 + Tests = "Please explain how the selected code works, then generate unit tests for it.", 6 + Refactor = "Please refactor the following code to improve its clarity and readability.", 7 + FixCode = "Please fix the following code to make it work as intended.", 8 + FixError = "Please explain the error in the following text and provide a solution.", 9 + BetterNamings = "Please provide better names for the following variables and functions.", 10 + Documentation = "Please provide documentation for the following code.", 11 + SwaggerApiDocs = "Please provide documentation for the following API using Swagger.", 12 + SwaggerJsDocs = "Please write JSDoc for the following API using Swagger.", 13 + -- Text related prompts 14 + Summarize = "Please summarize the following text.", 15 + Spelling = "Please correct any grammar and spelling errors in the following text.", 16 + Wording = "Please improve the grammar and wording of the following text.", 17 + Concise = "Please rewrite the following text to make it more concise.", 18 + } 19 + 20 + return { 21 + { 22 + "CopilotC-Nvim/CopilotChat.nvim", 23 + version = "v2.13.0", 24 + -- branch = "canary", -- Use the canary branch if you want to test the latest features but it might be unstable 25 + -- Do not use branch and version together, either use branch or version 26 + dependencies = { 27 + { "nvim-telescope/telescope.nvim" }, -- Use telescope for help actions 28 + { "nvim-lua/plenary.nvim" }, 29 + }, 30 + opts = { 31 + question_header = "## User ", 32 + answer_header = "## Copilot ", 33 + error_header = "## Error ", 34 + prompts = prompts, 35 + auto_follow_cursor = false, -- Don't follow the cursor after getting response 36 + show_help = false, -- Show help in virtual text, set to true if that's 1st time using Copilot Chat 37 + mappings = { 38 + -- Use tab for completion 39 + complete = { 40 + detail = "Use @<Tab> or /<Tab> for options.", 41 + insert = "<Tab>", 42 + }, 43 + -- Close the chat 44 + close = { 45 + normal = "q", 46 + insert = "<C-c>", 47 + }, 48 + -- Reset the chat buffer 49 + reset = { 50 + normal = "<C-x>", 51 + insert = "<C-x>", 52 + }, 53 + -- Submit the prompt to Copilot 54 + submit_prompt = { 55 + normal = "<CR>", 56 + insert = "<C-CR>", 57 + }, 58 + -- Accept the diff 59 + accept_diff = { 60 + normal = "<C-y>", 61 + insert = "<C-y>", 62 + }, 63 + -- Yank the diff in the response to register 64 + yank_diff = { 65 + normal = "gmy", 66 + }, 67 + -- Show the diff 68 + show_diff = { 69 + normal = "gmd", 70 + }, 71 + -- Show the prompt 72 + show_system_prompt = { 73 + normal = "gmp", 74 + }, 75 + -- Show the user selection 76 + show_user_selection = { 77 + normal = "gms", 78 + }, 79 + }, 80 + }, 81 + config = function(_, opts) 82 + local chat = require("CopilotChat") 83 + local select = require("CopilotChat.select") 84 + -- Use unnamed register for the selection 85 + opts.selection = select.unnamed 86 + 87 + -- Override the git prompts message 88 + opts.prompts.Commit = { 89 + prompt = "Write commit message for the change with commitizen convention", 90 + selection = select.gitdiff, 91 + } 92 + opts.prompts.CommitStaged = { 93 + prompt = "Write commit message for the change with commitizen convention", 94 + selection = function(source) return select.gitdiff(source, true) end, 95 + } 96 + 97 + chat.setup(opts) 98 + -- Setup the CMP integration 99 + require("CopilotChat.integrations.cmp").setup() 100 + 101 + vim.api.nvim_create_user_command( 102 + "CopilotChatVisual", 103 + function(args) chat.ask(args.args, { selection = select.visual }) end, 104 + { nargs = "*", range = true } 105 + ) 106 + 107 + -- Inline chat with Copilot 108 + vim.api.nvim_create_user_command( 109 + "CopilotChatInline", 110 + function(args) 111 + chat.ask(args.args, { 112 + selection = select.visual, 113 + window = { 114 + layout = "float", 115 + relative = "cursor", 116 + width = 1, 117 + height = 0.4, 118 + row = 1, 119 + }, 120 + }) 121 + end, 122 + { nargs = "*", range = true } 123 + ) 124 + 125 + -- Restore CopilotChatBuffer 126 + vim.api.nvim_create_user_command( 127 + "CopilotChatBuffer", 128 + function(args) chat.ask(args.args, { selection = select.buffer }) end, 129 + { nargs = "*", range = true } 130 + ) 131 + 132 + -- Custom buffer for CopilotChat 133 + vim.api.nvim_create_autocmd("BufEnter", { 134 + pattern = "copilot-*", 135 + callback = function() 136 + vim.opt_local.relativenumber = true 137 + vim.opt_local.number = true 138 + 139 + -- Get current filetype and set it to markdown if the current filetype is copilot-chat 140 + local ft = vim.bo.filetype 141 + if ft == "copilot-chat" then vim.bo.filetype = "markdown" end 142 + end, 143 + }) 144 + 145 + -- Add which-key mappings 146 + local wk = require("which-key") 147 + wk.add({ 148 + { "<leader>gm", group = "+Copilot Chat" }, -- group 149 + { "<leader>gmd", desc = "Show diff" }, 150 + { "<leader>gmp", desc = "System prompt" }, 151 + { "<leader>gms", desc = "Show selection" }, 152 + { "<leader>gmy", desc = "Yank diff" }, 153 + }) 154 + end, 155 + event = "VeryLazy", 156 + keys = { 157 + -- Show help actions with telescope 158 + { 159 + "<leader>ah", 160 + function() 161 + local actions = require("CopilotChat.actions") 162 + require("CopilotChat.integrations.telescope").pick(actions.help_actions()) 163 + end, 164 + desc = "CopilotChat - Help actions", 165 + }, 166 + -- Show prompts actions with telescope 167 + { 168 + "<leader>ap", 169 + function() 170 + local actions = require("CopilotChat.actions") 171 + require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) 172 + end, 173 + desc = "CopilotChat - Prompt actions", 174 + }, 175 + { 176 + "<leader>ap", 177 + ":lua require('CopilotChat.integrations.telescope').pick(require('CopilotChat.actions').prompt_actions({selection = require('CopilotChat.select').visual}))<CR>", 178 + mode = "x", 179 + desc = "CopilotChat - Prompt actions", 180 + }, 181 + -- Code related commands 182 + { "<leader>ae", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" }, 183 + { "<leader>at", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" }, 184 + { "<leader>ar", "<cmd>CopilotChatReview<cr>", desc = "CopilotChat - Review code" }, 185 + { "<leader>aR", "<cmd>CopilotChatRefactor<cr>", desc = "CopilotChat - Refactor code" }, 186 + { "<leader>an", "<cmd>CopilotChatBetterNamings<cr>", desc = "CopilotChat - Better Naming" }, 187 + -- Chat with Copilot in visual mode 188 + { 189 + "<leader>av", 190 + ":CopilotChatVisual", 191 + mode = "x", 192 + desc = "CopilotChat - Open in vertical split", 193 + }, 194 + { 195 + "<leader>ax", 196 + ":CopilotChatInline<cr>", 197 + mode = "x", 198 + desc = "CopilotChat - Inline chat", 199 + }, 200 + -- Custom input for CopilotChat 201 + { 202 + "<leader>ai", 203 + function() 204 + local input = vim.fn.input("Ask Copilot: ") 205 + if input ~= "" then vim.cmd("CopilotChat " .. input) end 206 + end, 207 + desc = "CopilotChat - Ask input", 208 + }, 209 + -- Generate commit message based on the git diff 210 + { 211 + "<leader>am", 212 + "<cmd>CopilotChatCommit<cr>", 213 + desc = "CopilotChat - Generate commit message for all changes", 214 + }, 215 + { 216 + "<leader>aM", 217 + "<cmd>CopilotChatCommitStaged<cr>", 218 + desc = "CopilotChat - Generate commit message for staged changes", 219 + }, 220 + -- Quick chat with Copilot 221 + { 222 + "<leader>aq", 223 + function() 224 + local input = vim.fn.input("Quick Chat: ") 225 + if input ~= "" then vim.cmd("CopilotChatBuffer " .. input) end 226 + end, 227 + desc = "CopilotChat - Quick chat", 228 + }, 229 + -- Debug 230 + { "<leader>ad", "<cmd>CopilotChatDebugInfo<cr>", desc = "CopilotChat - Debug Info" }, 231 + -- Fix the issue with diagnostic 232 + { "<leader>af", "<cmd>CopilotChatFixDiagnostic<cr>", desc = "CopilotChat - Fix Diagnostic" }, 233 + -- Clear buffer and chat history 234 + { "<leader>al", "<cmd>CopilotChatReset<cr>", desc = "CopilotChat - Clear buffer and chat history" }, 235 + -- Toggle Copilot Chat Vsplit 236 + { "<leader>av", "<cmd>CopilotChatToggle<cr>", desc = "CopilotChat - Toggle" }, 237 + -- Copilot Chat Models 238 + { "<leader>a?", "<cmd>CopilotChatModels<cr>", desc = "CopilotChat - Select Models" }, 239 + }, 240 + }, 241 + }
+13
lua/plugins/crates.lua
··· 1 + return { 2 + "saecki/crates.nvim", 3 + tag = "stable", 4 + event = { "BufRead Cargo.toml" }, 5 + config = function() 6 + require("crates").setup() 7 + vim.api.nvim_create_autocmd("BufRead", { 8 + group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }), 9 + pattern = "Cargo.toml", 10 + callback = function() cmp.setup.buffer({ sources = { { name = "crates" } } }) end, 11 + }) 12 + end, 13 + }
+66
lua/plugins/edgy.lua
··· 1 + return { 2 + "folke/edgy.nvim", 3 + event = "VeryLazy", 4 + init = function() 5 + vim.opt.laststatus = 3 6 + vim.opt.splitkeep = "screen" 7 + end, 8 + opts = { 9 + bottom = { 10 + -- toggleterm / lazyterm at the bottom with a height of 40% of the screen 11 + "Trouble", 12 + { ft = "qf", title = "QuickFix" }, 13 + { 14 + ft = "help", 15 + size = { height = 20 }, 16 + -- only show help buffers 17 + filter = function(buf) return vim.bo[buf].buftype == "help" end, 18 + }, 19 + { ft = "spectre_panel", size = { height = 0.4 } }, 20 + }, 21 + left = { 22 + -- Neo-tree filesystem always takes half the screen height 23 + { 24 + title = "Neo-Tree", 25 + ft = "neo-tree", 26 + filter = function(buf) return vim.b[buf].neo_tree_source == "filesystem" end, 27 + size = { height = 0.5 }, 28 + }, 29 + { 30 + title = "Neo-Tree Git", 31 + ft = "neo-tree", 32 + filter = function(buf) return vim.b[buf].neo_tree_source == "git_status" end, 33 + pinned = true, 34 + collapsed = true, -- show window as closed/collapsed on start 35 + open = "Neotree position=right git_status", 36 + }, 37 + { 38 + title = "Neo-Tree Buffers", 39 + ft = "neo-tree", 40 + filter = function(buf) return vim.b[buf].neo_tree_source == "buffers" end, 41 + pinned = true, 42 + collapsed = true, -- show window as closed/collapsed on start 43 + open = "Neotree position=top buffers", 44 + }, 45 + { 46 + title = function() 47 + local buf_name = vim.api.nvim_buf_get_name(0) or "[No Name]" 48 + return vim.fn.fnamemodify(buf_name, ":t") 49 + end, 50 + ft = "Outline", 51 + pinned = true, 52 + open = "SymbolsOutlineOpen", 53 + }, -- any other neo-tree windows 54 + "neo-tree", 55 + }, 56 + right = { 57 + { 58 + title = "copilot-chat", 59 + ft = "markdown", 60 + direction = "vertical", 61 + size = { width = 0.36 }, 62 + filter = function(buf, win) return vim.api.nvim_win_get_config(win).relative == "" end, 63 + }, 64 + }, 65 + }, 66 + }
+12
lua/plugins/flit.lua
··· 1 + return { 2 + "ggandor/flit.nvim", 3 + keys = function() 4 + local ret = {} 5 + for _, key in ipairs({ "f", "F", "t", "T" }) do 6 + ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key } 7 + end 8 + return ret 9 + end, 10 + opts = { labeled_modes = "nx" }, 11 + dependencies = { "ggandor/leap.nvim" }, 12 + }
+103
lua/plugins/formatter.lua
··· 1 + -- Format On Save 2 + local formatCode = vim.api.nvim_create_augroup("formatCode ", {}) 3 + vim.api.nvim_create_autocmd("BufWritePre", { 4 + pattern = { "*" }, 5 + command = "silent FormatWrite", 6 + group = formatCode, 7 + }) 8 + 9 + -- local function prettier_tailwindcss() 10 + -- local util = require 'formatter.util' 11 + -- return { 12 + -- exe = "prettier", 13 + -- args = { 14 + -- "--stdin-filepath", util.escape_path(util.get_current_buffer_file_path()), 15 + -- "--plugin", 16 + -- '~/.local/share/npm/lib/node_modules/prettier-plugin-tailwindcss/dist/index.mjs' 17 + -- }, 18 + -- stdin = true, 19 + -- try_node_modules = true 20 + -- } 21 + -- end 22 + 23 + -- local function jinja2_formatter() 24 + -- -- prettier-plugin-jinja-template 25 + -- local util = require 'formatter.util' 26 + -- return { 27 + -- exe = "prettier", 28 + -- args = { 29 + -- "--stdin-filepath", util.escape_path(util.get_current_buffer_file_path()), 30 + -- "--plugin", 31 + -- '~/.local/share/npm/lib/node_modules/prettier-plugin-jinja-template/lib/index.js', 32 + -- "--plugin", 33 + -- '~/.local/share/npm/lib/node_modules/prettier-plugin-tailwindcss/dist/index.mjs' 34 + -- 35 + -- }, 36 + -- stdin = true, 37 + -- try_node_modules = true 38 + -- } 39 + -- end 40 + 41 + -- Provides the Format and FormatWrite commands 42 + return { 43 + "mhartington/formatter.nvim", 44 + lazy = true, 45 + keys = { 46 + { 47 + "<Leader>F", 48 + ":FormatWrite<CR>", 49 + { noremap = true }, 50 + desc = "Format And Save", 51 + }, 52 + }, 53 + cmd = { "Format", "FormatWrite" }, 54 + config = function() 55 + require("formatter").setup({ 56 + logging = true, 57 + log_level = vim.log.levels.WARN, 58 + filetype = { 59 + ["*"] = { 60 + require("formatter.filetypes.any").remove_trailing_whitespace, 61 + function() 62 + -- Ignore already configured types. 63 + local defined_types = require("formatter.config").values.filetype 64 + if defined_types[vim.bo.filetype] ~= nil then return nil end 65 + vim.lsp.buf.format() 66 + end, 67 + }, 68 + c = { require("formatter.filetypes.c").clangformat }, 69 + cpp = { require("formatter.filetypes.cpp").clangformat }, 70 + cs = { require("formatter.filetypes.cs").clangformat }, 71 + css = { require("formatter.filetypes.css").prettierd }, 72 + html = { require("formatter.filetypes.html").prettierd }, 73 + -- jinja = { jinja2_formatter }, 74 + javascript = { require("formatter.filetypes.javascript").prettierd }, 75 + javascriptreact = { 76 + require("formatter.filetypes.javascriptreact").prettier, 77 + }, 78 + json = { require("formatter.filetypes.json").prettierd }, 79 + lua = { require("formatter.filetypes.lua").luaformat }, 80 + markdown = { require("formatter.filetypes.css").prettierd }, 81 + nix = { require("formatter.filetypes.nix").nixpkgs_fmt }, 82 + kotlin = { require("formatter.filetypes.kotlin").ktlint }, 83 + python = { 84 + function() 85 + return { 86 + exe = "black", 87 + args = { "--line-length 120", "-q", "-" }, 88 + stdin = true, 89 + } 90 + end, 91 + }, 92 + rust = { require("formatter.filetypes.rust").rustfmt }, 93 + toml = { require("formatter.filetypes.toml").taplo }, 94 + typescript = { require("formatter.filetypes.typescript").prettierd }, 95 + typescriptreact = { 96 + require("formatter.filetypes.typescriptreact").prettierd, 97 + }, 98 + xml = { require("formatter.filetypes.css").prettierd }, 99 + yaml = { require("formatter.filetypes.yaml").prettierd }, 100 + }, 101 + }) 102 + end, 103 + }
+21
lua/plugins/gitsigns.lua
··· 1 + return { 2 + "lewis6991/gitsigns.nvim", 3 + lazy = false, 4 + init = function() 5 + require("gitsigns").setup({ 6 + attach_to_untracked = false, 7 + current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` 8 + current_line_blame_opts = { 9 + virt_text = true, 10 + virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' 11 + delay = 200, 12 + ignore_whitespace = false, 13 + virt_text_priority = 100, 14 + }, 15 + current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>", 16 + -- current_line_blame_formatter_opts = { 17 + -- relative_time = false, 18 + -- }, 19 + }) 20 + end, 21 + }
+19
lua/plugins/gruvbox.lua
··· 1 + return { 2 + "ellisonleao/gruvbox.nvim", 3 + priority = 1000, 4 + lazy = false, 5 + enabled = true, 6 + config = function() 7 + require("gruvbox").setup({ 8 + transparent_mode = false, 9 + -- overrides = { 10 + -- NvimTreeNormal = {bg = '#32302f'}, 11 + -- NvimTreeEndOfBuffer = {fg = '#32302f'}, 12 + -- EndOfBuffer = {fg = "#32302f"}, 13 + -- NonText = {fg = "#5a524c"} 14 + -- } 15 + }) 16 + vim.cmd([[colorscheme gruvbox]]) 17 + vim.o.background = "dark" -- or "light" for light mode 18 + end, 19 + }
+29
lua/plugins/harpoon.lua
··· 1 + -- -- harpoon 2 + -- local harpoon = vim.api.nvim_create_augroup("harpoon", {}) 3 + -- vim.api.nvim_create_autocmd("BufEnter", 4 + -- {pattern="*", callback=function() require("harpoon.mark").add_file() end, group=harpoon 5 + -- }) 6 + 7 + return { 8 + "ThePrimeagen/harpoon", 9 + lazy = true, 10 + keys = { 11 + { "<Leader>ha", ':lua require("harpoon.mark").add_file()<CR>', desc = "Add File" }, 12 + { "<Leader>hh", ':lua require("harpoon.ui").toggle_quick_menu()<CR>', desc = "Toggle Quick Menu" }, 13 + { 14 + "<M-Tab>", 15 + ':lua require("harpoon.ui").nav_next() <CR>', 16 + { noremap = true, silent = true }, 17 + desc = "Next Harpooned File", 18 + }, 19 + { 20 + "<M-S-Tab>", 21 + ':lua require("harpoon.ui").nav_prev() <CR>', 22 + { noremap = true, silent = true }, 23 + desc = "Previous Harpooned File", 24 + }, 25 + }, 26 + opts = { 27 + excluded_filetypes = { "harpoon" }, 28 + }, 29 + }
+10
lua/plugins/import-cost.lua
··· 1 + return { 2 + "barrett-ruth/import-cost.nvim", 3 + build = [[ 4 + #! /usr/bin/env nix-shell 5 + #! nix-shell -i bash -p nodePackages_latest.pnpm 6 + 7 + sh install.sh pnpm 8 + ]], 9 + config = true, 10 + }
+29
lua/plugins/indent-blankline.lua
··· 1 + -- vim.opt.list = true 2 + -- vim.opt.listchars:append("space:⋅") 3 + -- vim.opt.listchars:append("eol:↴") 4 + 5 + -- vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]] 6 + -- vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]] 7 + -- vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]] 8 + -- vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]] 9 + -- vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]] 10 + -- vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]] 11 + 12 + return { 13 + "lukas-reineke/indent-blankline.nvim", 14 + lazy = false, 15 + main = "ibl", 16 + opts = { 17 + -- space_char_blankline = " ", 18 + -- show_current_context = true, 19 + -- show_current_context_start = true, 20 + -- char_highlight_list = { 21 + -- "IndentBlanklineIndent1", 22 + -- "IndentBlanklineIndent2", 23 + -- "IndentBlanklineIndent3", 24 + -- "IndentBlanklineIndent4", 25 + -- "IndentBlanklineIndent5", 26 + -- "IndentBlanklineIndent6", 27 + -- }, 28 + }, 29 + }
+14
lua/plugins/init.lua
··· 1 + return { 2 + -- Cosmetics 3 + { 4 + "folke/todo-comments.nvim", 5 + config = true, 6 + }, 7 + 8 + -- Git 9 + "tpope/vim-fugitive", 10 + 11 + -- Utilities 12 + 13 + "ellisonleao/glow.nvim", 14 + }
+1
lua/plugins/java.lua
··· 1 + return { "nvim-java/nvim-java" }
+3
lua/plugins/jinja2.lua
··· 1 + return { 2 + "Glench/Vim-Jinja2-Syntax", 3 + }
+4
lua/plugins/jsut.lua
··· 1 + return { 2 + "NoahTheDuke/vim-just", 3 + ft = { "just" }, 4 + }
+3
lua/plugins/jsx-pretty.lua
··· 1 + return { 2 + "MaxMEllon/vim-jsx-pretty", 3 + }
+1
lua/plugins/kotlin.lua
··· 1 + return { "udalov/kotlin-vim", ft = { "kotlin" }, enabled = false }
+28
lua/plugins/kulala.lua
··· 1 + return { 2 + "mistweaverco/kulala.nvim", 3 + ft = "http", 4 + keys = { 5 + { "<leader>R", "", desc = "+Rest" }, 6 + { 7 + "<leader>Rs", 8 + "<cmd>lua require('kulala').run()<cr>", 9 + desc = "Send the request", 10 + }, 11 + { 12 + "<leader>Rt", 13 + "<cmd>lua require('kulala').toggle_view()<cr>", 14 + desc = "Toggle headers/body", 15 + }, 16 + { 17 + "<leader>Rp", 18 + "<cmd>lua require('kulala').jump_prev()<cr>", 19 + desc = "Jump to previous request", 20 + }, 21 + { 22 + "<leader>Rn", 23 + "<cmd>lua require('kulala').jump_next()<cr>", 24 + desc = "Jump to next request", 25 + }, 26 + }, 27 + opts = {}, 28 + }
+18
lua/plugins/leap.lua
··· 1 + return { 2 + "ggandor/leap.nvim", 3 + keys = { 4 + { "s", mode = { "n", "x", "o" }, desc = "Leap forward to" }, 5 + { "S", mode = { "n", "x", "o" }, desc = "Leap backward to" }, 6 + { "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" }, 7 + }, 8 + config = function(_, opts) 9 + local leap = require("leap") 10 + for k, v in pairs(opts) do 11 + leap.opts[k] = v 12 + end 13 + leap.add_default_mappings(true) 14 + vim.keymap.del({ "x", "o" }, "x") 15 + vim.keymap.del({ "x", "o" }, "X") 16 + end, 17 + dependencies = { "tpope/vim-repeat" }, 18 + }
+76
lua/plugins/lint.lua
··· 1 + return { 2 + "mfussenegger/nvim-lint", 3 + -- Event to trigger linters 4 + events = { "BufWritePost", "BufReadPost", "InsertLeave" }, 5 + opts = { 6 + linters_by_ft = { 7 + -- Use the "*" filetype to run linters on all filetypes. 8 + -- Use the "_" filetype to run linters on filetypes that don't have other linters configured. 9 + -- ['_'] = { 'fallback linter' }, 10 + ["*"] = { "typos", "codespell" }, 11 + }, 12 + linters = { 13 + -- -- Example of using selene only when a selene.toml file is present 14 + -- selene = { 15 + -- -- `condition` is another LazyVim extension that allows you to 16 + -- -- dynamically enable/disable linters based on the context. 17 + -- condition = function(ctx) 18 + -- return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1] 19 + -- end, 20 + -- }, 21 + }, 22 + }, 23 + config = function(_, opts) 24 + local M = {} 25 + 26 + local lint = require("lint") 27 + for name, linter in pairs(opts.linters) do 28 + if type(linter) == "table" and type(lint.linters[name]) == "table" then 29 + lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter) 30 + else 31 + lint.linters[name] = linter 32 + end 33 + end 34 + lint.linters_by_ft = opts.linters_by_ft 35 + 36 + function M.debounce(ms, fn) 37 + local timer = vim.uv.new_timer() 38 + return function(...) 39 + local argv = { ... } 40 + timer:start(ms, 0, function() 41 + timer:stop() 42 + vim.schedule_wrap(fn)(unpack(argv)) 43 + end) 44 + end 45 + end 46 + 47 + function M.lint() 48 + -- Use nvim-lint's logic first: 49 + -- * checks if linters exist for the full filetype first 50 + -- * otherwise will split filetype by "." and add all those linters 51 + -- * this differs from conform.nvim which only uses the first filetype that has a formatter 52 + local names = lint._resolve_linter_by_ft(vim.bo.filetype) 53 + 54 + -- Create a copy of the names table to avoid modifying the original. 55 + names = vim.list_extend({}, names) 56 + 57 + -- Add fallback linters. 58 + if #names == 0 then vim.list_extend(names, lint.linters_by_ft["_"] or {}) end 59 + 60 + -- Add global linters. 61 + vim.list_extend(names, lint.linters_by_ft["*"] or {}) 62 + 63 + -- Filter out linters that don't exist or don't match the condition. 64 + local ctx = { filename = vim.api.nvim_buf_get_name(0) } 65 + ctx.dirname = vim.fn.fnamemodify(ctx.filename, ":h") 66 + names = vim.tbl_filter(function(name) 67 + local linter = lint.linters[name] 68 + if not linter then LazyVim.warn("Linter not found: " .. name, { title = "nvim-lint" }) end 69 + return linter and not (type(linter) == "table" and linter.condition and not linter.condition(ctx)) 70 + end, names) 71 + 72 + -- Run linters. 73 + if #names > 0 then lint.try_lint(names) end 74 + end 75 + end, 76 + }
+300
lua/plugins/lsp.lua
··· 1 + return { 2 + "neovim/nvim-lspconfig", 3 + opts = { inlay_hints = { enable = true } }, 4 + lazy = false, 5 + keys = { 6 + { 7 + "gD", 8 + vim.lsp.buf.declaration, 9 + { noremap = true, silent = true }, 10 + desc = "Go To Declaration", 11 + mode = "n", 12 + }, 13 + { 14 + "gd", 15 + vim.lsp.buf.definition, 16 + { noremap = true, silent = true }, 17 + desc = "Go To Definition", 18 + mode = "n", 19 + }, 20 + { 21 + "gi", 22 + vim.lsp.buf.implementation, 23 + { noremap = true, silent = true }, 24 + desc = "Go To Implementation", 25 + mode = "n", 26 + }, 27 + { "K", vim.lsp.buf.hover, { silent = true }, desc = "Show Info", mode = "n" }, 28 + { 29 + "<leader>ck", 30 + vim.lsp.buf.signature_help, 31 + { silent = true, noremap = true }, 32 + desc = "Show Signature", 33 + mode = "n", 34 + }, 35 + { 36 + "<leader>r", 37 + vim.lsp.buf.rename, 38 + { silent = true, noremap = true }, 39 + desc = "Rename symbol", 40 + mode = "n", 41 + }, -- { 42 + -- "<leader>cf", 43 + -- vim.lsp.buf.format, 44 + -- {silent = true, noremap = true}, 45 + -- desc = "Format", 46 + -- mode = "n" 47 + -- }, 48 + { 49 + "<Leader>gr", 50 + vim.lsp.buf.references, 51 + { noremap = true, silent = true }, 52 + desc = "Go To References", 53 + mode = "n", 54 + }, 55 + { 56 + "<Leader>D", 57 + vim.lsp.buf.type_definition, 58 + { noremap = true, silent = true }, 59 + desc = "Show Type Definition", 60 + mode = "n", 61 + }, 62 + { 63 + "<Leader>ca", 64 + vim.lsp.buf.code_action, 65 + { noremap = true, silent = true }, 66 + desc = "Code actions", 67 + }, 68 + }, 69 + config = function() 70 + -- Setup language servers. 71 + local lspconfig = require("lspconfig") 72 + local capabilities = vim.lsp.protocol.make_client_capabilities() 73 + capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) 74 + 75 + -- Rust 76 + lspconfig.rust_analyzer.setup({ 77 + capabilities = capabilities, 78 + autostart = true, 79 + settings = { 80 + ["rust-analyzer"] = { 81 + cargo = { 82 + allFeatures = true, 83 + loadOutDirsFromCheck = true, 84 + buildScripts = { enable = true }, 85 + }, 86 + assist = { 87 + -- Whether to insert #[must_use] when generating as_ methods for enum variants. 88 + emitMustUse = true, 89 + }, 90 + imports = { group = { enable = false } }, 91 + completion = { postfix = { enable = false } }, 92 + -- Add clippy lints for Rust. 93 + checkOnSave = { 94 + allFeatures = true, 95 + command = "clippy", 96 + extraArgs = { "--no-deps" }, 97 + }, 98 + procMacro = { 99 + enable = true, 100 + ignored = { 101 + ["async-trait"] = { "async_trait" }, 102 + ["napi-derive"] = { "napi" }, 103 + ["async-recursion"] = { "async_recursion" }, 104 + }, 105 + }, 106 + hint = { enable = true }, 107 + }, 108 + }, 109 + }) 110 + 111 + -- assembly 112 + lspconfig.asm_lsp.setup({ 113 + capabilities = capabilities, 114 + filetypes = { "asm", "vmasm", "nasm" }, 115 + autostart = true, 116 + single_file_support = true, 117 + -- formatting 118 + }) 119 + 120 + -- nix 121 + lspconfig.nil_ls.setup({ 122 + capabilities = capabilities, 123 + autostart = true, 124 + settings = { ["nil"] = { formatting = { command = { "nixpkgs-fmt" } } } }, 125 + }) 126 + 127 + -- lua 128 + lspconfig.lua_ls.setup({ 129 + capabilities = capabilities, 130 + autostart = true, 131 + settings = { 132 + Lua = { 133 + runtime = { version = "LuaJIT" }, 134 + completion = { callSnippet = "Replace" }, 135 + diagnostics = { globals = { "vim" } }, 136 + format = { enable = false }, 137 + hint = { enable = true }, 138 + }, 139 + }, 140 + }) 141 + 142 + lspconfig.gopls.setup({ 143 + capabilities = capabilities, 144 + autostart = true, 145 + cmd = { "gopls" }, 146 + filetypes = { "go", "gomod", "gowork", "gotmpl" }, 147 + single_file_support = true, 148 + }) 149 + 150 + -- python 151 + lspconfig.ruff.setup({ 152 + capabilities = capabilities, 153 + autostart = true, 154 + init_options = { 155 + settings = { 156 + lineLength = 120, 157 + lint = { 158 + enable = true, 159 + preview = true, 160 + }, 161 + format = { 162 + preview = true, 163 + }, 164 + }, 165 + }, 166 + single_file_support = true, 167 + }) 168 + 169 + lspconfig.tsserver.setup({ 170 + capabilities = capabilities, 171 + autostart = true, 172 + cmd = { "typescript-language-server", "--stdio" }, 173 + filetypes = { 174 + "javascript", 175 + "javascriptreact", 176 + "javascript.jsx", 177 + "typescript", 178 + "typescriptreact", 179 + "typescript.tsx", 180 + }, 181 + init_options = { hostInfo = "neovim" }, 182 + single_file_support = true, 183 + }) 184 + 185 + lspconfig.gleam.setup({ 186 + capabilities = capabilities, 187 + autostart = true, 188 + cmd = { "gleam", "lsp" }, 189 + filetypes = { "gleam" }, 190 + root_dir = lspconfig.util.root_pattern("gleam.toml", ".git"), 191 + }) 192 + 193 + lspconfig.nil_ls.setup({ 194 + capabilities = capabilities, 195 + autostart = true, 196 + cmd = { "nil" }, 197 + filetypes = { "nix" }, 198 + root_pattern = { "flake.nix", ".git" }, 199 + single_file_support = true, 200 + }) 201 + 202 + -- Zig 203 + lspconfig.zls.setup({ 204 + capabilities = capabilities, 205 + autostart = true, 206 + cmd = { "zls" }, 207 + filetypes = { "zig", "zir" }, 208 + single_file_support = true, 209 + }) 210 + 211 + -- Java 212 + -- lspconfig.java_language_server.setup { 213 + -- capabilities = capabilities, 214 + -- 215 + -- autostart = true, 216 + -- single_file_support = true 217 + -- } 218 + lspconfig.jdtls.setup({ 219 + capabilities = capabilities, 220 + autostart = true, 221 + single_file_support = true, 222 + }) 223 + 224 + -- C/C++ 225 + lspconfig.clangd.setup({ 226 + capabilities = capabilities, 227 + autostart = true, 228 + single_file_support = true, 229 + }) 230 + 231 + -- Kotlin 232 + lspconfig.kotlin_language_server.setup({ 233 + capabilities = capabilities, 234 + autostart = true, 235 + single_file_support = true, 236 + }) 237 + 238 + -- Bash LSP 239 + local configs = require("lspconfig.configs") 240 + if not configs.bash_lsp and vim.fn.executable("bash-language-server") == 1 then 241 + configs.bash_lsp = { 242 + capabilities = capabilities, 243 + autostart = true, 244 + default_config = { 245 + cmd = { "bash-language-server", "start" }, 246 + filetypes = { "sh" }, 247 + root_dir = require("lspconfig").util.find_git_ancestor, 248 + init_options = { settings = { args = {} } }, 249 + }, 250 + } 251 + end 252 + if configs.bash_lsp then lspconfig.bash_lsp.setup({}) end 253 + 254 + -- Grammar 255 + lspconfig.ltex.setup({ 256 + capabilities = capabilities, 257 + autostart = true, 258 + filetypes = { 259 + "bib", 260 + "gitcommit", 261 + "markdown", 262 + "org", 263 + "plaintex", 264 + "rst", 265 + "rnoweb", 266 + "tex", 267 + "pandoc", 268 + "quarto", 269 + "rmd", 270 + "context", 271 + "html", 272 + "xhtml", 273 + "mail", 274 + "text", 275 + }, 276 + single_file_support = true, 277 + }) 278 + 279 + -- Dockerfile 280 + lspconfig.dockerls.setup({ 281 + capabilities = capabilities, 282 + settings = { 283 + docker = { 284 + languageserver = { formatter = { ignoreMultilineInstructions = true } }, 285 + }, 286 + }, 287 + }) 288 + 289 + -- Docker compose 290 + lspconfig.docker_compose_language_service.setup({ 291 + capabilities = capabilities, 292 + autostart = true, 293 + single_file_support = true, 294 + filetypes = { "yaml", "yaml.docker-compose" }, 295 + }) 296 + 297 + -- enable inlay hints 298 + vim.lsp.inlay_hint.enable() 299 + end, 300 + }
+51
lua/plugins/lspsaga.lua
··· 1 + return { 2 + "nvimdev/lspsaga.nvim", 3 + lazy = true, 4 + event = "LspAttach", 5 + keys = { 6 + { 7 + "<leader>ca", 8 + "<cmd>Lspsaga code_action<CR>", 9 + { silent = true, noremap = true }, 10 + desc = "Range Code Action", 11 + mode = "v", 12 + }, 13 + { "<leader>ca", "<cmd>Lspsaga code_action<CR>", { silent = true, noremap = true }, desc = "Code Action", mode = "n" }, 14 + 15 + { 16 + "<leader>e", 17 + "<cmd>Lspsaga show_line_diagnostics<CR>", 18 + { silent = true, noremap = true }, 19 + desc = "Show Line Diagnostics", 20 + mode = "n", 21 + }, 22 + { 23 + "<Leader>[", 24 + "<cmd>Lspsaga diagnostic_jump_prev<CR>", 25 + { noremap = true, silent = true }, 26 + desc = "Jump To The Next Diagnostics", 27 + mode = "n", 28 + }, 29 + { 30 + "<Leader>]", 31 + "<cmd>Lspsaga diagnostic_jump_next<CR>", 32 + { noremap = true, silent = true }, 33 + desc = "Jump To The Previous Diagnostics", 34 + mode = "n", 35 + }, 36 + 37 + { "<Leader>T", "<cmd>Lspsaga open_floaterm<CR>", { silent = true }, desc = "Open Float Term", mode = "n" }, 38 + { "<Leader>T", [[<C-\><C-n><cmd>Lspsaga close_floaterm<CR>]], { silent = true }, desc = "Close Float Term", mode = "t" }, 39 + 40 + { "gr", "<cmd>Lspsaga rename<CR>", { silent = true, noremap = true }, desc = "Rename", mode = "n" }, 41 + { "gh", "<cmd>Lspsaga lsp_finder<CR>", { silent = true, noremap = true }, desc = "LSP Finder", mode = "n" }, 42 + { "<Leader>gd", "<cmd>Lspsaga peek_definition<CR>", { silent = true }, desc = "Peek Definition", mode = "n" }, 43 + }, 44 + -- opts = {border_style = "rounded"}, 45 + config = function() require("lspsaga").setup({ border_style = "rounded" }) end, 46 + dependencies = { 47 + "nvim-treesitter/nvim-treesitter", 48 + "nvim-tree/nvim-web-devicons", 49 + "neovim/nvim-lspconfig", 50 + }, 51 + }
+41
lua/plugins/lualine.lua
··· 1 + return { 2 + "nvim-lualine/lualine.nvim", 3 + opts = { 4 + options = { 5 + icons_enabled = true, 6 + theme = "gruvbox-material", 7 + component_separators = { left = "|", right = "|" }, 8 + section_separators = { left = "", right = "" }, 9 + disabled_filetypes = { "NvimTree", "packer" }, 10 + always_divide_middle = true, 11 + globalstatuses = true, 12 + }, 13 + sections = { 14 + lualine_a = { "mode" }, 15 + lualine_b = { 16 + "branch", 17 + "diff", 18 + { 19 + "diagnostics", 20 + sources = { "nvim_lsp", "coc" }, 21 + update_in_insert = true, 22 + always_visible = true, 23 + }, 24 + }, 25 + lualine_c = { { "filename", file_status = true, path = 1 } }, 26 + lualine_x = { "filetype" }, 27 + lualine_y = { "%p%%", "location" }, 28 + lualine_z = {}, 29 + }, 30 + inactive_sections = { 31 + lualine_a = {}, 32 + lualine_b = {}, 33 + lualine_c = { { "filename", file_status = true, path = 1 } }, 34 + lualine_x = { "filetype" }, 35 + lualine_y = { "%p%%", "location" }, 36 + lualine_z = {}, 37 + }, 38 + tabline = {}, 39 + extensions = { "fugitive", "fzf", "nvim-tree" }, 40 + }, 41 + }
+12
lua/plugins/luasnip.lua
··· 1 + return { 2 + "L3MON4D3/LuaSnip", 3 + -- follow latest release. 4 + version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release) 5 + -- install jsregexp (optional!). 6 + build = "make install_jsregexp", 7 + dependencies = { "rafamadriz/friendly-snippets" }, 8 + config = function() 9 + require("luasnip.loaders.from_vscode").lazy_load() 10 + require("config.snippets") 11 + end, 12 + }
+9
lua/plugins/multi-cursor.lua
··· 1 + return { 2 + -- "mg979/vim-visual-multi", 3 + -- init = function() 4 + -- vim.g.VM_maps = { 5 + -- ['Find Under'] = '<C-m>', 6 + -- ['Find Subword Under'] = '<C-m>' 7 + -- } 8 + -- end, 9 + }
+7
lua/plugins/mustache-handlebars.lua
··· 1 + return { 2 + "mustache/vim-mustache-handlebars", 3 + ft = { 4 + "html.mustache", 5 + "html.handlebars", 6 + }, 7 + }
+167
lua/plugins/neo-tree.lua
··· 1 + return { 2 + "nvim-neo-tree/neo-tree.nvim", 3 + cmd = "Neotree", 4 + keys = { 5 + { 6 + "<leader>fe", 7 + function() require("neo-tree.command").execute({ toggle = true }) end, 8 + desc = "Explorer NeoTree (Root Dir)", 9 + }, 10 + { 11 + "<leader>fE", 12 + function() 13 + require("neo-tree.command").execute({ 14 + toggle = true, 15 + dir = vim.uv.cwd(), 16 + }) 17 + end, 18 + desc = "Explorer NeoTree (cwd)", 19 + }, 20 + { 21 + "<leader>e", 22 + "<leader>fe", 23 + desc = "Explorer NeoTree (Root Dir)", 24 + remap = true, 25 + }, 26 + { 27 + "<leader>E", 28 + "<leader>fE", 29 + desc = "Explorer NeoTree (cwd)", 30 + remap = true, 31 + }, 32 + { 33 + "<leader>ge", 34 + function() 35 + require("neo-tree.command").execute({ 36 + source = "git_status", 37 + toggle = true, 38 + }) 39 + end, 40 + desc = "Git Explorer", 41 + }, 42 + { 43 + "<leader>be", 44 + function() 45 + require("neo-tree.command").execute({ 46 + source = "buffers", 47 + toggle = true, 48 + }) 49 + end, 50 + desc = "Buffer Explorer", 51 + }, 52 + }, 53 + deactivate = function() vim.cmd([[Neotree close]]) end, 54 + init = function() 55 + -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, 56 + -- because `cwd` is not set up properly. 57 + vim.api.nvim_create_autocmd("BufEnter", { 58 + group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), 59 + desc = "Start Neo-tree with directory", 60 + once = true, 61 + callback = function() 62 + if package.loaded["neo-tree"] then 63 + return 64 + else 65 + local stats = vim.uv.fs_stat(vim.fn.argv(0)) 66 + if stats and stats.type == "directory" then require("neo-tree") end 67 + end 68 + end, 69 + }) 70 + end, 71 + opts = { 72 + sources = { "filesystem", "buffers", "git_status" }, 73 + open_files_do_not_replace_types = { 74 + "terminal", 75 + "Trouble", 76 + "trouble", 77 + "qf", 78 + "Outline", 79 + }, 80 + filesystem = { 81 + filtered_items = { 82 + visible = false, -- when true, they will just be displayed differently than normal items 83 + hide_dotfiles = false, 84 + hide_gitignored = true, 85 + hide_hidden = true, -- only works on Windows for hidden files/directories 86 + hide_by_name = { 87 + "node_modules", 88 + }, 89 + hide_by_pattern = { -- uses glob style patterns 90 + -- "*.meta", 91 + -- "*/src/*/tsconfig.json", 92 + }, 93 + always_show = { -- remains visible even if other settings would normally hide it 94 + ".gitignored", 95 + ".justfile", 96 + }, 97 + -- uses glob style patterns 98 + always_show_by_pattern = { ".env*" }, 99 + -- remains hidden even if visible is toggled to true, this overrides always_show 100 + never_show = { 101 + ".DS_Store", 102 + }, 103 + }, 104 + follow_current_file = { 105 + enabled = false, -- This will find and focus the file in the active buffer every time 106 + -- -- the current file is changed while the tree is open. 107 + leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` 108 + }, 109 + group_empty_dirs = true, -- when true, empty folders will be grouped together 110 + hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree 111 + -- in whatever position is specified in window.position 112 + -- "open_current", -- netrw disabled, opening a directory opens within the 113 + -- window like netrw would, regardless of window.position 114 + -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs 115 + use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes 116 + }, 117 + enable_git_status = true, 118 + enable_diagnostics = true, 119 + window = { 120 + mappings = { 121 + ["l"] = "open", 122 + ["h"] = "close_node", 123 + ["<space>"] = "none", 124 + ["Y"] = { 125 + function(state) 126 + local node = state.tree:get_node() 127 + local path = node:get_id() 128 + vim.fn.setreg("+", path, "c") 129 + vim.notify("Path copyie to the system's clipboard") 130 + end, 131 + desc = "Copy Path to Clipboard", 132 + }, 133 + ["O"] = { 134 + function(state) require("lazy.util").open(state.tree:get_node().path, { system = true }) end, 135 + desc = "Open with System Application", 136 + }, 137 + ["P"] = { "toggle_preview", config = { use_float = false } }, 138 + }, 139 + }, 140 + default_component_configs = { 141 + indent = { 142 + with_expanders = true, -- if nil and file nesting is enabled, will enable expanders 143 + expander_collapsed = "", 144 + expander_expanded = "", 145 + expander_highlight = "NeoTreeExpander", 146 + }, 147 + git_status = { symbols = { unstaged = "󰄱", staged = "󰱒" } }, 148 + }, 149 + }, 150 + config = function(_, opts) 151 + local function on_move(data) vim.lsp.on_rename(data.source, data.destination) end 152 + 153 + local events = require("neo-tree.events") 154 + opts.event_handlers = opts.event_handlers or {} 155 + vim.list_extend(opts.event_handlers, { 156 + { event = events.FILE_MOVED, handler = on_move }, 157 + { event = events.FILE_RENAMED, handler = on_move }, 158 + }) 159 + require("neo-tree").setup(opts) 160 + vim.api.nvim_create_autocmd("TermClose", { 161 + pattern = "*lazygit", 162 + callback = function() 163 + if package.loaded["neo-tree.sources.git_status"] then require("neo-tree.sources.git_status").refresh() end 164 + end, 165 + }) 166 + end, 167 + }
+15
lua/plugins/neogen.lua
··· 1 + return { 2 + "danymat/neogen", 3 + cmd = "Neogen", 4 + keys = { 5 + { 6 + "<leader>cn", 7 + function() require("neogen").generate() end, 8 + desc = "Generate Annotations (Neogen)", 9 + }, 10 + }, 11 + opts = function(_, opts) 12 + if opts.snippet_engine ~= nil then return end 13 + opts.snippet_engine = "luasnip" 14 + end, 15 + }
+104
lua/plugins/noice.lua
··· 1 + return { 2 + "folke/noice.nvim", 3 + dependencies = { "rcarriga/nvim-notify" }, 4 + event = "VeryLazy", 5 + opts = { 6 + cmdline = { 7 + view = "cmdline", 8 + format = { 9 + search_down = { 10 + view = "cmdline", 11 + }, 12 + search_up = { 13 + view = "cmdline", 14 + }, 15 + }, 16 + }, 17 + lsp = { 18 + override = { 19 + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 20 + ["vim.lsp.util.stylize_markdown"] = true, 21 + ["cmp.entry.get_documentation"] = true, 22 + }, 23 + }, 24 + routes = { 25 + { 26 + filter = { 27 + event = "msg_show", 28 + any = { 29 + { find = "%d+L, %d+B" }, 30 + { find = "; after #%d+" }, 31 + { find = "; before #%d+" }, 32 + }, 33 + }, 34 + view = "mini", 35 + }, 36 + }, 37 + presets = { 38 + bottom_search = true, 39 + command_palette = true, 40 + long_message_to_split = true, 41 + }, 42 + }, 43 + keys = { 44 + { "<leader>sn", "", desc = "+noice" }, 45 + { 46 + "<S-Enter>", 47 + function() require("noice").redirect(vim.fn.getcmdline()) end, 48 + mode = "c", 49 + desc = "Redirect Cmdline", 50 + }, 51 + { 52 + "<leader>snl", 53 + function() require("noice").cmd("last") end, 54 + desc = "Noice Last Message", 55 + }, 56 + { 57 + "<leader>snh", 58 + function() require("noice").cmd("history") end, 59 + desc = "Noice History", 60 + }, 61 + { 62 + "<leader>sna", 63 + function() require("noice").cmd("all") end, 64 + desc = "Noice All", 65 + }, 66 + { 67 + "<leader>snd", 68 + function() require("noice").cmd("dismiss") end, 69 + desc = "Dismiss All", 70 + }, 71 + { 72 + "<leader>snt", 73 + function() require("noice").cmd("pick") end, 74 + desc = "Noice Picker (Telescope/FzfLua)", 75 + }, 76 + { 77 + "<c-f>", 78 + function() 79 + if not require("noice.lsp").scroll(4) then return "<c-f>" end 80 + end, 81 + silent = true, 82 + expr = true, 83 + desc = "Scroll Forward", 84 + mode = { "i", "n", "s" }, 85 + }, 86 + { 87 + "<c-b>", 88 + function() 89 + if not require("noice.lsp").scroll(-4) then return "<c-b>" end 90 + end, 91 + silent = true, 92 + expr = true, 93 + desc = "Scroll Backward", 94 + mode = { "i", "n", "s" }, 95 + }, 96 + }, 97 + config = function(_, opts) 98 + -- HACK: noice shows messages from before it was enabled, 99 + -- but this is not ideal when Lazy is installing plugins, 100 + -- so clear the messages in this case. 101 + if vim.o.filetype == "lazy" then vim.cmd([[messages clear]]) end 102 + require("noice").setup(opts) 103 + end, 104 + }
+27
lua/plugins/nvim-colorizer.lua
··· 1 + return { 2 + "norcalli/nvim-colorizer.lua", 3 + lazy = false, 4 + enable = true, 5 + ft = { 6 + "css", 7 + "html", 8 + "jinja", 9 + "javascript", 10 + "javascriptreact", 11 + "typescript", 12 + "typescriptreact", 13 + }, 14 + config = function() require("colorizer").setup() end, 15 + --opts = { 16 + -- {'*'}, { 17 + -- RGB = true, -- #RGB hex codes 18 + -- RRGGBB = true, -- #RRGGBB hex codes 19 + -- names = true, -- "Name" codes like Blue 20 + -- RRGGBBAA = true, -- #RRGGBB hex codes 21 + -- rgb_fn = true, -- CSS rgb() and rgba() functions 22 + -- hsl_fn = true, -- CSS hsl() and hsla() functions 23 + -- css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB 24 + -- css_fn = true -- Enable all CSS *functions*: rgb_fn, hsl_fn 25 + -- } 26 + --} 27 + }
+126
lua/plugins/nvim-tree.lua
··· 1 + local function on_attach(bufnr) 2 + local api = require("nvim-tree.api") 3 + 4 + local function opts(desc) 5 + return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 6 + end 7 + 8 + -- Default mappings. Feel free to modify or remove as you wish. 9 + -- 10 + -- BEGIN_DEFAULT_ON_ATTACH 11 + vim.keymap.set("n", "<C-]>", api.tree.change_root_to_node, opts("CD")) 12 + vim.keymap.set("n", "<C-e>", api.node.open.replace_tree_buffer, opts("Open: In Place")) 13 + vim.keymap.set("n", "<C-k>", api.node.show_info_popup, opts("Info")) 14 + vim.keymap.set("n", "<C-r>", api.fs.rename_sub, opts("Rename: Omit Filename")) 15 + vim.keymap.set("n", "<C-t>", api.node.open.tab, opts("Open: New Tab")) 16 + vim.keymap.set("n", "<C-v>", api.node.open.vertical, opts("Open: Vertical Split")) 17 + vim.keymap.set("n", "<C-x>", api.node.open.horizontal, opts("Open: Horizontal Split")) 18 + vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close Directory")) 19 + vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open")) 20 + vim.keymap.set("n", "<Tab>", api.node.open.preview, opts("Open Preview")) 21 + vim.keymap.set("n", ">", api.node.navigate.sibling.next, opts("Next Sibling")) 22 + vim.keymap.set("n", "<", api.node.navigate.sibling.prev, opts("Previous Sibling")) 23 + vim.keymap.set("n", ".", api.node.run.cmd, opts("Run Command")) 24 + vim.keymap.set("n", "-", api.tree.change_root_to_parent, opts("Up")) 25 + vim.keymap.set("n", "a", api.fs.create, opts("Create")) 26 + vim.keymap.set("n", "bmv", api.marks.bulk.move, opts("Move Bookmarked")) 27 + vim.keymap.set("n", "B", api.tree.toggle_no_buffer_filter, opts("Toggle No Buffer")) 28 + vim.keymap.set("n", "c", api.fs.copy.node, opts("Copy")) 29 + vim.keymap.set("n", "C", api.tree.toggle_git_clean_filter, opts("Toggle Git Clean")) 30 + vim.keymap.set("n", "[c", api.node.navigate.git.prev, opts("Prev Git")) 31 + vim.keymap.set("n", "]c", api.node.navigate.git.next, opts("Next Git")) 32 + vim.keymap.set("n", "d", api.fs.remove, opts("Delete")) 33 + vim.keymap.set("n", "D", api.fs.trash, opts("Trash")) 34 + vim.keymap.set("n", "E", api.tree.expand_all, opts("Expand All")) 35 + vim.keymap.set("n", "e", api.fs.rename_basename, opts("Rename: Basename")) 36 + vim.keymap.set("n", "]e", api.node.navigate.diagnostics.next, opts("Next Diagnostic")) 37 + vim.keymap.set("n", "[e", api.node.navigate.diagnostics.prev, opts("Prev Diagnostic")) 38 + vim.keymap.set("n", "F", api.live_filter.clear, opts("Clean Filter")) 39 + vim.keymap.set("n", "f", api.live_filter.start, opts("Filter")) 40 + vim.keymap.set("n", "g?", api.tree.toggle_help, opts("Help")) 41 + vim.keymap.set("n", "gy", api.fs.copy.absolute_path, opts("Copy Absolute Path")) 42 + vim.keymap.set("n", "H", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles")) 43 + vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore")) 44 + vim.keymap.set("n", "J", api.node.navigate.sibling.last, opts("Last Sibling")) 45 + vim.keymap.set("n", "K", api.node.navigate.sibling.first, opts("First Sibling")) 46 + vim.keymap.set("n", "m", api.marks.toggle, opts("Toggle Bookmark")) 47 + vim.keymap.set("n", "o", api.node.open.edit, opts("Open")) 48 + vim.keymap.set("n", "O", api.node.open.no_window_picker, opts("Open: No Window Picker")) 49 + vim.keymap.set("n", "p", api.fs.paste, opts("Paste")) 50 + vim.keymap.set("n", "P", api.node.navigate.parent, opts("Parent Directory")) 51 + vim.keymap.set("n", "q", api.tree.close, opts("Close")) 52 + vim.keymap.set("n", "r", api.fs.rename, opts("Rename")) 53 + vim.keymap.set("n", "R", api.tree.reload, opts("Refresh")) 54 + vim.keymap.set("n", "s", api.node.run.system, opts("Run System")) 55 + vim.keymap.set("n", "S", api.tree.search_node, opts("Search")) 56 + vim.keymap.set("n", "U", api.tree.toggle_custom_filter, opts("Toggle Hidden")) 57 + vim.keymap.set("n", "W", api.tree.collapse_all, opts("Collapse")) 58 + vim.keymap.set("n", "x", api.fs.cut, opts("Cut")) 59 + vim.keymap.set("n", "y", api.fs.copy.filename, opts("Copy Name")) 60 + vim.keymap.set("n", "Y", api.fs.copy.relative_path, opts("Copy Relative Path")) 61 + vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open")) 62 + vim.keymap.set("n", "<2-RightMouse>", api.tree.change_root_to_node, opts("CD")) 63 + -- END_DEFAULT_ON_ATTACH 64 + 65 + -- Mappings migrated from view.mappings.list 66 + -- 67 + -- You will need to insert "your code goes here" for any mappings with a custom action_cb 68 + vim.keymap.set("n", "u", api.tree.change_root_to_parent, opts("Up")) 69 + end 70 + 71 + vim.g.loaded_netrw = 1 72 + vim.g.loaded_netrwPlugin = 1 73 + 74 + vim.api.nvim_create_autocmd({ "UIEnter" }, { 75 + callback = function(data) 76 + -- buffer is a directory 77 + local directory = vim.fn.isdirectory(data.file) == 1 78 + 79 + if not directory then return end 80 + 81 + -- change to the directory 82 + vim.cmd.cd(data.file) 83 + 84 + -- open the tree 85 + require("nvim-tree.api").tree.open() 86 + end, 87 + }) 88 + 89 + return { 90 + "kyazdani42/nvim-tree.lua", 91 + dependencies = "nvim-tree/nvim-web-devicons", 92 + lazy = false, 93 + keys = { 94 + { "<C-\\>", ":NvimTreeToggle<CR>", { noremap = true, silent = true }, desc = "Toggle NvimTree" }, 95 + }, 96 + opts = { 97 + sync_root_with_cwd = true, 98 + reload_on_bufenter = true, 99 + respect_buf_cwd = true, 100 + on_attach = on_attach, 101 + view = { 102 + adaptive_size = true, 103 + side = "left", 104 + }, 105 + renderer = { 106 + group_empty = true, 107 + indent_markers = { 108 + enable = true, 109 + icons = { corner = "└ ", edge = "│ ", item = "│ ", none = " " }, 110 + }, 111 + }, 112 + diagnostics = { 113 + enable = true, 114 + show_on_dirs = true, 115 + -- icons = {hint = "", info = "", warning = "", error = ""} 116 + }, 117 + filters = { dotfiles = true, custom = { 118 + ".*\\~", 119 + "build$", 120 + "gradle$", 121 + "gradlew", 122 + "node_modules", 123 + } }, 124 + filesystem_watchers = { enable = true, debounce_delay = 50 }, 125 + }, 126 + }
+29
lua/plugins/octo.lua
··· 1 + return { 2 + "pwntester/octo.nvim", 3 + cmd = "Octo", 4 + event = { { event = "BufReadCmd", pattern = "octo://*" } }, 5 + opts = { 6 + enable_builtin = true, 7 + default_to_projects_v2 = true, 8 + default_merge_method = "squash", 9 + picker = "telescope", 10 + }, 11 + keys = { 12 + { "<leader>gi", "<cmd>Octo issue list<CR>", desc = "List Issues (Octo)" }, 13 + { "<leader>gI", "<cmd>Octo issue search<CR>", desc = "Search Issues (Octo)" }, 14 + { "<leader>gp", "<cmd>Octo pr list<CR>", desc = "List PRs (Octo)" }, 15 + { "<leader>gP", "<cmd>Octo pr search<CR>", desc = "Search PRs (Octo)" }, 16 + { "<leader>gr", "<cmd>Octo repo list<CR>", desc = "List Repos (Octo)" }, 17 + { "<leader>gS", "<cmd>Octo search<CR>", desc = "Search (Octo)" }, 18 + 19 + { "<leader>a", "", desc = "+assignee (Octo)", ft = "octo" }, 20 + { "<leader>c", "", desc = "+comment/code (Octo)", ft = "octo" }, 21 + { "<leader>l", "", desc = "+label (Octo)", ft = "octo" }, 22 + { "<leader>i", "", desc = "+issue (Octo)", ft = "octo" }, 23 + { "<leader>r", "", desc = "+react (Octo)", ft = "octo" }, 24 + { "<leader>p", "", desc = "+pr (Octo)", ft = "octo" }, 25 + { "<leader>v", "", desc = "+review (Octo)", ft = "octo" }, 26 + { "@", "@<C-x><C-o>", mode = "i", ft = "octo", silent = true }, 27 + { "#", "#<C-x><C-o>", mode = "i", ft = "octo", silent = true }, 28 + }, 29 + }
+55
lua/plugins/outher.lua
··· 1 + return { 2 + -- language support 3 + -- terraform 4 + { 5 + "hashivim/vim-terraform", 6 + ft = { "terraform" }, 7 + }, 8 + -- svelte 9 + { 10 + "evanleck/vim-svelte", 11 + ft = { "svelte" }, 12 + }, 13 + -- toml 14 + "cespare/vim-toml", 15 + -- yaml 16 + { 17 + "cuducos/yaml.nvim", 18 + ft = { "yaml" }, 19 + dependencies = { 20 + "nvim-treesitter/nvim-treesitter", 21 + }, 22 + }, 23 + -- rust 24 + { 25 + "rust-lang/rust.vim", 26 + ft = { "rust" }, 27 + config = function() 28 + vim.g.rustfmt_autosave = 1 29 + vim.g.rustfmt_emit_files = 1 30 + vim.g.rustfmt_fail_silently = 0 31 + vim.g.rust_clip_command = "xcopy" 32 + end, 33 + }, 34 + -- fish 35 + "khaveesh/vim-fish-syntax", 36 + -- markdown 37 + { 38 + "plasticboy/vim-markdown", 39 + ft = { "markdown" }, 40 + dependencies = { 41 + "godlygeek/tabular", 42 + }, 43 + config = function() 44 + -- never ever fold! 45 + vim.g.vim_markdown_folding_disabled = 1 46 + -- support front-matter in .md files 47 + vim.g.vim_markdown_frontmatter = 1 48 + -- 'o' on a list item should insert at same level 49 + vim.g.vim_markdown_new_list_item_indent = 0 50 + -- don't add bullets when wrapping: 51 + -- https://github.com/preservim/vim-markdown/issues/232 52 + vim.g.vim_markdown_auto_insert_bullets = 0 53 + end, 54 + }, 55 + }
+187
lua/plugins/outline.lua
··· 1 + return { 2 + "hedyhli/outline.nvim", 3 + lazy = true, 4 + cmd = { "Outline", "OutlineOpen" }, 5 + keys = { -- Example mapping to toggle outline 6 + { "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" }, 7 + }, 8 + opts = { 9 + outline_window = { 10 + -- Auto close the outline window if goto_location is triggered and not for 11 + -- peek_location 12 + auto_close = false, 13 + -- Automatically scroll to the location in code when navigating outline window. 14 + auto_jump = true, 15 + -- boolean or integer for milliseconds duration to apply a temporary highlight 16 + -- when jumping. false to disable. 17 + jump_highlight_duration = 300, 18 + -- Whether to center the cursor line vertically in the screen when 19 + -- jumping/focusing. Executes zz. 20 + center_on_jump = true, 21 + 22 + -- Vim options for the outline window 23 + show_numbers = false, 24 + show_relative_numbers = false, 25 + wrap = false, 26 + }, 27 + 28 + outline_items = { 29 + -- Show extra details with the symbols (lsp dependent) as virtual next 30 + show_symbol_details = true, 31 + -- Show corresponding line numbers of each symbol on the left column as 32 + -- virtual text, for quick navigation when not focused on outline. 33 + -- Why? See this comment: 34 + -- https://github.com/simrat39/symbols-outline.nvim/issues/212#issuecomment-1793503563 35 + show_symbol_lineno = true, 36 + -- Whether to highlight the currently hovered symbol and all direct parents 37 + highlight_hovered_item = true, 38 + -- Whether to automatically set cursor location in outline to match 39 + -- location in code when focus is in code. If disabled you can use 40 + -- `:OutlineFollow[!]` from any window or `<C-g>` from outline window to 41 + -- trigger this manually. 42 + auto_set_cursor = true, 43 + -- Autocmd events to automatically trigger these operations. 44 + auto_update_events = { 45 + -- Includes both setting of cursor and highlighting of hovered item. 46 + -- The above two options are respected. 47 + -- This can be triggered manually through `follow_cursor` lua API, 48 + -- :OutlineFollow command, or <C-g>. 49 + follow = { "CursorMoved" }, 50 + -- Re-request symbols from the provider. 51 + -- This can be triggered manually through `refresh_outline` lua API, or 52 + -- :OutlineRefresh command. 53 + items = { "InsertLeave", "WinEnter", "BufEnter", "BufWinEnter", "TabEnter", "BufWritePost" }, 54 + }, 55 + }, 56 + 57 + -- Options for outline guides which help show tree hierarchy of symbols 58 + guides = { 59 + enabled = true, 60 + markers = { 61 + -- It is recommended for bottom and middle markers to use the same number 62 + -- of characters to align all child nodes vertically. 63 + bottom = "└", 64 + middle = "├", 65 + vertical = "│", 66 + }, 67 + }, 68 + 69 + symbol_folding = { 70 + -- Depth past which nodes will be folded by default. Set to false to unfold all on open. 71 + autofold_depth = 1, 72 + -- When to auto unfold nodes 73 + auto_unfold = { 74 + -- Auto unfold currently hovered symbol 75 + hovered = true, 76 + -- Auto fold when the root level only has this many nodes. 77 + -- Set true for 1 node, false for 0. 78 + only = true, 79 + }, 80 + markers = { "", "" }, 81 + }, 82 + 83 + -- These keymaps can be a string or a table for multiple keys. 84 + -- Set to `{}` to disable. (Using 'nil' will fallback to default keys) 85 + keymaps = { 86 + show_help = "?", 87 + close = { "<Esc>", "q" }, 88 + -- Jump to symbol under cursor. 89 + -- It can auto close the outline window when triggered, see 90 + -- 'auto_close' option above. 91 + goto_location = "<Cr>", 92 + -- Jump to symbol under cursor but keep focus on outline window. 93 + peek_location = "o", 94 + -- Visit location in code and close outline immediately 95 + goto_and_close = "<S-Cr>", 96 + -- Change cursor position of outline window to match current location in code. 97 + -- 'Opposite' of goto/peek_location. 98 + restore_location = "<C-g>", 99 + -- Open LSP/provider-dependent symbol hover information 100 + hover_symbol = "<C-space>", 101 + -- Preview location code of the symbol under cursor 102 + toggle_preview = "K", 103 + rename_symbol = "r", 104 + code_actions = "a", 105 + -- These fold actions are collapsing tree nodes, not code folding 106 + fold = "h", 107 + unfold = "l", 108 + fold_toggle = "<Tab>", 109 + -- Toggle folds for all nodes. 110 + -- If at least one node is folded, this action will fold all nodes. 111 + -- If all nodes are folded, this action will unfold all nodes. 112 + fold_toggle_all = "<S-Tab>", 113 + fold_all = "W", 114 + unfold_all = "E", 115 + fold_reset = "R", 116 + -- Move down/up by one line and peek_location immediately. 117 + -- You can also use outline_window.auto_jump=true to do this for any 118 + -- j/k/<down>/<up>. 119 + down_and_jump = "<C-j>", 120 + up_and_jump = "<C-k>", 121 + }, 122 + 123 + providers = { 124 + priority = { "lsp", "coc", "markdown", "norg" }, 125 + -- Configuration for each provider (3rd party providers are supported) 126 + lsp = { 127 + -- Lsp client names to ignore 128 + blacklist_clients = {}, 129 + }, 130 + markdown = { 131 + -- List of supported ft's to use the markdown provider 132 + filetypes = { "markdown" }, 133 + }, 134 + }, 135 + 136 + symbols = { 137 + -- Filter by kinds (string) for symbols in the outline. 138 + -- Possible kinds are the Keys in the icons table below. 139 + -- A filter list is a string[] with an optional exclude (boolean) field. 140 + -- The symbols.filter option takes either a filter list or ft:filterList 141 + -- key-value pairs. 142 + -- Put exclude=true in the string list to filter by excluding the list of 143 + -- kinds instead. 144 + -- Include all except String and Constant: 145 + -- filter = { 'String', 'Constant', exclude = true } 146 + -- Only include Package, Module, and Function: 147 + -- filter = { 'Package', 'Module', 'Function' } 148 + -- See more examples below. 149 + filter = nil, 150 + 151 + icons = { 152 + File = { icon = "󰈔", hl = "Identifier" }, 153 + Module = { icon = "󰆧", hl = "Include" }, 154 + Namespace = { icon = "󰅪", hl = "Include" }, 155 + Package = { icon = "󰏗", hl = "Include" }, 156 + Class = { icon = "𝓒", hl = "Type" }, 157 + Method = { icon = "ƒ", hl = "Function" }, 158 + Property = { icon = "", hl = "Identifier" }, 159 + Field = { icon = "󰆨", hl = "Identifier" }, 160 + Constructor = { icon = "", hl = "Special" }, 161 + Enum = { icon = "ℰ", hl = "Type" }, 162 + Interface = { icon = "󰜰", hl = "Type" }, 163 + Function = { icon = "", hl = "Function" }, 164 + Variable = { icon = "", hl = "Constant" }, 165 + Constant = { icon = "", hl = "Constant" }, 166 + String = { icon = "𝓐", hl = "String" }, 167 + Number = { icon = "#", hl = "Number" }, 168 + Boolean = { icon = "⊨", hl = "Boolean" }, 169 + Array = { icon = "󰅪", hl = "Constant" }, 170 + Object = { icon = "⦿", hl = "Type" }, 171 + Key = { icon = "🔐", hl = "Type" }, 172 + Null = { icon = "NULL", hl = "Type" }, 173 + EnumMember = { icon = "", hl = "Identifier" }, 174 + Struct = { icon = "𝓢", hl = "Structure" }, 175 + Event = { icon = "🗲", hl = "Type" }, 176 + Operator = { icon = "+", hl = "Identifier" }, 177 + TypeParameter = { icon = "𝙏", hl = "Identifier" }, 178 + Component = { icon = "󰅴", hl = "Function" }, 179 + Fragment = { icon = "󰅴", hl = "Constant" }, 180 + TypeAlias = { icon = " ", hl = "Type" }, 181 + Parameter = { icon = " ", hl = "Identifier" }, 182 + StaticMethod = { icon = " ", hl = "Function" }, 183 + Macro = { icon = " ", hl = "Function" }, 184 + }, 185 + }, 186 + }, 187 + }
+17
lua/plugins/pairs.lua
··· 1 + return { 2 + "steelsojka/pears.nvim", 3 + lazy = false, 4 + config = function() 5 + require("pears").setup(function(conf) 6 + conf.preset("tag_matching") 7 + conf.expand_on_enter(true) 8 + conf.on_enter(function(pears_handle) 9 + if vim.fn.pumvisible() == 1 and vim.fn.complete_info().selected ~= -1 then 10 + vim.cmd([[:startinsert | call feedkeys("\<c-y>")]]) 11 + else 12 + pears_handle() 13 + end 14 + end) 15 + end) 16 + end, 17 + }
+18
lua/plugins/presence.lua
··· 1 + -- Discord Rich Presence 2 + return { 3 + "andweeb/presence.nvim", 4 + opts = { 5 + -- General options 6 + neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image 7 + main_image = "neovim", -- Main image display (either "neovim" or "file") 8 + enable_line_number = false, -- Displays the current line number instead of the current project 9 + 10 + -- Rich Presence text options 11 + editing_text = "Coding :p", 12 + file_explorer_text = "Coding :p", 13 + git_commit_text = "Coding :p", 14 + plugin_manager_text = "Coding :p", 15 + reading_text = "Coding :p", 16 + workspace_text = "NEOVIM BABYY", 17 + }, 18 + }
+13
lua/plugins/tailwindcss.lua
··· 1 + return { 2 + { 3 + "roobert/tailwindcss-colorizer-cmp.nvim", 4 + -- optionally, override the default options: 5 + config = function() require("tailwindcss-colorizer-cmp").setup({ color_square_width = 2 }) end, 6 + }, 7 + { 8 + "razak17/tailwind-fold.nvim", 9 + opts = {}, 10 + dependencies = { "nvim-treesitter/nvim-treesitter" }, 11 + ft = { "html", "typescriptreact", "tsx" }, 12 + }, 13 + }
+79
lua/plugins/telescope.lua
··· 1 + return { 2 + "nvim-telescope/telescope.nvim", 3 + lazy = false, 4 + keys = { 5 + { 6 + "<Leader>ff", 7 + ":lua require('telescope.builtin').find_files()<CR>", 8 + { noremap = true, silent = true }, 9 + desc = "Find Files", 10 + }, 11 + { 12 + "<Leader>bb", 13 + ":lua require('telescope.builtin').buffers()<CR>", 14 + { noremap = true, silent = true }, 15 + desc = "Buffers", 16 + }, 17 + { 18 + "<Leader>g", 19 + ":lua require('telescope.builtin').live_grep()<CR>", 20 + { noremap = true, silent = true }, 21 + desc = "Live Grep", 22 + }, 23 + { 24 + "<Leader>h", 25 + ":lua require('telescope.builtin').help_tags()<CR>", 26 + { noremap = true, silent = true }, 27 + desc = "Help Tags", 28 + }, 29 + { 30 + "<Leader>ss", 31 + ":lua require('telescope.builtin').spell_suggest()<CR>", 32 + { noremap = true, silent = true }, 33 + desc = "Spell Suggest", 34 + }, 35 + { 36 + "<Leader>k", 37 + ":lua require('telescope.builtin').keymaps()<CR>", 38 + { noremap = true, silent = true }, 39 + desc = "Show Key Maps", 40 + }, 41 + { 42 + "<Leader>vo", 43 + ":lua require('telescope.builtin').vim_options()<CR>", 44 + { noremap = true, silent = true }, 45 + desc = "Neovim Options", 46 + }, 47 + { 48 + "<Leader>D", 49 + ":lua require('telescope.builtin').diagnostics()<CR>", 50 + { noremap = true, silent = true }, 51 + desc = "Diagnostics", 52 + }, 53 + { 54 + "<Leader>cs", 55 + ":lua require('telescope.builtin').git_status()<CR>", 56 + { noremap = true, silent = true }, 57 + desc = "Git Status", 58 + }, 59 + }, 60 + dependencies = { 61 + { "nvim-lua/plenary.nvim" }, 62 + { "nvim-telescope/telescope-fzf-native.nvim" }, 63 + -- ripgrep needs to be installed on the system 'pacman -S ripgrep' 64 + }, 65 + config = function() 66 + local actions = require("telescope.actions") 67 + require("telescope").setup({ 68 + defaults = { mappings = { i = { ["<esc>"] = actions.close } } }, 69 + extensions = { 70 + fzf = { 71 + fuzzy = true, 72 + override_generic_sorter = true, 73 + override_file_sorter = true, 74 + case_mode = "smart_case", 75 + }, 76 + }, 77 + }) 78 + end, 79 + }
+17
lua/plugins/todo-comment.lua
··· 1 + return { 2 + "folke/todo-comments.nvim", 3 + cmd = { "TodoTrouble", "TodoTelescope" }, 4 + opts = {}, 5 + keys = { 6 + { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" }, 7 + { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" }, 8 + { "<leader>xt", "<cmd>Trouble todo toggle<cr>", desc = "Todo (Trouble)" }, 9 + { 10 + "<leader>xT", 11 + "<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>", 12 + desc = "Todo/Fix/Fixme (Trouble)", 13 + }, 14 + { "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" }, 15 + { "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" }, 16 + }, 17 + }
+143
lua/plugins/treesitter.lua
··· 1 + return { 2 + "nvim-treesitter/nvim-treesitter", 3 + version = false, -- last release is way too old and doesn't work on Windows 4 + build = ":TSUpdate", 5 + event = { "VeryLazy" }, 6 + init = function(plugin) 7 + -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early 8 + -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which 9 + -- no longer trigger the **nvim-treesitter** module to be loaded in time. 10 + -- Luckily, the only things that those plugins need are the custom queries, which we make available 11 + -- during startup. 12 + require("lazy.core.loader").add_to_rtp(plugin) 13 + require("nvim-treesitter.query_predicates") 14 + end, 15 + dependencies = { 16 + { 17 + "nvim-treesitter/nvim-treesitter-textobjects", 18 + config = function() 19 + -- When in diff mode, we want to use the default 20 + -- vim text objects c & C instead of the treesitter ones. 21 + local move = require("nvim-treesitter.textobjects.move") ---@type table<string,fun(...)> 22 + local configs = require("nvim-treesitter.configs") 23 + for name, fn in pairs(move) do 24 + if name:find("goto") == 1 then 25 + move[name] = function(q, ...) 26 + if vim.wo.diff then 27 + local config = configs.get_module("textobjects.move")[name] ---@type table<string,string> 28 + for key, query in pairs(config or {}) do 29 + if q == query and key:find("[%]%[][cC]") then 30 + vim.cmd("normal! " .. key) 31 + return 32 + end 33 + end 34 + end 35 + return fn(q, ...) 36 + end 37 + end 38 + end 39 + end, 40 + }, 41 + }, 42 + cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, 43 + keys = { 44 + { "<c-space>", desc = "Increment Selection" }, 45 + { "<bs>", desc = "Decrement Selection", mode = "x" }, 46 + }, 47 + opts = { 48 + highlight = { enable = true }, 49 + indent = { enable = true }, 50 + ensure_installed = { 51 + "rust", 52 + "bash", 53 + "c", 54 + "diff", 55 + "html", 56 + "javascript", 57 + "jsdoc", 58 + "json", 59 + "jsonc", 60 + "lua", 61 + "luadoc", 62 + "luap", 63 + "markdown", 64 + "markdown_inline", 65 + "nim", 66 + "python", 67 + "query", 68 + "regex", 69 + "toml", 70 + "tsx", 71 + "typescript", 72 + "vim", 73 + "nasm", 74 + "vimdoc", 75 + "xml", 76 + "yaml", 77 + "hurl", 78 + "nix", 79 + "zig", 80 + "asm", 81 + "jq", 82 + "just", 83 + "latex", 84 + "go", 85 + "gleam", 86 + "gitcommit", 87 + "gitignore", 88 + "dockerfile", 89 + "go", 90 + "kdl", 91 + "kotlin", 92 + "java", 93 + "make", 94 + "pony", 95 + "po", 96 + "printf", 97 + "sql", 98 + "typst", 99 + "http", 100 + "graphql", 101 + "earthfile", 102 + "editorconfig", 103 + "ssh_config", 104 + "tmux", 105 + }, 106 + incremental_selection = { 107 + enable = true, 108 + keymaps = { 109 + init_selection = "<C-space>", 110 + node_incremental = "<C-space>", 111 + scope_incremental = false, 112 + node_decremental = "<bs>", 113 + }, 114 + }, 115 + textobjects = { 116 + move = { 117 + enable = true, 118 + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, 119 + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, 120 + goto_previous_start = { 121 + ["[f"] = "@function.outer", 122 + ["[c"] = "@class.outer", 123 + }, 124 + goto_previous_end = { 125 + ["[F"] = "@function.outer", 126 + ["[C"] = "@class.outer", 127 + }, 128 + }, 129 + }, 130 + }, 131 + config = function(_, opts) 132 + if type(opts.ensure_installed) == "table" then 133 + ---@type table<string, boolean> 134 + local added = {} 135 + opts.ensure_installed = vim.tbl_filter(function(lang) 136 + if added[lang] then return false end 137 + added[lang] = true 138 + return true 139 + end, opts.ensure_installed) 140 + end 141 + require("nvim-treesitter.configs").setup(opts) 142 + end, 143 + }
+61
lua/plugins/trouble.lua
··· 1 + return { 2 + "folke/trouble.nvim", 3 + cmd = { "Trouble" }, 4 + opts = { modes = { lsp = { win = { position = "right" } } } }, 5 + keys = { 6 + { 7 + "<leader>xx", 8 + "<cmd>Trouble diagnostics toggle<cr>", 9 + desc = "Diagnostics (Trouble)", 10 + }, 11 + { 12 + "<leader>xX", 13 + "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", 14 + desc = "Buffer Diagnostics (Trouble)", 15 + }, 16 + { 17 + "<leader>cs", 18 + "<cmd>Trouble symbols toggle<cr>", 19 + desc = "Symbols (Trouble)", 20 + }, 21 + { 22 + "<leader>cS", 23 + "<cmd>Trouble lsp toggle<cr>", 24 + desc = "LSP references/definitions/... (Trouble)", 25 + }, 26 + { 27 + "<leader>xL", 28 + "<cmd>Trouble loclist toggle<cr>", 29 + desc = "Location List (Trouble)", 30 + }, 31 + { 32 + "<leader>xQ", 33 + "<cmd>Trouble qflist toggle<cr>", 34 + desc = "Quickfix List (Trouble)", 35 + }, 36 + { 37 + "[q", 38 + function() 39 + if require("trouble").is_open() then 40 + require("trouble").prev({ skip_groups = true, jump = true }) 41 + else 42 + local ok, err = pcall(vim.cmd.cprev) 43 + if not ok then vim.notify(err, vim.log.levels.ERROR) end 44 + end 45 + end, 46 + desc = "Previous Trouble/Quickfix Item", 47 + }, 48 + { 49 + "]q", 50 + function() 51 + if require("trouble").is_open() then 52 + require("trouble").next({ skip_groups = true, jump = true }) 53 + else 54 + local ok, err = pcall(vim.cmd.cnext) 55 + if not ok then vim.notify(err, vim.log.levels.ERROR) end 56 + end 57 + end, 58 + desc = "Next Trouble/Quickfix Item", 59 + }, 60 + }, 61 + }
+7
lua/plugins/undotree.lua
··· 1 + return { 2 + "mbbill/undotree", 3 + lazy = true, 4 + keys = { 5 + { "<Leader>u", ":UndotreeToggle<CR>", { noremap = true }, desc = "", mode = "n" }, 6 + }, 7 + }
+10
lua/plugins/vimtex.lua
··· 1 + return { 2 + "lervag/vimtex", 3 + lazy = false, -- lazy-loading will disable inverse search 4 + init = function() vim.g.vimtex_view_method = "zathura" end, 5 + config = function() 6 + vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover 7 + vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" 8 + end, 9 + keys = { { "<localLeader>l", "", desc = "+vimtext" } }, 10 + }
+64
lua/plugins/which-key.lua
··· 1 + return { 2 + "folke/which-key.nvim", 3 + event = "VeryLazy", 4 + opts_extend = { "spec" }, 5 + opts = { 6 + defaults = {}, 7 + spec = { 8 + { 9 + mode = { "n", "v" }, 10 + { "<leader><tab>", group = "tabs" }, 11 + { "<leader>c", group = "code" }, 12 + { "<leader>f", group = "file/find" }, 13 + { "<leader>g", group = "git" }, 14 + { "<leader>gh", group = "hunks" }, 15 + { "<leader>q", group = "quit/session" }, 16 + { "<leader>s", group = "search" }, 17 + { "<leader>u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, 18 + { 19 + "<leader>x", 20 + group = "diagnostics/quickfix", 21 + icon = { icon = "󱖫 ", color = "green" }, 22 + }, 23 + { "[", group = "prev" }, 24 + { "]", group = "next" }, 25 + { "g", group = "goto" }, 26 + { "gs", group = "surround" }, 27 + { "z", group = "fold" }, 28 + { 29 + "<leader>b", 30 + group = "buffer", 31 + expand = function() return require("which-key.extras").expand.buf() end, 32 + }, 33 + { 34 + "<leader>w", 35 + group = "windows", 36 + proxy = "<c-w>", 37 + expand = function() return require("which-key.extras").expand.win() end, 38 + }, 39 + -- better descriptions 40 + { "gx", desc = "Open with system app" }, 41 + }, 42 + }, 43 + }, 44 + keys = { 45 + { 46 + "<leader>?", 47 + function() require("which-key").show({ global = false }) end, 48 + desc = "Buffer Keymaps (which-key)", 49 + }, 50 + { 51 + "<c-w><space>", 52 + function() require("which-key").show({ keys = "<c-w>", loop = true }) end, 53 + desc = "Window Hydra Mode (which-key)", 54 + }, 55 + }, 56 + config = function(_, opts) 57 + local wk = require("which-key") 58 + wk.setup(opts) 59 + if not vim.tbl_isempty(opts.defaults) then 60 + vim.notify("which-key: opts.defaults is deprecated. Please use opts.spec instead.", "error") 61 + wk.register(opts.defaults) 62 + end 63 + end, 64 + }
+63
lua/settings.lua
··· 1 + -- I'm lazy 2 + local opt = vim.opt 3 + 4 + -- Nice Number Line 5 + opt.relativenumber = true 6 + opt.number = true 7 + 8 + -- Tabs & Spaces 9 + opt.expandtab = true 10 + opt.tabstop = 4 11 + opt.softtabstop = 4 12 + opt.shiftwidth = 4 13 + opt.smartindent = true 14 + opt.autoindent = true 15 + 16 + -- Searching 17 + opt.ignorecase = true 18 + opt.smartcase = true 19 + opt.hlsearch = true 20 + opt.incsearch = true 21 + 22 + -- Column Settings 23 + opt.signcolumn = "yes" 24 + opt.colorcolumn = "120" 25 + opt.wrap = false 26 + 27 + -- Cursor Settings 28 + opt.cursorline = true 29 + -- opt.guicursor = 30 + -- "n-v-c-sm:block,ci-ve:ver25,r-cr-o:hor20,i:block-blinkoff1-blinkon1" 31 + 32 + -- Window Settings 33 + opt.splitbelow = true 34 + opt.splitright = true 35 + opt.lazyredraw = true 36 + opt.showtabline = 0 37 + 38 + -- Spelling 39 + opt.spell = true 40 + opt.spelloptions = "camel" 41 + 42 + -- Other 43 + opt.mouse = "a" 44 + opt.showmode = false 45 + opt.termguicolors = true 46 + opt.hidden = true 47 + opt.clipboard = "unnamedplus" 48 + opt.formatoptions = "cjql" 49 + opt.laststatus = 3 50 + opt.completeopt = { "menu", "menuone", "preview" } 51 + opt.conceallevel = 2 52 + opt.concealcursor = "" 53 + -- opt.updatetime = 100 54 + 55 + -- Backup -- I have power issues :/ 56 + opt.backup = true 57 + opt.swapfile = true 58 + opt.undodir = os.getenv("HOME") .. "/.cache/undodir" 59 + opt.undofile = true 60 + 61 + -- arabic support 62 + opt.encoding = "utf-8" 63 + opt.termbidi = true
+313
spell/en.utf-8.add
··· 1 + HTTPException 2 + ormar 3 + async 4 + fastapi 5 + OAuth2 6 + async 7 + HTTPAuthorization 8 + OAuth2 9 + str 10 + bool 11 + pydantic 12 + import 13 + class 14 + init 15 + ======= 16 + Nvidia 17 + AUR 18 + multilib 19 + aur 20 + utils 21 + config 22 + linux 23 + config 24 + arcolinux 25 + Qtile 26 + vscode 27 + spotify 28 + adblock 29 + refrenced 30 + date 31 + date 32 + redis 33 + Todo 34 + Lua 35 + LSP 36 + fontsize 37 + qtile 38 + libqtile 39 + pathlib 40 + os 41 + rofi 42 + pyright 43 + pwd 44 + sa 45 + kwargs 46 + SQLModel 47 + UUID4 48 + sqlmodel 49 + uuid 50 + passlib 51 + uuid4 52 + from 53 + pwd 54 + bcrypt 55 + timedelta 56 + datetime 57 + aioredis 58 + jwt 59 + ExpiredSignatureError 60 + APIRouter 61 + OAuth2 62 + OAuth2 63 + from 64 + param 65 + signup 66 + OAuth2 67 + oauth 68 + access 69 + user 70 + whatsapp 71 + idx 72 + msg 73 + numbers 74 + url 75 + grid 76 + floating 77 + JSX 78 + HTMLAttributes 79 + HTMLButton 80 + api 81 + mx 82 + rtl 83 + ltr 84 + px 85 + py 86 + بحث 87 + fi 88 + ai 89 + headlessui 90 + md 91 + bg 92 + xl 93 + overscroll 94 + firefox 95 + preact 96 + WhatsappURLStage 97 + Configs 98 + Enum 99 + preact 100 + eslint 101 + sm 102 + const 103 + enums 104 + Browser 105 + usr 106 + exe 107 + win32 108 + src 109 + env 110 + tsx 111 + baseUrl 112 + jsxFragmentFactory 113 + jsxFactory 114 + jsxImportSource 115 + jsx 116 + skipLibCheck 117 + noImplicitReturns 118 + noUnusedParameters 119 + compilerOptions 120 + dom 121 + compat 122 + tsconfig 123 + json 124 + js 125 + tailwindcss 126 + vite 127 + Abdallah 128 + Gamal 129 + TypeScript 130 + cjs 131 + mjs 132 + cts 133 + mts 134 + noEmit 135 + tsc 136 + typecheck 137 + postinstall 138 + deps 139 + npm 140 + devDependencies 141 + autoprefixer 142 + postcss 143 + utf8 144 + Stage 145 + mb 146 + www 147 + css 148 + javascriptreact 149 + typescriptreact 150 + htmldjango 151 + javascript 152 + nvim 153 + lsp 154 + coq 155 + cmp 156 + sourcery 157 + filetypes 158 + cssls 159 + github 160 + neovim 161 + lspconfig 162 + lspconfig's 163 + urls 164 + localhost 165 + ws 166 + deserialized 167 + backend 168 + win64 169 + userdata 170 + img 171 + png 172 + jpeg 173 + txt 174 + AMedia 175 + AMedia 176 + useDefineForClassFields 177 + ESNext 178 + Iterable 179 + allowJs 180 + esModuleInterop 181 + allowSyntheticDefaultImports 182 + forceConsistentCasingInFileNames 183 + moduleResolution 184 + resolveJsonModule 185 + isolatedModules 186 + vitejs 187 + frontend 188 + UndoTree 189 + undodir 190 + gv 191 + dP 192 + Badr 193 + whitespace 194 + exists 195 + starlite 196 + wouter 197 + classnames 198 + btn 199 + pdfroff 200 + LOC 201 + longpress 202 + libphonenumber 203 + WriteFormat 204 + FormatWrite 205 + testid 206 + AsyncGenerator 207 + dir 208 + auth 209 + uri 210 + X11 211 + asyncio 212 + funcion 213 + OAuth 214 + endblock 215 + noqa 216 + F401 217 + CORSMiddleware 218 + HTTPSRedirect 219 + HTTPSRedirect 220 + jinja 221 + xset 222 + flatpak 223 + hashmap 224 + filesystem 225 + Mutex 226 + icon 227 + dbus 228 + freedesktop 229 + GC 230 + F403 231 + ar 232 + clsx 233 + BookDetails 234 + BookStore 235 + ستور 236 + بوك 237 + ico 238 + Navbar 239 + QuickActions 240 + nextjs 241 + نت 242 + python3 243 + Gamemode 244 + xs 245 + DetailsButton 246 + DetailsText 247 + useUrlFilter 248 + UrlFilterProvider 249 + FilterComponent 250 + UrlFilterContext 251 + HomeCards 252 + d99 253 + e8a 254 + e7 255 + bbe000bac05 256 + PiNumber 257 + numbersToName 258 + lang 259 + w3 260 + svg 261 + currentColor 262 + HeroScrollDownArrow 263 + fetchData 264 + AiOutlinePound 265 + Unkown 266 + HTMX 267 + Delist 268 + extralight 269 + vercel 270 + csrfToken 271 + signin 272 + nextauth 273 + nextauthjs 274 + discussioncomment 275 + FiSearch 276 + FaShoppingCart 277 + FaUser 278 + useOnScreen 279 + facebook 280 + outContactNumber 281 + ourContactInfo 282 + scrollend 283 + scrollAmount 284 + MdKeyboardArrowLeft 285 + MdKeyboardArrowRight 286 + useState 287 + useEffect 288 + useMemo 289 + AiOutlineEye 290 + postgres 291 + services 292 + postgresql 293 + pgdata 294 + pgadmin4 295 + dpage 296 + MdOutlineError 297 + enum 298 + navbar 299 + image 300 + services 301 + Ok 302 + vw 303 + minmax 304 + useFilteredData 305 + serverless 306 + adidas 307 + href 308 + ui 309 + PasswordField 310 + onChange 311 + credentialsError 312 + UrlProvider 313 + useFilter
spell/en.utf-8.add.spl

This is a binary file and will not be displayed.