diff --git a/nvim/.config/nvim/.stylua.toml b/nvim/.config/nvim/.stylua.toml new file mode 100644 index 0000000..75ba609 --- /dev/null +++ b/nvim/.config/nvim/.stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 4 +line_endings = "Unix" diff --git a/nvim/.config/nvim/ftdetect/github_workflows.lua b/nvim/.config/nvim/ftdetect/github_workflows.lua index b25e75c..d53bb72 100644 --- a/nvim/.config/nvim/ftdetect/github_workflows.lua +++ b/nvim/.config/nvim/ftdetect/github_workflows.lua @@ -2,8 +2,8 @@ -- au BufRead,BufNewFile */.github/workflows/*.yml setlocal filetype=yaml.github -- au BufRead,BufNewFile */.github/workflows/*.yaml setlocal filetype=yaml.github vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { - pattern = { "*/.github/workflows/*.yml", "*/.github/workflows/*.yaml" }, - callback = function() - vim.bo.filetype = "yaml.github" - end, + pattern = { "*/.github/workflows/*.yml", "*/.github/workflows/*.yaml" }, + callback = function() + vim.bo.filetype = "yaml.github" + end, }) diff --git a/nvim/.config/nvim/ftdetect/superhtml.lua b/nvim/.config/nvim/ftdetect/superhtml.lua index 5768c2a..15edece 100644 --- a/nvim/.config/nvim/ftdetect/superhtml.lua +++ b/nvim/.config/nvim/ftdetect/superhtml.lua @@ -1,9 +1,9 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { - pattern = { "*.shtml" }, - callback = function() - vim.bo.filetype = "superhtml" - end, + pattern = { "*.shtml" }, + callback = function() + vim.bo.filetype = "superhtml" + end, }) vim.filetype.add({ extension = { - shtml = "superhtml", + shtml = "superhtml", } }) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 00cbfe6..2a7b8bd 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,13 +1,13 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "--single-branch", - "https://github.com/folke/lazy.nvim.git", - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--single-branch", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) end vim.g.mapleader = "," vim.opt.runtimepath:prepend(lazypath) @@ -42,44 +42,44 @@ require("lsp") -- Treesitter Consistent Syntax Highlighting and indent require("nvim-treesitter.configs").setup({ - ensure_installed = { - "bash", - "c", - "dockerfile", - "gitcommit", - "go", - "gomod", - "lua", - "python", - "query", - "rust", - "toml", - "yaml", - }, - highlight = { - enable = true, - }, - rainbow = { - enable = true, - extended_mode = true, - }, - playground = { - enable = true, - }, - -- Potentially remove, this is not really in my roation yet - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = "", - node_decremental = "", - }, - }, - sync_install = false, - auto_install = false, - ignore_install = {}, - modules = {}, + ensure_installed = { + "bash", + "c", + "dockerfile", + "gitcommit", + "go", + "gomod", + "lua", + "python", + "query", + "rust", + "toml", + "yaml", + }, + highlight = { + enable = true, + }, + rainbow = { + enable = true, + extended_mode = true, + }, + playground = { + enable = true, + }, + -- Potentially remove, this is not really in my roation yet + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = "", + node_decremental = "", + }, + }, + sync_install = false, + auto_install = false, + ignore_install = {}, + modules = {}, }) vim.filetype.add({ extension = { mdx = "mdx", service = "systemd" } }) vim.treesitter.language.register("markdown", "mdx") @@ -88,17 +88,17 @@ vim.treesitter.language.register("html", "superhtml") require("treesitter-context").setup() vim.api.nvim_create_autocmd({ "FileType" }, { - group = vim.api.nvim_create_augroup("edit_text", { clear = true }), - pattern = { "gitcommit", "markdown", "txt" }, - desc = "Enable spell checking and text wrapping for certain filetypes", - callback = function() - -- vim.opt_local.wrap = true - vim.opt_local.spell = true - end, + group = vim.api.nvim_create_augroup("edit_text", { clear = true }), + pattern = { "gitcommit", "markdown", "txt" }, + desc = "Enable spell checking and text wrapping for certain filetypes", + callback = function() + -- vim.opt_local.wrap = true + vim.opt_local.spell = true + end, }) vim.opt.spell = false vim.diagnostic.config({ - update_in_insert = false, - virtual_text = { current_line = true }, + update_in_insert = false, + virtual_text = { current_line = true }, }) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index ea43730..20bd548 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -15,8 +15,6 @@ "mini.indentscope": { "branch": "main", "commit": "8af2569a7d7fd37300dfa760e44e71efbbf322fd" }, "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" }, "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, @@ -27,6 +25,7 @@ "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, "rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" }, + "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, diff --git a/nvim/.config/nvim/lsp/gopls.lua b/nvim/.config/nvim/lsp/gopls.lua index 5875814..5375194 100644 --- a/nvim/.config/nvim/lsp/gopls.lua +++ b/nvim/.config/nvim/lsp/gopls.lua @@ -1,22 +1,22 @@ return { - settings = { - gopls = { - gofumpt = true, - analyses = { - unusedparams = true, - shadow = true, - structtag = false, - }, - staticcheck = true, - codelenses = { test = true }, - hints = { - assignVariableTypes = true, - composeLiteralFields = true, - constantValues = true, - functionTypeParameter = true, - parameterNames = true, - rangeVariableTypes = true, - }, - }, - }, + settings = { + gopls = { + gofumpt = true, + analyses = { + unusedparams = true, + shadow = true, + structtag = false, + }, + staticcheck = true, + codelenses = { test = true }, + hints = { + assignVariableTypes = true, + composeLiteralFields = true, + constantValues = true, + functionTypeParameter = true, + parameterNames = true, + rangeVariableTypes = true, + }, + }, + }, } diff --git a/nvim/.config/nvim/lsp/ltex.lua b/nvim/.config/nvim/lsp/ltex.lua index 8ad2afd..4659c03 100644 --- a/nvim/.config/nvim/lsp/ltex.lua +++ b/nvim/.config/nvim/lsp/ltex.lua @@ -1,5 +1,5 @@ return { - settings = { - enabled = { "markdown" }, - }, + settings = { + enabled = { "markdown" }, + }, } diff --git a/nvim/.config/nvim/lsp/lua_ls.lua b/nvim/.config/nvim/lsp/lua_ls.lua index 347c581..573f271 100644 --- a/nvim/.config/nvim/lsp/lua_ls.lua +++ b/nvim/.config/nvim/lsp/lua_ls.lua @@ -1,25 +1,25 @@ return { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - diagnostics = { - -- Get the language server to recognize the `vim` global and `awesome` - globals = { "vim", "use", "beautiful", "awful" }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - hint = { - enable = true, - }, - telemetry = { - enable = false, - }, - }, - }, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = "LuaJIT", + }, + diagnostics = { + -- Get the language server to recognize the `vim` global and `awesome` + globals = { "vim", "use", "beautiful", "awful" }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + hint = { + enable = true, + }, + telemetry = { + enable = false, + }, + }, + }, } diff --git a/nvim/.config/nvim/lsp/nil_ls.lua b/nvim/.config/nvim/lsp/nil_ls.lua index c307410..0d4746f 100644 --- a/nvim/.config/nvim/lsp/nil_ls.lua +++ b/nvim/.config/nvim/lsp/nil_ls.lua @@ -1,9 +1,9 @@ return { - settings = { - ["nil"] = { - formatting = { - command = { "nixpkgs-fmt" }, - }, - }, - }, + settings = { + ["nil"] = { + formatting = { + command = { "nixpkgs-fmt" }, + }, + }, + }, } diff --git a/nvim/.config/nvim/lsp/pyright.lua b/nvim/.config/nvim/lsp/pyright.lua index 1c1bbf3..c86ecc0 100644 --- a/nvim/.config/nvim/lsp/pyright.lua +++ b/nvim/.config/nvim/lsp/pyright.lua @@ -1,12 +1,12 @@ return { - settings = { - pyright = { - disableOrganizeImports = true, - }, - python = { - analysis = { - ignore = "*", - }, - }, - }, + settings = { + pyright = { + disableOrganizeImports = true, + }, + python = { + analysis = { + ignore = "*", + }, + }, + }, } diff --git a/nvim/.config/nvim/lsp/superhtml.lua b/nvim/.config/nvim/lsp/superhtml.lua index 9fb3d44..db30bb2 100644 --- a/nvim/.config/nvim/lsp/superhtml.lua +++ b/nvim/.config/nvim/lsp/superhtml.lua @@ -1,3 +1,3 @@ return { - filetypes = { "html", "superhtml", "htm", "shtml" }, + filetypes = { "html", "superhtml", "htm", "shtml" }, } diff --git a/nvim/.config/nvim/lsp/terraformls.lua b/nvim/.config/nvim/lsp/terraformls.lua index 032abda..4832dce 100644 --- a/nvim/.config/nvim/lsp/terraformls.lua +++ b/nvim/.config/nvim/lsp/terraformls.lua @@ -1,7 +1,7 @@ return { - settings = { - terraform = { - path = "/etc/profiles/per-user/ethan/bin/tofu", - }, - }, + settings = { + terraform = { + path = "/etc/profiles/per-user/ethan/bin/tofu", + }, + }, } diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 85cb068..a13be77 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -2,123 +2,123 @@ vim.o.completeopt = "menuone,noinsert,noselect" -- local lspkind = require("lspkind") -- A table of servers used for setting up LSP local servers = { - -- "bashls", - "superhtml", - "pyright", - "nixd", - "zls", - "ruff", - "tflint", - { - "terraformls", - exec = "terraform-ls", - }, - { - "ansiblels", - exec = "ansible-language-server", - }, - { - "eslint", - exec = "vscode-eslint-language-server", - }, - { - "nil_ls", - exec = "nil", - }, - { - "ltex", - exec = "ltex-ls", - }, - { - "tsserver", - exec = "typescript-language-server", - }, - { - "astro", - exec = "astro-ls", - }, - { - "lua_ls", - exec = "lua-language-server", - }, - "gopls", + -- "bashls", + "superhtml", + "pyright", + "nixd", + "zls", + "ruff", + "tflint", + { + "terraformls", + exec = "terraform-ls", + }, + { + "ansiblels", + exec = "ansible-language-server", + }, + { + "eslint", + exec = "vscode-eslint-language-server", + }, + { + "nil_ls", + exec = "nil", + }, + { + "ltex", + exec = "ltex-ls", + }, + { + "tsserver", + exec = "typescript-language-server", + }, + { + "astro", + exec = "astro-ls", + }, + { + "lua_ls", + exec = "lua-language-server", + }, + "gopls", } -- Only install servers that exist + use custom options for _, server in ipairs(servers) do - local exec = "" - local lsp = "" - if type(server) == "table" then - lsp = server[1] - if server.enable ~= nil and server.continue then - goto continue - end - if server.exec ~= nil then - exec = server.exec - else - exec = lsp - end - else - lsp = server - exec = server - end + local exec = "" + local lsp = "" + if type(server) == "table" then + lsp = server[1] + if server.enable ~= nil and server.continue then + goto continue + end + if server.exec ~= nil then + exec = server.exec + else + exec = lsp + end + else + lsp = server + exec = server + end - local command = [[echo executable("]] .. exec .. [[")]] - local out = vim.api.nvim_exec2(command, { output = true }) - local result = tonumber(out.output) - if result ~= 0 then - vim.lsp.enable(lsp) - -- nvim_lsp[lsp].setup(setup) - end - ::continue:: + local command = [[echo executable("]] .. exec .. [[")]] + local out = vim.api.nvim_exec2(command, { output = true }) + local result = tonumber(out.output) + if result ~= 0 then + vim.lsp.enable(lsp) + -- nvim_lsp[lsp].setup(setup) + end + ::continue:: end vim.g.rustaceanvim = { - server = { - on_attach = function(client, _) - client.server_capabilities.workspace.didChangeWatchedFiles = { - dynamicRegistration = false, - } - end, - default_settings = { - ["rust-analyzer"] = { - files = { - watcherExclude = { - "**/.direnv/**", - }, - excludeDirs = { - ".direnv", - ".github", - }, - }, - cargo = { - features = "all", - }, - }, - }, - }, + server = { + on_attach = function(client, _) + client.server_capabilities.workspace.didChangeWatchedFiles = { + dynamicRegistration = false, + } + end, + default_settings = { + ["rust-analyzer"] = { + files = { + watcherExclude = { + "**/.direnv/**", + }, + excludeDirs = { + ".direnv", + ".github", + }, + }, + cargo = { + features = "all", + }, + }, + }, + }, } vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) vim.api.nvim_create_autocmd("LspAttach", { - group = "LspAttach_inlayhints", - callback = function(args) - vim.lsp.inlay_hint.enable(true) - end, + group = "LspAttach_inlayhints", + callback = function(args) + vim.lsp.inlay_hint.enable(true) + end, }) vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("LspAttach_Python", {}), - callback = function(args) - if not (args.data and args.data.client_id) then - return - end - local client = vim.lsp.get_client_by_id(args.data.client_id) - if client == nil then - return - end - if client.name == "ruff" then - client.server_capabilities.hoverProvider = false - end - end, + group = vim.api.nvim_create_augroup("LspAttach_Python", {}), + callback = function(args) + if not (args.data and args.data.client_id) then + return + end + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client == nil then + return + end + if client.name == "ruff" then + client.server_capabilities.hoverProvider = false + end + end, }) diff --git a/nvim/.config/nvim/lua/mappings.lua b/nvim/.config/nvim/lua/mappings.lua index c40fa9f..d1b474b 100644 --- a/nvim/.config/nvim/lua/mappings.lua +++ b/nvim/.config/nvim/lua/mappings.lua @@ -1,14 +1,14 @@ -- Map leader config vim.cmd.timeoutlen = 0 local function map(mode, l, r, opts) - opts = opts or {} - if type(mode) == "table" then - for _, m in ipairs(mode) do - vim.keymap.set(m, l, r, opts) - end - else - vim.keymap.set(mode, l, r, opts) - end + opts = opts or {} + if type(mode) == "table" then + for _, m in ipairs(mode) do + vim.keymap.set(m, l, r, opts) + end + else + vim.keymap.set(mode, l, r, opts) + end end map({ "n", "v" }, "p", '"+p', { desc = "Paste from clipboard" }) map({ "n", "v" }, "y", '"+y', { desc = "Yank to clipboard" }) @@ -16,14 +16,14 @@ map("t", "", "", { desc = "Exit terminal" }) -- Register LSP mappings vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("UserLspConfig", {}), - callback = function(args) - map("n", "ca", vim.lsp.buf.code_action, { desc = "Code Action" }) - map("n", "R", vim.lsp.buf.rename, { desc = "Rename" }) - map("n", "fl", require("telescope.builtin").lsp_document_symbols, { desc = "LSP Document Symbols" }) - map("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" }) - map("n", "gr", require("telescope.builtin").lsp_references, { desc = "References" }) - map("n", "gi", require("telescope.builtin").lsp_implementations, { desc = "Implementations" }) - map("n", "K", vim.lsp.buf.hover, { desc = "Hover (LSP)" }) - end, + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(args) + map("n", "ca", vim.lsp.buf.code_action, { desc = "Code Action" }) + map("n", "R", vim.lsp.buf.rename, { desc = "Rename" }) + map("n", "fl", require("telescope.builtin").lsp_document_symbols, { desc = "LSP Document Symbols" }) + map("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" }) + map("n", "gr", require("telescope.builtin").lsp_references, { desc = "References" }) + map("n", "gi", require("telescope.builtin").lsp_implementations, { desc = "Implementations" }) + map("n", "K", vim.lsp.buf.hover, { desc = "Hover (LSP)" }) + end, }) diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index 18aa340..168dd18 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -1,16 +1,16 @@ return { - { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - lua = { "stylua" }, - python = { "ruff_format" }, - terraform = { "tofu_fmt" }, - }, - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, - }, - }, + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + lua = { "stylua" }, + python = { "ruff_format" }, + terraform = { "tofu_fmt" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + }, + }, } diff --git a/nvim/.config/nvim/lua/plugins/coverage.lua b/nvim/.config/nvim/lua/plugins/coverage.lua index 943a664..4565ed3 100644 --- a/nvim/.config/nvim/lua/plugins/coverage.lua +++ b/nvim/.config/nvim/lua/plugins/coverage.lua @@ -1,9 +1,9 @@ return { - { - "andythigpen/nvim-coverage", - dependencies = { "nvim-lua/plenary.nvim", "EdenEast/nightfox.nvim" }, - -- lazy = true, - ft = { "python", "rust" }, - config = true, - }, + { + "andythigpen/nvim-coverage", + dependencies = { "nvim-lua/plenary.nvim", "EdenEast/nightfox.nvim" }, + -- lazy = true, + ft = { "python", "rust" }, + config = true, + }, } diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua index 7f0386e..5e7eca7 100644 --- a/nvim/.config/nvim/lua/plugins/git.lua +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -1,39 +1,39 @@ return { - -- Git - { - "tpope/vim-fugitive", - cmd = "Git", - keys = { - { "gg", vim.cmd.Git, desc = "Open vim-fugitive" }, - }, - }, - { - "lewis6991/gitsigns.nvim", - lazy = true, - event = "BufReadPre", - opts = { - on_attach = function(bufnr) - local signs = require("gitsigns") - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - if type(mode) == "table" then - for _, m in ipairs(mode) do - vim.keymap.set(m, l, r, opts) - end - else - vim.keymap.set(mode, l, r, opts) - end - end - map({ "v", "n" }, "gsh", function() - signs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end, { desc = "Stage hunk" }) - map("n", "gsb", signs.stage_buffer, { desc = "Stage buffer" }) - map({ "v", "n" }, "gsr", function() - require("gitsigns").reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end, { desc = "Reset hunk" }) - map("n", "gb", signs.blame_line, { desc = "Blame Line" }) - end, - }, - }, + -- Git + { + "tpope/vim-fugitive", + cmd = "Git", + keys = { + { "gg", vim.cmd.Git, desc = "Open vim-fugitive" }, + }, + }, + { + "lewis6991/gitsigns.nvim", + lazy = true, + event = "BufReadPre", + opts = { + on_attach = function(bufnr) + local signs = require("gitsigns") + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + if type(mode) == "table" then + for _, m in ipairs(mode) do + vim.keymap.set(m, l, r, opts) + end + else + vim.keymap.set(mode, l, r, opts) + end + end + map({ "v", "n" }, "gsh", function() + signs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end, { desc = "Stage hunk" }) + map("n", "gsb", signs.stage_buffer, { desc = "Stage buffer" }) + map({ "v", "n" }, "gsr", function() + require("gitsigns").reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end, { desc = "Reset hunk" }) + map("n", "gb", signs.blame_line, { desc = "Blame Line" }) + end, + }, + }, } diff --git a/nvim/.config/nvim/lua/plugins/harpoon.lua b/nvim/.config/nvim/lua/plugins/harpoon.lua index d12f60b..16d9526 100644 --- a/nvim/.config/nvim/lua/plugins/harpoon.lua +++ b/nvim/.config/nvim/lua/plugins/harpoon.lua @@ -1,62 +1,62 @@ return { - { - "ThePrimeagen/harpoon", - opts = { - tabline = true, - }, - dependencies = { - { "nvim-lua/plenary.nvim" }, - }, - keys = { - { - "m", - function() - require("harpoon.mark").add_file() - end, - desc = "Harpoon Mark", - }, - { - "q", - function() - require("harpoon.ui").toggle_quick_menu() - end, - desc = "Harpoon Quick Menu", - }, - { - "1", - function() - require("harpoon.ui").nav_file(1) - end, - desc = "Harpoon 1", - }, - { - "2", - function() - require("harpoon.ui").nav_file(2) - end, - desc = "Harpoon 2", - }, - { - "3", - function() - require("harpoon.ui").nav_file(3) - end, - desc = "Harpoon 3", - }, - { - "4", - function() - require("harpoon.ui").nav_file(4) - end, - desc = "Harpoon 4", - }, - { - "5", - function() - require("harpoon.ui").nav_file(5) - end, - desc = "Harpoon 5", - }, - }, - }, + { + "ThePrimeagen/harpoon", + opts = { + tabline = true, + }, + dependencies = { + { "nvim-lua/plenary.nvim" }, + }, + keys = { + { + "m", + function() + require("harpoon.mark").add_file() + end, + desc = "Harpoon Mark", + }, + { + "q", + function() + require("harpoon.ui").toggle_quick_menu() + end, + desc = "Harpoon Quick Menu", + }, + { + "1", + function() + require("harpoon.ui").nav_file(1) + end, + desc = "Harpoon 1", + }, + { + "2", + function() + require("harpoon.ui").nav_file(2) + end, + desc = "Harpoon 2", + }, + { + "3", + function() + require("harpoon.ui").nav_file(3) + end, + desc = "Harpoon 3", + }, + { + "4", + function() + require("harpoon.ui").nav_file(4) + end, + desc = "Harpoon 4", + }, + { + "5", + function() + require("harpoon.ui").nav_file(5) + end, + desc = "Harpoon 5", + }, + }, + }, } diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 8e3e18a..70610f4 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -1,83 +1,83 @@ return { - { "neovim/nvim-lspconfig" }, - "jose-elias-alvarez/null-ls.nvim", - { - "mrcjkb/rustaceanvim", - version = "^5", - ft = { "rust" }, - }, - { - "olexsmir/gopher.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - ft = "go", - build = function() - if not require("nvim-treesitter.parsers").has_parser("go") then - vim.cmd("TSInstall go") - end - end, - config = true, - }, - -- Filetype plugins - { - "Saecki/crates.nvim", - event = "BufRead Cargo.toml", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - lsp = { - enabled = true, - actions = true, - completion = true, - hover = true, - }, - }, - }, - "ziglang/zig.vim", + { "neovim/nvim-lspconfig" }, + "jose-elias-alvarez/null-ls.nvim", + { + "mrcjkb/rustaceanvim", + version = "^5", + ft = { "rust" }, + }, + { + "olexsmir/gopher.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + ft = "go", + build = function() + if not require("nvim-treesitter.parsers").has_parser("go") then + vim.cmd("TSInstall go") + end + end, + config = true, + }, + -- Filetype plugins + { + "Saecki/crates.nvim", + event = "BufRead Cargo.toml", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + lsp = { + enabled = true, + actions = true, + completion = true, + hover = true, + }, + }, + }, + "ziglang/zig.vim", - { - "saghen/blink.cmp", - dependencies = { "rafamadriz/friendly-snippets" }, - version = "1.*", - opts = { - keymap = { - preset = "default", - [""] = { "select_next", "fallback" }, - [""] = { "select_prev", "fallback" }, - }, - }, - }, - -- Treesitter - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - }, - "HiPhish/rainbow-delimiters.nvim", - "nvim-treesitter/nvim-treesitter-context", - -- UI - { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = function() - vim.cmd.colorscheme("tokyonight-night") - end, - }, - -- "stevearc/dressing.nvim", - { - "ethanholz/nvim-lastplace", - config = true, - }, - "mbbill/undotree", - { - "folke/which-key.nvim", - config = true, - }, - { - "IndianBoy42/tree-sitter-just", - config = true, - }, - "NoahTheDuke/vim-just", + { + "saghen/blink.cmp", + dependencies = { "rafamadriz/friendly-snippets" }, + version = "1.*", + opts = { + keymap = { + preset = "default", + [""] = { "select_next", "fallback" }, + [""] = { "select_prev", "fallback" }, + }, + }, + }, + -- Treesitter + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + }, + "HiPhish/rainbow-delimiters.nvim", + "nvim-treesitter/nvim-treesitter-context", + -- UI + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + config = function() + vim.cmd.colorscheme("tokyonight-night") + end, + }, + -- "stevearc/dressing.nvim", + { + "ethanholz/nvim-lastplace", + config = true, + }, + "mbbill/undotree", + { + "folke/which-key.nvim", + config = true, + }, + { + "IndianBoy42/tree-sitter-just", + config = true, + }, + "NoahTheDuke/vim-just", } diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua index da8d76d..8556a3a 100644 --- a/nvim/.config/nvim/lua/plugins/lualine.lua +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -1,15 +1,15 @@ return { - { - "nvim-lualine/lualine.nvim", - config = function() - vim.opt.cmdheight = 0 - vim.opt.laststatus = 3 - require("lualine").setup({ - options = { - component_separators = { left = "|", right = "|" }, - section_separators = "", - }, - }) - end, - }, + { + "nvim-lualine/lualine.nvim", + config = function() + vim.opt.cmdheight = 0 + vim.opt.laststatus = 3 + require("lualine").setup({ + options = { + component_separators = { left = "|", right = "|" }, + section_separators = "", + }, + }) + end, + }, } diff --git a/nvim/.config/nvim/lua/plugins/mini.lua b/nvim/.config/nvim/lua/plugins/mini.lua index ec02775..e3c8e20 100644 --- a/nvim/.config/nvim/lua/plugins/mini.lua +++ b/nvim/.config/nvim/lua/plugins/mini.lua @@ -1,24 +1,24 @@ return { - { - "echasnovski/mini.indentscope", - version = "*", - config = function() - local indent = require("mini.indentscope") - indent.setup({ - draw = { - animation = indent.gen_animation.none(), - }, - }) - end, - }, - { - "echasnovski/mini.pairs", - version = "*", - config = true, - }, - { - "echasnovski/mini.comment", - version = "*", - config = true, - }, + { + "echasnovski/mini.indentscope", + version = "*", + config = function() + local indent = require("mini.indentscope") + indent.setup({ + draw = { + animation = indent.gen_animation.none(), + }, + }) + end, + }, + { + "echasnovski/mini.pairs", + version = "*", + config = true, + }, + { + "echasnovski/mini.comment", + version = "*", + config = true, + }, } diff --git a/nvim/.config/nvim/lua/plugins/noice.lua b/nvim/.config/nvim/lua/plugins/noice.lua deleted file mode 100644 index c52bf30..0000000 --- a/nvim/.config/nvim/lua/plugins/noice.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - "folke/noice.nvim", - event = "VeryLazy", - dependencies = { - "MunifTanjim/nui.nvim", - }, - enabled = true, - opts = { - lsp = { - progress = { - throttle = 10000 / 30, - }, - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = true, -- add a border to hover docs and signature help - }, - }, - }, -} diff --git a/nvim/.config/nvim/lua/plugins/oil.lua b/nvim/.config/nvim/lua/plugins/oil.lua index e209ae8..71e152c 100644 --- a/nvim/.config/nvim/lua/plugins/oil.lua +++ b/nvim/.config/nvim/lua/plugins/oil.lua @@ -1,5 +1,5 @@ return { - "stevearc/oil.nvim", - opts = {}, - dependencies = { { "echasnovski/mini.icons", opts = {} } }, + "stevearc/oil.nvim", + opts = {}, + dependencies = { { "echasnovski/mini.icons", opts = {} } }, } diff --git a/nvim/.config/nvim/lua/plugins/snacks.lua b/nvim/.config/nvim/lua/plugins/snacks.lua new file mode 100644 index 0000000..088efcb --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/snacks.lua @@ -0,0 +1,8 @@ +return { + { + "folke/snacks.nvim", + opts = { + input = {}, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index 0dcddb0..b3a176f 100644 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -1,42 +1,42 @@ return { - { - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-fzf-native.nvim", - }, - branch = "0.1.x", - init = function() - require("telescope").setup({ - pickers = { - find_files = { - -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. - find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, - }, - }, - }) - require("telescope").load_extension("fzf") - require("telescope").load_extension("harpoon") - end, + { + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope-fzf-native.nvim", + }, + branch = "0.1.x", + init = function() + require("telescope").setup({ + pickers = { + find_files = { + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. + find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, + }, + }, + }) + require("telescope").load_extension("fzf") + require("telescope").load_extension("harpoon") + end, - -- lazy = true, - keys = { - { "ff", require("telescope.builtin").find_files, desc = "Find File" }, - { "fg", require("telescope.builtin").live_grep, desc = "Live Grep" }, - { "fb", require("telescope.builtin").buffers, desc = "Buffer List" }, - { "fh", require("telescope.builtin").help_tags, desc = "Help Tags" }, - { "fc", require("telescope.builtin").colorscheme, desc = "Colorschme" }, - { "fq", require("telescope").extensions.harpoon.marks, desc = "Harpoon Marks" }, - { "fs", require("telescope.builtin").grep_string, desc = "Grep String" }, - { "s", require("telescope.builtin").spell_suggest, desc = "Spell suggest" }, - }, - }, - { - "nvim-telescope/telescope-fzf-native.nvim", - dependencies = { - { "nvim-telescope/telescope.nvim" }, - }, - build = "make", - }, + -- lazy = true, + keys = { + { "ff", require("telescope.builtin").find_files, desc = "Find File" }, + { "fg", require("telescope.builtin").live_grep, desc = "Live Grep" }, + { "fb", require("telescope.builtin").buffers, desc = "Buffer List" }, + { "fh", require("telescope.builtin").help_tags, desc = "Help Tags" }, + { "fc", require("telescope.builtin").colorscheme, desc = "Colorschme" }, + { "fq", require("telescope").extensions.harpoon.marks, desc = "Harpoon Marks" }, + { "fs", require("telescope.builtin").grep_string, desc = "Grep String" }, + { "s", require("telescope.builtin").spell_suggest, desc = "Spell suggest" }, + }, + }, + { + "nvim-telescope/telescope-fzf-native.nvim", + dependencies = { + { "nvim-telescope/telescope.nvim" }, + }, + build = "make", + }, } diff --git a/nvim/.config/nvim/lua/plugins/trouble.lua b/nvim/.config/nvim/lua/plugins/trouble.lua index 760f4ae..4c750d0 100644 --- a/nvim/.config/nvim/lua/plugins/trouble.lua +++ b/nvim/.config/nvim/lua/plugins/trouble.lua @@ -1,15 +1,15 @@ return { - { - "folke/lsp-trouble.nvim", - config = true, - cmd = "Trouble", - keys = { - { - "xx", - "Trouble diagnostics toggle", - desc = "Diagnostics (Trouble)", - }, - }, - dependencies = { "echasnovski/mini.icons" }, - }, + { + "folke/lsp-trouble.nvim", + config = true, + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + }, + dependencies = { "echasnovski/mini.icons" }, + }, }