style(nvim): format with stylua

This commit is contained in:
Price Hiller 2024-01-21 04:03:40 -06:00
parent 3942c31f91
commit f1a13fe3d3
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
15 changed files with 57 additions and 50 deletions

View File

@ -5,5 +5,5 @@ vim.keymap.set("n", "<leader>fr", function()
require("toggleterm").exec("bash " .. vim.api.nvim_buf_get_name(0))
end, {
buffer = true,
desc = "Bash: Save and Run Current Buffer"
desc = "Bash: Save and Run Current Buffer",
})

View File

@ -14,7 +14,7 @@ M.setup = function()
bufhidden = "wipe",
swapfile = false,
readonly = true,
winbar = vim.opt.winbar:get()
winbar = vim.opt.winbar:get(),
}
for option, value in pairs(opts) do
vim.api.nvim_set_option_value(option, value, { scope = "local" })

View File

@ -349,8 +349,8 @@ return {
compare.exact,
-- Copied from cmp-under-comparator
function(entry1, entry2)
local _, entry1_under = entry1.completion_item.label:find "^_+"
local _, entry2_under = entry2.completion_item.label:find "^_+"
local _, entry1_under = entry1.completion_item.label:find("^_+")
local _, entry2_under = entry2.completion_item.label:find("^_+")
entry1_under = entry1_under or 0
entry2_under = entry2_under or 0
if entry1_under > entry2_under then

View File

@ -39,9 +39,9 @@ return {
return {
exe = "shfmt",
args = {
"-"
"-",
},
stdin = true
stdin = true,
}
end,
asm = function()

View File

@ -2,7 +2,7 @@ return {
{
"sindrets/diffview.nvim",
keys = {
{ "<localleader>dd", "<cmd>DiffviewOpen<CR>", desc = "Diff View: Open" },
{ "<localleader>dd", "<cmd>DiffviewOpen<CR>", desc = "Diff View: Open" },
{ "<localleader>dh", "<cmd>DiffviewFileHistory<CR>", desc = "Diff View: File History" },
},
cmd = {

View File

@ -904,7 +904,7 @@ return {
provider = " [",
hl = {
fg = colors.peachRed,
bg = colors.sumiInk4
bg = colors.sumiInk4,
},
},
{
@ -921,7 +921,7 @@ return {
provider = "]",
hl = {
fg = colors.peachRed,
bg = colors.sumiInk4
bg = colors.sumiInk4,
},
},
},

View File

@ -135,11 +135,11 @@ return {
"MasonUpdate",
"MasonInstall",
"MasonUninstall",
"MasonUninstallAll"
"MasonUninstallAll",
},
opts = {
max_concurrent_installers = 12
}
max_concurrent_installers = 12,
},
},
"simrat39/rust-tools.nvim",
"Hoffs/omnisharp-extended-lsp.nvim",
@ -429,7 +429,7 @@ return {
"vimls",
"marksman",
"asm_lsp",
"typst_lsp"
"typst_lsp",
}) do
lspconfig[server].setup(server_opts)
end

View File

@ -5,7 +5,7 @@ return {
"nvim-tree/nvim-web-devicons",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"miversen33/netman.nvim"
"miversen33/netman.nvim",
},
cmd = "Neotree",
keys = {
@ -21,9 +21,9 @@ return {
if vim.fn.isdirectory(f) ~= 0 then
vim.cmd("Neotree current dir=" .. f)
-- neo-tree is loaded now, delete the init autocmd
vim.api.nvim_clear_autocmds { group = "NeoTreeInit" }
vim.api.nvim_clear_autocmds({ group = "NeoTreeInit" })
end
end
end,
})
end,
opts = function()

View File

@ -3,6 +3,6 @@ return {
"miversen33/netman.nvim",
config = function()
require("netman")
end
}
end,
},
}

View File

@ -1,7 +1,7 @@
vim.api.nvim_create_autocmd("BufReadPre", {
callback = function()
vim.b.ufo_foldlevel = 0
end
end,
})
---@param num integer Set the fold level to this number
@ -51,7 +51,7 @@ return {
if count == 0 then
count = 1
end
change_buf_foldlevel_by(-(count))
change_buf_foldlevel_by(-count)
end,
desc = "UFO: Fold More",
},

View File

@ -1,6 +1,7 @@
return {
{
"nvim-orgmode/orgmode",
dir = "~/Git/Neovim/Orgmode",
dependencies = {
{ "nvim-treesitter/nvim-treesitter" },
{
@ -32,7 +33,7 @@ return {
require("orgmode").setup({
org_agenda_files = {
"~/Git/College/**/*",
"~/Notes/**/*"
"~/Notes/**/*",
},
org_default_notes_file = "~/Notes/notes.org",
org_agenda_start_day = "-1d",

View File

@ -7,33 +7,37 @@ return {
-- HACK: Ensure all signs get the correct CursorLineSign set to their "culhl" value
-- This, in effect, extends the CursorLine background highlight into the signcolumn
vim.uv.new_timer():start(50, 1000, vim.schedule_wrap(function()
-- Make all signs support "CusorLine.*" highlights
local signs_defined = vim.fn.sign_getdefined()
if #signs_defined == last_sign_def_len or #signs_defined == 0 then
return
end
last_sign_def_len = signs_defined
local bg = vim.api.nvim_get_hl(0, { name = "SignColumn", link = false }).bg
local cl_bg = vim.api.nvim_get_hl(0, { name = "CursorLineSign", link = false }).bg
for _, sign in ipairs(signs_defined) do
local name = sign.texthl
if name then
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = bg })
name = name .. "Cul"
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = cl_bg })
vim.fn.sign_define(sign.name, { culhl = name })
vim.uv.new_timer():start(
50,
1000,
vim.schedule_wrap(function()
-- Make all signs support "CusorLine.*" highlights
local signs_defined = vim.fn.sign_getdefined()
if #signs_defined == last_sign_def_len or #signs_defined == 0 then
return
end
end
end))
last_sign_def_len = signs_defined
local bg = vim.api.nvim_get_hl(0, { name = "SignColumn", link = false }).bg
local cl_bg = vim.api.nvim_get_hl(0, { name = "CursorLineSign", link = false }).bg
for _, sign in ipairs(signs_defined) do
local name = sign.texthl
if name then
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = bg })
name = name .. "Cul"
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = cl_bg })
vim.fn.sign_define(sign.name, { culhl = name })
end
end
end)
)
return {
setopt = true,
relculright = false,
segments = {
{ text = { "%s" }, click = "v:lua.ScSa" },
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
{ text = { "%s" }, click = "v:lua.ScSa" },
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
{ text = { " ", builtin.foldfunc, " " }, click = "v:lua.ScFa" },
},
}
@ -48,7 +52,7 @@ return {
delay = 0,
},
-- HACK: This allows the gitsigns to correctly use the culhl for their bg
_extmark_signs = false
}
_extmark_signs = false,
},
},
}

View File

@ -43,7 +43,7 @@ return {
cmd = {
"FrecencyMigrateDB",
"FrecencyValidate",
"FrecencyDelete"
"FrecencyDelete",
},
},
"debugloop/telescope-undo.nvim",
@ -151,7 +151,7 @@ return {
},
frecency = {
db_safe_mode = false,
auto_validate = false
auto_validate = false,
},
},
})

View File

@ -126,7 +126,7 @@ return {
"RRethy/nvim-treesitter-endwise",
},
config = function()
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.typst = {
install_info = {
url = "https://github.com/uben0/tree-sitter-typst",
@ -135,7 +135,7 @@ return {
generate_requires_npm = true,
},
maintainers = { "uben0" },
experimental = true
experimental = true,
}
require("nvim-treesitter.configs").setup({
auto_install = true,

View File

@ -2,6 +2,8 @@ return {
{
"chomosuke/typst-preview.nvim",
ft = "typst",
build = function() require("typst-preview").update() end,
}
build = function()
require("typst-preview").update()
end,
},
}