My simple neovim config

feat: styles + remove noice

+555 -576
+3
nvim/.config/nvim/.stylua.toml
··· 1 + indent_type = "Spaces" 2 + indent_width = 4 3 + line_endings = "Unix"
+4 -4
nvim/.config/nvim/ftdetect/github_workflows.lua
··· 2 2 -- au BufRead,BufNewFile */.github/workflows/*.yml setlocal filetype=yaml.github 3 3 -- au BufRead,BufNewFile */.github/workflows/*.yaml setlocal filetype=yaml.github 4 4 vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { 5 - pattern = { "*/.github/workflows/*.yml", "*/.github/workflows/*.yaml" }, 6 - callback = function() 7 - vim.bo.filetype = "yaml.github" 8 - end, 5 + pattern = { "*/.github/workflows/*.yml", "*/.github/workflows/*.yaml" }, 6 + callback = function() 7 + vim.bo.filetype = "yaml.github" 8 + end, 9 9 })
+5 -5
nvim/.config/nvim/ftdetect/superhtml.lua
··· 1 1 vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { 2 - pattern = { "*.shtml" }, 3 - callback = function() 4 - vim.bo.filetype = "superhtml" 5 - end, 2 + pattern = { "*.shtml" }, 3 + callback = function() 4 + vim.bo.filetype = "superhtml" 5 + end, 6 6 }) 7 7 vim.filetype.add({ extension = { 8 - shtml = "superhtml", 8 + shtml = "superhtml", 9 9 } })
+55 -55
nvim/.config/nvim/init.lua
··· 1 1 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 2 if not vim.loop.fs_stat(lazypath) then 3 - vim.fn.system({ 4 - "git", 5 - "clone", 6 - "--filter=blob:none", 7 - "--single-branch", 8 - "https://github.com/folke/lazy.nvim.git", 9 - lazypath, 10 - }) 3 + vim.fn.system({ 4 + "git", 5 + "clone", 6 + "--filter=blob:none", 7 + "--single-branch", 8 + "https://github.com/folke/lazy.nvim.git", 9 + lazypath, 10 + }) 11 11 end 12 12 vim.g.mapleader = "," 13 13 vim.opt.runtimepath:prepend(lazypath) ··· 42 42 43 43 -- Treesitter Consistent Syntax Highlighting and indent 44 44 require("nvim-treesitter.configs").setup({ 45 - ensure_installed = { 46 - "bash", 47 - "c", 48 - "dockerfile", 49 - "gitcommit", 50 - "go", 51 - "gomod", 52 - "lua", 53 - "python", 54 - "query", 55 - "rust", 56 - "toml", 57 - "yaml", 58 - }, 59 - highlight = { 60 - enable = true, 61 - }, 62 - rainbow = { 63 - enable = true, 64 - extended_mode = true, 65 - }, 66 - playground = { 67 - enable = true, 68 - }, 69 - -- Potentially remove, this is not really in my roation yet 70 - incremental_selection = { 71 - enable = true, 72 - keymaps = { 73 - init_selection = "<c-space>", 74 - node_incremental = "<c-space>", 75 - scope_incremental = "<c-s>", 76 - node_decremental = "<c-backspace>", 77 - }, 78 - }, 79 - sync_install = false, 80 - auto_install = false, 81 - ignore_install = {}, 82 - modules = {}, 45 + ensure_installed = { 46 + "bash", 47 + "c", 48 + "dockerfile", 49 + "gitcommit", 50 + "go", 51 + "gomod", 52 + "lua", 53 + "python", 54 + "query", 55 + "rust", 56 + "toml", 57 + "yaml", 58 + }, 59 + highlight = { 60 + enable = true, 61 + }, 62 + rainbow = { 63 + enable = true, 64 + extended_mode = true, 65 + }, 66 + playground = { 67 + enable = true, 68 + }, 69 + -- Potentially remove, this is not really in my roation yet 70 + incremental_selection = { 71 + enable = true, 72 + keymaps = { 73 + init_selection = "<c-space>", 74 + node_incremental = "<c-space>", 75 + scope_incremental = "<c-s>", 76 + node_decremental = "<c-backspace>", 77 + }, 78 + }, 79 + sync_install = false, 80 + auto_install = false, 81 + ignore_install = {}, 82 + modules = {}, 83 83 }) 84 84 vim.filetype.add({ extension = { mdx = "mdx", service = "systemd" } }) 85 85 vim.treesitter.language.register("markdown", "mdx") ··· 88 88 require("treesitter-context").setup() 89 89 90 90 vim.api.nvim_create_autocmd({ "FileType" }, { 91 - group = vim.api.nvim_create_augroup("edit_text", { clear = true }), 92 - pattern = { "gitcommit", "markdown", "txt" }, 93 - desc = "Enable spell checking and text wrapping for certain filetypes", 94 - callback = function() 95 - -- vim.opt_local.wrap = true 96 - vim.opt_local.spell = true 97 - end, 91 + group = vim.api.nvim_create_augroup("edit_text", { clear = true }), 92 + pattern = { "gitcommit", "markdown", "txt" }, 93 + desc = "Enable spell checking and text wrapping for certain filetypes", 94 + callback = function() 95 + -- vim.opt_local.wrap = true 96 + vim.opt_local.spell = true 97 + end, 98 98 }) 99 99 vim.opt.spell = false 100 100 101 101 vim.diagnostic.config({ 102 - update_in_insert = false, 103 - virtual_text = { current_line = true }, 102 + update_in_insert = false, 103 + virtual_text = { current_line = true }, 104 104 })
+1 -2
nvim/.config/nvim/lazy-lock.json
··· 15 15 "mini.indentscope": { "branch": "main", "commit": "8af2569a7d7fd37300dfa760e44e71efbbf322fd" }, 16 16 "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, 17 17 "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, 18 - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, 19 - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, 20 18 "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, 21 19 "nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" }, 22 20 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, ··· 27 25 "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, 28 26 "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, 29 27 "rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" }, 28 + "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, 30 29 "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, 31 30 "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, 32 31 "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
+20 -20
nvim/.config/nvim/lsp/gopls.lua
··· 1 1 return { 2 - settings = { 3 - gopls = { 4 - gofumpt = true, 5 - analyses = { 6 - unusedparams = true, 7 - shadow = true, 8 - structtag = false, 9 - }, 10 - staticcheck = true, 11 - codelenses = { test = true }, 12 - hints = { 13 - assignVariableTypes = true, 14 - composeLiteralFields = true, 15 - constantValues = true, 16 - functionTypeParameter = true, 17 - parameterNames = true, 18 - rangeVariableTypes = true, 19 - }, 20 - }, 21 - }, 2 + settings = { 3 + gopls = { 4 + gofumpt = true, 5 + analyses = { 6 + unusedparams = true, 7 + shadow = true, 8 + structtag = false, 9 + }, 10 + staticcheck = true, 11 + codelenses = { test = true }, 12 + hints = { 13 + assignVariableTypes = true, 14 + composeLiteralFields = true, 15 + constantValues = true, 16 + functionTypeParameter = true, 17 + parameterNames = true, 18 + rangeVariableTypes = true, 19 + }, 20 + }, 21 + }, 22 22 }
+3 -3
nvim/.config/nvim/lsp/ltex.lua
··· 1 1 return { 2 - settings = { 3 - enabled = { "markdown" }, 4 - }, 2 + settings = { 3 + enabled = { "markdown" }, 4 + }, 5 5 }
+23 -23
nvim/.config/nvim/lsp/lua_ls.lua
··· 1 1 return { 2 - settings = { 3 - Lua = { 4 - runtime = { 5 - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) 6 - version = "LuaJIT", 7 - }, 8 - diagnostics = { 9 - -- Get the language server to recognize the `vim` global and `awesome` 10 - globals = { "vim", "use", "beautiful", "awful" }, 11 - }, 12 - workspace = { 13 - -- Make the server aware of Neovim runtime files 14 - library = vim.api.nvim_get_runtime_file("", true), 15 - checkThirdParty = false, 16 - }, 17 - hint = { 18 - enable = true, 19 - }, 20 - telemetry = { 21 - enable = false, 22 - }, 23 - }, 24 - }, 2 + settings = { 3 + Lua = { 4 + runtime = { 5 + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) 6 + version = "LuaJIT", 7 + }, 8 + diagnostics = { 9 + -- Get the language server to recognize the `vim` global and `awesome` 10 + globals = { "vim", "use", "beautiful", "awful" }, 11 + }, 12 + workspace = { 13 + -- Make the server aware of Neovim runtime files 14 + library = vim.api.nvim_get_runtime_file("", true), 15 + checkThirdParty = false, 16 + }, 17 + hint = { 18 + enable = true, 19 + }, 20 + telemetry = { 21 + enable = false, 22 + }, 23 + }, 24 + }, 25 25 }
+7 -7
nvim/.config/nvim/lsp/nil_ls.lua
··· 1 1 return { 2 - settings = { 3 - ["nil"] = { 4 - formatting = { 5 - command = { "nixpkgs-fmt" }, 6 - }, 7 - }, 8 - }, 2 + settings = { 3 + ["nil"] = { 4 + formatting = { 5 + command = { "nixpkgs-fmt" }, 6 + }, 7 + }, 8 + }, 9 9 }
+10 -10
nvim/.config/nvim/lsp/pyright.lua
··· 1 1 return { 2 - settings = { 3 - pyright = { 4 - disableOrganizeImports = true, 5 - }, 6 - python = { 7 - analysis = { 8 - ignore = "*", 9 - }, 10 - }, 11 - }, 2 + settings = { 3 + pyright = { 4 + disableOrganizeImports = true, 5 + }, 6 + python = { 7 + analysis = { 8 + ignore = "*", 9 + }, 10 + }, 11 + }, 12 12 }
+1 -1
nvim/.config/nvim/lsp/superhtml.lua
··· 1 1 return { 2 - filetypes = { "html", "superhtml", "htm", "shtml" }, 2 + filetypes = { "html", "superhtml", "htm", "shtml" }, 3 3 }
+5 -5
nvim/.config/nvim/lsp/terraformls.lua
··· 1 1 return { 2 - settings = { 3 - terraform = { 4 - path = "/etc/profiles/per-user/ethan/bin/tofu", 5 - }, 6 - }, 2 + settings = { 3 + terraform = { 4 + path = "/etc/profiles/per-user/ethan/bin/tofu", 5 + }, 6 + }, 7 7 }
+104 -104
nvim/.config/nvim/lua/lsp.lua
··· 2 2 -- local lspkind = require("lspkind") 3 3 -- A table of servers used for setting up LSP 4 4 local servers = { 5 - -- "bashls", 6 - "superhtml", 7 - "pyright", 8 - "nixd", 9 - "zls", 10 - "ruff", 11 - "tflint", 12 - { 13 - "terraformls", 14 - exec = "terraform-ls", 15 - }, 16 - { 17 - "ansiblels", 18 - exec = "ansible-language-server", 19 - }, 20 - { 21 - "eslint", 22 - exec = "vscode-eslint-language-server", 23 - }, 24 - { 25 - "nil_ls", 26 - exec = "nil", 27 - }, 28 - { 29 - "ltex", 30 - exec = "ltex-ls", 31 - }, 32 - { 33 - "tsserver", 34 - exec = "typescript-language-server", 35 - }, 36 - { 37 - "astro", 38 - exec = "astro-ls", 39 - }, 40 - { 41 - "lua_ls", 42 - exec = "lua-language-server", 43 - }, 44 - "gopls", 5 + -- "bashls", 6 + "superhtml", 7 + "pyright", 8 + "nixd", 9 + "zls", 10 + "ruff", 11 + "tflint", 12 + { 13 + "terraformls", 14 + exec = "terraform-ls", 15 + }, 16 + { 17 + "ansiblels", 18 + exec = "ansible-language-server", 19 + }, 20 + { 21 + "eslint", 22 + exec = "vscode-eslint-language-server", 23 + }, 24 + { 25 + "nil_ls", 26 + exec = "nil", 27 + }, 28 + { 29 + "ltex", 30 + exec = "ltex-ls", 31 + }, 32 + { 33 + "tsserver", 34 + exec = "typescript-language-server", 35 + }, 36 + { 37 + "astro", 38 + exec = "astro-ls", 39 + }, 40 + { 41 + "lua_ls", 42 + exec = "lua-language-server", 43 + }, 44 + "gopls", 45 45 } 46 46 47 47 -- Only install servers that exist + use custom options 48 48 for _, server in ipairs(servers) do 49 - local exec = "" 50 - local lsp = "" 51 - if type(server) == "table" then 52 - lsp = server[1] 53 - if server.enable ~= nil and server.continue then 54 - goto continue 55 - end 56 - if server.exec ~= nil then 57 - exec = server.exec 58 - else 59 - exec = lsp 60 - end 61 - else 62 - lsp = server 63 - exec = server 64 - end 49 + local exec = "" 50 + local lsp = "" 51 + if type(server) == "table" then 52 + lsp = server[1] 53 + if server.enable ~= nil and server.continue then 54 + goto continue 55 + end 56 + if server.exec ~= nil then 57 + exec = server.exec 58 + else 59 + exec = lsp 60 + end 61 + else 62 + lsp = server 63 + exec = server 64 + end 65 65 66 - local command = [[echo executable("]] .. exec .. [[")]] 67 - local out = vim.api.nvim_exec2(command, { output = true }) 68 - local result = tonumber(out.output) 69 - if result ~= 0 then 70 - vim.lsp.enable(lsp) 71 - -- nvim_lsp[lsp].setup(setup) 72 - end 73 - ::continue:: 66 + local command = [[echo executable("]] .. exec .. [[")]] 67 + local out = vim.api.nvim_exec2(command, { output = true }) 68 + local result = tonumber(out.output) 69 + if result ~= 0 then 70 + vim.lsp.enable(lsp) 71 + -- nvim_lsp[lsp].setup(setup) 72 + end 73 + ::continue:: 74 74 end 75 75 76 76 vim.g.rustaceanvim = { 77 - server = { 78 - on_attach = function(client, _) 79 - client.server_capabilities.workspace.didChangeWatchedFiles = { 80 - dynamicRegistration = false, 81 - } 82 - end, 83 - default_settings = { 84 - ["rust-analyzer"] = { 85 - files = { 86 - watcherExclude = { 87 - "**/.direnv/**", 88 - }, 89 - excludeDirs = { 90 - ".direnv", 91 - ".github", 92 - }, 93 - }, 94 - cargo = { 95 - features = "all", 96 - }, 97 - }, 98 - }, 99 - }, 77 + server = { 78 + on_attach = function(client, _) 79 + client.server_capabilities.workspace.didChangeWatchedFiles = { 80 + dynamicRegistration = false, 81 + } 82 + end, 83 + default_settings = { 84 + ["rust-analyzer"] = { 85 + files = { 86 + watcherExclude = { 87 + "**/.direnv/**", 88 + }, 89 + excludeDirs = { 90 + ".direnv", 91 + ".github", 92 + }, 93 + }, 94 + cargo = { 95 + features = "all", 96 + }, 97 + }, 98 + }, 99 + }, 100 100 } 101 101 102 102 vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) 103 103 vim.api.nvim_create_autocmd("LspAttach", { 104 - group = "LspAttach_inlayhints", 105 - callback = function(args) 106 - vim.lsp.inlay_hint.enable(true) 107 - end, 104 + group = "LspAttach_inlayhints", 105 + callback = function(args) 106 + vim.lsp.inlay_hint.enable(true) 107 + end, 108 108 }) 109 109 110 110 vim.api.nvim_create_autocmd("LspAttach", { 111 - group = vim.api.nvim_create_augroup("LspAttach_Python", {}), 112 - callback = function(args) 113 - if not (args.data and args.data.client_id) then 114 - return 115 - end 116 - local client = vim.lsp.get_client_by_id(args.data.client_id) 117 - if client == nil then 118 - return 119 - end 120 - if client.name == "ruff" then 121 - client.server_capabilities.hoverProvider = false 122 - end 123 - end, 111 + group = vim.api.nvim_create_augroup("LspAttach_Python", {}), 112 + callback = function(args) 113 + if not (args.data and args.data.client_id) then 114 + return 115 + end 116 + local client = vim.lsp.get_client_by_id(args.data.client_id) 117 + if client == nil then 118 + return 119 + end 120 + if client.name == "ruff" then 121 + client.server_capabilities.hoverProvider = false 122 + end 123 + end, 124 124 })
+18 -18
nvim/.config/nvim/lua/mappings.lua
··· 1 1 -- Map leader config 2 2 vim.cmd.timeoutlen = 0 3 3 local function map(mode, l, r, opts) 4 - opts = opts or {} 5 - if type(mode) == "table" then 6 - for _, m in ipairs(mode) do 7 - vim.keymap.set(m, l, r, opts) 8 - end 9 - else 10 - vim.keymap.set(mode, l, r, opts) 11 - end 4 + opts = opts or {} 5 + if type(mode) == "table" then 6 + for _, m in ipairs(mode) do 7 + vim.keymap.set(m, l, r, opts) 8 + end 9 + else 10 + vim.keymap.set(mode, l, r, opts) 11 + end 12 12 end 13 13 map({ "n", "v" }, "<leader>p", '"+p', { desc = "Paste from clipboard" }) 14 14 map({ "n", "v" }, "<leader>y", '"+y', { desc = "Yank to clipboard" }) ··· 16 16 17 17 -- Register LSP mappings 18 18 vim.api.nvim_create_autocmd("LspAttach", { 19 - group = vim.api.nvim_create_augroup("UserLspConfig", {}), 20 - callback = function(args) 21 - map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code Action" }) 22 - map("n", "<leader>R", vim.lsp.buf.rename, { desc = "Rename" }) 23 - map("n", "<leader>fl", require("telescope.builtin").lsp_document_symbols, { desc = "LSP Document Symbols" }) 24 - map("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" }) 25 - map("n", "<leader>gr", require("telescope.builtin").lsp_references, { desc = "References" }) 26 - map("n", "<leader>gi", require("telescope.builtin").lsp_implementations, { desc = "Implementations" }) 27 - map("n", "K", vim.lsp.buf.hover, { desc = "Hover (LSP)" }) 28 - end, 19 + group = vim.api.nvim_create_augroup("UserLspConfig", {}), 20 + callback = function(args) 21 + map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code Action" }) 22 + map("n", "<leader>R", vim.lsp.buf.rename, { desc = "Rename" }) 23 + map("n", "<leader>fl", require("telescope.builtin").lsp_document_symbols, { desc = "LSP Document Symbols" }) 24 + map("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" }) 25 + map("n", "<leader>gr", require("telescope.builtin").lsp_references, { desc = "References" }) 26 + map("n", "<leader>gi", require("telescope.builtin").lsp_implementations, { desc = "Implementations" }) 27 + map("n", "K", vim.lsp.buf.hover, { desc = "Hover (LSP)" }) 28 + end, 29 29 })
+14 -14
nvim/.config/nvim/lua/plugins/conform.lua
··· 1 1 return { 2 - { 3 - "stevearc/conform.nvim", 4 - opts = { 5 - formatters_by_ft = { 6 - lua = { "stylua" }, 7 - python = { "ruff_format" }, 8 - terraform = { "tofu_fmt" }, 9 - }, 10 - format_on_save = { 11 - timeout_ms = 500, 12 - lsp_fallback = true, 13 - }, 14 - }, 15 - }, 2 + { 3 + "stevearc/conform.nvim", 4 + opts = { 5 + formatters_by_ft = { 6 + lua = { "stylua" }, 7 + python = { "ruff_format" }, 8 + terraform = { "tofu_fmt" }, 9 + }, 10 + format_on_save = { 11 + timeout_ms = 500, 12 + lsp_fallback = true, 13 + }, 14 + }, 15 + }, 16 16 }
+7 -7
nvim/.config/nvim/lua/plugins/coverage.lua
··· 1 1 return { 2 - { 3 - "andythigpen/nvim-coverage", 4 - dependencies = { "nvim-lua/plenary.nvim", "EdenEast/nightfox.nvim" }, 5 - -- lazy = true, 6 - ft = { "python", "rust" }, 7 - config = true, 8 - }, 2 + { 3 + "andythigpen/nvim-coverage", 4 + dependencies = { "nvim-lua/plenary.nvim", "EdenEast/nightfox.nvim" }, 5 + -- lazy = true, 6 + ft = { "python", "rust" }, 7 + config = true, 8 + }, 9 9 }
+37 -37
nvim/.config/nvim/lua/plugins/git.lua
··· 1 1 return { 2 - -- Git 3 - { 4 - "tpope/vim-fugitive", 5 - cmd = "Git", 6 - keys = { 7 - { "<leader>gg", vim.cmd.Git, desc = "Open vim-fugitive" }, 8 - }, 9 - }, 10 - { 11 - "lewis6991/gitsigns.nvim", 12 - lazy = true, 13 - event = "BufReadPre", 14 - opts = { 15 - on_attach = function(bufnr) 16 - local signs = require("gitsigns") 17 - local function map(mode, l, r, opts) 18 - opts = opts or {} 19 - opts.buffer = bufnr 20 - if type(mode) == "table" then 21 - for _, m in ipairs(mode) do 22 - vim.keymap.set(m, l, r, opts) 23 - end 24 - else 25 - vim.keymap.set(mode, l, r, opts) 26 - end 27 - end 28 - map({ "v", "n" }, "<leader>gsh", function() 29 - signs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) 30 - end, { desc = "Stage hunk" }) 31 - map("n", "<leader>gsb", signs.stage_buffer, { desc = "Stage buffer" }) 32 - map({ "v", "n" }, "<leader>gsr", function() 33 - require("gitsigns").reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) 34 - end, { desc = "Reset hunk" }) 35 - map("n", "<leader>gb", signs.blame_line, { desc = "Blame Line" }) 36 - end, 37 - }, 38 - }, 2 + -- Git 3 + { 4 + "tpope/vim-fugitive", 5 + cmd = "Git", 6 + keys = { 7 + { "<leader>gg", vim.cmd.Git, desc = "Open vim-fugitive" }, 8 + }, 9 + }, 10 + { 11 + "lewis6991/gitsigns.nvim", 12 + lazy = true, 13 + event = "BufReadPre", 14 + opts = { 15 + on_attach = function(bufnr) 16 + local signs = require("gitsigns") 17 + local function map(mode, l, r, opts) 18 + opts = opts or {} 19 + opts.buffer = bufnr 20 + if type(mode) == "table" then 21 + for _, m in ipairs(mode) do 22 + vim.keymap.set(m, l, r, opts) 23 + end 24 + else 25 + vim.keymap.set(mode, l, r, opts) 26 + end 27 + end 28 + map({ "v", "n" }, "<leader>gsh", function() 29 + signs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) 30 + end, { desc = "Stage hunk" }) 31 + map("n", "<leader>gsb", signs.stage_buffer, { desc = "Stage buffer" }) 32 + map({ "v", "n" }, "<leader>gsr", function() 33 + require("gitsigns").reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) 34 + end, { desc = "Reset hunk" }) 35 + map("n", "<leader>gb", signs.blame_line, { desc = "Blame Line" }) 36 + end, 37 + }, 38 + }, 39 39 }
+60 -60
nvim/.config/nvim/lua/plugins/harpoon.lua
··· 1 1 return { 2 - { 3 - "ThePrimeagen/harpoon", 4 - opts = { 5 - tabline = true, 6 - }, 7 - dependencies = { 8 - { "nvim-lua/plenary.nvim" }, 9 - }, 10 - keys = { 11 - { 12 - "<leader>m", 13 - function() 14 - require("harpoon.mark").add_file() 15 - end, 16 - desc = "Harpoon Mark", 17 - }, 18 - { 19 - "<leader>q", 20 - function() 21 - require("harpoon.ui").toggle_quick_menu() 22 - end, 23 - desc = "Harpoon Quick Menu", 24 - }, 25 - { 26 - "<leader>1", 27 - function() 28 - require("harpoon.ui").nav_file(1) 29 - end, 30 - desc = "Harpoon 1", 31 - }, 32 - { 33 - "<leader>2", 34 - function() 35 - require("harpoon.ui").nav_file(2) 36 - end, 37 - desc = "Harpoon 2", 38 - }, 39 - { 40 - "<leader>3", 41 - function() 42 - require("harpoon.ui").nav_file(3) 43 - end, 44 - desc = "Harpoon 3", 45 - }, 46 - { 47 - "<leader>4", 48 - function() 49 - require("harpoon.ui").nav_file(4) 50 - end, 51 - desc = "Harpoon 4", 52 - }, 53 - { 54 - "<leader>5", 55 - function() 56 - require("harpoon.ui").nav_file(5) 57 - end, 58 - desc = "Harpoon 5", 59 - }, 60 - }, 61 - }, 2 + { 3 + "ThePrimeagen/harpoon", 4 + opts = { 5 + tabline = true, 6 + }, 7 + dependencies = { 8 + { "nvim-lua/plenary.nvim" }, 9 + }, 10 + keys = { 11 + { 12 + "<leader>m", 13 + function() 14 + require("harpoon.mark").add_file() 15 + end, 16 + desc = "Harpoon Mark", 17 + }, 18 + { 19 + "<leader>q", 20 + function() 21 + require("harpoon.ui").toggle_quick_menu() 22 + end, 23 + desc = "Harpoon Quick Menu", 24 + }, 25 + { 26 + "<leader>1", 27 + function() 28 + require("harpoon.ui").nav_file(1) 29 + end, 30 + desc = "Harpoon 1", 31 + }, 32 + { 33 + "<leader>2", 34 + function() 35 + require("harpoon.ui").nav_file(2) 36 + end, 37 + desc = "Harpoon 2", 38 + }, 39 + { 40 + "<leader>3", 41 + function() 42 + require("harpoon.ui").nav_file(3) 43 + end, 44 + desc = "Harpoon 3", 45 + }, 46 + { 47 + "<leader>4", 48 + function() 49 + require("harpoon.ui").nav_file(4) 50 + end, 51 + desc = "Harpoon 4", 52 + }, 53 + { 54 + "<leader>5", 55 + function() 56 + require("harpoon.ui").nav_file(5) 57 + end, 58 + desc = "Harpoon 5", 59 + }, 60 + }, 61 + }, 62 62 }
+80 -80
nvim/.config/nvim/lua/plugins/init.lua
··· 1 1 return { 2 - { "neovim/nvim-lspconfig" }, 3 - "jose-elias-alvarez/null-ls.nvim", 4 - { 5 - "mrcjkb/rustaceanvim", 6 - version = "^5", 7 - ft = { "rust" }, 8 - }, 9 - { 10 - "olexsmir/gopher.nvim", 11 - dependencies = { 12 - "nvim-lua/plenary.nvim", 13 - "nvim-treesitter/nvim-treesitter", 14 - }, 15 - ft = "go", 16 - build = function() 17 - if not require("nvim-treesitter.parsers").has_parser("go") then 18 - vim.cmd("TSInstall go") 19 - end 20 - end, 21 - config = true, 22 - }, 23 - -- Filetype plugins 24 - { 25 - "Saecki/crates.nvim", 26 - event = "BufRead Cargo.toml", 27 - dependencies = { "nvim-lua/plenary.nvim" }, 28 - opts = { 29 - lsp = { 30 - enabled = true, 31 - actions = true, 32 - completion = true, 33 - hover = true, 34 - }, 35 - }, 36 - }, 37 - "ziglang/zig.vim", 2 + { "neovim/nvim-lspconfig" }, 3 + "jose-elias-alvarez/null-ls.nvim", 4 + { 5 + "mrcjkb/rustaceanvim", 6 + version = "^5", 7 + ft = { "rust" }, 8 + }, 9 + { 10 + "olexsmir/gopher.nvim", 11 + dependencies = { 12 + "nvim-lua/plenary.nvim", 13 + "nvim-treesitter/nvim-treesitter", 14 + }, 15 + ft = "go", 16 + build = function() 17 + if not require("nvim-treesitter.parsers").has_parser("go") then 18 + vim.cmd("TSInstall go") 19 + end 20 + end, 21 + config = true, 22 + }, 23 + -- Filetype plugins 24 + { 25 + "Saecki/crates.nvim", 26 + event = "BufRead Cargo.toml", 27 + dependencies = { "nvim-lua/plenary.nvim" }, 28 + opts = { 29 + lsp = { 30 + enabled = true, 31 + actions = true, 32 + completion = true, 33 + hover = true, 34 + }, 35 + }, 36 + }, 37 + "ziglang/zig.vim", 38 38 39 - { 40 - "saghen/blink.cmp", 41 - dependencies = { "rafamadriz/friendly-snippets" }, 42 - version = "1.*", 43 - opts = { 44 - keymap = { 45 - preset = "default", 46 - ["<C-j>"] = { "select_next", "fallback" }, 47 - ["<C-k>"] = { "select_prev", "fallback" }, 48 - }, 49 - }, 50 - }, 51 - -- Treesitter 52 - { 53 - "nvim-treesitter/nvim-treesitter", 54 - build = ":TSUpdate", 55 - }, 56 - "HiPhish/rainbow-delimiters.nvim", 57 - "nvim-treesitter/nvim-treesitter-context", 58 - -- UI 59 - { 60 - "folke/tokyonight.nvim", 61 - lazy = false, 62 - priority = 1000, 63 - opts = {}, 64 - config = function() 65 - vim.cmd.colorscheme("tokyonight-night") 66 - end, 67 - }, 68 - -- "stevearc/dressing.nvim", 69 - { 70 - "ethanholz/nvim-lastplace", 71 - config = true, 72 - }, 73 - "mbbill/undotree", 74 - { 75 - "folke/which-key.nvim", 76 - config = true, 77 - }, 78 - { 79 - "IndianBoy42/tree-sitter-just", 80 - config = true, 81 - }, 82 - "NoahTheDuke/vim-just", 39 + { 40 + "saghen/blink.cmp", 41 + dependencies = { "rafamadriz/friendly-snippets" }, 42 + version = "1.*", 43 + opts = { 44 + keymap = { 45 + preset = "default", 46 + ["<C-j>"] = { "select_next", "fallback" }, 47 + ["<C-k>"] = { "select_prev", "fallback" }, 48 + }, 49 + }, 50 + }, 51 + -- Treesitter 52 + { 53 + "nvim-treesitter/nvim-treesitter", 54 + build = ":TSUpdate", 55 + }, 56 + "HiPhish/rainbow-delimiters.nvim", 57 + "nvim-treesitter/nvim-treesitter-context", 58 + -- UI 59 + { 60 + "folke/tokyonight.nvim", 61 + lazy = false, 62 + priority = 1000, 63 + opts = {}, 64 + config = function() 65 + vim.cmd.colorscheme("tokyonight-night") 66 + end, 67 + }, 68 + -- "stevearc/dressing.nvim", 69 + { 70 + "ethanholz/nvim-lastplace", 71 + config = true, 72 + }, 73 + "mbbill/undotree", 74 + { 75 + "folke/which-key.nvim", 76 + config = true, 77 + }, 78 + { 79 + "IndianBoy42/tree-sitter-just", 80 + config = true, 81 + }, 82 + "NoahTheDuke/vim-just", 83 83 }
+13 -13
nvim/.config/nvim/lua/plugins/lualine.lua
··· 1 1 return { 2 - { 3 - "nvim-lualine/lualine.nvim", 4 - config = function() 5 - vim.opt.cmdheight = 0 6 - vim.opt.laststatus = 3 7 - require("lualine").setup({ 8 - options = { 9 - component_separators = { left = "|", right = "|" }, 10 - section_separators = "", 11 - }, 12 - }) 13 - end, 14 - }, 2 + { 3 + "nvim-lualine/lualine.nvim", 4 + config = function() 5 + vim.opt.cmdheight = 0 6 + vim.opt.laststatus = 3 7 + require("lualine").setup({ 8 + options = { 9 + component_separators = { left = "|", right = "|" }, 10 + section_separators = "", 11 + }, 12 + }) 13 + end, 14 + }, 15 15 }
+22 -22
nvim/.config/nvim/lua/plugins/mini.lua
··· 1 1 return { 2 - { 3 - "echasnovski/mini.indentscope", 4 - version = "*", 5 - config = function() 6 - local indent = require("mini.indentscope") 7 - indent.setup({ 8 - draw = { 9 - animation = indent.gen_animation.none(), 10 - }, 11 - }) 12 - end, 13 - }, 14 - { 15 - "echasnovski/mini.pairs", 16 - version = "*", 17 - config = true, 18 - }, 19 - { 20 - "echasnovski/mini.comment", 21 - version = "*", 22 - config = true, 23 - }, 2 + { 3 + "echasnovski/mini.indentscope", 4 + version = "*", 5 + config = function() 6 + local indent = require("mini.indentscope") 7 + indent.setup({ 8 + draw = { 9 + animation = indent.gen_animation.none(), 10 + }, 11 + }) 12 + end, 13 + }, 14 + { 15 + "echasnovski/mini.pairs", 16 + version = "*", 17 + config = true, 18 + }, 19 + { 20 + "echasnovski/mini.comment", 21 + version = "*", 22 + config = true, 23 + }, 24 24 }
-31
nvim/.config/nvim/lua/plugins/noice.lua
··· 1 - return { 2 - { 3 - "folke/noice.nvim", 4 - event = "VeryLazy", 5 - dependencies = { 6 - "MunifTanjim/nui.nvim", 7 - }, 8 - enabled = true, 9 - opts = { 10 - lsp = { 11 - progress = { 12 - throttle = 10000 / 30, 13 - }, 14 - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** 15 - override = { 16 - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 17 - ["vim.lsp.util.stylize_markdown"] = true, 18 - ["cmp.entry.get_documentation"] = true, 19 - }, 20 - }, 21 - -- you can enable a preset for easier configuration 22 - presets = { 23 - bottom_search = true, -- use a classic bottom cmdline for search 24 - command_palette = true, -- position the cmdline and popupmenu together 25 - long_message_to_split = true, -- long messages will be sent to a split 26 - inc_rename = false, -- enables an input dialog for inc-rename.nvim 27 - lsp_doc_border = true, -- add a border to hover docs and signature help 28 - }, 29 - }, 30 - }, 31 - }
+3 -3
nvim/.config/nvim/lua/plugins/oil.lua
··· 1 1 return { 2 - "stevearc/oil.nvim", 3 - opts = {}, 4 - dependencies = { { "echasnovski/mini.icons", opts = {} } }, 2 + "stevearc/oil.nvim", 3 + opts = {}, 4 + dependencies = { { "echasnovski/mini.icons", opts = {} } }, 5 5 }
+8
nvim/.config/nvim/lua/plugins/snacks.lua
··· 1 + return { 2 + { 3 + "folke/snacks.nvim", 4 + opts = { 5 + input = {}, 6 + }, 7 + }, 8 + }
+39 -39
nvim/.config/nvim/lua/plugins/telescope.lua
··· 1 1 return { 2 - { 3 - "nvim-telescope/telescope.nvim", 4 - cmd = "Telescope", 5 - dependencies = { 6 - "nvim-lua/plenary.nvim", 7 - "nvim-telescope/telescope-fzf-native.nvim", 8 - }, 9 - branch = "0.1.x", 10 - init = function() 11 - require("telescope").setup({ 12 - pickers = { 13 - find_files = { 14 - -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. 15 - find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, 16 - }, 17 - }, 18 - }) 19 - require("telescope").load_extension("fzf") 20 - require("telescope").load_extension("harpoon") 21 - end, 2 + { 3 + "nvim-telescope/telescope.nvim", 4 + cmd = "Telescope", 5 + dependencies = { 6 + "nvim-lua/plenary.nvim", 7 + "nvim-telescope/telescope-fzf-native.nvim", 8 + }, 9 + branch = "0.1.x", 10 + init = function() 11 + require("telescope").setup({ 12 + pickers = { 13 + find_files = { 14 + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. 15 + find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, 16 + }, 17 + }, 18 + }) 19 + require("telescope").load_extension("fzf") 20 + require("telescope").load_extension("harpoon") 21 + end, 22 22 23 - -- lazy = true, 24 - keys = { 25 - { "<leader>ff", require("telescope.builtin").find_files, desc = "Find File" }, 26 - { "<leader>fg", require("telescope.builtin").live_grep, desc = "Live Grep" }, 27 - { "<leader>fb", require("telescope.builtin").buffers, desc = "Buffer List" }, 28 - { "<leader>fh", require("telescope.builtin").help_tags, desc = "Help Tags" }, 29 - { "<leader>fc", require("telescope.builtin").colorscheme, desc = "Colorschme" }, 30 - { "<leader>fq", require("telescope").extensions.harpoon.marks, desc = "Harpoon Marks" }, 31 - { "<leader>fs", require("telescope.builtin").grep_string, desc = "Grep String" }, 32 - { "<leader>s", require("telescope.builtin").spell_suggest, desc = "Spell suggest" }, 33 - }, 34 - }, 35 - { 36 - "nvim-telescope/telescope-fzf-native.nvim", 37 - dependencies = { 38 - { "nvim-telescope/telescope.nvim" }, 39 - }, 40 - build = "make", 41 - }, 23 + -- lazy = true, 24 + keys = { 25 + { "<leader>ff", require("telescope.builtin").find_files, desc = "Find File" }, 26 + { "<leader>fg", require("telescope.builtin").live_grep, desc = "Live Grep" }, 27 + { "<leader>fb", require("telescope.builtin").buffers, desc = "Buffer List" }, 28 + { "<leader>fh", require("telescope.builtin").help_tags, desc = "Help Tags" }, 29 + { "<leader>fc", require("telescope.builtin").colorscheme, desc = "Colorschme" }, 30 + { "<leader>fq", require("telescope").extensions.harpoon.marks, desc = "Harpoon Marks" }, 31 + { "<leader>fs", require("telescope.builtin").grep_string, desc = "Grep String" }, 32 + { "<leader>s", require("telescope.builtin").spell_suggest, desc = "Spell suggest" }, 33 + }, 34 + }, 35 + { 36 + "nvim-telescope/telescope-fzf-native.nvim", 37 + dependencies = { 38 + { "nvim-telescope/telescope.nvim" }, 39 + }, 40 + build = "make", 41 + }, 42 42 }
+13 -13
nvim/.config/nvim/lua/plugins/trouble.lua
··· 1 1 return { 2 - { 3 - "folke/lsp-trouble.nvim", 4 - config = true, 5 - cmd = "Trouble", 6 - keys = { 7 - { 8 - "<leader>xx", 9 - "<cmd>Trouble diagnostics toggle<cr>", 10 - desc = "Diagnostics (Trouble)", 11 - }, 12 - }, 13 - dependencies = { "echasnovski/mini.icons" }, 14 - }, 2 + { 3 + "folke/lsp-trouble.nvim", 4 + config = true, 5 + cmd = "Trouble", 6 + keys = { 7 + { 8 + "<leader>xx", 9 + "<cmd>Trouble diagnostics toggle<cr>", 10 + desc = "Diagnostics (Trouble)", 11 + }, 12 + }, 13 + dependencies = { "echasnovski/mini.icons" }, 14 + }, 15 15 }