set up new nvim
This commit is contained in:
parent
5cfe0f5a0b
commit
b40ab988f1
|
@ -1,13 +1,11 @@
|
|||
# Functions
|
||||
# HACK: This is needed to trigger the opening function of the taolf nvim plugin
|
||||
cmd open ${{
|
||||
set +u
|
||||
files=${@:-$fx}
|
||||
[ "$lf_user_multiedit" = "true" ] && {
|
||||
if [ -z "$TAOLF" ]; then
|
||||
$EDITOR $fx
|
||||
return
|
||||
fi
|
||||
$EDITOR $fx
|
||||
lf -remote "send $id unselect"
|
||||
return
|
||||
}
|
||||
$OPENER "$f"
|
||||
}}
|
||||
|
@ -20,15 +18,7 @@ cmd pushedit %{{
|
|||
echo
|
||||
}
|
||||
echo $files | xargs -r touch
|
||||
if [ -n "$TAOLF" ]; then
|
||||
set -- $files
|
||||
lf -remote "send $id unselect
|
||||
send $id toggle $files
|
||||
send $id select $1
|
||||
send $id open"
|
||||
else
|
||||
lf -remote "send $id \$$OPENER $files"
|
||||
fi
|
||||
lf -remote "send $id \$$OPENER $files"
|
||||
}}
|
||||
|
||||
cmd open-with ${{
|
||||
|
@ -165,14 +155,7 @@ cmd find_word ${{
|
|||
row="$(echo "$res" | cut -d':' -f2)"
|
||||
column="$(echo "$res" | cut -d':' -f3)"
|
||||
if [ -n "$res" ]; then
|
||||
if [ -n "$VIM" ]; then
|
||||
lf -remote "send $id unselect
|
||||
send $id cd "$(dirname $file)"
|
||||
send $id set hidden
|
||||
send $id select "$file"
|
||||
send $id open
|
||||
send $id unselect"
|
||||
elif { [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; } && [ -n "$EMBEDDED" ]; then
|
||||
if { [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; } && [ -n "$EMBEDDED" ]; then
|
||||
lf -remote "send $id \$$EDITOR +'call cursor($row, $column)' -- $([ -n "$EMBEDDED" ] && echo "--") '$file'"
|
||||
else
|
||||
lf -remote "send $id \$$EDITOR '$file'"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#-------------------------------------------
|
||||
# Environment checks
|
||||
#-------------------------------------------
|
||||
# env NVIM, env lf_shell = $HOME/.local/libexec/vimlf-open "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Websites
|
||||
|
@ -17,9 +16,6 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
|||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# HACK: This '-- --' fixes nvim's argument parsing when given empty files.
|
||||
# Unfortunately I have no idea what's causing this bug.
|
||||
label editor, mime ^text|x-empty$, env EMBEDDED = ${VISUAL:-$EDITOR} -- -- "$@"
|
||||
label editor, mime ^text|x-empty$ = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, mime ^text|x-empty$ = $PAGER -- "$@"
|
||||
label editor, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = ${VISUAL:-$EDITOR} -- "$@"
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,2 @@
|
|||
vim.loader.enable()
|
||||
require("config.options")
|
||||
require("lazy-init")
|
||||
require("config.autocmds")
|
||||
require("config.filetypes")
|
||||
require("funcs").set_title()
|
||||
require("funcs").set_cwd()
|
||||
require("funcs").set_maps(require("config.keymaps").standard_maps())
|
||||
require("funcs").diagnostic_setup(require("config.diagnostic"))
|
||||
require("custom")
|
||||
require("config.lazy")
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "3314"
|
||||
},
|
||||
"version": 3
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
local autocmds = {
|
||||
{ -- Automatically change line numeration
|
||||
{ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" },
|
||||
|
@ -23,82 +27,25 @@ local autocmds = {
|
|||
-- end,
|
||||
},
|
||||
},
|
||||
{ -- Use 'q' to quit from common plugins
|
||||
"FileType",
|
||||
{
|
||||
pattern = {
|
||||
"PlenaryTestPopup",
|
||||
"help",
|
||||
"lspinfo",
|
||||
"notify",
|
||||
"qf",
|
||||
"query",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
"neotest-output",
|
||||
"checkhealth",
|
||||
"neotest-summary",
|
||||
"neotest-output-panel",
|
||||
},
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
|
||||
end,
|
||||
},
|
||||
},
|
||||
{ -- make it easier to close man-files when opened inline
|
||||
"FileType",
|
||||
{
|
||||
group = "man_unlisted",
|
||||
pattern = { "man" },
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"Filetype",
|
||||
{
|
||||
pattern = { "gitcommit", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.spell = true
|
||||
end,
|
||||
},
|
||||
},
|
||||
{ -- Fix auto comment
|
||||
"BufWinEnter",
|
||||
{
|
||||
command = "set formatoptions-=cro",
|
||||
},
|
||||
},
|
||||
{ -- Highlight yanked text
|
||||
"TextYankPost",
|
||||
{
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "Visual", timeout = 200 })
|
||||
end,
|
||||
},
|
||||
},
|
||||
{ -- Trigger shortcuts script
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "directories", "files" },
|
||||
command = "silent!!shortcuts"
|
||||
command = "silent!!shortcuts",
|
||||
},
|
||||
},
|
||||
{ -- Trigger xrdb
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "xresources" },
|
||||
command = "silent!!xrdb %"
|
||||
command = "silent!!xrdb %",
|
||||
},
|
||||
},
|
||||
{ -- Trigger xrdb
|
||||
{ -- Trigger asciidoctor-pdf
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "*.adoc" },
|
||||
command = "silent!!asciidoctor-pdf % &"
|
||||
command = "silent!!asciidoctor-pdf % &",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
local M = {}
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.signs = {
|
||||
{ name = "DapStopped", text = icons.DapStopped, texthl = "DiagnosticWarn" },
|
||||
{ name = "DapBreakpoint", text = icons.DapBreakpoint, texthl = "DiagnosticInfo" },
|
||||
{ name = "DapBreakpointRejected", text = icons.DapBreakpointRejected, texthl = "DiagnosticError" },
|
||||
{ name = "DapBreakpointCondition", text = icons.DapBreakpointCondition, texthl = "DiagnosticInfo" },
|
||||
{ name = "DapLogPoint", text = icons.DapLogPoint, texthl = "DiagnosticInfo" },
|
||||
{ name = "DiagnosticSignError", text = icons.Error, texthl = "DiagnosticSignError" },
|
||||
{ name = "DiagnosticSignWarn", text = icons.Warn, texthl = "DiagnosticSignWarn" },
|
||||
{ name = "DiagnosticSignHint", text = icons.Hint, texthl = "DiagnosticSignHint" },
|
||||
{ name = "DiagnosticSignInfo", text = icons.Info, texthl = "DiagnosticSignInfo" },
|
||||
}
|
||||
|
||||
M.diagnostic = {
|
||||
virtual_text = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = icons.Error,
|
||||
[vim.diagnostic.severity.HINT] = icons.Hint,
|
||||
[vim.diagnostic.severity.WARN] = icons.Warn,
|
||||
[vim.diagnostic.severity.INFO] = icons.Info,
|
||||
},
|
||||
active = M.signs,
|
||||
},
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
focused = false,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,27 +0,0 @@
|
|||
local ansible_test = function(path, bufnr)
|
||||
if string.find(path, "templates") or string.find(path, "files") then
|
||||
return "yaml"
|
||||
end
|
||||
local find = { "tasks", "roles", "handlers", "group_vars", "host_vars", "ansible.cfg", ".ansible-lint" }
|
||||
local opts = { stop = os.getenv("HOME"), upward = true, limit = 1, path = path }
|
||||
if next(vim.fs.find(find, opts)) ~= nil then
|
||||
return "yaml.ansible"
|
||||
else
|
||||
return "yaml"
|
||||
end
|
||||
end
|
||||
|
||||
local filetypes = {
|
||||
extension = {
|
||||
yml = ansible_test,
|
||||
yaml = ansible_test,
|
||||
},
|
||||
filename = {
|
||||
["Xresources"] = "xdefaults",
|
||||
["Xdefaults"] = "xdefaults",
|
||||
["xresources"] = "xdefaults",
|
||||
["xdefaults"] = "xdefaults",
|
||||
},
|
||||
}
|
||||
|
||||
vim.filetype.add(filetypes)
|
|
@ -1,88 +0,0 @@
|
|||
return {
|
||||
Diagnostic = "",
|
||||
Error = "",
|
||||
Hint = "",
|
||||
Info = "",
|
||||
Warn = "",
|
||||
Bug = "",
|
||||
True = "",
|
||||
Pending = "",
|
||||
False = "",
|
||||
Close = "",
|
||||
Selected = "",
|
||||
Console = "",
|
||||
Gear = "",
|
||||
Event = "",
|
||||
File = "",
|
||||
NewFile = "",
|
||||
FileTree = "",
|
||||
Import = "",
|
||||
Keyboard = "",
|
||||
Sleep = "",
|
||||
Package = "",
|
||||
Runtime = "",
|
||||
Source = "",
|
||||
Code = "",
|
||||
Start = "",
|
||||
Task = "",
|
||||
Buffer = "",
|
||||
Search = "",
|
||||
Speed = "",
|
||||
Test = "",
|
||||
Flame = "",
|
||||
Leave = "",
|
||||
Git = "",
|
||||
Loaded = "",
|
||||
Unloaded = "",
|
||||
Added = "",
|
||||
Modified = "",
|
||||
Removed = "",
|
||||
Untracked = "",
|
||||
ChangeDelete = "",
|
||||
Truncate = "",
|
||||
Note = "",
|
||||
Dap = {
|
||||
Breakpoint = "",
|
||||
BreakpointCondition = "",
|
||||
BreakpointRejected = "",
|
||||
LogPoint = ".>",
|
||||
Stopped = "",
|
||||
},
|
||||
lspkind = {
|
||||
Array = "",
|
||||
Boolean = "⊨",
|
||||
Class = "",
|
||||
Color = "",
|
||||
Constant = "",
|
||||
Constructor = "",
|
||||
Enum = "",
|
||||
EnumMember = "",
|
||||
Event = "",
|
||||
Field = "",
|
||||
File = "",
|
||||
Folder = "",
|
||||
Function = "",
|
||||
Interface = "",
|
||||
Key = "",
|
||||
Keyword = "",
|
||||
Method = "",
|
||||
Module = "",
|
||||
Namespace = "",
|
||||
Null = "",
|
||||
Number = "",
|
||||
Object = "",
|
||||
Operator = "",
|
||||
Package = "",
|
||||
Property = "",
|
||||
Reference = "",
|
||||
Snippet = "",
|
||||
String = "",
|
||||
Struct = "",
|
||||
Text = "",
|
||||
TypeParameter = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Variable = "",
|
||||
},
|
||||
progress = { "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.coding.copilot" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "lazyvim.plugins.extras.editor.aerial" },
|
||||
{ import = "lazyvim.plugins.extras.editor.leap" },
|
||||
{ import = "lazyvim.plugins.extras.test.core" },
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
lazy = false,
|
||||
version = false,
|
||||
},
|
||||
install = { colorscheme = { "tokyonight" } },
|
||||
checker = { enabled = true },
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
"matchparen",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,37 +0,0 @@
|
|||
local conf = { handlers = {} }
|
||||
local f = require("funcs")
|
||||
|
||||
conf.handlers.intelephense = {
|
||||
init_options = {
|
||||
storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense",
|
||||
globalStoragePath = os.getenv("XDG_CONFIG_HOME") .. "/intelephense",
|
||||
licenceKey = f.get_lsp_key("intelephense")
|
||||
},
|
||||
}
|
||||
|
||||
conf.handlers.sourcery = {
|
||||
on_attach = function(client, _)
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end,
|
||||
init_options = {
|
||||
token = f.get_lsp_key("sourcery")
|
||||
}
|
||||
}
|
||||
|
||||
conf.handlers.bashls = {
|
||||
settings = {
|
||||
bashIde = {
|
||||
shellcheckPath = vim.fn.stdpath("data") .. "/mason/bin/shellcheck",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
conf.handlers.yamlls = {
|
||||
filetypes = { 'yaml', 'yaml.docker-compose', 'yaml.ansible' },
|
||||
}
|
||||
|
||||
conf.required = { "lua_ls", "zk", "bashls" }
|
||||
|
||||
conf.ignore = { "rust_analyzer" } -- This will be set up by rustacean.nvim
|
||||
|
||||
return conf
|
|
@ -1,56 +1,9 @@
|
|||
local g = vim.g
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
local o = vim.opt
|
||||
local d = vim.diagnostic.config
|
||||
|
||||
g.mapleader = " "
|
||||
g.maplocalleader = " "
|
||||
g.vim_json_conceal = 0
|
||||
g.git_worktrees = {
|
||||
{ toplevel = vim.env.HOME, gitdir = vim.env.XDG_DATA_HOME .. "/dots" },
|
||||
}
|
||||
g.max_lines = 1000
|
||||
g.max_size = 1024 * 100
|
||||
|
||||
o.undodir = { vim.fn.stdpath("cache") .. "/undo" }
|
||||
o.clipboard = "unnamedplus"
|
||||
o.conceallevel = 0
|
||||
o.numberwidth = 3
|
||||
o.hlsearch = true
|
||||
o.ignorecase = true
|
||||
o.showmode = false
|
||||
o.smartindent = true
|
||||
o.splitbelow = true
|
||||
o.splitbelow = true
|
||||
o.splitbelow = true
|
||||
o.updatetime = 250
|
||||
o.writebackup = false
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 4
|
||||
o.tabstop = 4
|
||||
o.cursorline = true
|
||||
o.signcolumn = "yes"
|
||||
o.wrap = false
|
||||
o.scrolloff = 8
|
||||
o.sidescrolloff = 8
|
||||
o.undofile = true
|
||||
o.title = true
|
||||
o.smartcase = true
|
||||
-- o.mouse = ""
|
||||
o.backspace = "indent,eol,start"
|
||||
o.termguicolors = true
|
||||
o.timeoutlen = 500
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.laststatus = 3
|
||||
o.modeline = true
|
||||
o.modelines = 3
|
||||
o.listchars = { eol = "¬", tab = "→ ", extends = "❯", precedes = "❮", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- ufo needs these settings
|
||||
o.foldcolumn = "0"
|
||||
o.foldmethod = "manual"
|
||||
o.foldenable = true
|
||||
o.foldlevel = 99
|
||||
o.foldlevelstart = 99
|
||||
|
||||
d({ virtual_text = false })
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
---@class custom
|
||||
---@field dashboard custom.dashboard
|
||||
---@field language custom.language
|
||||
local M = {}
|
||||
|
||||
_G.Custom = M
|
||||
|
||||
setmetatable(M, {
|
||||
__index = function(_, k)
|
||||
return require("custom." .. k)
|
||||
end,
|
||||
})
|
||||
|
||||
return M
|
|
@ -0,0 +1,185 @@
|
|||
---@diagnostic disable: missing-fields
|
||||
---@class custom.language
|
||||
local M = {}
|
||||
|
||||
---@type table<string, conform.FormatterUnit>
|
||||
M.formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
sh = { "shfmt" },
|
||||
}
|
||||
|
||||
---@type table<string, conform.FormatterConfigOverride|fun(bufnr: integer): nil|conform.FormatterConfigOverride>
|
||||
M.formatters = {
|
||||
injected = { options = { ignore_errors = true } },
|
||||
shfmt = { prepend_args = { "-i", "4", "-ci" } },
|
||||
}
|
||||
|
||||
---@type table<string,table>
|
||||
M.linters_by_ft = {
|
||||
dockerfile = { "hadolint" },
|
||||
markdown = { "markdownlint" },
|
||||
}
|
||||
|
||||
---@type table<string,table>
|
||||
M.linters = {}
|
||||
|
||||
---@type Array<string>
|
||||
M.mason_install = {
|
||||
"ansible-lint",
|
||||
"ansible-language-server",
|
||||
"basedpyright",
|
||||
"codelldb",
|
||||
"dockerfile-language-server",
|
||||
"docker-compose-language-service",
|
||||
"json-lsp",
|
||||
"lua-language-server",
|
||||
"hadolint",
|
||||
"marksman",
|
||||
"markdownlint",
|
||||
"ruff-lsp",
|
||||
}
|
||||
|
||||
---@type Array<string>
|
||||
M.treesitter_install = {
|
||||
"bash",
|
||||
"c",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"html",
|
||||
"json",
|
||||
"jsonc",
|
||||
"json5",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"ninja",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"ron",
|
||||
"rst",
|
||||
"rust",
|
||||
"toml",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"yaml",
|
||||
}
|
||||
|
||||
---@type lspconfig.options
|
||||
M.lsp = {
|
||||
jsonls = {
|
||||
on_new_config = function(new_config)
|
||||
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
||||
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
||||
end,
|
||||
settings = {
|
||||
json = {
|
||||
format = {
|
||||
enable = true,
|
||||
},
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
codeLens = {
|
||||
enable = true,
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ruff_lsp = {
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.organizeImports" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Organize Imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
yamlls = {
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
on_new_config = function(new_config)
|
||||
new_config.settings.yaml.schemas = vim.tbl_deep_extend(
|
||||
"force",
|
||||
new_config.settings.yaml.schemas or {},
|
||||
require("schemastore").yaml.schemas()
|
||||
)
|
||||
end,
|
||||
settings = {
|
||||
redhat = { telemetry = { enabled = false } },
|
||||
yaml = {
|
||||
keyOrdering = false,
|
||||
format = {
|
||||
enable = true,
|
||||
},
|
||||
validate = true,
|
||||
schemaStore = {
|
||||
enable = false,
|
||||
url = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
M.lsp_setup = {
|
||||
ruff_lsp = function()
|
||||
LazyVim.lsp.on_attach(function(client, _)
|
||||
if client.name == "ruff_lsp" then
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end)
|
||||
end,
|
||||
rust_analyzer = function()
|
||||
return true
|
||||
end,
|
||||
["*"] = function(server, opts)
|
||||
local base = vim.lsp.protocol.make_client_capabilities()
|
||||
local cmp = require("cmp_nvim_lsp").default_capabilities()
|
||||
vim.tbl_deep_extend("force", opts.capabilities, base)
|
||||
vim.tbl_deep_extend("force", opts.capabilities, cmp)
|
||||
require("lspconfig")[server].setup(opts)
|
||||
end,
|
||||
}
|
||||
|
||||
setmetatable(M, {
|
||||
__index = function(_, k)
|
||||
if k == "lsp" then
|
||||
for l, _ in pairs(M.lsp) do
|
||||
M.lsp[l].mason = false
|
||||
return M.lsp
|
||||
end
|
||||
end
|
||||
return require("custom." .. k)
|
||||
end,
|
||||
})
|
||||
|
||||
return M
|
|
@ -0,0 +1,121 @@
|
|||
---@class custom.dashboard
|
||||
local M = {}
|
||||
|
||||
---@type Array<string>
|
||||
M.banners = {
|
||||
[[
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣷⣶⣤⡀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀
|
||||
⠀⣀⣴⣶⣶⣶⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀
|
||||
⣰⣿⣿⠿⠛⠿⢿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀
|
||||
⣿⣿⡇⠀⠀⠀⠀⠈⠛⢿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀
|
||||
⠹⣿⣧⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⡿⠛⠉⠀⢀⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀
|
||||
⠀⠙⢿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣷⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣤⣶⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠉⠻⠷⡄⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠀⢀⣠⣤⣤⣄⡀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣷⡀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⣿⠟⠉⠉⠙⢿⣿⣿⣷
|
||||
⠀⠀⠀⣀⣠⣤⣤⣤⣶⣶⣶⣤⣤⠀⣴⣿⣿⣿⡿⠟⠛⠛⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠉⠀⠀⠀⢀⣼⣿⣿⡿
|
||||
⠀⠀⠀⠈⠉⠉⠉⠉⠉⠉⠛⠻⠏⣼⣿⣿⡿⣋⣀⣤⣤⣴⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣠⣴⣾⣿⣿⡿⠁
|
||||
⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡿⠋⠘⠿⠟⠛⠛⢻⣿⣿⣿⠋⠁⠈⠉⢿⣿⣿⣧⠀⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠉⠀⠀
|
||||
⠙⣷⣤⣀⠀⠀⠀⢀⣀⣤⣶⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡟⠀⠀⠀⢠⣿⣿⣿⡟⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀
|
||||
⠀⠈⠛⠿⢿⣿⣿⣿⠿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡀⠀⢠⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣷⣶⣶⣶⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢶⣦⣤⣶⣾⣿⣿⡶⠈⠉⠛⠿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣤⣶⡿⠿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
]],
|
||||
[[
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠤⠤⠤⠤⠤⠤⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠒⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠓⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⢀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢇⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡆⠀⠀⠀⠀⠀⠀
|
||||
⠀⢸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀
|
||||
⠀⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⡇⠀⠀⠀⠀⠀
|
||||
⢠⣯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⠀⠀⠀⠀⠀
|
||||
⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⠿⠟⠁⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⠀⠀⠀⠀⠀
|
||||
⣸⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⡀⠀⠀⢉⣿⣿⠀⠀⠀⠀⠀
|
||||
⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⠿⠿⠿⠟⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀
|
||||
⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣤⣤⣀⡀⠀⠀⢀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⢀⣴⣿⣿⡇⠀⠀⠀⠀⠀
|
||||
⠀⠘⣿⣿⣿⣯⡉⠙⠛⠻⠿⢿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣶⣦⣄⣀⡀⠀⠀⠀⣀⣀⣠⣤⣾⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀
|
||||
⠀⠀⠸⣿⣿⣿⣷⣤⠀⠀⠀⠀⠀⠉⠙⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠙⣿⣿⣿⣿⣿⣶⣀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⣿⣶⣶⣤⣄⠀⢀⠀⠉⢿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠀⠈⠙⠛⠻⠿⠿⠿⠀⢀⣠⣴⣶⣦⡀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣾⣿⣿⣿⣿⣿⣿⣿⣷⡀⢀⠀⠀⠀⠀⠀⠀⡀⢠⣿⠟⠉⠀⠀⠁⣀⡀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣷⣤⣦⣀⣤⣿⣿⣿⡀⠀⢀⣠⣾⣿⣿
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠃
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠻⠿⠿⠿⣿⡿⠿⠿⠿⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠀⠀⠀
|
||||
]],
|
||||
[[
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢒⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢘⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢣⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡌⡦⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡐⣸⠂⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠸⡢⡀⠀⠀⠀⠀⠀⠔⣰⠏⡌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⢖⡠⣨⠊⠒⠠⣀⢀⠊⣠⠃⡰⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠠⠀⠀⠠⠠⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⢰⠑⠚⠀⠀⠀⡉⠀⢇⡰⠀⠀⠀⠀⠀⢀⠠⠐⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠐⠤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠈⡄⠀⠀⠀⠀⠘⠠⠐⡇⠀⠀⠀⠠⠐⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⢃⠀⠀⠀⠀⠀⠀⢀⠁⠀⢀⠌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠀⠀⠼⢄⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⢸⠀⠀⠀⠀⠀⠀⢸⠀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀⠀⠈⠢⠄⠀⠀⠀⠀
|
||||
⠀⠀⢸⠀⠀⠀⠀⠀⠀⠸⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠎⠀⠀⠀⠀⠀⠀⡠⠀⠈⢆⠀⠀⠀
|
||||
⠀⠀⠨⠀⠀⠀⠀⠀⠀⠀⢆⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⠀⠀⠀⡌⠀⠀⢎⠨⡄⠀⠀
|
||||
⠀⠀⠀⡂⠀⠀⠀⠀⠀⠀⠈⢎⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠀⠀⠸⠀⠀⢸⠸⢀⠇⠀⠀
|
||||
⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠡⢕⠠⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⢐⠀⠀⠈⠢⠥⠀⠀⠀
|
||||
⠀⠀⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⡉⠒⠠⣀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠰⡀⠀⠀⡰⠁⠀⠀⠀
|
||||
⠀⠀⠀⠀⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠠⢄⠈⠑⠒⠤⡀⠀⢐⠅⠀⠀⠀⠀⠀⠀⠀⡁⡂⠉⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠈⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠂⠤⢀⠓⠈⠢⢀⢀⠠⠤⠐⠀⡉⠌⠀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠰⠐⠪⠤⢀⢀⠀⠀⠀⠀⠀⠀
|
||||
⠀⠀⠀⠀⠀⠀⠀⠈⠁⠢⠄⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠂⠒⡠⠄
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠂⠐⠐⠐⠂⠂⠠⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠄⠐⠂⠂⠀⠉⠀⠀⠀
|
||||
]],
|
||||
}
|
||||
|
||||
---@type Array<table>
|
||||
M.buttons = {
|
||||
{
|
||||
action = LazyVim.telescope("files"),
|
||||
desc = " Find File" .. string.rep(" ", 33),
|
||||
icon = " ",
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
action = "ene | startinsert",
|
||||
desc = " New File" .. string.rep(" ", 34),
|
||||
icon = " ",
|
||||
key = "n",
|
||||
},
|
||||
{
|
||||
action = "Telescope live_grep",
|
||||
desc = " Find Text" .. string.rep(" ", 33),
|
||||
icon = " ",
|
||||
key = "g",
|
||||
},
|
||||
{
|
||||
action = "TodoTelescope",
|
||||
desc = " Find Todo" .. string.rep(" ", 33),
|
||||
icon = " ",
|
||||
key = "t",
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session" .. string.rep(" ", 27),
|
||||
icon = " ",
|
||||
key = "s",
|
||||
},
|
||||
{
|
||||
action = "qa",
|
||||
desc = " Quit" .. string.rep(" ", 38),
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,335 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
function M.lsp_on_attach(client, bufnr)
|
||||
-- TODO: Check this on 0.10.0 release
|
||||
if client.supports_method("textDocument/semanticTokens/full") and vim.lsp.semantic_tokens then
|
||||
vim.b[bufnr].semantic_tokens_enabled = true
|
||||
end
|
||||
|
||||
if client.supports_method("textDocument/documentHighlight") then
|
||||
M.add_buffer_autocmd("lsp_document_highlight", bufnr, {
|
||||
{
|
||||
events = { "CursorHold", "CursorHoldI" },
|
||||
desc = "highlight references when cursor holds",
|
||||
callback = function()
|
||||
if not M.has_capability("textDocument/documentHighlight", { bufnr = bufnr }) then
|
||||
M.del_buffer_autocmd("lsp_document_highlight", bufnr)
|
||||
return
|
||||
end
|
||||
vim.lsp.buf.document_highlight()
|
||||
end,
|
||||
},
|
||||
{
|
||||
events = { "CursorMoved", "CursorMovedI", "BufLeave" },
|
||||
desc = "clear references when cursor moves",
|
||||
callback = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
if client.supports_method("textDocument/inlayHint") then
|
||||
if vim.b[bufnr].inlay_hints_enabled == nil then
|
||||
vim.b[bufnr].inlay_hints_enabled = true
|
||||
end
|
||||
-- TODO: Check this on 0.10.0 release
|
||||
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints_enabled then
|
||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO: Check this on 0.10.0 release
|
||||
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints_enabled then
|
||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
end
|
||||
|
||||
local maps = require("config.keymaps").lsp_maps(client, bufnr)
|
||||
M.set_maps(maps, { buffer = bufnr })
|
||||
end
|
||||
|
||||
function M.set_title()
|
||||
local title = " %t"
|
||||
local f = io.popen([[ zsh -lc 'print -P $PS1' | sed 's/\[[0-9;]*m//g;s/» / %t/g' ]])
|
||||
if f ~= nil then
|
||||
title = f:read("*a") or ""
|
||||
f:close()
|
||||
end
|
||||
vim.opt.titlestring = title
|
||||
end
|
||||
|
||||
function M.buf_close(bufnr, force)
|
||||
local kill_command = "bd"
|
||||
|
||||
local bo = vim.bo
|
||||
local api = vim.api
|
||||
local fnamemodify = vim.fn.fnamemodify
|
||||
|
||||
if bufnr == 0 or bufnr == nil then
|
||||
bufnr = api.nvim_get_current_buf()
|
||||
end
|
||||
|
||||
local bufname = api.nvim_buf_get_name(bufnr)
|
||||
|
||||
if not force then
|
||||
local warning
|
||||
if bo[bufnr].modified then
|
||||
warning = string.format([[No write since last change for (%s)]], fnamemodify(bufname, ":t"))
|
||||
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
||||
warning = string.format([[Terminal %s will be killed]], bufname)
|
||||
end
|
||||
if warning then
|
||||
vim.ui.input({
|
||||
prompt = string.format([[%s. Close it anyway? [y]es or [n]o (default: no): ]], warning),
|
||||
}, function(choice)
|
||||
if choice:match("ye?s?") then
|
||||
force = true
|
||||
end
|
||||
end)
|
||||
if not force then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Get list of window IDs with the buffer to close
|
||||
local windows = vim.tbl_filter(function(win)
|
||||
return api.nvim_win_get_buf(win) == bufnr
|
||||
end, api.nvim_list_wins())
|
||||
|
||||
if #windows == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
if force then
|
||||
kill_command = kill_command .. "!"
|
||||
end
|
||||
|
||||
-- Get list of active buffers
|
||||
local buffers = vim.tbl_filter(function(buf)
|
||||
return api.nvim_buf_is_valid(buf) and bo[buf].buflisted
|
||||
end, api.nvim_list_bufs())
|
||||
|
||||
-- If there is only one buffer (which has to be the current one), vim will
|
||||
-- create a new buffer on :bd.
|
||||
-- For more than one buffer, pick the previous buffer (wrapping around if necessary)
|
||||
if #buffers > 1 then
|
||||
for i, v in ipairs(buffers) do
|
||||
if v == bufnr then
|
||||
local prev_buf_idx = i == 1 and (#buffers - 1) or (i - 1)
|
||||
local prev_buffer = buffers[prev_buf_idx]
|
||||
for _, win in ipairs(windows) do
|
||||
api.nvim_win_set_buf(win, prev_buffer)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
vim.cmd("q!")
|
||||
end
|
||||
|
||||
-- Check if buffer still exists, to ensure the target buffer wasn't killed
|
||||
-- due to options like bufhidden=wipe.
|
||||
if api.nvim_buf_is_valid(bufnr) and bo[bufnr].buflisted then
|
||||
vim.cmd(string.format("%s %d", kill_command, bufnr))
|
||||
end
|
||||
end
|
||||
|
||||
function M.is_available(plugin)
|
||||
local lazy_config_avail, lazy_config = pcall(require, "lazy.core.config")
|
||||
return lazy_config_avail and lazy_config.spec.plugins[plugin] ~= nil
|
||||
end
|
||||
|
||||
function M.empty_map_table()
|
||||
local maps = {}
|
||||
for _, mode in ipairs({ "", "n", "v", "x", "s", "o", "!", "i", "l", "c", "t" }) do
|
||||
maps[mode] = {}
|
||||
end
|
||||
-- TODO: Check this on 0.10.0 release
|
||||
if vim.fn.has("nvim-0.10.0") == 1 then
|
||||
for _, abbr_mode in ipairs({ "ia", "ca", "!a" }) do
|
||||
maps[abbr_mode] = {}
|
||||
end
|
||||
end
|
||||
return maps
|
||||
end
|
||||
|
||||
function M.toggle_term_cmd(opts)
|
||||
if not vim.g.user_terminals then
|
||||
vim.g.user_terminals = {}
|
||||
end
|
||||
local terms = vim.g.user_terminals
|
||||
if type(opts) == "string" then
|
||||
opts = { cmd = opts, hidden = true }
|
||||
end
|
||||
local num = vim.v.count > 0 and vim.v.count or 1
|
||||
if not terms[opts.cmd] then
|
||||
terms[opts.cmd] = {}
|
||||
end
|
||||
if not terms[opts.cmd][num] then
|
||||
if not opts.count then
|
||||
opts.count = vim.tbl_count(terms) * 100 + num
|
||||
end
|
||||
if not opts.on_exit then
|
||||
opts.on_exit = function()
|
||||
terms[opts.cmd][num] = nil
|
||||
end
|
||||
end
|
||||
terms[opts.cmd][num] = require("toggleterm.terminal").Terminal:new(opts)
|
||||
end
|
||||
terms[opts.cmd][num]:toggle()
|
||||
end
|
||||
|
||||
function M.cmd(cmd, show_error)
|
||||
if type(cmd) == "string" then
|
||||
cmd = { cmd }
|
||||
end
|
||||
local result = vim.fn.system(cmd)
|
||||
local success = vim.api.nvim_get_vvar("shell_error") == 0
|
||||
if not success and (show_error == nil or show_error) then
|
||||
vim.api.nvim_err_writeln(
|
||||
("Error running command %s\nError message:\n%s"):format(table.concat(cmd, " "), result)
|
||||
)
|
||||
end
|
||||
return success and result:gsub("[\27\155][][()#;?%d]*[A-PRZcf-ntqry=><~]", "") or nil
|
||||
end
|
||||
|
||||
function M.file_worktree(file, worktrees)
|
||||
worktrees = worktrees or vim.g.git_worktrees
|
||||
file = file or vim.fn.expand("%")
|
||||
for _, worktree in ipairs(worktrees) do
|
||||
if
|
||||
M.cmd({
|
||||
"git",
|
||||
"--work-tree",
|
||||
worktree.toplevel,
|
||||
"--git-dir",
|
||||
worktree.gitdir,
|
||||
"ls-files",
|
||||
"--error-unmatch",
|
||||
file,
|
||||
}, false)
|
||||
then
|
||||
return worktree
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.which_key_register()
|
||||
if M.which_key_queue then
|
||||
local wk_avail, wk = pcall(require, "which-key")
|
||||
if wk_avail then
|
||||
for mode, registration in pairs(M.which_key_queue) do
|
||||
wk.register(registration, { mode = mode })
|
||||
end
|
||||
M.which_key_queue = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.set_maps(map_table, base)
|
||||
base = base or {}
|
||||
for mode, maps in pairs(map_table) do
|
||||
for keymap, options in pairs(maps) do
|
||||
if options then
|
||||
local cmd = options
|
||||
local keymap_opts = base
|
||||
if type(options) == "table" then
|
||||
cmd = options[1]
|
||||
keymap_opts = vim.tbl_deep_extend("force", keymap_opts, options)
|
||||
keymap_opts[1] = nil
|
||||
end
|
||||
if not cmd or keymap_opts.name then -- which-key mapping
|
||||
if not keymap_opts.name then
|
||||
keymap_opts.name = keymap_opts.desc
|
||||
end
|
||||
if not M.which_key_queue then
|
||||
M.which_key_queue = {}
|
||||
end
|
||||
if not M.which_key_queue[mode] then
|
||||
M.which_key_queue[mode] = {}
|
||||
end
|
||||
M.which_key_queue[mode][keymap] = keymap_opts
|
||||
else -- not which-key mapping
|
||||
vim.keymap.set(mode, keymap, cmd, keymap_opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if package.loaded["which-key"] then
|
||||
M.which_key_register()
|
||||
end
|
||||
end
|
||||
|
||||
function M.del_buffer_autocmd(augroup, bufnr)
|
||||
local cmds_found, cmds = pcall(vim.api.nvim_get_autocmds, { group = augroup, buffer = bufnr })
|
||||
if cmds_found then
|
||||
vim.tbl_map(function(cmd)
|
||||
vim.api.nvim_del_autocmd(cmd.id)
|
||||
end, cmds)
|
||||
end
|
||||
end
|
||||
|
||||
function M.add_buffer_autocmd(augroup, bufnr, autocmds)
|
||||
if not vim.tbl_islist(autocmds) then
|
||||
autocmds = { autocmds }
|
||||
end
|
||||
local cmds_found, cmds = pcall(vim.api.nvim_get_autocmds, { group = augroup, buffer = bufnr })
|
||||
if not cmds_found or vim.tbl_isempty(cmds) then
|
||||
vim.api.nvim_create_augroup(augroup, { clear = false })
|
||||
for _, autocmd in ipairs(autocmds) do
|
||||
local events = autocmd.events
|
||||
autocmd.events = nil
|
||||
autocmd.group = augroup
|
||||
autocmd.buffer = bufnr
|
||||
vim.api.nvim_create_autocmd(events, autocmd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.has_capability(capability, filter)
|
||||
for _, client in ipairs(vim.lsp.get_active_clients(filter)) do
|
||||
if client.supports_method(capability) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function M.diagnostic_setup(conf)
|
||||
for _, sign in ipairs(conf.signs) do
|
||||
vim.fn.sign_define(sign.name, sign)
|
||||
end
|
||||
vim.diagnostic.config(conf.diagnostic)
|
||||
end
|
||||
|
||||
function M.has_value(table, value)
|
||||
for _, v in ipairs(table) do
|
||||
if v == value then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function M.get_gwd(path)
|
||||
return require("lspconfig.util").find_git_ancestor(path or vim.fn.getcwd())
|
||||
end
|
||||
|
||||
function M.set_cwd()
|
||||
local dir = M.get_gwd()
|
||||
if dir ~= nil then
|
||||
vim.fn.chdir(dir)
|
||||
end
|
||||
end
|
||||
|
||||
function M.get_lsp_key(key)
|
||||
local ok, keys = pcall(require, "config.keys")
|
||||
if ok then
|
||||
return keys[key]
|
||||
end
|
||||
end
|
||||
|
||||
function M.lazy_file()
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,13 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup("plugins", require("plugins.lazy").opts)
|
|
@ -1,72 +0,0 @@
|
|||
local M = { "hrsh7th/nvim-cmp" }
|
||||
|
||||
M.dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
}
|
||||
|
||||
M.event = "InsertEnter"
|
||||
|
||||
M.opts = function()
|
||||
local cmp = require("cmp")
|
||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
||||
local lspkind_status_ok, lspkind = pcall(require, "lspkind")
|
||||
if not snip_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local border_opts = {
|
||||
border = "rounded",
|
||||
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
|
||||
return {
|
||||
enabled = function()
|
||||
local dap_prompt = require("funcs").is_available("cmp-dap")
|
||||
and vim.tbl_contains(
|
||||
{ "dap-repl", "dapui_watches", "dapui_hover" },
|
||||
vim.api.nvim_get_option_value("filetype", { buf = 0 })
|
||||
)
|
||||
if vim.api.nvim_get_option_value("buftype", { buf = 0 }) == "prompt" and not dap_prompt then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
preselect = cmp.PreselectMode.None,
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = lspkind_status_ok and lspkind.cmp_format(require("plugins.misc.lspkind").opts) or nil,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
duplicates = {
|
||||
nvim_lsp = 1,
|
||||
luasnip = 1,
|
||||
cmp_tabnine = 1,
|
||||
buffer = 1,
|
||||
path = 1,
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(border_opts),
|
||||
documentation = cmp.config.window.bordered(border_opts),
|
||||
},
|
||||
mapping = require("config.keymaps").cmp,
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp", priority = 1000 },
|
||||
{ name = "luasnip", priority = 750 },
|
||||
{ name = "buffer", priority = 500 },
|
||||
{ name = "path", priority = 250 },
|
||||
}),
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,15 +0,0 @@
|
|||
local M = { "rcarriga/cmp-dap" }
|
||||
|
||||
M.event = { "VeryLazy" }
|
||||
|
||||
M.dependencies = { "nvim-cmp" }
|
||||
|
||||
M.config = function()
|
||||
require("cmp").setup.filetype({ "dap-repl", "dapui_watches", "dapui_hover" }, {
|
||||
sources = {
|
||||
{ name = "dap" },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
require("plugins.cmp.cmp"),
|
||||
require("plugins.cmp.dap"),
|
||||
require("plugins.cmp.luasnip"),
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
local M = { "L3MON4D3/LuaSnip" }
|
||||
|
||||
M.lazy = true
|
||||
|
||||
M.build = "make install_jsregexp"
|
||||
|
||||
M.dependencies = { "rafamadriz/friendly-snippets" }
|
||||
|
||||
M.opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
region_check_events = "CursorMoved",
|
||||
}
|
||||
|
||||
M.config = function(_, opts)
|
||||
require("luasnip").config.setup(opts)
|
||||
vim.tbl_map(function(type)
|
||||
require("luasnip.loaders.from_" .. type).lazy_load()
|
||||
end, { "vscode", "snipmate", "lua" })
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,23 +0,0 @@
|
|||
local M = { "rcarriga/nvim-dap-ui" }
|
||||
|
||||
M.dependencies = { "mason-nvim-dap.nvim" }
|
||||
|
||||
M.opts = {
|
||||
floating = { border = "rounded" },
|
||||
}
|
||||
|
||||
M.config = function(_, opts)
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dapui.setup(opts)
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,19 +0,0 @@
|
|||
local icons = require("config.icons")
|
||||
local signs = {
|
||||
{ name = "DapStopped", text = icons.Dap.Stopped, texthl = "DiagnosticWarn" },
|
||||
{ name = "DapBreakpoint", text = icons.Dap.Breakpoint, texthl = "DiagnosticInfo" },
|
||||
{ name = "DapBreakpointRejected", text = icons.Dap.BreakpointRejected, texthl = "DiagnosticError" },
|
||||
{ name = "DapBreakpointCondition", text = icons.Dap.BreakpointCondition, texthl = "DiagnosticInfo" },
|
||||
{ name = "DapLogPoint", text = icons.Dap.LogPoint, texthl = "DiagnosticInfo" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, sign)
|
||||
end
|
||||
|
||||
return {
|
||||
{ "mfussenegger/nvim-dap" },
|
||||
{ "nvim-neotest/nvim-nio" },
|
||||
require("plugins.dap.dap-ui"),
|
||||
require("plugins.dap.mason-dap"),
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
local M = { "jay-babu/mason-nvim-dap.nvim" }
|
||||
|
||||
M.dependencies = { "mason.nvim", "nvim-dap" }
|
||||
|
||||
M.cmd = { "DapInstall", "DapUninstall" }
|
||||
|
||||
M.opts = {
|
||||
handlers = {}
|
||||
}
|
||||
|
||||
return M
|
|
@ -0,0 +1,214 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
auto_install = true,
|
||||
ensure_installed = Custom.language.treesitter_install,
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = Custom.language.formatters_by_ft,
|
||||
formatters = Custom.language.formatters,
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = Custom.language.lsp,
|
||||
setup = Custom.language.lsp_setup,
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = {
|
||||
linters_by_ft = Custom.language.linters_by_ft,
|
||||
linters = Custom.language.linters,
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = Custom.language.mason_install,
|
||||
},
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
local function has_words_before()
|
||||
local line, col = (unpack or table.unpack)(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0
|
||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
-- stylua: ignore
|
||||
table.insert(opts.auto_brackets, "python")
|
||||
table.insert(opts.sources, { name = "crates" })
|
||||
|
||||
opts.mapping = vim.tbl_deep_extend("force", opts.mapping, {
|
||||
["<up>"] = require("cmp").mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
["<Down>"] = require("cmp").mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
["<C-p>"] = require("cmp").mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-n>"] = require("cmp").mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-k>"] = require("cmp").mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-j>"] = require("cmp").mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-u>"] = require("cmp").mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
|
||||
["<C-d>"] = require("cmp").mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
|
||||
["<C-Space>"] = cmp.mapping.confirm({ select = false }),
|
||||
["<C-y>"] = cmp.config.disable,
|
||||
["<C-e>"] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close() }),
|
||||
["<CR>"] = vim.NIL,
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif require("luasnip").expand_or_locally_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
require("luasnip").jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-ansible",
|
||||
keys = {
|
||||
{
|
||||
"<leader>tr",
|
||||
function()
|
||||
require("ansible").run()
|
||||
end,
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"b0o/SchemaStore.nvim",
|
||||
lazy = true,
|
||||
version = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
"<cmd>MarkdownPreviewToggle<cr>",
|
||||
desc = "Markdown Preview",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.cmd([[do FileType]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local _, rt = pcall(require, "rustaceanvim.neotest")
|
||||
opts.adapters = vim.tbl_deep_extend("force", opts.adapters, {
|
||||
["neotest-python"] = {},
|
||||
rt,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>dPt", function() require("dap-python").test_method() end, desc = "Debug Method", ft = "python" },
|
||||
{ "<leader>dPc", function() require("dap-python").test_class() end, desc = "Debug Class", ft = "python" },
|
||||
},
|
||||
config = function()
|
||||
local path = require("mason-registry").get_package("debugpy"):get_install_path()
|
||||
require("dap-python").setup(path .. "/venv/bin/python")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
cmd = "VenvSelect",
|
||||
opts = function(_, opts)
|
||||
if LazyVim.has("nvim-dap-python") then
|
||||
opts.dap_enabled = true
|
||||
end
|
||||
return vim.tbl_deep_extend("force", opts, {
|
||||
name = {
|
||||
"venv",
|
||||
".venv",
|
||||
"env",
|
||||
".env",
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
|
||||
},
|
||||
{
|
||||
"Saecki/crates.nvim",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
opts = {
|
||||
src = {
|
||||
cmp = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^4",
|
||||
ft = { "rust" },
|
||||
opts = {
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
vim.keymap.set("n", "<leader>cR", function()
|
||||
vim.cmd.RustLsp("codeAction")
|
||||
end, { desc = "Code Action", buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>dr", function()
|
||||
vim.cmd.RustLsp("debuggables")
|
||||
end, { desc = "Rust Debuggables", buffer = bufnr })
|
||||
end,
|
||||
default_settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
runBuildScripts = true,
|
||||
},
|
||||
checkOnSave = {
|
||||
allFeatures = true,
|
||||
command = "clippy",
|
||||
extraArgs = { "--no-deps" },
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
local M = { "folke/lazy.nvim" }
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.opts = {
|
||||
dev = {
|
||||
path = (os.getenv("XDG_DOCUMENTS_DIR") or "~/Documents") .. "/dev/nvim",
|
||||
patterns = { "ssnailed" },
|
||||
},
|
||||
install = {
|
||||
missing = true,
|
||||
colorscheme = { "tokyonight" },
|
||||
},
|
||||
ui = {
|
||||
title = "packages",
|
||||
border = "single",
|
||||
icons = {
|
||||
cmd = icons.Console .. " ",
|
||||
config = icons.Gear,
|
||||
event = icons.Event,
|
||||
ft = icons.File .. " ",
|
||||
init = icons.Gear .. " ",
|
||||
import = icons.Import .. " ",
|
||||
keys = icons.Keyboard .. " ",
|
||||
lazy = icons.Sleep .. " ",
|
||||
loaded = icons.Loaded,
|
||||
not_loaded = icons.Unloaded,
|
||||
plugin = icons.Package,
|
||||
runtime = icons.Runtime .. " ",
|
||||
source = icons.Source .. " ",
|
||||
start = icons.Start,
|
||||
task = icons.Task,
|
||||
},
|
||||
},
|
||||
change_detection = {
|
||||
enabled = false,
|
||||
},
|
||||
-- checker = {
|
||||
-- enabled = true,
|
||||
-- },
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
"matchparen",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
-- "tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
profiling = {
|
||||
loader = true,
|
||||
require = true,
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,22 +0,0 @@
|
|||
local M = { "stevearc/aerial.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.opts = {
|
||||
attach_mode = "global",
|
||||
backends = { "lsp", "treesitter", "markdown", "man" },
|
||||
disable_max_lines = vim.g.max_lines,
|
||||
disable_max_size = vim.g.max_size,
|
||||
layout = { min_width = 28 },
|
||||
show_guides = true,
|
||||
filter_kind = false,
|
||||
guides = {
|
||||
mid_item = "├ ",
|
||||
last_item = "└ ",
|
||||
nested_top = "│ ",
|
||||
whitespace = " ",
|
||||
},
|
||||
keymaps = require("config.keymaps").aerial,
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "folke/neoconf.nvim" },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
require("plugins.lsp.mason-lspconfig"),
|
||||
require("plugins.lsp.mason-null-ls"),
|
||||
require("plugins.lsp.null-ls"),
|
||||
require("plugins.lsp.aerial"),
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
local M = { "williamboman/mason-lspconfig.nvim" }
|
||||
local f = require("funcs")
|
||||
local serverconf = require("config.lsp")
|
||||
|
||||
M.dependencies = { "mason.nvim", "neoconf.nvim", "neodev.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.cmd = { "LspInstall", "LspUninstall" }
|
||||
|
||||
local function merge(table, overwrite)
|
||||
overwrite = overwrite or {}
|
||||
return table and vim.tbl_deep_extend("force", table, overwrite) or overwrite
|
||||
end
|
||||
|
||||
local base_capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
local cmp_capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local capabilities = merge(base_capabilities, cmp_capabilities)
|
||||
capabilities.textDocument.foldingRange = { dynamicRegistration = false, lineFoldingOnly = true }
|
||||
|
||||
M.config = function()
|
||||
require("neoconf").setup()
|
||||
require("neodev").setup()
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded", silent = true })
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] =
|
||||
vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded", silent = true })
|
||||
|
||||
local mlsp = require("mason-lspconfig")
|
||||
mlsp.setup({ ensure_installed = serverconf.required })
|
||||
|
||||
mlsp.setup_handlers({
|
||||
function(server)
|
||||
if not f.has_value(serverconf.ignore, server) then
|
||||
local ls = require("lspconfig")[server]
|
||||
local ls_opts = merge(ls, { capabilities = capabilities, on_attach = require("funcs").lsp_on_attach })
|
||||
local opts = merge(ls_opts, serverconf.handlers[server])
|
||||
require("lspconfig")[server].setup(opts)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,7 +0,0 @@
|
|||
local M = { "jay-babu/mason-null-ls.nvim" }
|
||||
|
||||
M.dependencies = { "mason.nvim" }
|
||||
|
||||
M.opts = { handlers = {} }
|
||||
|
||||
return M
|
|
@ -1,11 +0,0 @@
|
|||
local M = { "nvimtools/none-ls.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.dependencies = { "mason-null-ls.nvim" }
|
||||
|
||||
M.opts = {
|
||||
on_attach = require("funcs").lsp_on_attach,
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,169 +0,0 @@
|
|||
local M = { "goolord/alpha-nvim" }
|
||||
|
||||
M.lazy = true
|
||||
|
||||
M.event = { "VimEnter" }
|
||||
|
||||
M.dependencies = { "telescope.nvim", "todo-comments.nvim" }
|
||||
|
||||
M.opts = function()
|
||||
local icons = require("config.icons")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.opts.hl = "DashboardHeader"
|
||||
dashboard.section.footer.opts.hl = "DashboardFooter"
|
||||
|
||||
local banners = {
|
||||
[1] = {
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣷⣶⣤⡀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀",
|
||||
"⠀⣀⣴⣶⣶⣶⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀",
|
||||
"⣰⣿⣿⠿⠛⠿⢿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀",
|
||||
"⣿⣿⡇⠀⠀⠀⠀⠈⠛⢿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀",
|
||||
"⠹⣿⣧⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⡿⠛⠉⠀⢀⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀",
|
||||
"⠀⠙⢿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣷⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣤⣶⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠉⠻⠷⡄⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠀⢀⣠⣤⣤⣄⡀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣷⡀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⣿⠟⠉⠉⠙⢿⣿⣿⣷",
|
||||
"⠀⠀⠀⣀⣠⣤⣤⣤⣶⣶⣶⣤⣤⠀⣴⣿⣿⣿⡿⠟⠛⠛⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠉⠀⠀⠀⢀⣼⣿⣿⡿",
|
||||
"⠀⠀⠀⠈⠉⠉⠉⠉⠉⠉⠛⠻⠏⣼⣿⣿⡿⣋⣀⣤⣤⣴⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣠⣴⣾⣿⣿⡿⠁",
|
||||
"⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡿⠋⠘⠿⠟⠛⠛⢻⣿⣿⣿⠋⠁⠈⠉⢿⣿⣿⣧⠀⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠉⠀⠀",
|
||||
"⠙⣷⣤⣀⠀⠀⠀⢀⣀⣤⣶⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡟⠀⠀⠀⢠⣿⣿⣿⡟⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠈⠛⠿⢿⣿⣿⣿⠿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡀⠀⢠⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣷⣶⣶⣶⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢶⣦⣤⣶⣾⣿⣿⡶⠈⠉⠛⠿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣤⣶⡿⠿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
},
|
||||
[2] = {
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢒⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢘⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢣⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡌⡦⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡐⣸⠂⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠸⡢⡀⠀⠀⠀⠀⠀⠔⣰⠏⡌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⢖⡠⣨⠊⠒⠠⣀⢀⠊⣠⠃⡰⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠠⠀⠀⠠⠠⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⢰⠑⠚⠀⠀⠀⡉⠀⢇⡰⠀⠀⠀⠀⠀⢀⠠⠐⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠐⠤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠈⡄⠀⠀⠀⠀⠘⠠⠐⡇⠀⠀⠀⠠⠐⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⢃⠀⠀⠀⠀⠀⠀⢀⠁⠀⢀⠌⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠀⠀⠼⢄⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢸⠀⢠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀⠀⠈⠢⠄⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠸⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠎⠀⠀⠀⠀⠀⠀⡠⠀⠈⢆⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠨⠀⠀⠀⠀⠀⠀⠀⢆⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⠀⠀⠀⡌⠀⠀⢎⠨⡄⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⡂⠀⠀⠀⠀⠀⠀⠈⢎⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠀⠀⠸⠀⠀⢸⠸⢀⠇⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠡⢕⠠⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⢐⠀⠀⠈⠢⠥⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⡉⠒⠠⣀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠰⡀⠀⠀⡰⠁⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠠⢄⠈⠑⠒⠤⡀⠀⢐⠅⠀⠀⠀⠀⠀⠀⠀⡁⡂⠉⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠂⠤⢀⠓⠈⠢⢀⢀⠠⠤⠐⠀⡉⠌⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠰⠐⠪⠤⢀⢀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠢⠄⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠂⠒⡠⠄",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠂⠐⠐⠐⠂⠂⠠⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠄⠐⠂⠂⠀⠉⠀⠀⠀",
|
||||
},
|
||||
[3] = {
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣴⣶⣶⣾⣿⣿⣿⣿⣿⣷⣶⣶⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⠿⠟⠛⠉⠉⠉⠉⠉⢉⣭⡉⠉⠛⠻⠿⣿⣿⣿⣿⣿⣿⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣦⡀⠀⠀⠀⠉⠛⢿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⢀⣴⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣦⡀⠀⠀⠀",
|
||||
"⠀⠀⢀⣾⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣦⡀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣷⡀⠀⠀",
|
||||
"⠀⠀⣾⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡦⠀⠀⠀⠀⠀⢻⣿⣿⣿⣷⠀⠀",
|
||||
"⠀⣼⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠛⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣧⠀",
|
||||
"⢠⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⡄",
|
||||
"⢸⣿⣿⣿⡇⠀⡀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣦⡀⢸⣿⣿⣿⡇",
|
||||
"⣿⣿⣿⣿⡇⠀⣿⣦⣤⣾⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⢸⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⠀⠀⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡇⠀⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⢸⣿⣿⣿⣿",
|
||||
"⢸⣿⣿⣿⡇⠀⠉⠉⠉⠉⠉⠉⠉⢠⡀⠀⠀⣠⣾⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⢸⣿⣿⣿⡇",
|
||||
"⠘⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣦⣾⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⠃",
|
||||
"⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⡟⠀",
|
||||
"⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⡿⠀⠀",
|
||||
"⠀⠀⠈⢿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣦⡀⠀⣠⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⡿⠁⠀⠀",
|
||||
"⠀⠀⠀⠈⠻⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⠟⠁⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣷⣤⣀⠀⠀⠀⠀⠀⠿⠿⠿⠿⠿⠿⠦⠀⠀⠀⠀⠀⣀⣤⣾⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣤⣴⣶⣿⣿⣿⣿⣿⣿⠿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠻⠿⠿⢿⣿⣿⣿⣿⣿⡿⠿⠿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
},
|
||||
[4] = {
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠤⠤⠤⠤⠤⠤⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⠒⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠓⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢇⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡆⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⢸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⡇⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⢠⣯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⠿⠟⠁⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⣸⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⡀⠀⠀⢉⣿⣿⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⣿⣿⣿⣿⣶⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⠿⠿⠿⠟⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣤⣤⣀⡀⠀⠀⢀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⢀⣴⣿⣿⡇⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠘⣿⣿⣿⣯⡉⠙⠛⠻⠿⢿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣶⣦⣄⣀⡀⠀⠀⠀⣀⣀⣠⣤⣾⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠸⣿⣿⣿⣷⣤⠀⠀⠀⠀⠀⠉⠙⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣶⣀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⣿⣶⣶⣤⣄⠀⢀⠀⠉⢿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠀⠈⠙⠛⠻⠿⠿⠿⠀⢀⣠⣴⣶⣦⡀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣾⣿⣿⣿⣿⣿⣿⣿⣷⡀⢀⠀⠀⠀⠀⠀⠀⡀⢠⣿⠟⠉⠀⠀⠁⣀⡀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣷⣤⣦⣀⣤⣿⣿⣿⡀⠀⢀⣠⣾⣿⣿",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠃",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠻⠿⠿⠿⣿⡿⠿⠿⠿⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠀⠀⠀",
|
||||
},
|
||||
}
|
||||
|
||||
dashboard.section.header.val = banners[4]
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("n", icons.File .. " New file", "<Cmd>ene<CR>"),
|
||||
dashboard.button("f", icons.Search .. " Find file", "<Cmd>lua require('telescope.builtin').find_files()<CR>"),
|
||||
dashboard.button(
|
||||
"e",
|
||||
icons.FileTree .. " Browse files",
|
||||
"<Cmd>lua require('taolf').start({ dir = 'gwd' })<CR>"
|
||||
),
|
||||
dashboard.button(
|
||||
"t",
|
||||
icons.Task .. " Find todo",
|
||||
"<Cmd>:lua require('telescope').extensions['todo-comments'].todo()<CR>"
|
||||
),
|
||||
dashboard.button("q", icons.Leave .. " Quit", "<Cmd>qa<CR>"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val = "Behold: a Snail's Vim"
|
||||
|
||||
dashboard.config.layout = {
|
||||
{ type = "padding", val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) },
|
||||
dashboard.section.header,
|
||||
{ type = "padding", val = 5 },
|
||||
dashboard.section.buttons,
|
||||
{ type = "padding", val = 3 },
|
||||
dashboard.section.footer,
|
||||
}
|
||||
|
||||
dashboard.config.opts.noautocmd = true
|
||||
|
||||
return dashboard
|
||||
end
|
||||
|
||||
M.config = function(_, opts)
|
||||
require("alpha").setup(opts.config)
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimStarted",
|
||||
desc = "Add Alpha dashboard footer",
|
||||
once = true,
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = math.floor(stats.startuptime * 100 + 0.5) / 100
|
||||
opts.section.footer.val = { "Behold: a Snail's Vim | " .. stats.count .. " " .. ms .. "ms" }
|
||||
pcall(vim.cmd.AlphaRedraw)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,17 +0,0 @@
|
|||
local M = { "windwp/nvim-autopairs" }
|
||||
|
||||
M.lazy = true
|
||||
|
||||
M.event = { "VeryLazy" }
|
||||
|
||||
M.opts = {
|
||||
check_ts = true,
|
||||
disable_filetype = { "TelescopePrompt", "vim" },
|
||||
ts_config = {
|
||||
lua = { "string", "source" },
|
||||
javascript = { "string", "template_string" },
|
||||
java = false,
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,58 +0,0 @@
|
|||
local M = { "akinsho/bufferline.nvim" }
|
||||
|
||||
M.event = { "VeryLazy" }
|
||||
|
||||
M.opts = function()
|
||||
local icons = require("config.icons")
|
||||
|
||||
local function diagnostics_indicator(_, _, diagnostics, _)
|
||||
local result = {}
|
||||
local symbols = {
|
||||
error = icons.Error,
|
||||
warning = icons.Warn,
|
||||
info = icons.Info,
|
||||
}
|
||||
for name, count in pairs(diagnostics) do
|
||||
if symbols[name] and count > 0 then
|
||||
table.insert(result, symbols[name] .. " " .. count)
|
||||
end
|
||||
end
|
||||
local result_str = table.concat(result, " ")
|
||||
return #result_str > 0 and result_str or ""
|
||||
end
|
||||
|
||||
local config = {
|
||||
highlights = {
|
||||
background = {
|
||||
italic = true,
|
||||
bold = false,
|
||||
},
|
||||
buffer_selected = {
|
||||
italic = false,
|
||||
bold = true,
|
||||
},
|
||||
},
|
||||
options = {
|
||||
indicator = {
|
||||
style = "none",
|
||||
},
|
||||
buffer_close_icon = icons.Close,
|
||||
modified_icon = icons.Modified,
|
||||
close_icon = icons.Close,
|
||||
left_trunc_marker = icons.Truncate,
|
||||
right_trunc_marker = icons.Truncate,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = diagnostics_indicator,
|
||||
offsets = {},
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
separator_style = { "", "" },
|
||||
move_wraps_at_ends = true,
|
||||
always_show_bufferline = false,
|
||||
sort_by = "id",
|
||||
},
|
||||
}
|
||||
return config
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,9 +0,0 @@
|
|||
local M = { "NvChad/nvim-colorizer.lua" }
|
||||
|
||||
M.lazy = true
|
||||
|
||||
M.cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" }
|
||||
|
||||
M.opts = { user_default_options = { names = false } }
|
||||
|
||||
return M
|
|
@ -1,12 +0,0 @@
|
|||
local M = { "numToStr/Comment.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.opts = {
|
||||
mappings = {
|
||||
basic = false,
|
||||
extra = false,
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,18 +0,0 @@
|
|||
local M = { "lewis6991/gitsigns.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.opts = {
|
||||
signs = {
|
||||
add = { text = icons.Added },
|
||||
change = { text = icons.Modified },
|
||||
delete = { text = icons.Removed },
|
||||
topdelete = { text = icons.Removed },
|
||||
changedelete = { text = icons.ChangeDelete },
|
||||
untracked = { text = icons.Untracked },
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,37 +0,0 @@
|
|||
local M = { "lukas-reineke/indent-blankline.nvim" }
|
||||
|
||||
M.main = "ibl"
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.dependencies = { "nvim-treesitter" }
|
||||
|
||||
M.opts = {
|
||||
indent = {
|
||||
char = "▏",
|
||||
tab_char = "▏",
|
||||
},
|
||||
scope = {
|
||||
char = "▎",
|
||||
enabled = true,
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
},
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,32 +0,0 @@
|
|||
return {
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "kyazdani42/nvim-web-devicons", lazy = true },
|
||||
{ "zk-org/zk-nvim", opts = { picker = "telescope" }, main = "zk" },
|
||||
{ "NMAC427/guess-indent.nvim", config = true },
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring", dependencies = { "nvim-treesitter" } },
|
||||
{ "nvim-treesitter/nvim-treesitter-textobjects", dependencies = { "nvim-treesitter" } },
|
||||
{ "windwp/nvim-ts-autotag" },
|
||||
require("plugins.misc.alpha"),
|
||||
require("plugins.misc.autopairs"),
|
||||
require("plugins.misc.bufferline"),
|
||||
require("plugins.misc.colorizer"),
|
||||
require("plugins.misc.comment"),
|
||||
require("plugins.misc.gitsigns"),
|
||||
require("plugins.misc.indent-blankline"),
|
||||
require("plugins.misc.taolf"),
|
||||
require("plugins.misc.lspkind"),
|
||||
require("plugins.misc.lualine"),
|
||||
require("plugins.misc.mason"),
|
||||
require("plugins.misc.rustacean"),
|
||||
require("plugins.misc.surround"),
|
||||
require("plugins.misc.telescope"),
|
||||
require("plugins.misc.telescope-fzf-native"),
|
||||
require("plugins.misc.todo-comments"),
|
||||
require("plugins.misc.toggleterm"),
|
||||
require("plugins.misc.tokyonight"),
|
||||
require("plugins.misc.treesitter"),
|
||||
require("plugins.misc.ufo"),
|
||||
require("plugins.misc.vimtex"),
|
||||
require("plugins.misc.which-key"),
|
||||
-- require("plugins.misc.tabnine"),
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
local M = { "onsails/lspkind.nvim" }
|
||||
|
||||
M.lazy = true
|
||||
|
||||
M.opts = {
|
||||
mode = "symbol",
|
||||
symbol_map = require("config.icons").lspkind,
|
||||
menu = {},
|
||||
}
|
||||
|
||||
M.config = function(_, opts)
|
||||
require("lspkind").init(opts)
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,219 +0,0 @@
|
|||
local M = { "nvim-lualine/lualine.nvim" }
|
||||
|
||||
-- M.event = { "VeryLazy" }
|
||||
|
||||
M.opts = function()
|
||||
local colors = require("tokyonight.colors").setup({ transform = true })
|
||||
local icons = require("config.icons")
|
||||
local conditions = {
|
||||
buffer_not_empty = function()
|
||||
return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
|
||||
end,
|
||||
hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end,
|
||||
check_git_workspace = function()
|
||||
local filepath = vim.fn.expand("%:p:h")
|
||||
local gitdir = vim.fn.finddir(".git", filepath .. ";")
|
||||
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
||||
end,
|
||||
}
|
||||
|
||||
-- local function search_result()
|
||||
-- if vim.v.hlsearch == 0 then
|
||||
-- return ""
|
||||
-- end
|
||||
-- local last_search = vim.fn.getreg("/")
|
||||
-- if not last_search or last_search == "" then
|
||||
-- return ""
|
||||
-- end
|
||||
-- local searchcount = vim.fn.searchcount({ maxcount = 9999 })
|
||||
-- return last_search .. "(" .. searchcount.current .. "/" .. searchcount.total .. ")"
|
||||
-- end
|
||||
|
||||
local config = {
|
||||
options = {
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
-- theme = {
|
||||
-- normal = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
-- inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
-- },
|
||||
disabled_filetypes = {
|
||||
statusline = { "alpha" },
|
||||
},
|
||||
ignore_focus = { "toggleterm", "NvimTree" },
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
}
|
||||
|
||||
local function ins_left(component)
|
||||
table.insert(config.sections.lualine_c, component)
|
||||
end
|
||||
|
||||
local function ins_right(component)
|
||||
table.insert(config.sections.lualine_x, component)
|
||||
end
|
||||
|
||||
local function mode_color()
|
||||
local color = {
|
||||
n = colors.red,
|
||||
i = colors.green,
|
||||
v = colors.magenta,
|
||||
[string.char(22)] = colors.magenta,
|
||||
V = colors.magenta,
|
||||
c = colors.blue,
|
||||
no = colors.red,
|
||||
s = colors.orange,
|
||||
S = colors.orange,
|
||||
[string.char(19)] = colors.orange,
|
||||
ic = colors.yellow,
|
||||
R = colors.purple,
|
||||
Rv = colors.purple,
|
||||
cv = colors.red,
|
||||
ce = colors.red,
|
||||
r = colors.cyan,
|
||||
rm = colors.cyan,
|
||||
["r?"] = colors.cyan,
|
||||
["!"] = colors.red,
|
||||
t = colors.red,
|
||||
}
|
||||
return { fg = color[vim.fn.mode()] }
|
||||
end
|
||||
|
||||
ins_left({
|
||||
function()
|
||||
return "▊"
|
||||
end,
|
||||
color = function()
|
||||
return mode_color()
|
||||
end,
|
||||
padding = { right = 1 },
|
||||
})
|
||||
|
||||
ins_left({
|
||||
"filename",
|
||||
cond = conditions.buffer_not_empty,
|
||||
color = { fg = colors.magenta, gui = "bold" },
|
||||
})
|
||||
|
||||
ins_left({
|
||||
"fileformat",
|
||||
fmt = string.upper,
|
||||
icons_enabled = false,
|
||||
color = { fg = colors.green },
|
||||
})
|
||||
|
||||
ins_left({
|
||||
"o:encoding",
|
||||
fmt = string.upper,
|
||||
cond = conditions.hide_in_width,
|
||||
color = { fg = colors.green },
|
||||
})
|
||||
|
||||
ins_left({
|
||||
"filesize",
|
||||
fmt = string.upper,
|
||||
icons_enabled = false,
|
||||
color = { fg = colors.green },
|
||||
})
|
||||
|
||||
ins_left({
|
||||
"%04l:%04c",
|
||||
})
|
||||
|
||||
-- NOTE: My beloved :(
|
||||
|
||||
-- ins_left {
|
||||
-- function()
|
||||
-- local current_line = vim.fn.line "."
|
||||
-- local total_lines = vim.fn.line "$"
|
||||
-- local chars = icons.progress
|
||||
-- local line_ratio = current_line / total_lines
|
||||
-- local index = math.ceil(line_ratio * #chars)
|
||||
-- return chars[index]
|
||||
-- end,
|
||||
-- color = { fg = colors.yellow }
|
||||
-- }
|
||||
|
||||
-- ins_right({
|
||||
-- search_result,
|
||||
-- color = { fg = colors.fg },
|
||||
-- padding = { left = 1 },
|
||||
-- })
|
||||
|
||||
-- ins_right({
|
||||
-- 'tabnine',
|
||||
-- color = { fg = colors.green1, gui = "bold" },
|
||||
-- })
|
||||
|
||||
ins_right({
|
||||
function()
|
||||
local msg = ""
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return "No LSP"
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
msg = msg .. ", " .. client.name
|
||||
end
|
||||
end
|
||||
return msg:sub(3)
|
||||
end,
|
||||
color = { fg = colors.green2, gui = "bold" },
|
||||
})
|
||||
|
||||
ins_right({
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
symbols = {
|
||||
error = icons.Error .. " ",
|
||||
warn = icons.Warn .. " ",
|
||||
info = icons.Info .. " ",
|
||||
},
|
||||
diagnostics_color = {
|
||||
color_error = { fg = colors.red },
|
||||
color_warn = { fg = colors.yellow },
|
||||
color_info = { fg = colors.cyan },
|
||||
},
|
||||
})
|
||||
|
||||
ins_right({
|
||||
"filetype",
|
||||
color = { fg = colors.green, gui = "bold" },
|
||||
padding = { left = 1 },
|
||||
})
|
||||
|
||||
ins_right({
|
||||
function()
|
||||
return "▊"
|
||||
end,
|
||||
color = function()
|
||||
return mode_color()
|
||||
end,
|
||||
padding = { left = 1 },
|
||||
})
|
||||
|
||||
return config
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,29 +0,0 @@
|
|||
local M = { "williamboman/mason.nvim" }
|
||||
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.cmd = {
|
||||
"Mason",
|
||||
"MasonInstall",
|
||||
"MasonUninstall",
|
||||
"MasonUninstallAll",
|
||||
"MasonLog",
|
||||
"MasonUpdate",
|
||||
}
|
||||
|
||||
M.build = ":MasonUpdate"
|
||||
|
||||
M.opts = {
|
||||
ui = {
|
||||
border = "none",
|
||||
icons = {
|
||||
package_installed = icons.True,
|
||||
package_pending = icons.Pending,
|
||||
package_uninstalled = icons.False,
|
||||
},
|
||||
},
|
||||
log_level = vim.log.levels.INFO,
|
||||
max_concurrent_installers = 4,
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,24 +0,0 @@
|
|||
local M = { "mrcjkb/rustaceanvim" }
|
||||
|
||||
M.build = ":MasonInstall codelldb"
|
||||
|
||||
M.ft = { "rust" }
|
||||
|
||||
M.init = function()
|
||||
local extension_path = os.getenv("XDG_DATA_HOME") .. "/nvim/mason/packages/codelldb/extension/"
|
||||
local codelldb_path = extension_path .. "apapter/codelldb"
|
||||
local liblldb_path = extension_path .. "lldb/lib/liblldb.so"
|
||||
local adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb_path, liblldb_path)
|
||||
vim.g.rustaceanvim = function()
|
||||
return {
|
||||
dap = {
|
||||
adapter = adapter,
|
||||
},
|
||||
server = {
|
||||
on_attach = require("funcs").lsp_on_attach,
|
||||
},
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,21 +0,0 @@
|
|||
local M = { "kylechui/nvim-surround" }
|
||||
|
||||
M.event = "VeryLazy"
|
||||
|
||||
M.opts = {
|
||||
keymaps = require("config.keymaps").surround,
|
||||
surrounds = {
|
||||
["B"] = {
|
||||
add = { "{{ ", " }}" },
|
||||
find = function()
|
||||
return require("nvim-surround.config").get_selection({ pattern = "{{ .- }}" })
|
||||
end,
|
||||
delete = "^(.. ?)().-( ?..)()$",
|
||||
},
|
||||
},
|
||||
aliases = {
|
||||
["B"] = false,
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,23 +0,0 @@
|
|||
local M = { "codota/tabnine-nvim" }
|
||||
|
||||
M.build = "./dl_binaries.sh"
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.main = "tabnine"
|
||||
|
||||
M.opts = function()
|
||||
local colors = require("tokyonight.colors").setup({ transform = true })
|
||||
local maps = require("config.keymaps").tabnine
|
||||
return {
|
||||
disable_auto_comment = true,
|
||||
accept_keymap = maps.accept_keymap,
|
||||
dismiss_keymap = maps.dismiss_keymap,
|
||||
debounce_ms = 800,
|
||||
suggestion_color = { gui = colors.fg_gutter, cterm = 244 },
|
||||
exclude_filetypes = { "TelescopePrompt", "NvimTree" },
|
||||
log_file_path = nil, -- absolute path to Tabnine log file
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,13 +0,0 @@
|
|||
local M = { "ssnailed/taolf" }
|
||||
|
||||
M.dev = false
|
||||
|
||||
M.event = "VeryLazy"
|
||||
|
||||
M.cmd = { "Lf" }
|
||||
|
||||
M.dependencies = { "toggleterm.nvim" }
|
||||
|
||||
M.config = true
|
||||
|
||||
return M
|
|
@ -1,5 +0,0 @@
|
|||
local M = { "nvim-telescope/telescope-fzf-native.nvim" }
|
||||
|
||||
M.build = "make"
|
||||
|
||||
return M
|
|
@ -1,35 +0,0 @@
|
|||
local M = { "nvim-telescope/telescope.nvim" }
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.dependencies = { "telescope-fzf-native.nvim", "aerial.nvim" }
|
||||
|
||||
M.cmd = "Telescope"
|
||||
|
||||
M.opts = function()
|
||||
return {
|
||||
defaults = {
|
||||
git_worktrees = vim.g.git_worktrees,
|
||||
prompt_prefix = icons.Selected,
|
||||
path_display = { "truncate" },
|
||||
sorting_startegy = "ascending",
|
||||
layout_config = {
|
||||
horizontal = { prompt_position = "top", preview_width = 0.7 },
|
||||
vertical = { mirror = false },
|
||||
width = 0.87,
|
||||
height = 0.80,
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
M.config = function(_, opts)
|
||||
local actions = require("telescope.actions")
|
||||
opts.mappings = require("config.keymaps").telescope(actions)
|
||||
local m = require("telescope")
|
||||
m.setup(opts)
|
||||
m.load_extension("aerial")
|
||||
m.load_extension("fzf")
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,22 +0,0 @@
|
|||
local M = { "folke/todo-comments.nvim" }
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
M.opts = {
|
||||
signs = false,
|
||||
highlight = {
|
||||
multiline = false,
|
||||
},
|
||||
keywords = {
|
||||
BUG = { icon = icons.Bug, color = "error", alt = { "FIXME", "FIX", "FIXIT", "ISSUE" } },
|
||||
TODO = { icon = icons.Task, color = "info" },
|
||||
HACK = { icon = icons.Flame, color = "warning" },
|
||||
WARN = { icon = icons.Warn, color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = icons.Speed, alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = icons.Buffer, color = "hint", alt = { "INFO" } },
|
||||
TEST = { icon = icons.Test, color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,42 +0,0 @@
|
|||
local M = { "akinsho/toggleterm.nvim" }
|
||||
|
||||
M.cmd = { "ToggleTerm", "TermExec" }
|
||||
|
||||
M.opts = {
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return vim.o.lines * 0.33
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.colums * 0.33
|
||||
end
|
||||
end,
|
||||
-- TODO: Move to config.keymaps
|
||||
open_mapping = "<C-z>",
|
||||
direction = "float",
|
||||
highlights = {
|
||||
Normal = { link = "Normal" },
|
||||
NormalNC = { link = "NormalNC" },
|
||||
NormalFloat = { link = "NormalFloat" },
|
||||
FloatBorder = { link = "FloatBorder" },
|
||||
StatusLine = { link = "StatusLine" },
|
||||
StatusLineNC = { link = "StatusLineNC" },
|
||||
WinBar = { link = "WinBar" },
|
||||
WinBarNC = { link = "WinBarNC" },
|
||||
},
|
||||
float_opts = {
|
||||
border = "curved",
|
||||
-- winblend = 10,
|
||||
width = function()
|
||||
return math.ceil(math.min(vim.o.columns, math.max(80, vim.o.columns - 20)))
|
||||
end,
|
||||
height = function()
|
||||
return math.ceil(math.min(vim.o.lines, math.max(20, vim.o.lines - 10)))
|
||||
end,
|
||||
},
|
||||
on_create = function()
|
||||
vim.opt.foldcolumn = "0"
|
||||
vim.opt.signcolumn = "no"
|
||||
end,
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,18 +0,0 @@
|
|||
local M = { "folke/tokyonight.nvim" }
|
||||
|
||||
M.priority = 1000
|
||||
|
||||
local opts = {
|
||||
style = "night",
|
||||
transparent = true,
|
||||
on_highlights = function(hl, _)
|
||||
hl.CurSearch = nil
|
||||
end,
|
||||
}
|
||||
|
||||
M.config = function()
|
||||
require("tokyonight").setup(opts)
|
||||
vim.cmd("colorscheme tokyonight")
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,64 +0,0 @@
|
|||
local M = { "nvim-treesitter/nvim-treesitter" }
|
||||
|
||||
M.build = ":TSUpdate"
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||
|
||||
-- M.cmd = {
|
||||
-- "TSBufDisable",
|
||||
-- "TSBufEnable",
|
||||
-- "TSBufToggle",
|
||||
-- "TSDisable",
|
||||
-- "TSEnable",
|
||||
-- "TSToggle",
|
||||
-- "TSInstall",
|
||||
-- "TSInstallInfo",
|
||||
-- "TSInstallSync",
|
||||
-- "TSModuleInfo",
|
||||
-- "TSUninstall",
|
||||
-- "TSUpdate",
|
||||
-- "TSUpdateSync",
|
||||
-- }
|
||||
|
||||
M.init = function(plugin)
|
||||
require("lazy.core.loader").add_to_rtp(plugin)
|
||||
require("nvim-treesitter.query_predicates")
|
||||
require("nvim-treesitter.install").setup_auto_install()
|
||||
end
|
||||
|
||||
local maps = require("config.keymaps").treesitter
|
||||
M.opts = {
|
||||
autotag = { enable = true },
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- HACK: this doesn't work for some reason, so I manually call it in M.init
|
||||
-- auto_install = true,
|
||||
autopairs = {
|
||||
enable = false,
|
||||
},
|
||||
incremental_selection = { enable = true },
|
||||
indent = { enable = true },
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = maps.select,
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = maps.move.goto_next_start,
|
||||
goto_next_end = maps.move.goto_next_end,
|
||||
goto_previous_start = maps.move.goto_previous_start,
|
||||
goto_previous_end = maps.move.goto_previous_end,
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = maps.swap.swap_next,
|
||||
swap_previous = maps.swap.swap_previous,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,34 +0,0 @@
|
|||
local M = { "kevinhwang91/nvim-ufo" }
|
||||
|
||||
M.event = { "InsertEnter" }
|
||||
|
||||
M.dependencies = { "kevinhwang91/promise-async", "nvim-treesitter" }
|
||||
|
||||
M.opts = {
|
||||
preview = {
|
||||
mappings = require("config.keymaps").ufo,
|
||||
},
|
||||
provider_selector = function(_, filetype, buftype)
|
||||
local function handleFallbackException(bufnr, err, providerName)
|
||||
if type(err) == "string" and err:match("UfoFallbackException") then
|
||||
return require("ufo").getFolds(bufnr, providerName)
|
||||
else
|
||||
return require("promise").reject(err)
|
||||
end
|
||||
end
|
||||
|
||||
return (filetype == "" or buftype == "nofile") and "indent" -- only use indent until a file is opened
|
||||
or function(bufnr)
|
||||
return require("ufo")
|
||||
.getFolds(bufnr, "lsp")
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "treesitter")
|
||||
end)
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "indent")
|
||||
end)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,11 +0,0 @@
|
|||
local M = { "lervag/vimtex" }
|
||||
|
||||
M.init = function()
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.tex_flavor = "latex"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
vim.o.conceallevel = 1
|
||||
vim.g.tex_conceal = "abdmg"
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,37 +0,0 @@
|
|||
local M = { "folke/which-key.nvim" }
|
||||
|
||||
local icons = require("config.icons")
|
||||
|
||||
M.event = "VeryLazy"
|
||||
|
||||
M.init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end
|
||||
|
||||
M.opts = {
|
||||
plugins = {
|
||||
presets = {
|
||||
operators = false,
|
||||
motions = false,
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
breadcrumb = icons.Selected,
|
||||
separator = icons.Selected,
|
||||
group = "",
|
||||
},
|
||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " },
|
||||
triggers = "auto",
|
||||
triggers_blacklist = {
|
||||
i = { "j", "k", "v", "y" },
|
||||
v = { "j", "k", "y" },
|
||||
},
|
||||
}
|
||||
|
||||
M.config = function(_, opts)
|
||||
require("which-key").setup(opts)
|
||||
require("funcs").which_key_register()
|
||||
end
|
||||
|
||||
return M
|
|
@ -0,0 +1,38 @@
|
|||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = true,
|
||||
opts = { style = "night" },
|
||||
-- on_highlights = function(hl, _)
|
||||
-- hl.CurSearch = nil
|
||||
-- end
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
opts = function(_, opts)
|
||||
local center = Custom.ui.buttons
|
||||
local banners = Custom.ui.banners
|
||||
for _, button in ipairs(center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
button.key_format = " %s"
|
||||
end
|
||||
math.randomseed(os.time())
|
||||
local banner = "\n\n" .. banners[math.random(#banners)] .. "\n\n"
|
||||
opts.config.header = vim.split(banner, "\n")
|
||||
opts.config.center = center
|
||||
opts.config.footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return { "Behold: a Snail's Vim | " .. stats.count .. " " .. ms .. "ms" }
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
opts = {
|
||||
draw = {
|
||||
animation = require("mini.indentscope").gen_animation.none(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
Gentoo
|
||||
Witzenrath
|
||||
Kubernetes
|
||||
Vallendor
|
||||
basis
|
||||
KVM
|
||||
Qemu
|
||||
Tralios
|
||||
Libvirt
|
||||
POSIX
|
||||
Ansible
|
||||
Hosting
|
||||
Meilensteinplans
|
|
@ -1,12 +0,0 @@
|
|||
config
|
||||
Neovim
|
||||
ansible
|
||||
traefik
|
||||
yml
|
||||
yaml
|
||||
dir
|
||||
blocksync
|
||||
LV
|
||||
proxmox
|
||||
NVMe
|
||||
blocksize
|
|
@ -0,0 +1,3 @@
|
|||
indent_type = "Spaces"
|
||||
indent_width = 4
|
||||
column_width = 120
|
|
@ -1,5 +0,0 @@
|
|||
Continue checking for old keymaps
|
||||
Configure Todo Telescope integration etc.
|
||||
Figure out why the theme breaks when you install a plugin
|
||||
Indicate if various lsp toggles are active
|
||||
map q to toggle the terminal in taolf
|
Loading…
Reference in New Issue