kitchen sink:
- add code action previews - change indent blankline style - more luasnip snippets - change default mason stuff - customize neorg more - change notify style - change startpage completely - add line info to statusline - change telescope style - change how todo comments look - make indentation work via treesitter
This commit is contained in:
17
after/plugin/actionpreview.lua
Normal file
17
after/plugin/actionpreview.lua
Normal file
@ -0,0 +1,17 @@
|
||||
local status_ok, actions = pcall(require, "actions-preview")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
actions.setup {
|
||||
backend = { "telescope" },
|
||||
telescope = require("telescope.themes").get_dropdown {
|
||||
borderchars = {
|
||||
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
},
|
||||
layout_strategy = 'cursor',
|
||||
winblend = 10,
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
local status_ok, fold = pcall(require, "cleanfold")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
fold.setup {}
|
@ -1,6 +0,0 @@
|
||||
local status_ok, dapui = pcall(require, "dapui")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
dapui.setup {}
|
@ -1,13 +0,0 @@
|
||||
local status_ok, foldsign = pcall(require, "nvim-foldsign")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
foldsign.setup {
|
||||
offset = -2,
|
||||
foldsigns = {
|
||||
open = 'V',
|
||||
close = '>',
|
||||
seps = { '│', '┃' },
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
local status_ok, iconpicker = pcall(require, "icon-picker")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
iconpicker.setup {}
|
@ -1,17 +1,10 @@
|
||||
local status_ok, indent_blankline = pcall(require, "indent_blankline")
|
||||
local status_ok, ibl = pcall(require, "ibl")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
indent_blankline.setup {
|
||||
char = "",
|
||||
char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
ibl.setup {
|
||||
scope = {
|
||||
enabled = false,
|
||||
},
|
||||
space_char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
},
|
||||
show_trailing_blankline_indent = false,
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
local status_ok, killersheep = pcall(require, "killersheep")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
killersheep.setup {
|
||||
gore = true,
|
||||
border = 'shadow',
|
||||
keymaps = {
|
||||
move_left = "h",
|
||||
move_right = "l",
|
||||
shoot = "<Space>",
|
||||
},
|
||||
}
|
@ -10,3 +10,6 @@ luasnip.config.set_config {
|
||||
-- update on text insert
|
||||
updateevents = "TextChanged,TextChangedI"
|
||||
}
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||
|
@ -4,15 +4,14 @@ if not status_ok then
|
||||
end
|
||||
|
||||
masontool.setup {
|
||||
-- a list of all tools you want to ensure are installed upon
|
||||
-- start; they should be the names Mason uses for each tool
|
||||
ensure_installed = {
|
||||
'lua-language-server',
|
||||
'bash-language-server',
|
||||
'editorconfig-checker',
|
||||
'stylua',
|
||||
'shellcheck',
|
||||
'editorconfig-checker',
|
||||
'shfmt',
|
||||
'clangd',
|
||||
'clang-format',
|
||||
'html-lsp',
|
||||
'css-lsp',
|
||||
},
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
local status_ok, neodev = pcall(require, "neodev")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
neodev.setup {}
|
@ -3,7 +3,7 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local wsphome = "~/documents/notes/"
|
||||
local wsphome = os.getenv("HOME").."/documents/notes/"
|
||||
neorg.setup {
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
@ -16,8 +16,8 @@ neorg.setup {
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
home = wsphome .. "home",
|
||||
robotics = wsphome .. "robotics"
|
||||
home = wsphome.."home",
|
||||
robotics = wsphome.."robotics"
|
||||
},
|
||||
index = "index.norg",
|
||||
}
|
||||
@ -31,13 +31,14 @@ neorg.setup {
|
||||
width = "content",
|
||||
},
|
||||
folds = false,
|
||||
icon_preset = "varied",
|
||||
icon_preset = "basic",
|
||||
}
|
||||
},
|
||||
["core.export"] = {},
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp",
|
||||
name = "[Neorg]",
|
||||
}
|
||||
},
|
||||
["core.presenter"] = {
|
||||
@ -48,5 +49,3 @@ neorg.setup {
|
||||
["core.integrations.telescope"] = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- vim.cmd('Neorg sync-parsers')
|
||||
|
@ -4,6 +4,8 @@ if not status_ok then
|
||||
end
|
||||
|
||||
notify.setup {
|
||||
timeout = 3000,
|
||||
minimum_width = 35,
|
||||
icons = {
|
||||
DEBUG = "B",
|
||||
ERROR = "x",
|
||||
@ -11,6 +13,20 @@ notify.setup {
|
||||
TRACE = "t",
|
||||
WARN = "!"
|
||||
},
|
||||
minimum_width = 35,
|
||||
max_width = 80,
|
||||
|
||||
max_height = function() return math.floor(vim.o.lines * 0.75) end,
|
||||
max_width = function() return math.floor(vim.o.columns * 0.5) end,
|
||||
on_open = function(win, record)
|
||||
vim.api.nvim_win_set_config(win, {
|
||||
title = {
|
||||
{ " "..record.title[1].." ", "Notify"..record.level.."Title" },
|
||||
},
|
||||
title_pos = "center",
|
||||
border = "single",
|
||||
})
|
||||
end,
|
||||
render = function(bufnr, notif)
|
||||
notif.message[1] = string.format("%s", notif.message[1])
|
||||
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, notif.message)
|
||||
end,
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
local status_ok, presence = pcall(require, "presence")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
presence.setup {
|
||||
neovim_image_text = "Have you heard of our lord a savior Neovim?",
|
||||
main_image = "file",
|
||||
show_time = false,
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s",
|
||||
file_explorer_text = "Browsing %s",
|
||||
git_commit_text = "Committing changes",
|
||||
plugin_manager_text = "Managing plugins",
|
||||
reading_text = "Reading %s",
|
||||
workspace_text = "Working on %s",
|
||||
line_number_text = "Line %s out of %s",
|
||||
}
|
@ -5,6 +5,14 @@ end
|
||||
|
||||
project.setup {
|
||||
detection_methods = { "pattern" },
|
||||
patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" },
|
||||
patterns = {
|
||||
".git",
|
||||
"Makefile",
|
||||
"_darcs",
|
||||
".hg",
|
||||
".bzr",
|
||||
".svn",
|
||||
"package.json",
|
||||
},
|
||||
show_hidden = false,
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
local status_ok, scrollbar = pcall(require, "scrollbar")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
scrollbar.setup({
|
||||
hide_if_all_visible = true,
|
||||
handle = {
|
||||
hide_if_all_visible = true,
|
||||
},
|
||||
marks = {
|
||||
Cursor = {
|
||||
text = "*",
|
||||
},
|
||||
GitAdd = { text = "|" },
|
||||
GitChange = { text = "|" },
|
||||
GitDelete = { text = "-" },
|
||||
},
|
||||
handlers = {
|
||||
cursor = true,
|
||||
diagnostic = true,
|
||||
gitsigns = true, -- Requires gitsigns
|
||||
handle = true,
|
||||
},
|
||||
})
|
||||
|
||||
--[[ scrollbar.setup {
|
||||
current_only = true,
|
||||
winblend = 50,
|
||||
zindex = 40,
|
||||
excluded_filetypes = {},
|
||||
width = 2,
|
||||
} ]]
|
@ -11,7 +11,7 @@ sfm.setup {
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {
|
||||
-- user mappings go here
|
||||
{ key = 's', action = 'toggle_selection' }
|
||||
}
|
||||
},
|
||||
renderer = {
|
||||
@ -30,7 +30,8 @@ sfm.setup {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
file = "",
|
||||
}
|
||||
},
|
||||
selection = "*"
|
||||
}
|
||||
}
|
||||
}:load_extension('sfm-git', {
|
||||
|
@ -3,334 +3,113 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
local C = {}
|
||||
local R = {}
|
||||
|
||||
-- buttons
|
||||
local function button(sc, txt, keybind)
|
||||
local opts = {
|
||||
local function button(sc, txt, cmd, kopts, opts)
|
||||
opts = opts or {
|
||||
position = "center",
|
||||
shortcut = sc,
|
||||
cursor = -1,
|
||||
width = string.len(C.header[1]),
|
||||
shortcut = sc:gsub("<leader>", "LDR"),
|
||||
cursor = 0,
|
||||
width = 49,
|
||||
align_shortcut = "right",
|
||||
hl_shortcut = "Keyword",
|
||||
redraw_on_resize = false,
|
||||
hl_shortcut = "AlphaShortcut",
|
||||
hl = "AlphaText",
|
||||
}
|
||||
if cmd then
|
||||
kopts = kopts or { noremap = true, silent = true, nowait = true }
|
||||
opts.keymap = { "n", sc, cmd, kopts }
|
||||
end
|
||||
|
||||
local function on_press()
|
||||
local key = vim.api.nvim_replace_termcodes(keybind .. "<Ignore>", true, false, true)
|
||||
local key = vim.api.nvim_replace_termcodes(cmd, true, false, true)
|
||||
vim.api.nvim_feedkeys(key, "t", false)
|
||||
end
|
||||
|
||||
return {
|
||||
type = "button",
|
||||
val = txt,
|
||||
on_press = on_press,
|
||||
opts = opts,
|
||||
on_press = on_press,
|
||||
}
|
||||
end
|
||||
|
||||
-- actual config
|
||||
C.bigheader = {
|
||||
{
|
||||
[[ |\ ]],
|
||||
[[ ||. ]],
|
||||
[[ ||;` ]],
|
||||
[[ ,'|; : ]],
|
||||
[[ ,': |; ` ]],
|
||||
[[ ,' | ; `-` ]],
|
||||
[[ ,' | ; : ]],
|
||||
[[ ,' `-|; ` ]],
|
||||
[[ ; ; ` ]],
|
||||
[[ ,' `--\`-. `--: ]],
|
||||
[[ ,-._,'`. |\||`-. ` ]],
|
||||
[[ `;-.`-._`. | |\ \ `-. ` ]],
|
||||
[[ :`--`-.`-\ `--.| /`\;\ `-: ]],
|
||||
[[ ; ``-`. |/ ; \ `. ]],
|
||||
[[ ; `.`-/ ; \ ` ]],
|
||||
[[ ; : `/ ; \ ` ]],
|
||||
[[ ,-._ | / ; -`\ : ]],
|
||||
[[ `;-.`-._| : / | \ ` ]],
|
||||
[[ ; `-.| : / | \ ` ]],
|
||||
[[ ; | : : / | \ : ]],
|
||||
[[ ; | : / ; | \ ` ]],
|
||||
[[ ; | / ; | --`\ ` ]],
|
||||
[[ | | : / ; | \ : ]],
|
||||
[[ | : | : / ; \ ` ]],
|
||||
[[ | : ; ;:'-.._ -`\ ` ]],
|
||||
[[ | : ;___ ;'---....___;__:__| `-._ \ : ]],
|
||||
[[ | : `;``-------'';|| : \ `-._ \` ]],
|
||||
[[ -=======:===;===========;=|| : \ `-.\: ]],
|
||||
[[ ___ ; _;_|| ; ||___,:-.\___,....__\_ ]],
|
||||
[[ |`--:.|;_o||-______;,..-----""""" __|__...-'' ]],
|
||||
[[----....|___ """" jrei__||-------........________]],
|
||||
[[ """"----....____ __..--'' || ~~~~~ ]],
|
||||
[[ ~~~ ~~~ """"----....____|/ ~~~~~~~ ~~~~~~~]],
|
||||
[[~~~ ~~~~ ~~~~~~ ~ ~~~ ~~~~ ]],
|
||||
[[ ~~~~~ ~~~ ~ ~~~~~~~~~ ~~~ ~~~~~~~~~~ ]],
|
||||
},
|
||||
{
|
||||
[[ J\ ]],
|
||||
[[ | \ ]],
|
||||
[[ | `. ]],
|
||||
[[ F `. ]],
|
||||
[[ F \ ]],
|
||||
[[ F \ ]],
|
||||
[[ J `. ]],
|
||||
[[ J `. _ ]],
|
||||
[[ J \ |\ ]],
|
||||
[[ |. `.J|\ ]],
|
||||
[[ | `. `.L \ ]],
|
||||
[[ | `. \L `. ]],
|
||||
[[ J ` F `. ]],
|
||||
[[ J F \ ]],
|
||||
[[ J J \ ]],
|
||||
[[ F | \ ]],
|
||||
[[ F | `. ]],
|
||||
[[ F F `. ]],
|
||||
[[ | F \ ]],
|
||||
[[ | J \ ]],
|
||||
[[ | | \ ]],
|
||||
[[ | | \ ]],
|
||||
[[ J F \ ]],
|
||||
[[----------J J \-------------]],
|
||||
[[ L | \ ]],
|
||||
[[~ O ======F \ ~ ]],
|
||||
[[ ~ (\`-. / J \-. ~ ]],
|
||||
[[ \_\/ )"L_ _\_) ]],
|
||||
[[ >|`-.||[_][""""---------.'_.-\\ ~ ]],
|
||||
[[~~ ~~~ \`-. J_ Veronica"""""\/"_.--'\\ ]],
|
||||
[[ ~ `. "--._ _..--""" |\` ]],
|
||||
[[ ~~ ~~ ~""-. """"""""""" | ]],
|
||||
[[ ~~ ~ ~~ ~"----._--.-._--""""\|'\| ]],
|
||||
[[ ~ ~~~ ~~ ~~~ ~~~~ `- `--.` ` ]],
|
||||
[[~~~ ~~ ~~ ~~~~ ~~ ~ ]],
|
||||
},
|
||||
{
|
||||
[[ . . ]],
|
||||
[[ _..-''"""\ _.--'"""\ ]],
|
||||
[[ | L | \ ]],
|
||||
[[ _ / _.-.---.\. / .-.----.\ ]],
|
||||
[[ _/-|--- _/<"---'"""""\\`. /-'--''"""""\ ]],
|
||||
[[ | \ | L`.`-. | L ]],
|
||||
[[ /_.-.---.L | \ \ `| J`. ]],
|
||||
[[ _/--'"""" \ F \L \ | L ]],
|
||||
[[ L `. L J _.---.-"""-.\`. L_/ _.--|"""""--.\ `. ]],
|
||||
[[ | \+. /-"__.--'"""" \ `./'"---'"""""" \`. `. ]],
|
||||
[[ F _____ \ `F" `. \ \ L `. ]],
|
||||
[[ /.-'"_|---'"\ | ` JL | L `.`. ]],
|
||||
[[ <-'"" \| _.-.------._ A J _.-.-----`.--| ``.`. ]],
|
||||
[[ L `. |/.-'"_.-`---'""\."| /-'"---'""""" \`.\. \ `.`. ]],
|
||||
[[ | _.------\.<'""" L\ L\ `.`\`. \ `. ]],
|
||||
[[ _.-'//'"--'""" L\| ________\ `.F ___.-------._L \ `-\ \`. ]],
|
||||
[[ /___| F F _.--'"_|-------L /_.-'"_.-|-'"""""""\ L L `.`. ]],
|
||||
[[ | F _.-'|"""""/'"-'""" J <'""" L J | `.`. ]],
|
||||
[[ |/-'-''/|""\ )-|\ F \ | L .'"""`\""-\\_ ]],
|
||||
[[ F`-'-'-(`-') | \ F \ |___`"""`.""`.-'" ]],
|
||||
[[------------/ `-'---| F L L __ |"""""`-'"__________]],
|
||||
[[ .'_ | |__L __ J__ | _.--'"""" `".----'".' ]],
|
||||
[[ '""""""""""""|--._+--F _.-'""||" """___/.-'" ||-'"/""""" \_. .' ]],
|
||||
[[ J------------(___\__/'_____.--------'-------'"""""""" / ]],
|
||||
[[ `-. _.__.__.__.____ J_.-._ ]],
|
||||
[[ .'`-._ (-`--`---.'--._`---._.-'`-._.-'_.-'``-._' `-''-' ]],
|
||||
},
|
||||
{
|
||||
[[ _____|\ ]],
|
||||
[[ _.--| SSt |: ]],
|
||||
[[ <____|.----|| ]],
|
||||
[[ .---''---, ]],
|
||||
[[ ;..__..' _... ]],
|
||||
[[ ,'/ ;|/..--'' \ ]],
|
||||
[[ ,'_/.-/': : ]],
|
||||
[[ _..-'''/ / | \ \ _|/| ]],
|
||||
[[ \ /-./_ \; \ \,;' \ ]],
|
||||
[[ ,\ / \: `:\ \ // `:`. ]],
|
||||
[[ ,' \ /-._; | : : :: ,. . ]],
|
||||
[[ ,' :: /`-._| | | || ' : `.`.)]],
|
||||
[[ _,' |;._:: | | | | `| : `' ]],
|
||||
[[ ,' `. / |`-:_ ; | | | : \ ]],
|
||||
[[ `--. ) /|-._: : | \ \ ]],
|
||||
[[ / / :_| ;`-._; __..--'; : : ]],
|
||||
[[ / ( ;|;-./_ _/.-:'o | / ' | ]],
|
||||
[[ / , \._/_/_./--''/_|:|___|_,' | ]],
|
||||
[[ : / `'-'--'----'---------' | ]],
|
||||
[[ | : O ._O O_. O ._O O_. ; ; ]],
|
||||
[[ : `. // // // // ,' / ]],
|
||||
[[ ~~~`.______//____//____//____//_______,'~ ]],
|
||||
[[ // //~ // // ]],
|
||||
[[ ~~ _// _// _// ~ _// ~ ]],
|
||||
[[ ~ / / / / / / / / ~ ~~ ]],
|
||||
[[ ~~~ ~~~ ~~~ ~~~ ]],
|
||||
},
|
||||
{
|
||||
[[ P___----.... ]],
|
||||
[[ ! __ ]],
|
||||
[[ ' ~~ ---.#..__ ` ~ ~ - - . .: ]],
|
||||
[[ ` ~~--. .F~~___-__. ]],
|
||||
[[ ; , .- . _! ]],
|
||||
[[ , ' ; ~ . ]],
|
||||
[[ , ____ ; ' _ ._ ; ]],
|
||||
[[ ,_ . - '___#, ~~~ ---. _, . ' .#' ~ .; ]],
|
||||
[[ =---==~~~ ~~~==--__ ; '~ -. ,#_ .' ]],
|
||||
[[ ' `~=.; ` / ]],
|
||||
[[ ' ' '. ]],
|
||||
[[ ' ' ]],
|
||||
[[ \ ' ' ' ]],
|
||||
[[ `.`\ ' . ; , ]],
|
||||
[[ \ ` ' ' ; ]],
|
||||
[[ ; ' ' ' ]],
|
||||
[[ /_ ., / __...---./ ' ]],
|
||||
[[ ',_, __.--- ~~;#~ --..__ _'.-~;# // `.' ]],
|
||||
[[ / / ~~ .' . #; ~~ /// #; // / ]],
|
||||
[[ / ' . __ . ' ;#;_ . ////.;#;./ ; / ]],
|
||||
[[ \ . / ,##' / _ /. '(/ ~||~\' ]],
|
||||
[[ \ ` - . /_ . -==- ~ ' / (/ ' . ;;. ', ]],
|
||||
[[ /' . ' -^^^...--- ``(/' _ ' '' `,; ]],
|
||||
[[##,. .#...( ' .c c .c c c. '.. ;; ../ ]],
|
||||
[[%%#%;,..##.\_ ,;###;,. ;;.:##;,. raf ]],
|
||||
[[%%%%########%%%%;,.....,;%%%%%%;,.....,;%%%%%%%%%%%%%%%%%%%%............]],
|
||||
},
|
||||
{
|
||||
[[ .. ]],
|
||||
[[ .( )`-._ ]],
|
||||
[[ .' || `._ ]],
|
||||
[[ .' || `. ]],
|
||||
[[ .' || `._ ]],
|
||||
[[ .' _||_ `-. ]],
|
||||
[[ .' |====| `.. ]],
|
||||
[[ .' \__/ ( ) ]],
|
||||
[[ ( ) || _ || ]],
|
||||
[[ /|\ || .-` \ || ]],
|
||||
[[ .' | ' || _.-' | || ]],
|
||||
[[ / |\ \ || .' `.__.' || _.-.. ]],
|
||||
[[ .' /| `. _.-' _.-' _.-.`-'`._`.` ]],
|
||||
[[ \ .' | | .-.` `./ _.-`. `._.-' ]],
|
||||
[[ |. | `. _.-' `. .' .' `._.`---` ]],
|
||||
[[ .' | | : `._..-'.' `._..' || ]],
|
||||
[[ / | \ `-._.' || || ]],
|
||||
[[ | .'|`. | ||_.--.-._ || ]],
|
||||
[[ ' / | \ \ __.--'\ `. : || ]],
|
||||
[[ \ .' | \| ..-' \ `._-._.' || ]],
|
||||
[[`.._ |/ | `. \ \ `._.- || ]],
|
||||
[[ `-.._ / | \ `-.'_.--' || ]],
|
||||
[[ `-.._.' | | | | _ _ _ _'_ _ _ _ _ ]],
|
||||
[[ `-.._ | \ | | |_|_|_'|_|_|_|_|_|_| ]],
|
||||
[[ [`--^-..._.' | | /....../| __ __ | ]],
|
||||
[[ \`---.._|`--.._ | | /....../ | |__| |__| | ]],
|
||||
[[ \__ _ `-.._| `-._|_|_ _ _/_ _ _ / | |__| |__| | ]],
|
||||
[[ \ _o_ _`-._|_|_|_|_|_|_|_|_/ '-----------/ ]],
|
||||
[[ \_`.|.' _ - .--.--.--.--.--.`--------------' ]],
|
||||
[[ .```-._ ``-.._ \__ _ _ '--'--'--'--'--' - _ - _ __/ ]],
|
||||
[[ .`-.```-._ ``-..__``.- `. _ - _ _ _ - _- _ __/(.``-._]],
|
||||
[[ _.-` ``--.. .. _.-` ``--.. .. .._ _. __ __ _ __ ..--.._ / .( _..``]],
|
||||
[[`.-._ `._ `- `-._ .`-.```-._ ``-..__``.- -._--.__---._--..-._`...```]],
|
||||
[[ _.-` ``--.. .. `.-._ `._ `- `-._ .-_. ._.- -._ --.._`` _.-`LGB`-.]],
|
||||
},
|
||||
local header = {
|
||||
'█▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀█ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀█ ',
|
||||
'█ ░█████▀▀▀▀▀█████▓▄ ▀▀▀▀ ░ ░█ ░█ ░█ █ ',
|
||||
'█ ▒███████ ▓███████ ▒██ ▓███ ▓███ ▓███ █ ',
|
||||
'█ ▓███████ ▓███████ ▓█████████████████ █ ',
|
||||
'█ ▓███████ ▓███████ ███ ██████████████ █ ',
|
||||
'█ ▓███████ ▓███████ ███ ██████████████ █ ',
|
||||
'█ ▓███████ ▓███████ ███ ██████████████ █ ',
|
||||
'█ ▓███████ ▓███████ ███▄██████████████ █ ',
|
||||
'█ ▓███████ ▓███████ ██████▀▀██████████ █ ',
|
||||
'▀ ▓███████ ▓███████▄ ▄▄███████████ █ ',
|
||||
'█ ▓███████ ██████████████████ █▄▄▄',
|
||||
'█ ▓███████▀▀ ▀ ▀ ▀████████████████▄ ▄ █',
|
||||
'█▄▄▄▄▄▄▄ ▀ █▀▀▀▀▀▀▀▀▀▀▀▀█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█',
|
||||
' █ ▀ █ ',
|
||||
' ▀▀▀▀▀ ',
|
||||
}
|
||||
C.mediumheader = {
|
||||
{
|
||||
[[ |._ ]],
|
||||
[[ |._( ]],
|
||||
[[ <|.__..-'|. ]],
|
||||
[[ ,| .|)\ ]],
|
||||
[[ /| .|) \ ]],
|
||||
[[ /.|) .|) \ ]],
|
||||
[[ / .|) .|) \ ]],
|
||||
[[ / .|) .|) \ ]],
|
||||
[[ / .|) .|) \ ]],
|
||||
[[ / ,--+---_ | \ , ]],
|
||||
[[ '\==-,,;,,;,,;,,,,,,,-==;7 ]],
|
||||
[[ _ \__...____...__ __/ _ seal _]],
|
||||
[[ ~ ~~~~ ~~ ]],
|
||||
},
|
||||
{
|
||||
[[ , ]],
|
||||
[[ |"-,_ ]],
|
||||
[[ I--(_ ]],
|
||||
[[ ,I?8, ]],
|
||||
[[ d|`888. ]],
|
||||
[[ d8| 8888b ]],
|
||||
[[ ,88| ?8888b ]],
|
||||
[[ ,888| `88888b ]],
|
||||
[[ ,8888| 8888g8b ]],
|
||||
[[ ,88888| 888PX?8b ]],
|
||||
[[ ,888888| 8888bd88, ]],
|
||||
[[ o8888888| ,888888888 ]],
|
||||
[[ d8888888P| d888888888b ]],
|
||||
[[ _.d888gggg8'| 8gg88888888, ]],
|
||||
[[ '\==-,,,,,,,,|/;,,,,,-==;7 ]],
|
||||
[[ _ \__...____...__ __/ _ seal _]],
|
||||
[[ ~ ~~~~ ~~ ]],
|
||||
},
|
||||
local footer = {
|
||||
'▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄',
|
||||
}
|
||||
C.smallheader = {
|
||||
{
|
||||
[[ _~ ]],
|
||||
[[ _~ )_)_~ ]],
|
||||
[[ )_))_))_) ]],
|
||||
[[ _!__!__!_ ]],
|
||||
[[ \______t/ ]],
|
||||
[[~~~~~~~~~~~~~]],
|
||||
},
|
||||
{
|
||||
[[ __4___ ]],
|
||||
[[ _ \ \ \ \ ]],
|
||||
[[<'\ /_/_/_/ ]],
|
||||
[[ ((____!___/)]],
|
||||
[[ \0\0\0\0\/ ]],
|
||||
},
|
||||
{
|
||||
[[ I\ ]],
|
||||
[[ I \ ]],
|
||||
[[ I \ ]],
|
||||
[[ I*--\ ]],
|
||||
[[ I \ ]],
|
||||
[[ I \ ]],
|
||||
[[ I______\ ]],
|
||||
[[ _____I__O______ ]],
|
||||
[[ \ ( ) b ^ ^]],
|
||||
[[^^^^^^^^^^^^^^^^^ ^ ]],
|
||||
},
|
||||
{
|
||||
[[ ^ +~+~~ ]],
|
||||
[[ ^ )`.). ]],
|
||||
[[ )``)``) .~~ ]],
|
||||
[[ ).-'.-')|) ]],
|
||||
[[ |-).-).-'_'-/ ]],
|
||||
[[~~~\ `o-o-o' /~~~~~~~~~~~~~~~~~]],
|
||||
[[ ~~~'---.____/~~Eric C. Liebl~~~]],
|
||||
},
|
||||
{
|
||||
[[ ,_ ]],
|
||||
[[ I~ ]],
|
||||
[[ |\ ]],
|
||||
[[ /|.\ ]],
|
||||
[[ / || \ ]],
|
||||
[[ ,' |' \ ]],
|
||||
[[.-'.-==|/_--' ]],
|
||||
[[`--'-------' _ seal _]],
|
||||
}
|
||||
}
|
||||
|
||||
R.width = vim.api.nvim_win_get_width(0)
|
||||
R.height = vim.api.nvim_win_get_height(0)
|
||||
|
||||
C.header = C.bigheader[math.random(#C.bigheader)]
|
||||
if #C.header >= R.height then
|
||||
C.header = C.mediumheader[math.random(#C.mediumheader)]
|
||||
if #C.header >= R.height then
|
||||
C.header = C.smallheader[math.random(#C.smallheader)]
|
||||
if #C.header >= R.height then
|
||||
C.header = ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
alpha.setup {
|
||||
layout = {
|
||||
{ type = "padding", val = math.floor((R.height - #C.header) / 2) },
|
||||
{ type = "text", val = C.header, opts = { position = 'center', hl = "AlphaHeader" } },
|
||||
{ type = 'text', val = function()
|
||||
local padding = {}
|
||||
for i = 1, math.floor((vim.api.nvim_win_get_height(0) - #header - 6 - #footer) / 2), 1 do
|
||||
table.insert(padding, " ")
|
||||
end
|
||||
return padding
|
||||
end },
|
||||
{ type = 'text', val = header, opts = {
|
||||
position = 'center',
|
||||
hl = 'AlphaHeader',
|
||||
} },
|
||||
{ type = 'padding', val = 1 },
|
||||
{ type = 'group', val = {
|
||||
button('f', '? Find files', '<cmd>Telescope find_files<CR>'),
|
||||
button('r', '↺ Recent files', '<cmd>Telescope oldfiles <CR>'),
|
||||
button('n', '▣ Neorg workspace', '<cmd>Telescope neorg switch_workspace<CR>'),
|
||||
button('m', '≡ Menu', '<cmd>ConfigMenu<CR>'),
|
||||
button('q', '✖ Quit', '<cmd>wqa<CR>'),
|
||||
} },
|
||||
{ type = 'text', val = footer, opts = {
|
||||
position = 'center',
|
||||
hl = 'AlphaFooter',
|
||||
} },
|
||||
},
|
||||
opts = {
|
||||
keymap = {
|
||||
press = '<CR>',
|
||||
press_queue = nil
|
||||
},
|
||||
setup = function()
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'AlphaReady',
|
||||
desc = 'disable stuff for alpha',
|
||||
callback = function()
|
||||
vim.opt.laststatus = 0
|
||||
vim.opt.showtabline = 0
|
||||
vim.opt.more = false
|
||||
vim.opt.showcmd = false
|
||||
vim.opt.ruler = false
|
||||
vim.opt.number = false
|
||||
vim.opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('BufUnload', {
|
||||
buffer = 0,
|
||||
desc = 'enable stuff after alpha closes',
|
||||
callback = function()
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.showtabline = 2
|
||||
vim.opt.more = true
|
||||
vim.opt.showcmd = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.number = false
|
||||
vim.opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
@ -5,63 +5,19 @@ end
|
||||
|
||||
el.reset_windows()
|
||||
|
||||
local builtin = require "el.builtin"
|
||||
local sections = require "el.sections"
|
||||
local builtin = require("el.builtin")
|
||||
local sections = require("el.sections")
|
||||
local c = require "components"
|
||||
|
||||
-- color setup
|
||||
local hl_statusline = "StatusLine"
|
||||
--diagnostic colors
|
||||
local hl_hint = "DiagnosticHint"
|
||||
local hl_info = "DiagnosticInfo"
|
||||
local hl_warn = "DiagnosticWarn"
|
||||
local hl_err = "DiagnosticError"
|
||||
-- git colors
|
||||
local hl_red = "ErrorMsg"
|
||||
local hl_green = "diffAdded"
|
||||
local hl_yellow = "WarningMsg"
|
||||
local highlights = {
|
||||
-- diagnostic colors
|
||||
diag_err = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_err] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
diag_warn = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_warn] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
diag_info = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_info] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
diag_hint = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_hint] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
local function hl(fg, b)
|
||||
b = b or false
|
||||
return c.extract_hl({
|
||||
bg = {["StatusLine"] = "bg"},
|
||||
fg = {[fg] = "fg"},
|
||||
bold = b,
|
||||
})
|
||||
end
|
||||
|
||||
-- git colors
|
||||
red_fg = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_red] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
green_fg = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_green] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
yellow_fg = c.extract_hl({
|
||||
bg = { [hl_statusline] = "bg" },
|
||||
fg = { [hl_yellow] = "fg" },
|
||||
bold = true,
|
||||
}),
|
||||
}
|
||||
|
||||
-- modes
|
||||
local modes = {
|
||||
-- display name, mode, highlight group
|
||||
n = { "Normal", "N" },
|
||||
@ -79,56 +35,44 @@ local modes = {
|
||||
ic = { "ICompl", "Ic" },
|
||||
R = { "Replace", "R" },
|
||||
Rv = { "VReplace", "Rv" },
|
||||
c = { "Command", "C" },
|
||||
c = { "Command", "C", hl("DiagnosticHint")},
|
||||
cv = { "Vim Ex", "E" },
|
||||
ce = { "Ex (r)", "E" },
|
||||
r = { "Prompt", "P" },
|
||||
rm = { "More ", "M" },
|
||||
rm = { "More", "M" },
|
||||
["r?"] = { "Confirm", "Cn" },
|
||||
["!"] = { "Shell ", "S" },
|
||||
nt = { "Term ", "T" },
|
||||
t = { "Term ", "T" },
|
||||
["!"] = { "Shell", "S" },
|
||||
nt = { "Term", "T" },
|
||||
t = { "Term", "T" },
|
||||
}
|
||||
|
||||
el.setup {
|
||||
generator = function()
|
||||
local items = {
|
||||
{ c.mode { modes = modes, fmt = " %s %s ", icon = "", hl_icon_only = false } },
|
||||
return {
|
||||
{ { " " }, c.mode { modes = modes, hl_icon_only = false } },
|
||||
{ sections.split, required = true },
|
||||
{ sections.collapse_builtin { { builtin.filetype }, { " " } } },
|
||||
{ sections.maximum_width(builtin.tail_file, 0.50), required = true },
|
||||
{ sections.collapse_builtin { { " " }, { builtin.modified_flag } } },
|
||||
{ sections.split, required = true },
|
||||
{ c.lsp_srvname },
|
||||
{ c.diagnostics {
|
||||
fmt = "[%s]", lsp = true,
|
||||
hl_err = highlights.diag_err,
|
||||
hl_warn = highlights.diag_warn,
|
||||
hl_info = highlights.diag_info,
|
||||
hl_hint = highlights.diag_hint,
|
||||
icon_err = 'x', icon_warn = '!', icon_info = 'i', icon_hint = 'h'
|
||||
}
|
||||
},
|
||||
{ c.git_branch { fmt = "%s *%s", icon = "" } },
|
||||
fmt = "[%s]",
|
||||
hl_err = hl("DiagnosticError", true),
|
||||
hl_warn = hl("DiagnosticWarn", true),
|
||||
hl_info = hl("DiagnosticInfo", true),
|
||||
hl_hint = hl("DiagnosticHint", true)
|
||||
}},
|
||||
{ c.git_branch { icon = "*", fmt = " %s%s" } },
|
||||
{ c.git_changes_buf {
|
||||
fmt = "[%s]",
|
||||
icon_insert = "+",
|
||||
icon_change = "~",
|
||||
icon_delete = "-",
|
||||
hl_insert = highlights.green_fg,
|
||||
hl_change = highlights.yellow_fg,
|
||||
hl_delete = highlights.red_fg,
|
||||
hl_insert = hl("GitSignsAdd", true),
|
||||
hl_change = hl("GitSignsChange", true),
|
||||
hl_delete = hl("GitSignsDelete", true),
|
||||
}},
|
||||
{ { " " }, c.line {
|
||||
fmt = "ʟ[%s]",
|
||||
}, required = true },
|
||||
}
|
||||
|
||||
local add_item = function(result, item)
|
||||
table.insert(result, item)
|
||||
end
|
||||
|
||||
local result = {}
|
||||
for _, item in ipairs(items) do
|
||||
add_item(result, item)
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
}
|
||||
|
@ -5,18 +5,71 @@ end
|
||||
local actions = require('telescope.actions')
|
||||
local action_layout = require("telescope.actions.layout")
|
||||
|
||||
local function telescopew()
|
||||
if vim.o.columns <= 80 then
|
||||
return vim.o.columns
|
||||
else
|
||||
return 80
|
||||
end
|
||||
end
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
borderchars = {
|
||||
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
},
|
||||
sorting_strategy = 'ascending',
|
||||
preview = {
|
||||
-- add image previews via chafa
|
||||
mime_hook = function(filepath, bufnr, opts)
|
||||
local is_image = function(filepath)
|
||||
local image_extensions = { -- supported image formats
|
||||
'png',
|
||||
'jpg',
|
||||
'jpe',
|
||||
'jpeg',
|
||||
'webp',
|
||||
'gif',
|
||||
}
|
||||
local split_path = vim.split(filepath:lower(), '.', { plain=true })
|
||||
local extension = split_path[#split_path]
|
||||
return vim.tbl_contains(image_extensions, extension)
|
||||
end
|
||||
if is_image(filepath) then
|
||||
local term = vim.api.nvim_open_term(bufnr, {})
|
||||
local function send_output(_, data, _ )
|
||||
for _, d in ipairs(data) do
|
||||
vim.api.nvim_chan_send(term, d..'\r\n')
|
||||
end
|
||||
end
|
||||
vim.fn.jobstart({
|
||||
'chafa',
|
||||
'-C',
|
||||
'on',
|
||||
'--animate',
|
||||
'off',
|
||||
'-s',
|
||||
(telescopew() - 10)..'x25',
|
||||
'--clear',
|
||||
filepath
|
||||
}, { on_stdout = send_output, stdout_buffered = true, pty = true })
|
||||
a.nvim_set_option_value("number", false, {buf = bufnr})
|
||||
else
|
||||
require("telescope.previewers.utils").set_preview_message(bufnr, opts.winid, "File cannot be previewed")
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
winblend = 0,
|
||||
-- 'horizontal', 'vertical', 'bottom_pane', or 'cursor'
|
||||
layout_strategy = 'bottom_pane',
|
||||
layout_strategy = 'vertical',
|
||||
sorting_strategy = 'ascending',
|
||||
layout_config = {
|
||||
bottom_pane = { height = 0.4, },
|
||||
vertical = {
|
||||
width = telescopew(),
|
||||
prompt_position = "top",
|
||||
}
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
@ -42,5 +95,7 @@ telescope.load_extension('projects')
|
||||
|
||||
a.nvim_create_autocmd('User', {
|
||||
pattern = 'TelescopePreviewerLoaded',
|
||||
command = 'setlocal number',
|
||||
callback = function()
|
||||
vim.opt.winblend = 0
|
||||
end,
|
||||
})
|
||||
|
@ -1,8 +0,0 @@
|
||||
local status_ok, termedit = pcall(require, "term-edit")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
termedit.setup {
|
||||
prompt_end = '$ ',
|
||||
}
|
@ -5,12 +5,32 @@ end
|
||||
|
||||
todocomments.setup {
|
||||
keywords = {
|
||||
FIX = { icon = " ", alt = { "FIXME", "BUG" } },
|
||||
TODO = { icon = "i ", color = "info" },
|
||||
HACK = { icon = "* ", color = "warning" },
|
||||
WARN = { icon = "! ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = "i ", color = "hint", alt = { "INFO" } },
|
||||
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||
FIX = {
|
||||
icon = "# ",
|
||||
alt = { "FIXME", "BUG" },
|
||||
},
|
||||
HACK = {
|
||||
icon = "* ",
|
||||
color = "warning",
|
||||
},
|
||||
WARN = {
|
||||
icon = "! ",
|
||||
color = "warning",
|
||||
alt = { "WARNING", "XXX" },
|
||||
},
|
||||
NOTE = {
|
||||
icon = "i ",
|
||||
color = "hint",
|
||||
alt = { "INFO", "TODO" },
|
||||
},
|
||||
PERF = {
|
||||
icon = "@ ",
|
||||
alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" },
|
||||
},
|
||||
TEST = {
|
||||
icon = "@ ",
|
||||
color = "test",
|
||||
alt = { "TESTING", "PASSED", "FAILED" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
local status_ok, trouble = pcall(require, "trouble")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
trouble.setup {
|
||||
icons = false,
|
||||
fold_open = "v",
|
||||
fold_closed = ">",
|
||||
signs = {
|
||||
error = "[x]",
|
||||
warning = "[!]",
|
||||
hint = "[?]",
|
||||
information = "[i]"
|
||||
},
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
local status_ok, truezen = pcall(require, "true-zen")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
truezen.setup {
|
||||
modes = {
|
||||
ataraxis = {
|
||||
minimum_writing_area = {
|
||||
width = 90,
|
||||
height = 44,
|
||||
},
|
||||
},
|
||||
narrow = {
|
||||
folds_style = "invisible",
|
||||
},
|
||||
}
|
||||
}
|
@ -24,4 +24,7 @@ treesitter.setup {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user