style(nvim): format with stylua
This commit is contained in:
parent
3942c31f91
commit
f1a13fe3d3
@ -5,5 +5,5 @@ vim.keymap.set("n", "<leader>fr", function()
|
|||||||
require("toggleterm").exec("bash " .. vim.api.nvim_buf_get_name(0))
|
require("toggleterm").exec("bash " .. vim.api.nvim_buf_get_name(0))
|
||||||
end, {
|
end, {
|
||||||
buffer = true,
|
buffer = true,
|
||||||
desc = "Bash: Save and Run Current Buffer"
|
desc = "Bash: Save and Run Current Buffer",
|
||||||
})
|
})
|
||||||
|
@ -14,7 +14,7 @@ M.setup = function()
|
|||||||
bufhidden = "wipe",
|
bufhidden = "wipe",
|
||||||
swapfile = false,
|
swapfile = false,
|
||||||
readonly = true,
|
readonly = true,
|
||||||
winbar = vim.opt.winbar:get()
|
winbar = vim.opt.winbar:get(),
|
||||||
}
|
}
|
||||||
for option, value in pairs(opts) do
|
for option, value in pairs(opts) do
|
||||||
vim.api.nvim_set_option_value(option, value, { scope = "local" })
|
vim.api.nvim_set_option_value(option, value, { scope = "local" })
|
||||||
|
@ -349,8 +349,8 @@ return {
|
|||||||
compare.exact,
|
compare.exact,
|
||||||
-- Copied from cmp-under-comparator
|
-- Copied from cmp-under-comparator
|
||||||
function(entry1, entry2)
|
function(entry1, entry2)
|
||||||
local _, entry1_under = entry1.completion_item.label:find "^_+"
|
local _, entry1_under = entry1.completion_item.label:find("^_+")
|
||||||
local _, entry2_under = entry2.completion_item.label:find "^_+"
|
local _, entry2_under = entry2.completion_item.label:find("^_+")
|
||||||
entry1_under = entry1_under or 0
|
entry1_under = entry1_under or 0
|
||||||
entry2_under = entry2_under or 0
|
entry2_under = entry2_under or 0
|
||||||
if entry1_under > entry2_under then
|
if entry1_under > entry2_under then
|
||||||
|
@ -39,9 +39,9 @@ return {
|
|||||||
return {
|
return {
|
||||||
exe = "shfmt",
|
exe = "shfmt",
|
||||||
args = {
|
args = {
|
||||||
"-"
|
"-",
|
||||||
},
|
},
|
||||||
stdin = true
|
stdin = true,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
asm = function()
|
asm = function()
|
||||||
|
@ -2,7 +2,7 @@ return {
|
|||||||
{
|
{
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
keys = {
|
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" },
|
{ "<localleader>dh", "<cmd>DiffviewFileHistory<CR>", desc = "Diff View: File History" },
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
|
@ -904,7 +904,7 @@ return {
|
|||||||
provider = " [",
|
provider = " [",
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.peachRed,
|
fg = colors.peachRed,
|
||||||
bg = colors.sumiInk4
|
bg = colors.sumiInk4,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -921,7 +921,7 @@ return {
|
|||||||
provider = "]",
|
provider = "]",
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.peachRed,
|
fg = colors.peachRed,
|
||||||
bg = colors.sumiInk4
|
bg = colors.sumiInk4,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -135,11 +135,11 @@ return {
|
|||||||
"MasonUpdate",
|
"MasonUpdate",
|
||||||
"MasonInstall",
|
"MasonInstall",
|
||||||
"MasonUninstall",
|
"MasonUninstall",
|
||||||
"MasonUninstallAll"
|
"MasonUninstallAll",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
max_concurrent_installers = 12
|
max_concurrent_installers = 12,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"simrat39/rust-tools.nvim",
|
"simrat39/rust-tools.nvim",
|
||||||
"Hoffs/omnisharp-extended-lsp.nvim",
|
"Hoffs/omnisharp-extended-lsp.nvim",
|
||||||
@ -429,7 +429,7 @@ return {
|
|||||||
"vimls",
|
"vimls",
|
||||||
"marksman",
|
"marksman",
|
||||||
"asm_lsp",
|
"asm_lsp",
|
||||||
"typst_lsp"
|
"typst_lsp",
|
||||||
}) do
|
}) do
|
||||||
lspconfig[server].setup(server_opts)
|
lspconfig[server].setup(server_opts)
|
||||||
end
|
end
|
||||||
|
@ -5,7 +5,7 @@ return {
|
|||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"miversen33/netman.nvim"
|
"miversen33/netman.nvim",
|
||||||
},
|
},
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
keys = {
|
keys = {
|
||||||
@ -21,9 +21,9 @@ return {
|
|||||||
if vim.fn.isdirectory(f) ~= 0 then
|
if vim.fn.isdirectory(f) ~= 0 then
|
||||||
vim.cmd("Neotree current dir=" .. f)
|
vim.cmd("Neotree current dir=" .. f)
|
||||||
-- neo-tree is loaded now, delete the init autocmd
|
-- 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,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
opts = function()
|
opts = function()
|
||||||
|
@ -3,6 +3,6 @@ return {
|
|||||||
"miversen33/netman.nvim",
|
"miversen33/netman.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("netman")
|
require("netman")
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
vim.api.nvim_create_autocmd("BufReadPre", {
|
vim.api.nvim_create_autocmd("BufReadPre", {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.b.ufo_foldlevel = 0
|
vim.b.ufo_foldlevel = 0
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
---@param num integer Set the fold level to this number
|
---@param num integer Set the fold level to this number
|
||||||
@ -51,7 +51,7 @@ return {
|
|||||||
if count == 0 then
|
if count == 0 then
|
||||||
count = 1
|
count = 1
|
||||||
end
|
end
|
||||||
change_buf_foldlevel_by(-(count))
|
change_buf_foldlevel_by(-count)
|
||||||
end,
|
end,
|
||||||
desc = "UFO: Fold More",
|
desc = "UFO: Fold More",
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-orgmode/orgmode",
|
"nvim-orgmode/orgmode",
|
||||||
|
dir = "~/Git/Neovim/Orgmode",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-treesitter/nvim-treesitter" },
|
{ "nvim-treesitter/nvim-treesitter" },
|
||||||
{
|
{
|
||||||
@ -32,7 +33,7 @@ return {
|
|||||||
require("orgmode").setup({
|
require("orgmode").setup({
|
||||||
org_agenda_files = {
|
org_agenda_files = {
|
||||||
"~/Git/College/**/*",
|
"~/Git/College/**/*",
|
||||||
"~/Notes/**/*"
|
"~/Notes/**/*",
|
||||||
},
|
},
|
||||||
org_default_notes_file = "~/Notes/notes.org",
|
org_default_notes_file = "~/Notes/notes.org",
|
||||||
org_agenda_start_day = "-1d",
|
org_agenda_start_day = "-1d",
|
||||||
|
@ -7,33 +7,37 @@ return {
|
|||||||
|
|
||||||
-- HACK: Ensure all signs get the correct CursorLineSign set to their "culhl" value
|
-- HACK: Ensure all signs get the correct CursorLineSign set to their "culhl" value
|
||||||
-- This, in effect, extends the CursorLine background highlight into the signcolumn
|
-- This, in effect, extends the CursorLine background highlight into the signcolumn
|
||||||
vim.uv.new_timer():start(50, 1000, vim.schedule_wrap(function()
|
vim.uv.new_timer():start(
|
||||||
-- Make all signs support "CusorLine.*" highlights
|
50,
|
||||||
local signs_defined = vim.fn.sign_getdefined()
|
1000,
|
||||||
if #signs_defined == last_sign_def_len or #signs_defined == 0 then
|
vim.schedule_wrap(function()
|
||||||
return
|
-- Make all signs support "CusorLine.*" highlights
|
||||||
end
|
local signs_defined = vim.fn.sign_getdefined()
|
||||||
last_sign_def_len = signs_defined
|
if #signs_defined == last_sign_def_len or #signs_defined == 0 then
|
||||||
local bg = vim.api.nvim_get_hl(0, { name = "SignColumn", link = false }).bg
|
return
|
||||||
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
|
last_sign_def_len = signs_defined
|
||||||
end))
|
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 {
|
return {
|
||||||
setopt = true,
|
setopt = true,
|
||||||
relculright = false,
|
relculright = false,
|
||||||
segments = {
|
segments = {
|
||||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||||
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
|
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
|
||||||
{ text = { " ", builtin.foldfunc, " " }, click = "v:lua.ScFa" },
|
{ text = { " ", builtin.foldfunc, " " }, click = "v:lua.ScFa" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -48,7 +52,7 @@ return {
|
|||||||
delay = 0,
|
delay = 0,
|
||||||
},
|
},
|
||||||
-- HACK: This allows the gitsigns to correctly use the culhl for their bg
|
-- HACK: This allows the gitsigns to correctly use the culhl for their bg
|
||||||
_extmark_signs = false
|
_extmark_signs = false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ return {
|
|||||||
cmd = {
|
cmd = {
|
||||||
"FrecencyMigrateDB",
|
"FrecencyMigrateDB",
|
||||||
"FrecencyValidate",
|
"FrecencyValidate",
|
||||||
"FrecencyDelete"
|
"FrecencyDelete",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"debugloop/telescope-undo.nvim",
|
"debugloop/telescope-undo.nvim",
|
||||||
@ -151,7 +151,7 @@ return {
|
|||||||
},
|
},
|
||||||
frecency = {
|
frecency = {
|
||||||
db_safe_mode = false,
|
db_safe_mode = false,
|
||||||
auto_validate = false
|
auto_validate = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -126,7 +126,7 @@ return {
|
|||||||
"RRethy/nvim-treesitter-endwise",
|
"RRethy/nvim-treesitter-endwise",
|
||||||
},
|
},
|
||||||
config = function()
|
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 = {
|
parser_config.typst = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/uben0/tree-sitter-typst",
|
url = "https://github.com/uben0/tree-sitter-typst",
|
||||||
@ -135,7 +135,7 @@ return {
|
|||||||
generate_requires_npm = true,
|
generate_requires_npm = true,
|
||||||
},
|
},
|
||||||
maintainers = { "uben0" },
|
maintainers = { "uben0" },
|
||||||
experimental = true
|
experimental = true,
|
||||||
}
|
}
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
|
@ -2,6 +2,8 @@ return {
|
|||||||
{
|
{
|
||||||
"chomosuke/typst-preview.nvim",
|
"chomosuke/typst-preview.nvim",
|
||||||
ft = "typst",
|
ft = "typst",
|
||||||
build = function() require("typst-preview").update() end,
|
build = function()
|
||||||
}
|
require("typst-preview").update()
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user