style(nvim): format with stylua
This commit is contained in:
parent
ed9d8dbd5b
commit
3a833516a8
@ -1,10 +1,7 @@
|
||||
vim.keymap.set("n", "<leader>fr",
|
||||
function()
|
||||
vim.cmd.write()
|
||||
vim.cmd.terminal("deno run " .. vim.fn.expand("%"))
|
||||
end,
|
||||
{
|
||||
buffer = true,
|
||||
silent = true
|
||||
}
|
||||
)
|
||||
vim.keymap.set("n", "<leader>fr", function()
|
||||
vim.cmd.write()
|
||||
vim.cmd.terminal("deno run " .. vim.fn.expand("%"))
|
||||
end, {
|
||||
buffer = true,
|
||||
silent = true,
|
||||
})
|
||||
|
@ -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",
|
||||
})
|
||||
|
@ -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" },
|
||||
}),
|
||||
})
|
||||
|
||||
|
@ -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" },
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
{ "<Enter>", "<cmd>Neogit<CR>", { 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
|
||||
^^ _<F7>_: Step Out _<F8>_: Step Back
|
||||
]],
|
||||
heads = {
|
||||
{ "c", ":DapContinue<CR>" },
|
||||
{ "r", ":DapRunLast<CR>" },
|
||||
{ "e", ":DapTerminate<CR>" },
|
||||
{ "b", ":DapToggleBreakpoint<CR>" },
|
||||
{ "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<CR>" },
|
||||
{ "r", ":DapRunLast<CR>" },
|
||||
{ "e", ":DapTerminate<CR>" },
|
||||
{ "b", ":DapToggleBreakpoint<CR>" },
|
||||
{
|
||||
"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 },
|
||||
{ "<F5>", ":DapStepOver<CR>" },
|
||||
{ "<F6>", ":DapStepInto<CR>" },
|
||||
{ "<F7>", ":DapStepOut<CR>" },
|
||||
{ "<F8>", require("dap").step_back }
|
||||
{ "<F8>", 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 = "<leader>hD",
|
||||
heads = {
|
||||
{ "H", "<C-v>h:VBox<CR>" },
|
||||
{ "J", "<C-v>j:VBox<CR>" },
|
||||
{ "K", "<C-v>k:VBox<CR>" },
|
||||
{ "L", "<C-v>l:VBox<CR>" },
|
||||
{ "f", ":VBox<CR>", { mode = "v" } },
|
||||
{ "<Esc>", nil, { exit = true } },
|
||||
{ "H", "<C-v>h:VBox<CR>" },
|
||||
{ "J", "<C-v>j:VBox<CR>" },
|
||||
{ "K", "<C-v>k:VBox<CR>" },
|
||||
{ "L", "<C-v>l:VBox<CR>" },
|
||||
{ "f", ":VBox<CR>", { mode = "v" } },
|
||||
{ "<Esc>", nil, { exit = true } },
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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
|
||||
|
@ -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 = {
|
||||
{ "<leader>l", desc = "> LSP" },
|
||||
{ "<leader>l", desc = "> LSP" },
|
||||
{
|
||||
"<leader>lh",
|
||||
function()
|
||||
@ -156,11 +155,11 @@ return {
|
||||
end,
|
||||
desc = "LSP: Toggle Diagnostics",
|
||||
},
|
||||
{ "<leader>lD", vim.lsp.buf.declaration, desc = "LSP: Declaration" },
|
||||
{ "<leader>k", vim.lsp.buf.hover, desc = "LSP: Hover" },
|
||||
{ "<leader>K", vim.lsp.buf.signature_help, desc = "LSP: Sig Help" },
|
||||
{ "<leader>lc", vim.lsp.buf.code_action, desc = "LSP: Code Action" },
|
||||
{ "<leader>lR", ":LspRestart<CR>", desc = "LSP: Restart" },
|
||||
{ "<leader>lD", vim.lsp.buf.declaration, desc = "LSP: Declaration" },
|
||||
{ "<leader>k", vim.lsp.buf.hover, desc = "LSP: Hover" },
|
||||
{ "<leader>K", vim.lsp.buf.signature_help, desc = "LSP: Sig Help" },
|
||||
{ "<leader>lc", vim.lsp.buf.code_action, desc = "LSP: Code Action" },
|
||||
{ "<leader>lR", ":LspRestart<CR>", desc = "LSP: Restart" },
|
||||
{
|
||||
"<leader>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({
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -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 = {
|
||||
{"<leader>bb", "<cmd>NoNeckPain<cr>", desc = "NoNeckPain: Toggle", }
|
||||
}
|
||||
}
|
||||
{ "<leader>bb", "<cmd>NoNeckPain<cr>", desc = "NoNeckPain: Toggle" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ return {
|
||||
{ "<leader>tm", ":Telescope man_pages<CR>", desc = "Telescope: Man Pages" },
|
||||
{ "<leader>tq", ":Telescope quickfixhistry", desc = "LSP: Telescope Quickfix History" },
|
||||
{ "<leader>nv", ":Telescope notify<CR>", desc = "Notifications: Search" },
|
||||
{ "<leader>tt", ":Telescope<CR>", desc = "Telescope: Open Telescope" }
|
||||
{ "<leader>tt", ":Telescope<CR>", 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",
|
||||
|
@ -3,11 +3,11 @@ return {
|
||||
{
|
||||
"danymat/neogen",
|
||||
keys = {
|
||||
{ "<leader>ng", desc = "> Neogen" },
|
||||
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
||||
{ "<leader>ng", desc = "> Neogen" },
|
||||
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
||||
{ "<leader>ngc", "<cmd>Neogen class<CR>", desc = "Neogen: Class Annotation" },
|
||||
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
||||
{ "<leader>ngb", "<cmd>Neogen file<CR>", desc = "Neogen: File Annotation" },
|
||||
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
||||
{ "<leader>ngb", "<cmd>Neogen file<CR>", 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
|
||||
|
@ -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 = {
|
||||
|
@ -3,7 +3,7 @@ return {
|
||||
"chrisgrieser/nvim-various-textobjs",
|
||||
opts = {
|
||||
useDefaultKeymaps = true,
|
||||
disabledKeymaps = { "r", "R" }
|
||||
}
|
||||
disabledKeymaps = { "r", "R" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-repeat"
|
||||
}
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
}
|
||||
|
@ -2,14 +2,14 @@ return {
|
||||
{
|
||||
"dhruvasagar/vim-table-mode",
|
||||
keys = {
|
||||
{ ";;", "<cmd>TableModeRealign<CR>", desc = "Table Mode: Realign" }
|
||||
{ ";;", "<cmd>TableModeRealign<CR>", 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,
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user