Track lunarvim config

This commit is contained in:
Asocia
2022-01-25 20:19:51 +03:00
parent c37a30b9f8
commit 44ee0f6985
11 changed files with 560 additions and 0 deletions

View File

@ -0,0 +1,9 @@
require('autosave').setup({
enabled = vim.g.auto_save,
-- execution_message = 'autosaved at : ' .. vim.fn.strftime('%H:%M:%S'),
-- events = {'InsertLeave', 'TextChanged'},
-- conditions = {exists = true, filetype_is_not = {}, modifiable = true},
write_all_buffers = true,
on_off_commands = true,
clean_command_line_interval = 2500
})

View File

@ -0,0 +1,14 @@
lvim.builtin.dashboard.active = true
-- lvim.builtin.dashboard.custom_header = {
-- ' _______ _____ ',
-- ' ___ |__Welcome back, _________(_)______ _ ',
-- ' __ /| |__ ___/_ __ \\_ ___/__ / _ __ `/ ',
-- ' _ ___ |_(__ ) / /_/ // /__ _ / / /_/ / ',
-- ' /_/ |_|/____/ \\____/ \\___/ /_/ \\__,_/ '
-- }
lvim.builtin.dashboard.custom_header = {}
vim.g.dashboard_preview_command = 'cat'
vim.g.dashboard_preview_pipeline = 'lolcat -F 0.2'
vim.g.dashboard_preview_file = '~/.config/Asocia/splash'
vim.g.dashboard_preview_file_height = 10
vim.g.dashboard_preview_file_width = 45

View File

@ -0,0 +1,40 @@
local dial = require 'dial'
vim.cmd [[
nmap <C-a> <Plug>(dial-increment)
nmap <C-x> <Plug>(dial-decrement)
vmap <C-a> <Plug>(dial-increment)
vmap <C-x> <Plug>(dial-decrement)
vmap g<C-a> <Plug>(dial-increment-additional)
vmap g<C-x> <Plug>(dial-decrement-additional)
]]
dial.augends['custom#boolean'] = dial.common.enum_cyclic {
name = 'boolean',
strlist = {'true', 'false'}
}
table.insert(dial.config.searchlist.normal, 'custom#boolean')
-- For Languages which prefer True/False, e.g. python.
dial.augends['custom#Boolean'] = dial.common.enum_cyclic {
name = 'Boolean',
strlist = {'True', 'False'}
}
table.insert(dial.config.searchlist.normal, 'custom#Boolean')
dial.augends['custom#directions'] = dial.common.enum_cyclic {
name = 'directions',
strlist = {'left', 'right', 'top', 'bottom'}
}
table.insert(dial.config.searchlist.normal, 'custom#directions')
dial.augends['custom#yesno'] = dial.common.enum_cyclic {
name = 'yesno',
strlist = {'yes', 'no'}
}
table.insert(dial.config.searchlist.normal, 'custom#yesno')
dial.augends['custom#YesNo'] = dial.common.enum_cyclic {
name = 'YesNo',
strlist = {'Yes', 'No'}
}
table.insert(dial.config.searchlist.normal, 'custom#YesNo')

View File

@ -0,0 +1,8 @@
require('indent_blankline').setup {
indent_blankline_char = '',
indent_blankline_filetype_exclude = {'help', 'terminal', 'dashboard'},
indent_blankline_buftype_exclude = {'terminal'},
indent_blankline_show_trailing_blankline_indent = false,
indent_blankline_show_first_indent_level = false
}

View File

@ -0,0 +1,65 @@
lvim.builtin.which_key.mappings['<tab>'] = {'<C-^>', 'alternate file'}
lvim.builtin.which_key.mappings['\\'] = {':vnew<CR>', 'vsplit'}
lvim.builtin.which_key.mappings['-'] = {':new<CR>', 'hsplit'}
-- hop mappings
lvim.builtin.which_key.mappings['w'] = {':HopWord<CR>', 'Hop word'}
lvim.builtin.which_key.mappings['j'] = {':HopLineStartAC<CR>', 'Hop line'}
lvim.builtin.which_key.mappings['k'] = {':HopLineStartBC<CR>', 'Hop line'}
lvim.builtin.which_key.mappings['r'] = {
':set invrelativenumber<CR>', 'Toggle relative number'
}
lvim.builtin.which_key.mappings['i'] = {':SymbolsOutline<CR>', 'Index view'}
lvim.builtin.which_key.mappings['P'] = {
'<cmd>Telescope projects<CR>', 'Projects'
}
lvim.builtin.which_key.mappings['S'] = {
name = 'Session',
c = {
'<cmd>lua require(\'persistence\').load()<cr>',
'Restore last session for current dir'
},
l = {
'<cmd>lua require(\'persistence\').load({ last = true })<cr>',
'Restore last session'
},
Q = {
'<cmd>lua require(\'persistence\').stop()<cr>',
'Quit without saving session'
}
}
lvim.builtin.which_key.mappings['d'] = {
-- " Available Debug Adapters:
-- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/
-- " Adapter configuration and installation instructions:
-- " https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation
-- " Debug Adapter protocol:
-- " https://microsoft.github.io/debug-adapter-protocol/
-- " Debugging
name = 'Debug',
e = {':call vimspector#Reset()<cr>', 'exit debug mode'},
l = {':call vimspector#StepInto()<cr>', 'step into'},
j = {':call vimspector#StepOver()<cr>', 'step over'},
h = {':call vimspector#StepOut()<cr>', 'step out'},
k = {':call vimspector#Restart()<cr>', 'restart debugging'},
c = {':call vimspector#Continue()<cr>', 'continue'},
r = {':call vimspector#RunToCursor()<cr>', 'run to cursor'},
d = {':call vimspector#Launch()<cr>', 'Launch'},
b = {':call vimspector#ToggleBreakpoint()<cr>', 'toggle breakpoint'},
B = {'<Plug>VimspectorToggleConditionalBreakpoint', 'toggle breakpoint'},
C = {':call vimspector#ClearBreakpoints()<cr>', 'clear breakpoints'},
i = {'<Plug>VimspectorBalloonEval', 'inspect'}
}
-- lvim.builtin.which_key.mappings['t'] = {
-- name = '+Trouble',
-- r = {'<cmd>Trouble lsp_references<cr>', 'References'},
-- f = {'<cmd>Trouble lsp_definitions<cr>', 'Definitions'},
-- d = {'<cmd>Trouble lsp_document_diagnostics<cr>', 'Diagnostics'},
-- q = {'<cmd>Trouble quickfix<cr>', 'QuickFix'},
-- l = {'<cmd>Trouble loclist<cr>', 'LocationList'},
-- w = {'<cmd>Trouble lsp_workspace_diagnostics<cr>', 'Diagnostics'}
-- }