Compare commits
4
Commits
91773e0a00
...
InoriShio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4ad52f1b1 | ||
|
|
5b0b6f32c5 | ||
|
|
acf072e634 | ||
|
|
a775122059 |
@@ -0,0 +1,29 @@
|
|||||||
|
function! neoformat#formatters#powershell#enabled() abort
|
||||||
|
return ['pwshfmt']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! neoformat#formatters#powershell#pwshfmt() abort
|
||||||
|
"if has('win32') || has('win64')
|
||||||
|
" let l:args = [
|
||||||
|
" \ '-NoProfile',
|
||||||
|
" \ '-Command',
|
||||||
|
" \ 'Import-Module PSScriptAnalyzer; Invoke-Formatter -ScriptDefinition (\$input | Out-String)',
|
||||||
|
" \ ]
|
||||||
|
"else
|
||||||
|
" let l:args = [
|
||||||
|
" \ '-NoProfile',
|
||||||
|
" \ '-Command',
|
||||||
|
" \ '"Import-Module (Resolve-Path \"/opt/powershell-editor-services/PSScriptAnalyzer/*/PSScriptAnalyzer.psd1\" | Select-Object -ExpandProperty Path); Invoke-Formatter -ScriptDefinition (\$input | Out-String)"'
|
||||||
|
" \ ]
|
||||||
|
"endif
|
||||||
|
"
|
||||||
|
return {
|
||||||
|
\ 'exe': 'pwsh',
|
||||||
|
\ 'args': [
|
||||||
|
\ '-NoProfile',
|
||||||
|
\ '-Command',
|
||||||
|
\ 'Import-Module PSScriptAnalyzer; Invoke-Formatter -ScriptDefinition ($input | Out-String)'
|
||||||
|
\ ],
|
||||||
|
\ 'stdin': 1,
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
function! neoformat#formatters#ps1#enabled() abort
|
||||||
|
return ['pwshfmt']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! neoformat#formatters#ps1#pwshfmt() abort
|
||||||
|
return {
|
||||||
|
\ 'exe': 'pwsh',
|
||||||
|
\ 'args': ['-NoProfile', '-Command',
|
||||||
|
\ '"Import-Module (Resolve-Path \"/opt/powershell-editor-services/PSScriptAnalyzer/*/PSScriptAnalyzer.psd1\" | Select-Object -ExpandProperty Path); Invoke-Formatter -ScriptDefinition (\$input | Out-String)"'],
|
||||||
|
\ 'stdin': 1
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
function! neoformat#formatters#pwsh#enabled() abort
|
|
||||||
return ['pwshfmt']
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! neoformat#formatters#pwsh#pwshfmt() abort
|
|
||||||
if has('win32') || has('win64')
|
|
||||||
let l:args = [
|
|
||||||
\ '-NoProfile',
|
|
||||||
\ '-Command',
|
|
||||||
\ 'Invoke-Formatter',
|
|
||||||
\ ]
|
|
||||||
else
|
|
||||||
let l:args = [
|
|
||||||
\ '-NoProfile',
|
|
||||||
\ '-Command',
|
|
||||||
\ '"Import-Module (Resolve-Path \"/opt/powershell-editor-services/PSScriptAnalyzer/*/PSScriptAnalyzer.psd1\" | Select-Object -ExpandProperty Path); Invoke-Formatter -ScriptDefinition (\$input | Out-String)"'
|
|
||||||
\ ]
|
|
||||||
endif
|
|
||||||
|
|
||||||
return {
|
|
||||||
\ 'exe': 'pwsh',
|
|
||||||
\ 'args': l:args,
|
|
||||||
\ 'stdin': 1,
|
|
||||||
\ }
|
|
||||||
endfunction
|
|
||||||
+58
-58
@@ -27,82 +27,82 @@ local function pick(light, dark)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local c = {
|
local c = {
|
||||||
bg = "#171216",
|
bg = "#121318",
|
||||||
bg_alt = "#201A1F",
|
bg_alt = "#1A1B20",
|
||||||
bg_float = "#241E23",
|
bg_float = "#1E1F25",
|
||||||
bg_popup = "#2E282D",
|
bg_popup = "#292A2F",
|
||||||
bg_cursorline = pick("#2E282D", "#3A3338"),
|
bg_cursorline = pick("#292A2F", "#33343A"),
|
||||||
bg_fold = "#201A1F",
|
bg_fold = "#1A1B20",
|
||||||
bg_visual = "#5D3F5C",
|
bg_visual = "#3E4867",
|
||||||
bg_search = pick("#8CAB44", "#5D3F5C"),
|
bg_search = pick("#C177BE", "#3E4867"),
|
||||||
bg_incsearch = "#D285D3",
|
bg_incsearch = "#718EDF",
|
||||||
bg_selection = "#D285D3",
|
bg_selection = "#718EDF",
|
||||||
bg_statusline = pick("#2E282D", "#241E23"),
|
bg_statusline = pick("#292A2F", "#1E1F25"),
|
||||||
bg_statusline_nc = "#201A1F",
|
bg_statusline_nc = "#1A1B20",
|
||||||
bg_tabline = "#201A1F",
|
bg_tabline = "#1A1B20",
|
||||||
bg_tabsel = "#2E282D",
|
bg_tabsel = "#292A2F",
|
||||||
|
|
||||||
fg = "#EBDFE6",
|
fg = "#E3E2E9",
|
||||||
fg_muted = "#D2C2CE",
|
fg_muted = "#C4C6D3",
|
||||||
fg_subtle = "#9B8C98",
|
fg_subtle = "#8E909C",
|
||||||
fg_comment = pick("#9B8C98", "#4F434D"),
|
fg_comment = pick("#8E909C", "#444651"),
|
||||||
fg_strong = pick("#1A1B1F", "#F2F2F7"),
|
fg_strong = pick("#1A1B1F", "#F2F2F7"),
|
||||||
fg_on_soft = pick("#17181C", "#F4F4F8"),
|
fg_on_soft = pick("#17181C", "#F4F4F8"),
|
||||||
|
|
||||||
border = "#4F434D",
|
border = "#444651",
|
||||||
accent = "#FCABFC",
|
accent = "#B3C5FF",
|
||||||
accent_container = "#D285D3",
|
accent_container = "#718EDF",
|
||||||
accent_fg = "#5B1961",
|
accent_fg = "#001748",
|
||||||
accent_solid_fg = "#53115A",
|
accent_solid_fg = "#002B75",
|
||||||
|
|
||||||
secondary = "#E2BADE",
|
secondary = "#BBC5EA",
|
||||||
secondary_container = "#5D3F5C",
|
secondary_container = "#3E4867",
|
||||||
secondary_fg = "#D3ADCF",
|
secondary_fg = "#ADB7DB",
|
||||||
secondary_solid_fg = "#422742",
|
secondary_solid_fg = "#252F4D",
|
||||||
|
|
||||||
tertiary = "#B2D266",
|
tertiary = "#FCACF7",
|
||||||
tertiary_container = "#8CAB44",
|
tertiary_container = "#C177BE",
|
||||||
tertiary_fg = "#2C3C00",
|
tertiary_fg = "#360039",
|
||||||
tertiary_solid_fg = "#263500",
|
tertiary_solid_fg = "#531356",
|
||||||
|
|
||||||
error = "#FFB4AB",
|
error = "#FFB4AB",
|
||||||
error_container = "#93000A",
|
error_container = "#93000A",
|
||||||
error_fg = "#FFDAD6",
|
error_fg = "#FFDAD6",
|
||||||
error_solid_fg = "#690005",
|
error_solid_fg = "#690005",
|
||||||
|
|
||||||
ok = "#FFBAC2",
|
ok = "#44DEF5",
|
||||||
warn = "#FFDDEA",
|
warn = "#FFDCF2",
|
||||||
info = "#B3A2D5",
|
info = "#90ACD5",
|
||||||
hint = "#FFBA93",
|
hint = "#9BCEFE",
|
||||||
add = "#FFBAC2",
|
add = "#44DEF5",
|
||||||
change = "#B3A2D5",
|
change = "#90ACD5",
|
||||||
delete = "#F248D2",
|
delete = "#947DFF",
|
||||||
|
|
||||||
cursor_fg = "#53115A",
|
cursor_fg = "#002B75",
|
||||||
cursor_bg = "#FCABFC",
|
cursor_bg = "#B3C5FF",
|
||||||
match_bg = "#8CAB44",
|
match_bg = "#C177BE",
|
||||||
match_fg = "#2C3C00",
|
match_fg = "#360039",
|
||||||
todo_bg = "#8CAB44",
|
todo_bg = "#C177BE",
|
||||||
todo_fg = "#2C3C00",
|
todo_fg = "#360039",
|
||||||
|
|
||||||
-- Syntax accents must stay dynamic. These come from your generated palette
|
-- Syntax accents must stay dynamic. These come from your generated palette
|
||||||
-- instead of fixed hex values, so foregrounds change with the wallpaper too.
|
-- instead of fixed hex values, so foregrounds change with the wallpaper too.
|
||||||
code_keyword = "#D994CF",
|
code_keyword = "#A6A3EE",
|
||||||
code_func = "#FFBA93",
|
code_func = "#9BCEFE",
|
||||||
code_string = "#FFBAC2",
|
code_string = "#44DEF5",
|
||||||
code_number = "#FFDDEA",
|
code_number = "#FFDCF2",
|
||||||
code_const = "#F248D2",
|
code_const = "#947DFF",
|
||||||
code_type = "#FCABFC",
|
code_type = "#B3C5FF",
|
||||||
code_special = "#B2D266",
|
code_special = "#FCACF7",
|
||||||
code_preproc = "#E2BADE",
|
code_preproc = "#BBC5EA",
|
||||||
code_builtin = "#FCABFC",
|
code_builtin = "#B3C5FF",
|
||||||
code_param = "#FFDDEA",
|
code_param = "#FFDCF2",
|
||||||
code_field = "#E2BADE",
|
code_field = "#BBC5EA",
|
||||||
code_namespace = "#B2D266",
|
code_namespace = "#FCACF7",
|
||||||
code_operator = pick("#FCABFC", "#E2BADE"),
|
code_operator = pick("#B3C5FF", "#BBC5EA"),
|
||||||
|
|
||||||
line_current = pick("#232428", "#E7E7EC"),
|
line_current = pick("#232428", "#E7E7EC"),
|
||||||
ref_bg = pick("#3A3338", "#2E282D"),
|
ref_bg = pick("#33343A", "#292A2F"),
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Core UI -------------------------------------------------------------------
|
-- Core UI -------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
local gen_hook = MiniSplitjoin.gen_hook
|
|
||||||
|
|
||||||
local curly = { brackets = { "%b{}" }, separator = ";" }
|
|
||||||
local curly_semi = { brackets = { "%b{}" }, separator = ";" }
|
|
||||||
local add_semicolon_curly = gen_hook.add_trailing_separator(curly)
|
|
||||||
local remove_semicolon_curly = gen_hook.del_trailing_separator(curly)
|
|
||||||
local pad_curly = gen_hook.pad_brackets(curly_semi)
|
|
||||||
|
|
||||||
vim.b.minisplitjoin_config = {
|
|
||||||
split = { hooks_post = { remove_semicolon_curly } },
|
|
||||||
join = { hooks_pre = { add_semicolon_curly }, hooks_post = { pad_curly } },
|
|
||||||
}
|
|
||||||
+3
-5
@@ -14,11 +14,9 @@ autocmd("VimLeave", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
autocmd("BufWritePre", {
|
autocmd("BufWritePre", {
|
||||||
callback = function()
|
pattern = "*",
|
||||||
local ok = pcall(function()
|
callback = function(args)
|
||||||
vim.cmd "undojoin"
|
require("conform").format({ bufnr = args.buf })
|
||||||
end)
|
|
||||||
vim.cmd "Neoformat"
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
require("conform").setup {
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
python = { "ruff" },
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
javascript = { "prettier" },
|
||||||
|
typescript = { "prettier" },
|
||||||
|
qml = { "qmlformat" },
|
||||||
|
go = { "gofmt" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
bash = { "shfmt" },
|
||||||
|
zsh = { "shfmt" },
|
||||||
|
ps1 = {},
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -17,22 +17,16 @@ local function flatten_to_array(t)
|
|||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = vim.tbl_deep_extend(
|
local capabilities =
|
||||||
"force",
|
vim.tbl_deep_extend("force", {}, vim.lsp.protocol.make_client_capabilities(), cmp_lsp.default_capabilities())
|
||||||
{},
|
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
|
||||||
cmp_lsp.default_capabilities()
|
|
||||||
)
|
|
||||||
|
|
||||||
require("fidget").setup {}
|
require("fidget").setup {}
|
||||||
require("mason").setup()
|
|
||||||
require("mason-lspconfig").setup {
|
require("mason-lspconfig").setup {
|
||||||
automatic_enable = true,
|
automatic_enable = false,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"qmlls",
|
"qmlls",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"gopls",
|
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
@@ -55,15 +49,24 @@ require("mason-lspconfig").setup {
|
|||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
["rust_analyzer"] = function()
|
||||||
|
local lspconfig = require "lspconfig"
|
||||||
|
lspconfig.rust_analyzer.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
cargo = { allFeatures = true },
|
||||||
|
checkOnSave = { command = "clippy" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
zls = function()
|
zls = function()
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
lspconfig.zls.setup {
|
lspconfig.zls.setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
root_dir = lspconfig.util.root_pattern(
|
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
|
||||||
".git",
|
|
||||||
"build.zig",
|
|
||||||
"zls.json"
|
|
||||||
),
|
|
||||||
settings = {
|
settings = {
|
||||||
zls = {
|
zls = {
|
||||||
enable_inlay_hints = true,
|
enable_inlay_hints = true,
|
||||||
@@ -75,6 +78,7 @@ require("mason-lspconfig").setup {
|
|||||||
vim.g.zig_fmt_parse_errors = 0
|
vim.g.zig_fmt_parse_errors = 0
|
||||||
vim.g.zig_fmt_autosave = 0
|
vim.g.zig_fmt_autosave = 0
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["lua_ls"] = function()
|
["lua_ls"] = function()
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
lspconfig.lua_ls.setup {
|
lspconfig.lua_ls.setup {
|
||||||
@@ -214,8 +218,7 @@ lspconfig("texlab", {
|
|||||||
executable = "zathura",
|
executable = "zathura",
|
||||||
args = {
|
args = {
|
||||||
"--synctex-editor-command",
|
"--synctex-editor-command",
|
||||||
[[ nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]]
|
[[ nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
||||||
.. vim.v.servername,
|
|
||||||
"--synctex-forward",
|
"--synctex-forward",
|
||||||
"%l:1:%f",
|
"%l:1:%f",
|
||||||
"%p",
|
"%p",
|
||||||
@@ -252,6 +255,25 @@ lspconfig("jsonls", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
lspconfig("powershell_es", {
|
||||||
|
settings = {
|
||||||
|
powershell = {
|
||||||
|
codeFormatting = {
|
||||||
|
preset = "Custom",
|
||||||
|
openBraceOnSameLine = true,
|
||||||
|
newLineAfterOpenBrace = false,
|
||||||
|
newLineAfterCloseBrace = true,
|
||||||
|
whitespaceBeforeOpenBrace = true,
|
||||||
|
whitespaceBeforeOpenParen = true,
|
||||||
|
whitespaceAroundOperator = true,
|
||||||
|
whitespaceAfterSeparator = true,
|
||||||
|
ignoreOneLineBlock = true,
|
||||||
|
pipelineIndentationStyle = "NoIndentation",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
lspconfig("yamlls", {
|
lspconfig("yamlls", {
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
@@ -282,15 +304,10 @@ local flat_servers = flatten_to_array(servers)
|
|||||||
|
|
||||||
for _, server in ipairs(flat_servers) do
|
for _, server in ipairs(flat_servers) do
|
||||||
lspconfig(server, {
|
lspconfig(server, {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client)
|
||||||
if client.name == "typos_lsp" or client.name == "copilot" then
|
if client.name == "typos_lsp" or client.name == "copilot" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
require("workspace-diagnostics").populate_workspace_diagnostics(
|
|
||||||
client,
|
|
||||||
bufnr
|
|
||||||
)
|
|
||||||
end,
|
end,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.plugin = {
|
|
||||||
"sbdchd/neoformat",
|
|
||||||
config = function()
|
|
||||||
vim.g.neoformat_enabled_lua = { "luaformatter" }
|
|
||||||
vim.g.neoformat_enabled_python = { "black" }
|
|
||||||
vim.g.neoformat_enabled_javascript = { "prettier" }
|
|
||||||
vim.g.neoformat_enabled_typescript = { "prettier" }
|
|
||||||
vim.g.neoformat_enabled_qml = { "qmlformat" }
|
|
||||||
vim.g.neoformat_enabled_go = { "gofmt" }
|
|
||||||
vim.g.neoformat_enabled_sh = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_bash = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_zsh = { "shfmt" }
|
|
||||||
vim.g.neoformat_enabled_rust = { "rustfmt" }
|
|
||||||
vim.g.neoformat_enabled_pwsh = { "pwshfmt" }
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
require("undotree").setup {
|
||||||
|
float_diff = true,
|
||||||
|
layout = "left_bottom",
|
||||||
|
position = "left",
|
||||||
|
ignore_filetype = { "undotree", "undotreeDiff", "qf", "TelescopePrompt", "spectre_panel", "tsplayground" },
|
||||||
|
window = {
|
||||||
|
winblend = 30,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
["move_next"] = "j",
|
||||||
|
["move_prev"] = "k",
|
||||||
|
["move2parent"] = "gj",
|
||||||
|
["move_change_next"] = "J",
|
||||||
|
["move_change_prev"] = "K",
|
||||||
|
["action_enter"] = "<cr>",
|
||||||
|
["enter_diffbuf"] = "p", -- is defined for both undotree and preview buffers, so it works as a toggle
|
||||||
|
["quit"] = "q", -- is defined for both undotree and preview buffers
|
||||||
|
["update_undotree_view"] = "S",
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
vim.g.neovide_cursor_trail_size = 0
|
||||||
|
vim.g.neovide_floating_corner_radius = 0.4
|
||||||
|
vim.o.guifont = "0xProto Nerd Font Mono:h12"
|
||||||
|
vim.g.neovide_refresh_rate = 144
|
||||||
|
vim.g.neovide_refresh_rate_idle = 144
|
||||||
|
vim.g.neovide_no_idle = true
|
||||||
|
vim.g.neovide_floating_blur_amount_x = 0
|
||||||
|
vim.g.neovide_floating_blur_amount_y = 0
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.08
|
||||||
|
vim.g.neovide_cursor_short_animation_length = 0.04
|
||||||
|
vim.g.neovide_scroll_animation_length = 0.15
|
||||||
@@ -1,17 +1,20 @@
|
|||||||
vim.notify = require('notify')
|
vim.notify = require('notify')
|
||||||
|
local icons = require("assets.icons").icons
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
|
||||||
require('notify').setup({
|
require('notify').setup({
|
||||||
|
-- background_colour = "#000000",
|
||||||
render = "wrapped-default",
|
render = "wrapped-default",
|
||||||
|
animation = "slide",
|
||||||
timeout = 6000,
|
timeout = 6000,
|
||||||
max_width = 50,
|
max_width = 50,
|
||||||
minimum_width = 50,
|
minimum_width = 50,
|
||||||
level = "info",
|
level = "info",
|
||||||
fps = 60,
|
fps = 60,
|
||||||
icons = {
|
icons = {
|
||||||
ERROR = "",
|
ERROR = icons.diagnostics.Error,
|
||||||
WARN = "",
|
WARN = icons.diagnostics.Warn,
|
||||||
INFO = "",
|
INFO = icons.diagnostics.Info,
|
||||||
DEBUG = "",
|
DEBUG = "",
|
||||||
TRACE = "✎",
|
TRACE = "✎",
|
||||||
},
|
},
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
local i = {}
|
|
||||||
|
|
||||||
function M.foldexpr()
|
|
||||||
local lnum = vim.v.lnum
|
|
||||||
local line = vim.fn.getline( lnum )
|
|
||||||
if line:find( "<think>", 1, true ) then
|
|
||||||
return "a1"
|
|
||||||
elseif line:find( "</think>", 1, true ) then
|
|
||||||
return "s1"
|
|
||||||
else
|
|
||||||
return "="
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
require('undotree').setup({
|
|
||||||
float_diff = true,
|
|
||||||
layout = "left_bottom",
|
|
||||||
position = "left",
|
|
||||||
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
|
||||||
window = {
|
|
||||||
winblend = 30,
|
|
||||||
},
|
|
||||||
keymaps = {
|
|
||||||
['j'] = "move_next",
|
|
||||||
['k'] = "move_prev",
|
|
||||||
['gj'] = "move2parent",
|
|
||||||
['J'] = "move_change_next",
|
|
||||||
['K'] = "move_change_prev",
|
|
||||||
['<cr>'] = "action_enter",
|
|
||||||
['p'] = "enter_diffbuf",
|
|
||||||
['q'] = "quit",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -6,19 +6,19 @@ local function pick(light, dark)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local c = {
|
local c = {
|
||||||
bg = "#171216",
|
bg = "#121318",
|
||||||
bg_alt = "#201A1F",
|
bg_alt = "#1A1B20",
|
||||||
bg_mid = pick("#2E282D", "#241E23"),
|
bg_mid = pick("#292A2F", "#1E1F25"),
|
||||||
fg = "#EBDFE6",
|
fg = "#E3E2E9",
|
||||||
fg_muted = "#D2C2CE",
|
fg_muted = "#C4C6D3",
|
||||||
fg_strong = pick("#15161A", "#F4F4F8"),
|
fg_strong = pick("#15161A", "#F4F4F8"),
|
||||||
|
|
||||||
normal = "#D285D3",
|
normal = "#718EDF",
|
||||||
insert = "#5D3F5C",
|
insert = "#3E4867",
|
||||||
visual = "#8CAB44",
|
visual = "#C177BE",
|
||||||
replace = "#93000A",
|
replace = "#93000A",
|
||||||
command = pick("#FFDDEA", "#B3A2D5"),
|
command = pick("#FFDCF2", "#90ACD5"),
|
||||||
inactive = "#201A1F",
|
inactive = "#1A1B20",
|
||||||
|
|
||||||
normal_fg = pick("#15161A", "#F4F4F8"),
|
normal_fg = pick("#15161A", "#F4F4F8"),
|
||||||
insert_fg = pick("#15161A", "#F4F4F8"),
|
insert_fg = pick("#15161A", "#F4F4F8"),
|
||||||
|
|||||||
+24
-7
@@ -11,11 +11,24 @@ map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
|
|||||||
map("n", "<C-j>", "<C-d>zz")
|
map("n", "<C-j>", "<C-d>zz")
|
||||||
map("n", "<C-k>", "<C-u>zz")
|
map("n", "<C-k>", "<C-u>zz")
|
||||||
map("n", "<A-->", ":bdelete<CR>")
|
map("n", "<A-->", ":bdelete<CR>")
|
||||||
|
map("", "=", function()
|
||||||
|
require("conform").format({ async = true, lsp_fallback = true }, function(err)
|
||||||
|
if not err then
|
||||||
|
local mode = vim.api.nvim_get_mode().mode
|
||||||
|
if vim.startswith(string.lower(mode), "v") then
|
||||||
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<Esc>", true, false, true), "n", true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end, { desc = "Format code" })
|
||||||
|
|
||||||
-- map("n", "<SA-->", ":BufferRestore<CR>")
|
-- map("n", "<SA-->", ":BufferRestore<CR>")
|
||||||
map('n', '<leader>e', function() Snacks.explorer() end)
|
map("n", "<leader>e", function()
|
||||||
map('n', '<leader>u', require('undotree').toggle, { noremap = true, silent = true })
|
Snacks.explorer()
|
||||||
|
end)
|
||||||
map("n", "<leader>g", require("telescope.builtin").live_grep, { desc = "Telescope grep" })
|
map("n", "<leader>g", require("telescope.builtin").live_grep, { desc = "Telescope grep" })
|
||||||
map("n", "<leader>f", require("telescope.builtin").find_files, { desc = "Telescope find files" })
|
map("n", "<leader>f", require("telescope.builtin").find_files, { desc = "Telescope find files" })
|
||||||
|
map("n", "<leader>u", require("undotree").toggle, { noremap = true, silent = true })
|
||||||
|
|
||||||
-- Copilot Chat buffer
|
-- Copilot Chat buffer
|
||||||
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||||
@@ -28,16 +41,20 @@ map("n", "<leader>zig", "<cmd>LspRestart<cr>")
|
|||||||
-- Why?
|
-- Why?
|
||||||
map("x", "<leader>p", [["_dP]])
|
map("x", "<leader>p", [["_dP]])
|
||||||
map({ "n", "v" }, "<leader>y", [["+y]])
|
map({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
map({"n", "v"}, "<leader>d", "\"_d")
|
map({ "n", "v" }, "<leader>d", '"_d')
|
||||||
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
|
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>")
|
||||||
map("n", "<leader><leader>", function()
|
map("n", "<leader><leader>", function()
|
||||||
vim.cmd("so")
|
vim.cmd "so"
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Greatest remap
|
-- Greatest remap
|
||||||
map("n", "<leader>Y", [["+Y]])
|
map("n", "<leader>Y", [["+Y]])
|
||||||
map("n", "<A-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Terminal" })
|
map("n", "<A-q>", function()
|
||||||
map("n", "<leader>gb", function() Snacks.gitbrowse.open() end )
|
Snacks.terminal.toggle()
|
||||||
|
end, { desc = "Toggle Terminal" })
|
||||||
|
map("n", "<leader>gb", function()
|
||||||
|
Snacks.gitbrowse.open()
|
||||||
|
end)
|
||||||
map("n", "K", require("pretty_hover").hover)
|
map("n", "K", require("pretty_hover").hover)
|
||||||
|
|
||||||
-- Might delete later
|
-- Might delete later
|
||||||
|
|||||||
+1
-1
@@ -29,11 +29,11 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,
|
|||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = "unnamedplus"
|
||||||
vim.o.cursorline = true
|
vim.o.cursorline = true
|
||||||
vim.o.cursorlineopt = "number"
|
vim.o.cursorlineopt = "number"
|
||||||
|
vim.o.number = true
|
||||||
vim.opt.fillchars = { eob = " " }
|
vim.opt.fillchars = { eob = " " }
|
||||||
vim.o.ignorecase = true
|
vim.o.ignorecase = true
|
||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
vim.o.mouse = "a"
|
vim.o.mouse = "a"
|
||||||
vim.o.number = true
|
|
||||||
vim.o.numberwidth = 3
|
vim.o.numberwidth = 3
|
||||||
vim.o.ruler = false
|
vim.o.ruler = false
|
||||||
vim.o.showmode = false
|
vim.o.showmode = false
|
||||||
|
|||||||
@@ -10,8 +10,14 @@ return {
|
|||||||
opts = require "config.format.markdown",
|
opts = require "config.format.markdown",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'mrcjkb/rustaceanvim',
|
"mrcjkb/rustaceanvim",
|
||||||
version = '^9',
|
version = "^9",
|
||||||
-- lazy = false,
|
-- lazy = false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require "config.format.conform"
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -2,7 +2,7 @@ return {
|
|||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.gitsigns")
|
require "config.other.gitsigns"
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-35
@@ -2,21 +2,13 @@ return {
|
|||||||
{
|
{
|
||||||
require "config.snacks",
|
require "config.snacks",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"nvim-mini/mini.nvim",
|
|
||||||
version = false,
|
|
||||||
|
|
||||||
modules = function()
|
|
||||||
require "config.mini-modules"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
branch = "main",
|
branch = "main",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.treesitter"
|
require "config.modules.treesitter"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -32,7 +24,7 @@ return {
|
|||||||
{
|
{
|
||||||
"rmagatti/auto-session",
|
"rmagatti/auto-session",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.autosession"
|
require "config.modules.autosession"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -48,22 +40,19 @@ return {
|
|||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.barbar"
|
require "config.other.barbar"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mawkler/modicator.nvim",
|
"mawkler/modicator.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.modicator"
|
require "config.gui.modicator"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"shinchu/lightline-gruvbox.vim",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"jiaoshijie/undotree",
|
"jiaoshijie/undotree",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.undotree"
|
require "config.modules.undotree"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -74,7 +63,7 @@ return {
|
|||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.autopairs"
|
require "config.other.autopairs"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -83,7 +72,7 @@ return {
|
|||||||
{
|
{
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.notify"
|
require "config.other.notify"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -108,12 +97,11 @@ return {
|
|||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.dapconf"
|
require "config.other.dapconf"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mason-org/mason-lspconfig.nvim",
|
"mason-org/mason-lspconfig.nvim",
|
||||||
opts = {},
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "mason-org/mason.nvim", opts = {} },
|
{ "mason-org/mason.nvim", opts = {} },
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
@@ -184,12 +172,6 @@ return {
|
|||||||
{
|
{
|
||||||
"vimpostor/vim-tpipeline",
|
"vimpostor/vim-tpipeline",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"yazeed1s/minimal.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.g.minimal_italic_comments = true
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Yazeed1s/minimal.nvim",
|
"Yazeed1s/minimal.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
@@ -216,19 +198,13 @@ return {
|
|||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require "config.harpoon"
|
require "config.other.harpoon"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aznhe21/actions-preview.nvim",
|
"aznhe21/actions-preview.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require "config.actions-preview"
|
require "config.other.actions-preview"
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sbdchd/neoformat",
|
|
||||||
config = function()
|
|
||||||
require "config.format.neoformat"
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -243,6 +219,9 @@ return {
|
|||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"artemave/workspace-diagnostics.nvim",
|
"jiaoshijie/undotree",
|
||||||
|
config = function()
|
||||||
|
require "config.modules.undotree"
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ return {
|
|||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("config.telescope")
|
require("config.modules.telescope")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ return {
|
|||||||
})
|
})
|
||||||
vim.o.laststatus = 0
|
vim.o.laststatus = 0
|
||||||
end
|
end
|
||||||
require("config.theme.lualine")
|
require("config.gui.lualine")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"catgoose/nvim-colorizer.lua",
|
"catgoose/nvim-colorizer.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.theme.colorizer")
|
require("config.gui.colorizer")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -30,7 +30,7 @@ return {
|
|||||||
enabled = false,
|
enabled = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("config.theme.onedarkpro-light")
|
require("config.gui.themes.onedarkpro-light")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user