new config old version is now on v1 branch

This commit is contained in:
2023-04-30 18:41:13 -04:00
parent 7c5d3eff78
commit 01a09f243c
77 changed files with 1611 additions and 1267 deletions

1
after/ftplugin/help.lua Normal file
View File

@ -0,0 +1 @@
vim.treesitter.start()

11
after/ftplugin/java.lua Normal file
View File

@ -0,0 +1,11 @@
local status_ok, jdtls = pcall(require, "jdtls")
if not status_ok then
return
end
jdtls.start_or_attach {
cmd = {'/home/squibid/Downloads/jdt-lang-serv/bin/jdtls'},
root_dir = vim.fs.dirname(
vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]
),
}

View File

@ -0,0 +1,6 @@
local status_ok, autopairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
autopairs.setup{}

129
after/plugin/cmp.lua Normal file
View File

@ -0,0 +1,129 @@
local status_ok, cmp = pcall(require, "cmp")
if not status_ok then
return
end
local lspicons = {
Text = 'Tx',
Snippet = '<>',
Method = '{}',
Function = '{}',
Constructor = '{}',
Field = '""',
Variable = 'x=',
Class = '{}',
Interface = '.h',
Module = '{}',
Property = '@p',
Unit = '',
Value = '',
Enum = 'E#',
Keyword = '$1',
Color = '',
File = '#`',
Reference = '',
Folder = '[/',
EnumMember = '',
Constant = 'c=',
Struct = '',
Event = '',
Operator = '%*',
TypeParameter = '',
}
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(a.nvim_win_get_cursor(0))
return col ~= 0 and a.nvim_buf_get_lines(0, line - 1, line, true)
[1]:sub(col, col):match("%s") == nil
end
local luasnip = require('luasnip')
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup {
completion = { autocomplete = false, },
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
sources = cmp.config.sources({
{ name = 'nvim_lsp', keyword_length = 3 },
{ name = 'luasnip', keyword_length = 3 },
{ name = 'path' },
{ name = 'buffer', keyword_length = 3, max_item_count = 7 },
{ name = 'calc' },
{ name = 'neorg' },
}),
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
col_offset = 0,
side_padding = 0,
}
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind_icons = lspicons
local menu_items = {
buffer = "buffer",
nvim_lsp = "LSP",
luasnip = "luasnip",
nvim_lua = "lua",
calc = "calc",
}
vim_item.kind = string.format(' %s ', kind_icons[vim_item.kind])
vim_item.menu = string.format(' (%s)', menu_items[entry.source.name])
return vim_item
end
},
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
require("intellitab").indent()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<ESC>'] = cmp.mapping.close(),
}),
sorting = {
comparators = {
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
require "cmp-under-comparator".under,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
enabled = function()
local context = require 'cmp.config.context'
if a.nvim_get_mode().mode == 'c' then
return true
else
return not context.in_treesitter_capture("comment")
and not context.in_syntax_group("Comment")
end
end
}

View File

@ -0,0 +1,13 @@
local status_ok, colorizer = pcall(require, "colorizer")
if not status_ok then
return
end
colorizer.setup {
filetypes = { '*' },
user_default_options = {
names = false,
RRGGBBAA = true,
AARRGGBB = true,
},
}

26
after/plugin/comment.lua Normal file
View File

@ -0,0 +1,26 @@
local status_ok, comment = pcall(require, "Comment")
if not status_ok then
return
end
comment.setup {
toggler = {
line = 'gcc',
block = 'gbc',
},
opleader = {
line = 'gc',
block = 'gb',
},
extra = {
above = 'gcO',
below = 'gco',
eol = 'gcA',
},
mappings = {
basic = true,
extra = true,
},
pre_hook = nil,
post_hook = nil,
}

6
after/plugin/dapui.lua Normal file
View File

@ -0,0 +1,6 @@
local status_ok, dapui = pcall(require, "dapui")
if not status_ok then
return
end
dapui.setup {}

14
after/plugin/fidget.lua Normal file
View File

@ -0,0 +1,14 @@
local status_ok, fidget = pcall(require, "fidget")
if not status_ok then
return
end
fidget.setup {
text = {
spinner = "line",
done = ":)",
},
window = {
zindex = 1,
}
}

28
after/plugin/gitsigns.lua Normal file
View File

@ -0,0 +1,28 @@
local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
return
end
gitsigns.setup {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '-' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
preview_config = {
border = 'shadow',
},
}

6
after/plugin/hlargs.lua Normal file
View File

@ -0,0 +1,6 @@
local status_ok, hlargs = pcall(require, "hlargs")
if not status_ok then
return
end
hlargs.setup {}

View File

@ -0,0 +1,6 @@
local status_ok, iconpicker = pcall(require, "icon-picker")
if not status_ok then
return
end
iconpicker.setup {}

View File

@ -0,0 +1,17 @@
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if not status_ok then
return
end
indent_blankline.setup {
char = "",
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
},
space_char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
},
show_trailing_blankline_indent = false,
}

23
after/plugin/jabs.lua Normal file
View File

@ -0,0 +1,23 @@
local status_ok, jabs = pcall(require, "jabs")
if not status_ok then
return
end
jabs.setup {
offset = { bottom = 2, right = 2 },
symbols = {
current = "@",
split = "|",
alternate = "*",
hidden = "\\",
locked = "=",
ro = "=",
edited = "+",
terminal = ">_",
default_file = "~",
terminal_symbol = ">_",
},
use_devicons = false,
}

105
after/plugin/lsp.lua Normal file
View File

@ -0,0 +1,105 @@
local status_ok, lspconfig = pcall(require, "lspconfig")
if not status_ok then
return
end
local function lsp_keymaps(bufnr)
local map = function(m, lhs, rhs)
local opts = {remap = false, silent = true, buffer = bufnr}
vim.keymap.set(m, lhs, rhs, opts)
end
-- LSP actions
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
map('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>')
map('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
map('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
map('n', '<S-Tab>', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
map('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>')
map('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
-- Diagnostics
map('n', '<Tab>', '<cmd>lua vim.diagnostic.open_float()<cr>')
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
end
local function lsp_settings()
local sign = function(opts)
vim.fn.sign_define(opts.name, {
texthl = opts.name,
text = opts.text,
numhl = ''
})
end
sign({name = 'DiagnosticSignError', text = 'x'})
sign({name = 'DiagnosticSignWarn', text = '!'})
sign({name = 'DiagnosticSignHint', text = 'h'})
sign({name = 'DiagnosticSignInfo', text = 'i'})
vim.diagnostic.config({
virtual_text = false,
signs = true,
update_in_insert = false,
underline = true,
severity_sort = true,
float = {
focusable = false,
show_header = true,
style = 'minimal',
border = 'shadow',
source = 'always',
header = '',
prefix = '* ',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with( vim.lsp.handlers.hover,
{ border = 'shadow', }
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{border = 'shadow'}
)
local command = vim.api.nvim_create_user_command
command('LspWorkspaceAdd', function()
vim.lsp.buf.add_workspace_folder()
end, {desc = 'Add folder to workspace'})
command('LspWorkspaceList', function()
vim.notify(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, {desc = 'List workspace folders'})
command('LspWorkspaceRemove', function()
vim.lsp.buf.remove_workspace_folder()
end, {desc = 'Remove folder from workspace'})
end
local function lsp_attach(client, bufnr)
local buf_command = vim.api.nvim_buf_create_user_command
lsp_keymaps(bufnr)
buf_command(bufnr, 'LspFormat', function()
vim.lsp.buf.format()
end, {desc = 'Format buffer with language server'})
end
lsp_settings()
require('mason').setup({})
require('mason-lspconfig').setup({})
local get_servers = require('mason-lspconfig').get_installed_servers
for _, server_name in ipairs(get_servers()) do
lspconfig[server_name].setup({
on_attach = lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities(),
})
end

View File

@ -0,0 +1,12 @@
local status_ok, lspsignature = pcall(require, "lsp_signature")
if not status_ok then
return
end
lspsignature.setup {
hint_enable = false,
floating_window = true,
handler_opts = {
border = "shadow"
}
}

12
after/plugin/luasnip.lua Normal file
View File

@ -0,0 +1,12 @@
local status_ok, luasnip = pcall(require, "luasnip")
if not status_ok then
return
end
luasnip.config.set_config {
-- return back into snippet
history = true,
-- update on text insert
updateevents = "TextChanged,TextChangedI"
}

9
after/plugin/marks.lua Normal file
View File

@ -0,0 +1,9 @@
local status_ok, marks = pcall(require, "marks")
if not status_ok then
return
end
marks.setup {
default_mappings = true,
builtin_marks = nil,
}

View File

@ -0,0 +1,8 @@
local status_ok, masondap = pcall(require, "mason-nvim-dap")
if not status_ok then
return
end
masondap.setup {
automatic_setup = true,
}

29
after/plugin/mason.lua Normal file
View File

@ -0,0 +1,29 @@
local status_ok, mason = pcall(require, "mason")
if not status_ok then
return
end
mason.setup({
ui = {
border = "shadow",
width = 0.6,
height = 0.9,
icons = {
package_installed = "+",
package_pending = "?",
package_uninstalled = "x"
}
},
keymaps = {
toggle_package_expand = "<CR>",
install_package = "i", -- Keymap to install the package under the current cursor position
update_package = "u", -- Keymap to reinstall/update the package under the current cursor position
check_package_version = "c", -- Keymap to check for new version for the package under the current cursor position
update_all_packages = "U", -- Keymap to update all installed packages
check_outdated_packages = "C", -- Keymap to check which installed packages are outdated
uninstall_package = "r", -- Keymap to uninstall a package
cancel_installation = "<C-c>", -- Keymap to cancel a package installation
apply_language_filter = "<C-f>", -- Keymap to apply language filter
},
})

View File

@ -0,0 +1,18 @@
local status_ok, masontool = pcall(require, "mason-tool-installer")
if not status_ok then
return
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',
'stylua',
'shellcheck',
'editorconfig-checker',
'shfmt',
'clangd',
'clang-format',
},
}

34
after/plugin/neorg.lua Normal file
View File

@ -0,0 +1,34 @@
local status_ok, neorg = pcall(require, "neorg")
if not status_ok then
return
end
neorg.setup {
load = {
["core.defaults"] = {},
["core.dirman"] = {
config = {
workspaces = {
home = "~/Documents/notes/home",
}
}
},
["core.concealer"] = {
config = {
dim_code_blocks = {
padding = { right = 2, },
content_only = false,
width = "content",
},
}
},
["core.export"] = {},
["core.completion"] = {
config = {
engine = "nvim-cmp",
}
},
}
}
-- vim.cmd('Neorg sync-parsers')

16
after/plugin/notify.lua Normal file
View File

@ -0,0 +1,16 @@
local status_ok, notify = pcall(require, "notify")
if not status_ok then
return
end
notify.setup {
icons = {
DEBUG = "B",
ERROR = "x",
INFO = "i",
TRACE = "t",
WARN = "!"
},
minimum_width = 35,
max_width = 80,
}

10
after/plugin/project.lua Normal file
View File

@ -0,0 +1,10 @@
local status_ok, project = pcall(require, "project_nvim")
if not status_ok then
return
end
project.setup {
detection_methods = { "pattern" },
patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" },
show_hidden = false,
}

View File

@ -0,0 +1,22 @@
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 = "*",
}
},
handlers = {
cursor = true,
diagnostic = true,
gitsigns = true, -- Requires gitsigns
handle = true,
},
})

46
after/plugin/sfm.lua Normal file
View File

@ -0,0 +1,46 @@
local status_ok, sfm = pcall(require, "sfm")
if not status_ok then
return
end
sfm.setup {
view = {
side = 'right',
width = 35,
},
mappings = {
custom_only = false,
list = {
-- user mappings go here
}
},
renderer = {
icons = {
file = {
default = "#",
symlink = "#",
},
folder = {
default = "[|",
open = "[/",
symlink = "[|",
symlink_open = "[/",
},
indicator = {
folder_closed = "",
folder_open = "",
file = "",
}
}
}
}:load_extension('sfm-git', {
icons = {
unstaged = "+",
staged = "S",
unmerged = "U",
renamed = "r",
untracked = "?",
deleted = "-",
ignored = "?",
}
})

View File

@ -0,0 +1,28 @@
local status_ok, smartsplits = pcall(require, "smart-splits")
if not status_ok then
return
end
smartsplits.setup {
default_amount = 3,
resize_mode = {
quit_key = '<leader>r',
resize_keys = {
'<C-h>',
'<C-j>',
'<C-k>',
'<C-l>',
},
silent = true,
hooks = {
on_enter = function()
vim.notify("Resize mode on", vim.log.levels.INFO, { title = "Smart Splits" })
vim.cmd('unmap <leader>r')
end,
on_leave = function()
vim.notify("Resize Mode off", vim.log.levels.INFO, { title = "Smart Splits" })
vim.keymap.set('n', '<leader>r', smartsplits.start_resize_mode, {})
end,
},
},
}

View File

@ -0,0 +1,71 @@
local status_ok, alpha = pcall(require, "alpha")
if not status_ok then
return
end
-- buttons
local function button(sc, txt, keybind)
local opts = {
position = "center",
shortcut = sc,
cursor = 5,
width = 80,
align_shortcut = "right",
hl_shortcut = "Keyword",
}
local function on_press()
local key = vim.api.nvim_replace_termcodes(keybind .. "<Ignore>", true, false, true)
vim.api.nvim_feedkeys(key, "t", false)
end
return {
type = "button",
val = txt,
on_press = on_press,
opts = opts,
}
end
-- actual config
local R = {}
R.width = vim.api.nvim_win_get_width(0)
R.height = vim.api.nvim_win_get_height(0)
if R.width >= 120 then
alpha.setup {
layout = {
{ type = "padding", val = math.floor(R.height / 2.5) },
button([[ `'::. `'::::. ]], "Recent Files", "<cmd>Telescope oldfiles<CR>"),
button([[ _________H ,%%&%, _____A_ ]], "New File", "<cmd>ene<CR>"),
button([[ /\ _ \%&&%%&% / /\ ]], "Update Plugins", "<cmd>DepSync<CR>"),
button([[ / \___/^\___\%&%%&& __/__/\__/ \___ ]], "", ""),
button([[ | | [] [] |%\Y&%' /__|" '' "| /___/\ ]], "", ""),
button([[ | | .-. | || |''|"'||'"| |' '|| ]], "", ""),
button([[~~@._|@@_|||_@@|~||~~~ ~`""`""))""`"`""""`~~]], "", ""),
button([[ `""") )"""` // ]], "", ""),
}
}
end
if R.width <= 119 then
local header = {
[[ `'::. `'::::. ]],
[[ _________H ,%%&%, _____A_ ]],
[[ /\ _ \%&&%%&% / /\ ]],
[[ / \___/^\___\%&%%&& __/__/\__/ \___ ]],
[[ | | [] [] |%\Y&%' /__|" '' "| /___/\ ]],
[[ | | .-. | || |''|"'||'"| |' '|| ]],
[[~~@._|@@_|||_@@|~||~~~ ~`""`""))""`"`""""`~~]],
[[ `""") )"""` // ]],
}
alpha.setup {
layout = {
{ type = "padding", val = math.floor(R.height / 2.5) },
{ type = "text", val = header, opts = { position = "center", hl = "AlphaHeader" } },
{ type = "padding", val = 1 },
button([[]], "Recent Files", "<cmd>Telescope oldfiles<CR>"),
button([[]], "New File", "<cmd>ene<CR>"),
button([[]], "Update Plugins", "<cmd>DepSync<CR>"),
}
}
end

136
after/plugin/statusline.lua Normal file
View File

@ -0,0 +1,136 @@
local status_ok, el = pcall(require, "el")
if not status_ok then
return
end
el.reset_windows()
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,
}),
-- 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" },
niI = { "Normal", "N" },
niR = { "Normal", "N" },
niV = { "Normal", "N" },
no = { "N·OpPd", "?" },
v = { "Visual", "V" },
V = { "V·Line", "Vl" },
[""] = { "V·Block", "Vb" },
s = { "Select", "S" },
S = { "S·Line", "Sl" },
[""] = { "S·Block", "Sb" },
i = { "Insert", "I" },
ic = { "ICompl", "Ic" },
R = { "Replace", "R" },
Rv = { "VReplace", "Rv" },
c = { "Command", "C" },
cv = { "Vim Ex", "E" },
ce = { "Ex (r)", "E" },
r = { "Prompt", "P" },
rm = { "More ", "M" },
["r?"] = { "Confirm", "Cn" },
["!"] = { "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 } },
{ 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.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 = "" } },
{ 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,
}
},
}
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,
}

9
after/plugin/tabline.lua Normal file
View File

@ -0,0 +1,9 @@
local status_ok, luatab = pcall(require, "luatab")
if not status_ok then
return
end
luatab.setup {
windowCount = function() return '' end,
devicon = function() return '' end,
}

View File

@ -0,0 +1,49 @@
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
local actions = require('telescope.actions')
telescope.setup {
defaults = {
borderchars = {
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
},
sorting_strategy = 'ascending',
layout_strategy = 'bottom_pane',
layout_config = {
height = 0.3,
},
mappings = {
i = {
['<C-h>'] = 'which_key',
['<C-j>'] = actions.move_selection_next,
['<C-k>'] = actions.move_selection_previous,
['<C-l>'] = actions.select_default,
['<C-u>'] = actions.preview_scrolling_up,
['<C-d>'] = actions.preview_scrolling_down,
},
n = {
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,
},
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_ivy {
-- even more opts
}
}
},
}
}
telescope.load_extension('file_browser')
telescope.load_extension('ui-select')
telescope.load_extension('projects')
a.nvim_create_autocmd('User', {
pattern = 'TelescopePreviewerLoaded',
command = 'setlocal number',
})

View File

@ -0,0 +1,33 @@
local status_ok, toggleterm = pcall(require, "toggleterm")
if not status_ok then
return
end
toggleterm.setup {
shade_terminals = true,
float_opts = {
border = 'shadow',
},
on_open = function()
vim.opt.cmdheight = 0
end,
on_close = function()
vim.opt.cmdheight = 1
end
}
local term = require('toggleterm.terminal').Terminal
local glow = term:new({
cmd = "glow",
hidden = true,
direction = "float",
float_opts = {
border = "shadow",
width = 120,
height = 50,
}
})
function _glow()
glow:toggle()
end

16
after/plugin/trouble.lua Normal file
View File

@ -0,0 +1,16 @@
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]"
},
}

27
after/plugin/ts.lua Normal file
View File

@ -0,0 +1,27 @@
local status_ok, treesitter = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
treesitter.setup {
ensure_installed = {
"c",
"lua",
"bash",
"vim",
"vimdoc",
"query",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"git_config",
},
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}

10
after/plugin/tsc.lua Normal file
View File

@ -0,0 +1,10 @@
local status_ok, tc = pcall(require, "treesitter-context")
if not status_ok then
return
end
tc.setup{
enable = true,
line_numbers = true,
separator = '-',
}

9
after/plugin/tsj.lua Normal file
View File

@ -0,0 +1,9 @@
local status_ok, treesj = pcall(require, "treesj")
if not status_ok then
return
end
treesj.setup {
use_default_keymaps = false,
max_join_length = 120,
}

8
after/plugin/urlview.lua Normal file
View File

@ -0,0 +1,8 @@
local status_ok, urlview = pcall(require, "urlview")
if not status_ok then
return
end
urlview.setup {
default_picker = 'telescope',
}

20
after/plugin/whichkey.lua Normal file
View File

@ -0,0 +1,20 @@
local status_ok, whichkey = pcall(require, "which-key")
if not status_ok then
return
end
whichkey.setup {
icons = {
breadcrumb = '>>',
separator = '->',
},
winblend = 0,
window = {
border = 'shadow',
margin = { 1, 5, 2, 5 },
},
layout = {
width = { min = 20, max = 50 },
align = 'left',
}
}