diff --git a/home/vim/after/plugin/mappings/unimpaired.lua b/home/vim/after/plugin/mappings/unimpaired.lua index c1b1d15..f39a8c0 100644 --- a/home/vim/after/plugin/mappings/unimpaired.lua +++ b/home/vim/after/plugin/mappings/unimpaired.lua @@ -30,7 +30,7 @@ local keys = { x = "XML encode", y = "C string encode", -- Custom - d = { vim.diagnostic.goto_prev, "Previous diagnostic" } + d = { vim.diagnostic.goto_prev, "Previous diagnostic" }, }, ["]"] = { name = "Next", @@ -60,7 +60,7 @@ local keys = { x = "XML decode", y = "C string decode", -- Custom - d = { vim.diagnostic.goto_next, "Next diagnostic" } + d = { vim.diagnostic.goto_next, "Next diagnostic" }, }, -- Option mappings diff --git a/home/vim/lua/ambroisie/lsp.lua b/home/vim/lua/ambroisie/lsp.lua index 254d243..b682d27 100644 --- a/home/vim/lua/ambroisie/lsp.lua +++ b/home/vim/lua/ambroisie/lsp.lua @@ -39,7 +39,7 @@ M.on_attach = function(client, bufnr) -- * nothing displayed -- * single diagnostic at the end of the line (`virtual_text`) -- * full diagnostics using virtual text (`virtual_lines`) - local text = vim.diagnostic.config().virtual_text + local text = vim.diagnostic.config().virtual_text local lines = vim.diagnostic.config().virtual_lines -- Text -> Lines transition @@ -63,7 +63,7 @@ M.on_attach = function(client, bufnr) end local function show_buffer_diagnostics() - vim.diagnostic.open_float(nil, { scope="buffer" }) + vim.diagnostic.open_float(nil, { scope = "buffer" }) end local keys = { @@ -94,5 +94,4 @@ M.on_attach = function(client, bufnr) wk.register(keys, { buffer = bufnr }) end - return M diff --git a/home/vim/lua/ambroisie/utils.lua b/home/vim/lua/ambroisie/utils.lua index ca6de28..984c730 100644 --- a/home/vim/lua/ambroisie/utils.lua +++ b/home/vim/lua/ambroisie/utils.lua @@ -17,7 +17,9 @@ end ---@param cmd string? command to check ---@return fun(cmd: string): boolean executable M.is_executable_condition = function(cmd) - return function() return M.is_executable(cmd) end + return function() + return M.is_executable(cmd) + end end -- whether or not we are currently in an SSH connection diff --git a/home/vim/plugin/settings/completion.lua b/home/vim/plugin/settings/completion.lua index b5c80d3..2d150e8 100644 --- a/home/vim/plugin/settings/completion.lua +++ b/home/vim/plugin/settings/completion.lua @@ -28,7 +28,7 @@ cmp.setup({ end, [""] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), { "i", "c" }), - [""] = cmp.mapping.scroll_docs(-5), + [""] = cmp.mapping.scroll_docs(-5), [""] = cmp.mapping.scroll_docs(5), [""] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), [""] = cmp.mapping.abort(), diff --git a/home/vim/plugin/settings/fastfold.lua b/home/vim/plugin/settings/fastfold.lua index ac08519..78ee937 100644 --- a/home/vim/plugin/settings/fastfold.lua +++ b/home/vim/plugin/settings/fastfold.lua @@ -1,4 +1,5 @@ -- Intercept all fold commands +-- stylua: ignore vim.g.fastfold_fold_command_suffixes = { "x", "X", "a", "A", "o", "O", "c", "C", "r", "R", "m", "M", "i", "n", "N", } diff --git a/home/vim/plugin/settings/git.lua b/home/vim/plugin/settings/git.lua index bb9b516..4dbebca 100644 --- a/home/vim/plugin/settings/git.lua +++ b/home/vim/plugin/settings/git.lua @@ -1,4 +1,4 @@ -local gitsigns = require('gitsigns') +local gitsigns = require("gitsigns") local wk = require("which-key") gitsigns.setup({ @@ -13,13 +13,13 @@ local keys = { ["[c"] = { "&diff ? '[c' : 'Gitsigns prev_hunk'", "Previous hunk/diff", expr = true }, ["]c"] = { "&diff ? ']c' : 'Gitsigns next_hunk'", "Next hunk/diff", expr = true }, - -- Commands ["g"] = { name = "Git", -- Actions b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" }, d = { gitsigns.diffthis, "Diff buffer" }, + -- stylua: ignore D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" }, g = { "Git", "Git status" }, h = { gitsigns.toggle_deleted, "Show deleted hunks" }, diff --git a/home/vim/plugin/settings/null-ls.lua b/home/vim/plugin/settings/null-ls.lua index 16e52ff..8446683 100644 --- a/home/vim/plugin/settings/null-ls.lua +++ b/home/vim/plugin/settings/null-ls.lua @@ -65,7 +65,6 @@ null_ls.register({ }), }) - -- Shell (non-POSIX) null_ls.register({ null_ls.builtins.code_actions.shellcheck.with({ @@ -98,7 +97,7 @@ null_ls.register({ -- Shell (POSIX) null_ls.register({ null_ls.builtins.code_actions.shellcheck.with({ - -- Restrict to POSIX sh + -- Restrict to POSIX sh filetypes = { "sh" }, -- Only used if available condition = utils.is_executable_condition("shellcheck"), diff --git a/home/vim/plugin/settings/ssh.lua b/home/vim/plugin/settings/ssh.lua index 3af7b61..992a707 100644 --- a/home/vim/plugin/settings/ssh.lua +++ b/home/vim/plugin/settings/ssh.lua @@ -3,15 +3,15 @@ if not require("ambroisie.utils").is_ssh() then end local function copy(lines, _) - require('osc52').copy(table.concat(lines, '\n')) + require("osc52").copy(table.concat(lines, "\n")) end local function paste() - return {vim.fn.split(vim.fn.getreg(''), '\n'), vim.fn.getregtype('')} + return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") } end vim.g.clipboard = { - name = 'osc52', - copy = {['+'] = copy, ['*'] = copy}, - paste = {['+'] = paste, ['*'] = paste}, + name = "osc52", + copy = { ["+"] = copy, ["*"] = copy }, + paste = { ["+"] = paste, ["*"] = paste }, } diff --git a/home/vim/plugin/settings/telescope.lua b/home/vim/plugin/settings/telescope.lua index c87907e..4548ec5 100644 --- a/home/vim/plugin/settings/telescope.lua +++ b/home/vim/plugin/settings/telescope.lua @@ -7,8 +7,8 @@ telescope.setup({ [""] = "which_key", -- I want the normal readline mappings rather than scrolling [""] = false, - } - } + }, + }, }, extensions = { fzf = {