From 3a833516a8d2e4de42424b44203d3bb8b3daa58c Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 22 Dec 2023 11:03:58 -0600 Subject: [PATCH] style(nvim): format with stylua --- .../nvim/after/ftplugin/typescript.lua | 17 +++--- dots/.config/nvim/ftdetect/log.lua | 6 +-- dots/.config/nvim/lua/plugins/configs/cmp.lua | 54 +++++++++++-------- .../nvim/lua/plugins/configs/comment.lua | 12 ++--- .../nvim/lua/plugins/configs/dadbod.lua | 4 +- .../nvim/lua/plugins/configs/formatter.lua | 2 +- dots/.config/nvim/lua/plugins/configs/git.lua | 14 ++--- .../nvim/lua/plugins/configs/heirline.lua | 13 ++--- .../nvim/lua/plugins/configs/hydra.lua | 52 ++++++++++-------- .../lua/plugins/configs/indent-blankline.lua | 20 +++---- .../nvim/lua/plugins/configs/kanagawa.lua | 2 +- dots/.config/nvim/lua/plugins/configs/lsp.lua | 35 ++++++------ .../nvim/lua/plugins/configs/markdown.lua | 6 ++- .../nvim/lua/plugins/configs/nabla.lua | 18 ++++--- .../nvim/lua/plugins/configs/no-neck-pain.lua | 10 ++-- .../nvim/lua/plugins/configs/noice.lua | 11 ++-- .../nvim/lua/plugins/configs/nvim-lint.lua | 2 +- .../nvim/lua/plugins/configs/nvim-ufo.lua | 12 ++--- .../nvim/lua/plugins/configs/org-mode.lua | 18 +++---- .../nvim/lua/plugins/configs/rest-nvim.lua | 8 +-- .../nvim/lua/plugins/configs/telescope.lua | 6 +-- .../nvim/lua/plugins/configs/treesitter.lua | 12 ++--- .../nvim/lua/plugins/configs/trouble.lua | 14 ++--- .../lua/plugins/configs/various-textobjs.lua | 4 +- .../nvim/lua/plugins/configs/vim-repeat.lua | 4 +- .../lua/plugins/configs/vim-table-mode.lua | 12 ++--- dots/.config/nvim/lua/plugins/init.lua | 6 ++- 27 files changed, 197 insertions(+), 177 deletions(-) diff --git a/dots/.config/nvim/after/ftplugin/typescript.lua b/dots/.config/nvim/after/ftplugin/typescript.lua index f1e4c8d4..77e3e25a 100644 --- a/dots/.config/nvim/after/ftplugin/typescript.lua +++ b/dots/.config/nvim/after/ftplugin/typescript.lua @@ -1,10 +1,7 @@ -vim.keymap.set("n", "fr", - function() - vim.cmd.write() - vim.cmd.terminal("deno run " .. vim.fn.expand("%")) - end, - { - buffer = true, - silent = true - } -) +vim.keymap.set("n", "fr", function() + vim.cmd.write() + vim.cmd.terminal("deno run " .. vim.fn.expand("%")) +end, { + buffer = true, + silent = true, +}) diff --git a/dots/.config/nvim/ftdetect/log.lua b/dots/.config/nvim/ftdetect/log.lua index fa4809bc..4170b568 100644 --- a/dots/.config/nvim/ftdetect/log.lua +++ b/dots/.config/nvim/ftdetect/log.lua @@ -1,4 +1,4 @@ -vim.api.nvim_create_autocmd({"BufNewFile", "BufRead"}, { - pattern = {"*.log", "*_log", "*.LOG", "*_LOG"}, - command = "set ft=log" +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { + pattern = { "*.log", "*_log", "*.LOG", "*_LOG" }, + command = "set ft=log", }) diff --git a/dots/.config/nvim/lua/plugins/configs/cmp.lua b/dots/.config/nvim/lua/plugins/configs/cmp.lua index 4ee06e9f..7bbc53d8 100644 --- a/dots/.config/nvim/lua/plugins/configs/cmp.lua +++ b/dots/.config/nvim/lua/plugins/configs/cmp.lua @@ -10,9 +10,9 @@ return { { "petertriho/cmp-git", dependencies = { - "nvim-lua/plenary.nvim" + "nvim-lua/plenary.nvim", }, - opts = {} + opts = {}, }, "hrsh7th/cmp-nvim-lsp-document-symbol", "hrsh7th/cmp-calc", @@ -27,7 +27,7 @@ return { "tzachar/cmp-fuzzy-buffer", dependencies = { "tzachar/fuzzy.nvim", - } + }, }, -- Snippets { @@ -55,7 +55,7 @@ return { -- Load Snippets require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_lua").load({ - paths = vim.fn.stdpath("config") .. "/lua/plugins/snippets" + paths = vim.fn.stdpath("config") .. "/lua/plugins/snippets", }) local colors_bg_color = vim.api.nvim_get_hl(0, { name = "CmpCustomSelectionColor" }).bg @@ -119,7 +119,7 @@ return { sources = sources or {} local default_sources = { { name = "nvim_lsp", priority = 11 }, - { name = "luasnip", priority = 10 }, -- For luasnip users. + { name = "luasnip", priority = 10 }, -- For luasnip users. { name = "fuzzy_buffer", priority = 8, @@ -132,17 +132,19 @@ return { option = { "--smart-case", "--hidden", - "--max-depth 4" - } + "--max-depth 4", + }, }, { name = "async_path", priority = 6 }, - { name = "zsh", priority = 5 }, - { name = "emoji", keyword_length = 2 }, + { name = "zsh", priority = 5 }, + { name = "emoji", keyword_length = 2 }, { name = "calc" }, - { name = "npm", keyword_length = 2 }, + { name = "npm", keyword_length = 2 }, } - vim.tbl_map(function(source) table.insert(default_sources, 1, source) end, sources) + vim.tbl_map(function(source) + table.insert(default_sources, 1, source) + end, sources) return cmp.config.sources(default_sources) end cmp.setup({ @@ -165,7 +167,7 @@ return { conventionalcommits = { symbol = " ", name = "Commit", hl_group = "Commit" }, git = { symbol = "󰊢 ", name = "Git", hl_group = "Git" }, docker_compose_language_service = { symbol = "󰡨 ", name = "Docker", hl_group = "Docker" }, - luasnip = { symbol = " ", name = "Snippet" } + luasnip = { symbol = " ", name = "Snippet" }, } local extra_kind_icons = { @@ -339,7 +341,7 @@ return { sorting = { priority_weight = 2, comparators = { - require('cmp_fuzzy_buffer.compare'), + require("cmp_fuzzy_buffer.compare"), compare.score, compare.offset, compare.recently_used, @@ -355,23 +357,29 @@ return { -- Git Commit Completions cmp.setup.filetype("gitcommit", { sources = standard_sources({ - { name = "git", priority = 20 }, - { name = "conventionalcommits", priority = 19 } + { name = "git", priority = 20 }, + { name = "conventionalcommits", priority = 19 }, }), }) cmp.setup.filetype("octo", { sources = standard_sources({ - { name = "git", priority = 20 } + { name = "git", priority = 20 }, }), }) - cmp.setup.filetype("sql", - { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) }) - cmp.setup.filetype("mysql", - { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) }) - cmp.setup.filetype("plsql", - { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) }) + cmp.setup.filetype( + "sql", + { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) } + ) + cmp.setup.filetype( + "mysql", + { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) } + ) + cmp.setup.filetype( + "plsql", + { sources = standard_sources({ { name = "vim-dadbod-completion", priority = 20 } }) } + ) cmp.setup.filetype("toml", { sources = standard_sources({ { name = "crates" } }) }) cmp.setup.filetype("org", { sources = standard_sources({ { name = "orgmode", priority = 20 } }) }) @@ -380,7 +388,7 @@ return { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = "fuzzy_buffer" }, - { name = "rg" } + { name = "rg" }, }), }) diff --git a/dots/.config/nvim/lua/plugins/configs/comment.lua b/dots/.config/nvim/lua/plugins/configs/comment.lua index fc674954..0b4f52ba 100644 --- a/dots/.config/nvim/lua/plugins/configs/comment.lua +++ b/dots/.config/nvim/lua/plugins/configs/comment.lua @@ -3,7 +3,7 @@ return { "numToStr/Comment.nvim", config = function() require("Comment").setup({ - pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(), + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), }) end, dependencies = { @@ -13,15 +13,15 @@ return { vim.g.skip_ts_context_commentstring_module = true end, config = function() - require('ts_context_commentstring').setup({ - enable_autocmd = false + require("ts_context_commentstring").setup({ + enable_autocmd = false, }) - end + end, }, }, keys = { - { "gc", desc = "> Comment: Line" }, - { "gb", desc = "> Comment: Block " }, + { "gc", desc = "> Comment: Line" }, + { "gb", desc = "> Comment: Block " }, { "gbc", desc = "Comment: Toggle block comment" }, { "gcc", desc = "Comment: Toggle line comment" }, { "gcO", desc = "Comment: Add comment on line above" }, diff --git a/dots/.config/nvim/lua/plugins/configs/dadbod.lua b/dots/.config/nvim/lua/plugins/configs/dadbod.lua index 3ebaa7e8..aa544361 100644 --- a/dots/.config/nvim/lua/plugins/configs/dadbod.lua +++ b/dots/.config/nvim/lua/plugins/configs/dadbod.lua @@ -4,12 +4,12 @@ return { dependencies = { { "tpope/vim-dadbod", - lazy = true + lazy = true, }, { "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, - lazy = true + lazy = true, }, }, cmd = { diff --git a/dots/.config/nvim/lua/plugins/configs/formatter.lua b/dots/.config/nvim/lua/plugins/configs/formatter.lua index 90993624..5bc02b5c 100644 --- a/dots/.config/nvim/lua/plugins/configs/formatter.lua +++ b/dots/.config/nvim/lua/plugins/configs/formatter.lua @@ -25,7 +25,7 @@ return { markdown = filetypes.markdown.prettierd, css = filetypes.css.prettierd, lua = filetypes.lua.stylua, - sql = function () + sql = function() return { exe = "sql-formatter", args = { diff --git a/dots/.config/nvim/lua/plugins/configs/git.lua b/dots/.config/nvim/lua/plugins/configs/git.lua index b09be6f2..8d0136f5 100644 --- a/dots/.config/nvim/lua/plugins/configs/git.lua +++ b/dots/.config/nvim/lua/plugins/configs/git.lua @@ -22,7 +22,7 @@ return { auto_refresh = true, filewatcher = { enabled = true, - interval = 1000 + interval = 1000, }, graph_style = "unicode", integrations = { @@ -81,7 +81,7 @@ return { { "linrongbin16/gitlinker.nvim", cmd = { - "GitLink" + "GitLink", }, opts = function() --- @param s string @@ -115,13 +115,13 @@ return { return { router = { browse = { - ["^gitlab%.orion%-technologies%.io"] = gitlab_orion_router("blob") + ["^gitlab%.orion%-technologies%.io"] = gitlab_orion_router("blob"), }, blame = { - ["^gitlab%.orion%-technologies%.io"] = gitlab_orion_router("blame") - } + ["^gitlab%.orion%-technologies%.io"] = gitlab_orion_router("blame"), + }, }, } - end - } + end, + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/heirline.lua b/dots/.config/nvim/lua/plugins/configs/heirline.lua index b0ea166b..ab3f4dc3 100644 --- a/dots/.config/nvim/lua/plugins/configs/heirline.lua +++ b/dots/.config/nvim/lua/plugins/configs/heirline.lua @@ -1061,14 +1061,11 @@ return { disable_winbar_cb = function(args) if args.event == "FileType" then local ft = args.match - local matches = vim.tbl_filter( - function(excluded_ft) - return ft:lower():find(excluded_ft) ~= nil - end, - { - ".*neogit.*" - } - ) + local matches = vim.tbl_filter(function(excluded_ft) + return ft:lower():find(excluded_ft) ~= nil + end, { + ".*neogit.*", + }) if #matches > 0 then return false end diff --git a/dots/.config/nvim/lua/plugins/configs/hydra.lua b/dots/.config/nvim/lua/plugins/configs/hydra.lua index 004185a4..78243b76 100644 --- a/dots/.config/nvim/lua/plugins/configs/hydra.lua +++ b/dots/.config/nvim/lua/plugins/configs/hydra.lua @@ -100,7 +100,7 @@ return { { "u", gitsigns.undo_stage_hunk }, { "S", gitsigns.stage_buffer }, { "p", gitsigns.preview_hunk }, - { "d", gitsigns.toggle_deleted, { nowait = true } }, + { "d", gitsigns.toggle_deleted, { nowait = true } }, { "b", gitsigns.blame_line }, { "B", @@ -108,9 +108,9 @@ return { gitsigns.blame_line({ full = true }) end, }, - { "/", gitsigns.show, { exit = true } }, -- show the base of the file + { "/", gitsigns.show, { exit = true } }, -- show the base of the file { "", "Neogit", { exit = true } }, - { "q", nil, { exit = true, nowait = true } }, + { "q", nil, { exit = true, nowait = true } }, }, }) @@ -150,26 +150,36 @@ _b_: Toggle Breakpoint _l_: Toggle Log Breakpoint _B_: Toggle Conditional ^^ __: Step Out __: Step Back ]], heads = { - { "c", ":DapContinue" }, - { "r", ":DapRunLast" }, - { "e", ":DapTerminate" }, - { "b", ":DapToggleBreakpoint" }, - { "B", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint Condition: ")) end }, - { "l", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint Condition: ")) end }, - { "s", require("dapui").toggle }, - { "R", require("dap").run_to_cursor }, + { "c", ":DapContinue" }, + { "r", ":DapRunLast" }, + { "e", ":DapTerminate" }, + { "b", ":DapToggleBreakpoint" }, + { + "B", + function() + require("dap").set_breakpoint(vim.fn.input("Breakpoint Condition: ")) + end, + }, + { + "l", + function() + require("dap").set_breakpoint(vim.fn.input("Breakpoint Condition: ")) + end, + }, + { "s", require("dapui").toggle }, + { "R", require("dap").run_to_cursor }, { "", ":DapStepOver" }, { "", ":DapStepInto" }, { "", ":DapStepOut" }, - { "", require("dap").step_back } + { "", require("dap").step_back }, }, config = { color = "pink", invoke_on_body = true, hint = { - border = "solid" - } - } + border = "solid", + }, + }, }) -- Hydra for diagrams @@ -197,12 +207,12 @@ _b_: Toggle Breakpoint _l_: Toggle Log Breakpoint _B_: Toggle Conditional mode = "n", body = "hD", heads = { - { "H", "h:VBox" }, - { "J", "j:VBox" }, - { "K", "k:VBox" }, - { "L", "l:VBox" }, - { "f", ":VBox", { mode = "v" } }, - { "", nil, { exit = true } }, + { "H", "h:VBox" }, + { "J", "j:VBox" }, + { "K", "k:VBox" }, + { "L", "l:VBox" }, + { "f", ":VBox", { mode = "v" } }, + { "", nil, { exit = true } }, }, }) diff --git a/dots/.config/nvim/lua/plugins/configs/indent-blankline.lua b/dots/.config/nvim/lua/plugins/configs/indent-blankline.lua index 9ea264d2..dde8a76c 100644 --- a/dots/.config/nvim/lua/plugins/configs/indent-blankline.lua +++ b/dots/.config/nvim/lua/plugins/configs/indent-blankline.lua @@ -11,7 +11,7 @@ return { exclude = { buftypes = { "terminal", - "nofile" + "nofile", }, filetypes = { "help", @@ -31,13 +31,13 @@ return { "NeogitPopup", "NeogitLogView", "norg", - "org" - } + "org", + }, }, indent = { char = "▏", tab_char = "▏", - smart_indent_cap = true + smart_indent_cap = true, }, scope = { enabled = true, @@ -45,12 +45,12 @@ return { node_type = { lua = { "return_statement", - "table_constructor" + "table_constructor", }, nix = { - "binding" - } - } + "binding", + }, + }, }, highlight = { "RainbowDelimiterRed", @@ -60,8 +60,8 @@ return { "RainbowDelimiterGreen", "RainbowDelimiterViolet", "RainbowDelimiterCyan", - } - } + }, + }, }) end, }, diff --git a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua index f81d6e88..7cbee5e8 100644 --- a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua +++ b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua @@ -206,7 +206,7 @@ return { org_table_header = { fg = colors.crystalBlue, bg = colors.winterBlue }, org_table = { bg = colors.winterBlue }, ["@OrgTSBlock.org"] = { fg = colors.fujiGray, bold = true, italic = true }, - ["@OrgTSDirective.org"] = { link = "@OrgTSBlock.org" } + ["@OrgTSDirective.org"] = { link = "@OrgTSBlock.org" }, } return overrides diff --git a/dots/.config/nvim/lua/plugins/configs/lsp.lua b/dots/.config/nvim/lua/plugins/configs/lsp.lua index 09fc3782..3e81b728 100644 --- a/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -29,8 +29,7 @@ local function on_attach(client, bufnr) end end -local lsp_capabilities = - require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) +local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) local server_opts = { capabilities = lsp_capabilities, on_attach = on_attach, @@ -96,8 +95,8 @@ return { end, }, { - 'mrcjkb/rustaceanvim', - ft = { 'rust' }, + "mrcjkb/rustaceanvim", + ft = { "rust" }, config = function() vim.g.rustaceanvim = { server = { @@ -111,7 +110,7 @@ return { command = "codelldb", args = { "--port", "${port}" }, }, - } + }, }, tools = { executor = require("rustaceanvim.executors").termopen, @@ -120,7 +119,7 @@ return { }, }, } - end + end, }, { "neovim/nvim-lspconfig", @@ -144,7 +143,7 @@ return { }, }, keys = { - { "l", desc = "> LSP" }, + { "l", desc = "> LSP" }, { "lh", function() @@ -156,11 +155,11 @@ return { end, desc = "LSP: Toggle Diagnostics", }, - { "lD", vim.lsp.buf.declaration, desc = "LSP: Declaration" }, - { "k", vim.lsp.buf.hover, desc = "LSP: Hover" }, - { "K", vim.lsp.buf.signature_help, desc = "LSP: Sig Help" }, - { "lc", vim.lsp.buf.code_action, desc = "LSP: Code Action" }, - { "lR", ":LspRestart", desc = "LSP: Restart" }, + { "lD", vim.lsp.buf.declaration, desc = "LSP: Declaration" }, + { "k", vim.lsp.buf.hover, desc = "LSP: Hover" }, + { "K", vim.lsp.buf.signature_help, desc = "LSP: Sig Help" }, + { "lc", vim.lsp.buf.code_action, desc = "LSP: Code Action" }, + { "lR", ":LspRestart", desc = "LSP: Restart" }, { "ls", function() @@ -265,11 +264,11 @@ return { python = { analysis = { diagnosticMode = "workspace", - typeCheckingMode = "strict" - } + typeCheckingMode = "strict", + }, }, capabilities = lsp_capabilities, - on_attach = on_attach + on_attach = on_attach, }) lspconfig.yamlls.setup({ @@ -307,11 +306,11 @@ return { lspconfig.docker_compose_language_service.setup({ settings = { telemetry = { - enableTelemetry = false - } + enableTelemetry = false, + }, }, capabilities = lsp_capabilities, - on_attach = on_attach + on_attach = on_attach, }) lspconfig.powershell_es.setup({ diff --git a/dots/.config/nvim/lua/plugins/configs/markdown.lua b/dots/.config/nvim/lua/plugins/configs/markdown.lua index 9f79c736..e8583050 100644 --- a/dots/.config/nvim/lua/plugins/configs/markdown.lua +++ b/dots/.config/nvim/lua/plugins/configs/markdown.lua @@ -3,6 +3,8 @@ return { "iamcco/markdown-preview.nvim", cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, ft = { "markdown" }, - build = function() vim.fn["mkdp#util#install"]() end, - } + build = function() + vim.fn["mkdp#util#install"]() + end, + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/nabla.lua b/dots/.config/nvim/lua/plugins/configs/nabla.lua index f043f109..e2c2eaa1 100644 --- a/dots/.config/nvim/lua/plugins/configs/nabla.lua +++ b/dots/.config/nvim/lua/plugins/configs/nabla.lua @@ -2,19 +2,25 @@ return { { "jbyuki/nabla.nvim", keys = { - { ";nn", function() require("nabla").popup() end, desc = "Nabla: Popup" }, + { + ";nn", + function() + require("nabla").popup() + end, + desc = "Nabla: Popup", + }, { ";nv", function() require("nabla").toggle_virt() end, - desc = "Nabla: Toggle Virt Lines" - } + desc = "Nabla: Toggle Virt Lines", + }, }, ft = { "org", - "tex" + "tex", }, - config = false - } + config = false, + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/no-neck-pain.lua b/dots/.config/nvim/lua/plugins/configs/no-neck-pain.lua index 50c82dc6..a288e520 100644 --- a/dots/.config/nvim/lua/plugins/configs/no-neck-pain.lua +++ b/dots/.config/nvim/lua/plugins/configs/no-neck-pain.lua @@ -2,7 +2,7 @@ return { { "shortcuts/no-neck-pain.nvim", opts = { - width = 160 + width = 160, }, cmds = { "NoNeckPain", @@ -10,10 +10,10 @@ return { "NoNeckPainWidthDown", "NoNeckPainScratchPad", "NoNeckPainToggleLeftSide", - "NoNeckPainToggleRightSide" + "NoNeckPainToggleRightSide", }, keys = { - {"bb", "NoNeckPain", desc = "NoNeckPain: Toggle", } - } - } + { "bb", "NoNeckPain", desc = "NoNeckPain: Toggle" }, + }, + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/noice.lua b/dots/.config/nvim/lua/plugins/configs/noice.lua index b0606445..6b29343e 100644 --- a/dots/.config/nvim/lua/plugins/configs/noice.lua +++ b/dots/.config/nvim/lua/plugins/configs/noice.lua @@ -32,29 +32,28 @@ return { routes = { { filter = { event = "msg_show", find = "Hop .*:" }, - opts = { skip = true } + opts = { skip = true }, }, -- Ignore `written` message { filter = { event = "msg_show", find = '^".*" %d*L, %d*B written$' }, - opts = { skip = true } + opts = { skip = true }, }, -- Ignore `undo` message { filter = { event = "msg_show", find = "^%d+ .*; before #%d+ %d+.*ago$" }, - opts = { skip = true } + opts = { skip = true }, }, -- Ignore `redo` message { filter = { event = "msg_show", find = "^%d+ .*; after #%d+ %d+.*ago$" }, - opts = { skip = true } + opts = { skip = true }, }, { view = "split", filter = { event = "msg_show", min_height = 20 }, }, - - } + }, }, dependencies = { -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries diff --git a/dots/.config/nvim/lua/plugins/configs/nvim-lint.lua b/dots/.config/nvim/lua/plugins/configs/nvim-lint.lua index 9adbf72d..12a4d01b 100644 --- a/dots/.config/nvim/lua/plugins/configs/nvim-lint.lua +++ b/dots/.config/nvim/lua/plugins/configs/nvim-lint.lua @@ -5,7 +5,7 @@ return { config = function() require("lint").linters_by_ft = { markdown = { "proselint" }, - dockerfile = { "hadolint" } + dockerfile = { "hadolint" }, } vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter" }, { callback = function() diff --git a/dots/.config/nvim/lua/plugins/configs/nvim-ufo.lua b/dots/.config/nvim/lua/plugins/configs/nvim-ufo.lua index b65adf15..ecf0ff72 100644 --- a/dots/.config/nvim/lua/plugins/configs/nvim-ufo.lua +++ b/dots/.config/nvim/lua/plugins/configs/nvim-ufo.lua @@ -1,7 +1,7 @@ vim.api.nvim_create_autocmd("BufReadPre", { callback = function() vim.b.ufo_foldlevel = 0 - end + end, }) local change_buf_foldlevel_by = function(num) @@ -31,14 +31,14 @@ return { function() require("ufo").openAllFolds() end, - desc = "UFO: Open All Folds" + desc = "UFO: Open All Folds", }, { "zM", function() require("ufo").closeAllFolds() end, - desc = "UFO: Close All Folds" + desc = "UFO: Close All Folds", }, { "zm", @@ -49,7 +49,7 @@ return { end change_buf_foldlevel_by(count or -1) end, - desc = "UFO: Fold Less" + desc = "UFO: Fold Less", }, { "zr", @@ -60,7 +60,7 @@ return { end change_buf_foldlevel_by(count or 1) end, - desc = "UFO: Fold More" + desc = "UFO: Fold More", }, { "zS", @@ -71,7 +71,7 @@ return { set_buf_foldlevel(vim.v.count) end end, - desc = "UFO: Set Foldlevel" + desc = "UFO: Set Foldlevel", }, }, opts = function() diff --git a/dots/.config/nvim/lua/plugins/configs/org-mode.lua b/dots/.config/nvim/lua/plugins/configs/org-mode.lua index 88f0e20e..1e75ffde 100644 --- a/dots/.config/nvim/lua/plugins/configs/org-mode.lua +++ b/dots/.config/nvim/lua/plugins/configs/org-mode.lua @@ -16,10 +16,10 @@ return { "", "󰬪", "󱆭", - } - } - } - } + }, + }, + }, + }, }, ft = { "org" }, keys = { @@ -36,7 +36,7 @@ return { org_agenda_files = "~/Notes/**/*", org_default_notes_file = "~/Notes/notes.org", org_startup_folded = "inherit", - org_todo_keywords = {'TODO(t)', 'NEXT(n)', '|', 'DONE(d)', "CANCELLED(c)" }, + org_todo_keywords = { "TODO(t)", "NEXT(n)", "|", "DONE(d)", "CANCELLED(c)" }, win_split_mode = "auto", org_capture_templates = { t = { @@ -46,12 +46,12 @@ return { j = { description = "Journal", template = "\n* %? %U :journal:", - target = "~/Notes/journal/%<%Y-%m-%d>.org" + target = "~/Notes/journal/%<%Y-%m-%d>.org", }, }, emacs_config = { - config_path = "$HOME/.config/emacs/init.el" - } + config_path = "$HOME/.config/emacs/init.el", + }, }) vim.api.nvim_set_hl(0, "org_code", { link = "@field" }) @@ -65,5 +65,5 @@ return { vim.cmd.edit() end end, - } + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/rest-nvim.lua b/dots/.config/nvim/lua/plugins/configs/rest-nvim.lua index 384a1575..c5658945 100644 --- a/dots/.config/nvim/lua/plugins/configs/rest-nvim.lua +++ b/dots/.config/nvim/lua/plugins/configs/rest-nvim.lua @@ -4,10 +4,10 @@ return { ft = { "http" }, dependencies = { "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter" + "nvim-treesitter/nvim-treesitter", }, - config = function () + config = function() require("rest-nvim").setup({}) - end - } + end, + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/telescope.lua b/dots/.config/nvim/lua/plugins/configs/telescope.lua index bf8c756c..8558e960 100644 --- a/dots/.config/nvim/lua/plugins/configs/telescope.lua +++ b/dots/.config/nvim/lua/plugins/configs/telescope.lua @@ -34,7 +34,7 @@ return { { "tm", ":Telescope man_pages", desc = "Telescope: Man Pages" }, { "tq", ":Telescope quickfixhistry", desc = "LSP: Telescope Quickfix History" }, { "nv", ":Telescope notify", desc = "Notifications: Search" }, - { "tt", ":Telescope", desc = "Telescope: Open Telescope" } + { "tt", ":Telescope", desc = "Telescope: Open Telescope" }, }, dependencies = { "artart222/telescope_find_directories", @@ -58,7 +58,7 @@ return { "f", "--strip-cwd-prefix", "--exclude", - ".git/" + ".git/", }, }, }, @@ -71,7 +71,7 @@ return { "--line-number", "--column", "--smart-case", - "--hidden" + "--hidden", }, history = { path = "~/.local/share/nvim/databases/telescope_history.sqlite3", diff --git a/dots/.config/nvim/lua/plugins/configs/treesitter.lua b/dots/.config/nvim/lua/plugins/configs/treesitter.lua index 05645c7f..eadafa69 100644 --- a/dots/.config/nvim/lua/plugins/configs/treesitter.lua +++ b/dots/.config/nvim/lua/plugins/configs/treesitter.lua @@ -3,11 +3,11 @@ return { { "danymat/neogen", keys = { - { "ng", desc = "> Neogen" }, - { "ngf", "Neogen func", desc = "Neogen: Function Annotation" }, + { "ng", desc = "> Neogen" }, + { "ngf", "Neogen func", desc = "Neogen: Function Annotation" }, { "ngc", "Neogen class", desc = "Neogen: Class Annotation" }, - { "ngt", "Neogen type", desc = "Neogen: Type Annotation" }, - { "ngb", "Neogen file", desc = "Neogen: File Annotation" }, + { "ngt", "Neogen type", desc = "Neogen: Type Annotation" }, + { "ngb", "Neogen file", desc = "Neogen: File Annotation" }, }, cmd = { "Neogen", @@ -32,7 +32,7 @@ return { }, config = function() require("treesitter-context").setup({ - max_lines = 3 + max_lines = 3, }) vim.cmd.TSContextEnable() end, @@ -144,7 +144,7 @@ return { disable = function(_, buf) local disabled_filetypes = { "tex", - "log" + "log", } for _, ft in ipairs(disabled_filetypes) do diff --git a/dots/.config/nvim/lua/plugins/configs/trouble.lua b/dots/.config/nvim/lua/plugins/configs/trouble.lua index 41a001c7..9e37ebf8 100644 --- a/dots/.config/nvim/lua/plugins/configs/trouble.lua +++ b/dots/.config/nvim/lua/plugins/configs/trouble.lua @@ -42,26 +42,26 @@ return { dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() vim.api.nvim_create_autocmd("QuickFixCmdPost", { - callback = function () + callback = function() vim.cmd.TroubleRefresh() vim.cmd.Trouble("quickfix") - end + end, }) -- HACK: Unfortuantely Neovim & Vim don't expose some C level functions to know when content in the -- quickfix has been updated 😢. A serious issue with this is that it just tries to refresh after 200ms, -- which may or may not work depending on how long the quickfix filtering took :/ - vim.api.nvim_create_autocmd({"CmdlineLeave", "CmdwinLeave"}, { - callback = function () + vim.api.nvim_create_autocmd({ "CmdlineLeave", "CmdwinLeave" }, { + callback = function() vim.defer_fn(vim.cmd.TroubleRefresh, 200) - end + end, }) require("trouble").setup({ auto_open = false, auto_close = true, position = "right", action_keys = { - cancel = "q" - } + cancel = "q", + }, }) end, cmd = { diff --git a/dots/.config/nvim/lua/plugins/configs/various-textobjs.lua b/dots/.config/nvim/lua/plugins/configs/various-textobjs.lua index 47de87eb..307a6ef5 100644 --- a/dots/.config/nvim/lua/plugins/configs/various-textobjs.lua +++ b/dots/.config/nvim/lua/plugins/configs/various-textobjs.lua @@ -3,7 +3,7 @@ return { "chrisgrieser/nvim-various-textobjs", opts = { useDefaultKeymaps = true, - disabledKeymaps = { "r", "R" } - } + disabledKeymaps = { "r", "R" }, + }, }, } diff --git a/dots/.config/nvim/lua/plugins/configs/vim-repeat.lua b/dots/.config/nvim/lua/plugins/configs/vim-repeat.lua index fdc8466c..3b862985 100644 --- a/dots/.config/nvim/lua/plugins/configs/vim-repeat.lua +++ b/dots/.config/nvim/lua/plugins/configs/vim-repeat.lua @@ -1,5 +1,5 @@ return { { - "tpope/vim-repeat" - } + "tpope/vim-repeat", + }, } diff --git a/dots/.config/nvim/lua/plugins/configs/vim-table-mode.lua b/dots/.config/nvim/lua/plugins/configs/vim-table-mode.lua index f2a6e186..7369744c 100644 --- a/dots/.config/nvim/lua/plugins/configs/vim-table-mode.lua +++ b/dots/.config/nvim/lua/plugins/configs/vim-table-mode.lua @@ -2,14 +2,14 @@ return { { "dhruvasagar/vim-table-mode", keys = { - { ";;", "TableModeRealign", desc = "Table Mode: Realign" } + { ";;", "TableModeRealign", desc = "Table Mode: Realign" }, }, lazy = false, init = function() - vim.g.table_mode_map_prefix = ';t' + vim.g.table_mode_map_prefix = ";t" vim.g.table_mode_always_active = 1 - vim.g.table_mode_header_fillchar = '-' - vim.g.table_mode_corner = '|' - end - } + vim.g.table_mode_header_fillchar = "-" + vim.g.table_mode_corner = "|" + end, + }, } diff --git a/dots/.config/nvim/lua/plugins/init.lua b/dots/.config/nvim/lua/plugins/init.lua index 321bf74e..58d88f6c 100755 --- a/dots/.config/nvim/lua/plugins/init.lua +++ b/dots/.config/nvim/lua/plugins/init.lua @@ -10,8 +10,10 @@ if not vim.uv.fs_stat(lazypath) then lazypath, }):wait() - if status.code > 0 then - error("Failed to install lazy.nvim!\n====STDOUT====\n" .. status.stdout .. "\n====STDERR====\n" ..status.stderr) + if status.code > 0 then + error( + "Failed to install lazy.nvim!\n====STDOUT====\n" .. status.stdout .. "\n====STDERR====\n" .. status.stderr + ) end end vim.opt.runtimepath:prepend(lazypath)