home: vim: fix lua formatting
This commit is contained in:
parent
c2d231d3f1
commit
1e9f6fe957
|
@ -30,7 +30,7 @@ local keys = {
|
||||||
x = "XML encode",
|
x = "XML encode",
|
||||||
y = "C string encode",
|
y = "C string encode",
|
||||||
-- Custom
|
-- Custom
|
||||||
d = { vim.diagnostic.goto_prev, "Previous diagnostic" }
|
d = { vim.diagnostic.goto_prev, "Previous diagnostic" },
|
||||||
},
|
},
|
||||||
["]"] = {
|
["]"] = {
|
||||||
name = "Next",
|
name = "Next",
|
||||||
|
@ -60,7 +60,7 @@ local keys = {
|
||||||
x = "XML decode",
|
x = "XML decode",
|
||||||
y = "C string decode",
|
y = "C string decode",
|
||||||
-- Custom
|
-- Custom
|
||||||
d = { vim.diagnostic.goto_next, "Next diagnostic" }
|
d = { vim.diagnostic.goto_next, "Next diagnostic" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Option mappings
|
-- Option mappings
|
||||||
|
|
|
@ -63,7 +63,7 @@ M.on_attach = function(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function show_buffer_diagnostics()
|
local function show_buffer_diagnostics()
|
||||||
vim.diagnostic.open_float(nil, { scope="buffer" })
|
vim.diagnostic.open_float(nil, { scope = "buffer" })
|
||||||
end
|
end
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
|
@ -94,5 +94,4 @@ M.on_attach = function(client, bufnr)
|
||||||
wk.register(keys, { buffer = bufnr })
|
wk.register(keys, { buffer = bufnr })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -17,7 +17,9 @@ end
|
||||||
---@param cmd string? command to check
|
---@param cmd string? command to check
|
||||||
---@return fun(cmd: string): boolean executable
|
---@return fun(cmd: string): boolean executable
|
||||||
M.is_executable_condition = function(cmd)
|
M.is_executable_condition = function(cmd)
|
||||||
return function() return M.is_executable(cmd) end
|
return function()
|
||||||
|
return M.is_executable(cmd)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- whether or not we are currently in an SSH connection
|
-- whether or not we are currently in an SSH connection
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
-- Intercept all fold commands
|
-- Intercept all fold commands
|
||||||
|
-- stylua: ignore
|
||||||
vim.g.fastfold_fold_command_suffixes = {
|
vim.g.fastfold_fold_command_suffixes = {
|
||||||
"x", "X", "a", "A", "o", "O", "c", "C", "r", "R", "m", "M", "i", "n", "N",
|
"x", "X", "a", "A", "o", "O", "c", "C", "r", "R", "m", "M", "i", "n", "N",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local gitsigns = require('gitsigns')
|
local gitsigns = require("gitsigns")
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
gitsigns.setup({
|
gitsigns.setup({
|
||||||
|
@ -13,13 +13,13 @@ local keys = {
|
||||||
["[c"] = { "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", "Previous hunk/diff", expr = true },
|
["[c"] = { "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", "Previous hunk/diff", expr = true },
|
||||||
["]c"] = { "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", "Next hunk/diff", expr = true },
|
["]c"] = { "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", "Next hunk/diff", expr = true },
|
||||||
|
|
||||||
|
|
||||||
-- Commands
|
-- Commands
|
||||||
["<leader>g"] = {
|
["<leader>g"] = {
|
||||||
name = "Git",
|
name = "Git",
|
||||||
-- Actions
|
-- Actions
|
||||||
b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" },
|
b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" },
|
||||||
d = { gitsigns.diffthis, "Diff buffer" },
|
d = { gitsigns.diffthis, "Diff buffer" },
|
||||||
|
-- stylua: ignore
|
||||||
D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" },
|
D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" },
|
||||||
g = { "<cmd>Git<CR>", "Git status" },
|
g = { "<cmd>Git<CR>", "Git status" },
|
||||||
h = { gitsigns.toggle_deleted, "Show deleted hunks" },
|
h = { gitsigns.toggle_deleted, "Show deleted hunks" },
|
||||||
|
|
|
@ -65,7 +65,6 @@ null_ls.register({
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Shell (non-POSIX)
|
-- Shell (non-POSIX)
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
null_ls.builtins.code_actions.shellcheck.with({
|
null_ls.builtins.code_actions.shellcheck.with({
|
||||||
|
|
|
@ -3,15 +3,15 @@ if not require("ambroisie.utils").is_ssh() then
|
||||||
end
|
end
|
||||||
|
|
||||||
local function copy(lines, _)
|
local function copy(lines, _)
|
||||||
require('osc52').copy(table.concat(lines, '\n'))
|
require("osc52").copy(table.concat(lines, "\n"))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function paste()
|
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
|
end
|
||||||
|
|
||||||
vim.g.clipboard = {
|
vim.g.clipboard = {
|
||||||
name = 'osc52',
|
name = "osc52",
|
||||||
copy = {['+'] = copy, ['*'] = copy},
|
copy = { ["+"] = copy, ["*"] = copy },
|
||||||
paste = {['+'] = paste, ['*'] = paste},
|
paste = { ["+"] = paste, ["*"] = paste },
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ telescope.setup({
|
||||||
["<C-h>"] = "which_key",
|
["<C-h>"] = "which_key",
|
||||||
-- I want the normal readline mappings rather than scrolling
|
-- I want the normal readline mappings rather than scrolling
|
||||||
["<C-u>"] = false,
|
["<C-u>"] = false,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
fzf = {
|
fzf = {
|
||||||
|
|
Loading…
Reference in a new issue