nvim: split plugins into multiple files

master
tiyn 12 months ago
parent 1a80dedbb6
commit 0c9a6f387b

@ -23,6 +23,7 @@ vim.o.splitright = true
-- disable case sensitive matching
vim.o.ignorecase = true
vim.o.smartcase = true
-- enable nocompatible mode
vim.o.nocompatible = true
@ -44,16 +45,31 @@ vim.o.relativenumber = true
vim.o.ttyfast = true
vim.o.lazyredraw = true
-- textEdit might fail without hidden
-- decrease update time
vim.o.updatetime = 250
vim.o.timeout = true
vim.o.timeoutlen = 300
-- enable break indent
vim.o.breakindent = true
-- textedit might fail without hidden
vim.o.hidden = true
-- disable backupfiles
vim.o.nobackup = true
vim.o.nowritebackup = true
-- Set completeopt to have a better completion experience
-- set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- set completion option for command mode
vim.o.wildmode = 'longest:full,full'
-- minimum number of lines around the cursor
vim.o.scrolloff = 10
vim.o.sidescrolloff = 8
-- always show the signcolumn
vim.o.signcolumn = "yes"
@ -69,6 +85,7 @@ vim.g.python3_host_prog = '/usr/bin/python3'
vim.o.foldcolumn = '0'
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldexpr = 'expr'
vim.o.foldenable = true
vim.o.conceallevel = 0
vim.g.markdown_folding = 1
@ -90,10 +107,14 @@ vim.filetype.add({
md = 'markdown',
nim = 'nim',
py = 'python',
sage = 'python',
tex = 'tex',
}
})
-- set mapleader for hotkeys
vim.g.mapleader = ","
-- load general mapped keys
require('style')

@ -1,16 +1,15 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" },
"fterm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
"fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" },
"git-blame.nvim": { "branch": "master", "commit": "41e22dc843c6821a410db57be0b7025154f9d8ec" },
"gitsigns.nvim": { "branch": "main", "commit": "749267aaa863c30d721c9913699c5d94e0c07dd3" },
"headlines.nvim": { "branch": "master", "commit": "74a083a3c32a08be24f7dfcc6f448ecf47857f46" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"knap": { "branch": "main", "commit": "503010f541696e99ed5c62f658620e546cebf8b0" },
"lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" },

@ -1,7 +1,5 @@
-- set mapleader for hotkeys
vim.g.mapleader = ","
-- unmap unwanted commands
vim.keymap.set({ 'n', 'v' }, '<Space>', '<NOP>', { silent = true })
vim.keymap.set({ 'n', 'i' }, '<F1>', '<NOP>', { noremap = true })
vim.keymap.set('i', '<F2>', '<NOP>', { noremap = true })
vim.keymap.set('i', '<F3>', '<NOP>', { noremap = true })
@ -27,11 +25,19 @@ vim.keymap.set('n', '<leader>c', ':w! | !compiler <c-r>%<CR>', { noremap = true
-- save file as sudo on files that require root permission
vim.keymap.set('c', 'w!!', 'execute "silent! write !sudo tee % >/dev/null" <bar> edit!', { noremap = true })
-- alias for replacing
vim.keymap.set('n', '<leader>ss', ':%s//gI<Left><Left><Left>', { noremap = true })
-- irc compatibility for interactivity
vim.keymap.set('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true })
-- easy substitution for whole file and line, visual mode
vim.keymap.set('n', '<leader>ss', ':%s/\\<<C-r><C-w>\\>//g<Left><Left>', { noremap = true })
vim.keymap.set({ 'n', 'v' }, '<leader>sl', ':s//g<Left><Left>', { noremap = true })
vim.keymap.set('n', '<leader>sa', ':%s//g<Left><Left>', { noremap = true })
-- highlighting yanked regions
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
})
-- SmiteshP/nvim-navbuddy
vim.keymap.set('n', '<F3>', ':Navbuddy<CR>', {})
@ -41,7 +47,6 @@ vim.keymap.set('n', '<F2>', ':NvimTreeToggle toggle<CR>', {})
-- numtostr/fterm.nvim
vim.keymap.set({ 'n', 't' }, '<leader>t', require("FTerm").toggle, { noremap = true })
local lazygit = require("FTerm"):new({
cmd = 'lazygit',
})

@ -13,658 +13,8 @@ end
vim.opt.rtp:prepend(lazypath)
return require("lazy").setup({
-- colorscheme
{
'tiyn/tccs.nvim',
lazy = false,
priority = 1000,
config = function()
require('tccs').setup({
require('tccs').load()
})
end
},
-- display git status per line
{
'lewis6991/gitsigns.nvim',
opts = {}
},
-- show indentation lines
{
'lukas-reineke/indent-blankline.nvim',
event = "BufReadPre",
opts = {
show_current_context = true,
show_current_context_start = true
}
},
-- statusline
{
'nvim-lualine/lualine.nvim',
dependencies = {
{
'nvim-tree/nvim-web-devicons',
lazy = true
},
{
'f-person/git-blame.nvim',
config = function()
vim.g.gitblame_display_virtual_text = 0
end
},
{ 'tiyn/tccs.nvim' },
},
config = function()
require('lualine').setup({
options = {
globalstatus = true,
symbols = {
error = Error_sign,
warn = Warn_sign,
hint = Hint_sign,
info = Info_sign
},
theme = 'tccs',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
},
sections = {
lualine_b = {
{
require('gitblame').get_current_blame_text,
cond = require('gitblame').is_blame_text_available
}
},
lualine_c = {},
lualine_x = {
'encoding',
'fileformat',
{
'filetype',
icon_only = true
}
},
lualine_y = {
{
'filename',
file_status = true,
newfile_status = true,
path = 1,
shorting_target = 50,
symbols = {
modified = Lualine_signs["modified"],
readonly = Lualine_signs["readonly"],
unnamed = Lualine_signs["unnamed"],
newfile = Lualine_signs["newfile"],
}
}
},
lualine_z = { 'progress', 'location' },
}
})
end
},
-- show function signature while typing
{
'ray-x/lsp_signature.nvim',
opts = {
bind = true,
handler_opts = {
border = "none"
},
hint_prefix = Hint_sign,
hint_scheme = "DiagnosticSignHint"
}
},
-- preview for markdown filetypes
{
"iamcco/markdown-preview.nvim",
ft = { 'markdown' },
build = "cd app && yarn install",
config = function()
vim.cmd([[
function OpenMarkdownPreview (url)
execute "silent ! firefox --kiosk --new-window " . a:url
endfunction
]])
vim.g.mkdp_browserfunc = "OpenMarkdownPreview"
end
},
-- automatic closing of brackets
{
'windwp/nvim-autopairs',
opts = {}
},
-- lang server installations
{
'williamboman/mason.nvim',
dependencies = {
{
'jose-elias-alvarez/null-ls.nvim',
config = function()
require("null-ls").setup({
sources = {
require("null-ls").builtins.formatting.black,
require("null-ls").builtins.formatting.mdformat
}
})
end
},
{
'jay-babu/mason-null-ls.nvim',
opts = {
automatic_installation = true,
ensure_installed = { "black", "mdformat" }
}
},
},
opts = {
ui = {
icons = Install_signs
}
}
},
-- lang server management
{
'williamboman/mason-lspconfig.nvim',
dependencies = {
'neovim/nvim-lspconfig',
{
'hrsh7th/cmp-nvim-lsp',
config = function()
Capabilities = require("cmp_nvim_lsp").default_capabilities()
Capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
end
},
-- navigation menu
{
'SmiteshP/nvim-navbuddy',
config = function()
local navbuddy = require("nvim-navbuddy")
Attach_func = function(client, bufnr)
navbuddy.attach(client, bufnr)
end
end,
dependencies = {
'SmiteshP/nvim-navic',
'MunifTanjim/nui.nvim'
}
},
},
config = function()
require("mason-lspconfig").setup({
automatic_setup = true,
ensure_installed = {
"bashls",
"lua_ls",
"marksman",
"nimls",
"pylsp",
"texlab"
}
})
local servers = {
lua_ls = {
Lua = {
diagnostics = {
globals = { 'vim' }
},
telemetry = { enable = false },
},
}
}
local default = { __index = function() return {} end }
setmetatable(servers, default)
require("mason-lspconfig").setup_handlers({
function(server_name)
require('lspconfig')[server_name].setup({
on_attach = Attach_func,
capabilities = Capabilities,
flags = {
debounce_text_changes = 150
},
settings = servers[server_name]
})
end
})
end
},
-- autocompletion and its sources and snippets
{
'hrsh7th/nvim-cmp',
dependencies = {
'nvim-lua/plenary.nvim',
'onsails/lspkind-nvim',
-- cmp sources
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'lukas-reineke/cmp-under-comparator',
-- luasnip
{
'l3mon4d3/luasnip',
config = function()
require("luasnip.loaders.from_snipmate")
end,
dependencies = { 'saadparwaiz1/cmp_luasnip' }
},
},
config = function()
local cmp = require("cmp")
cmp.setup {
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
},
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end
},
mapping = {
['<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" }),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true
}
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'buffer' },
{ name = 'luasnip' }
},
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
preset = "codicons",
maxwidth = 50,
menu = Menu_signs,
symbol_map = Lsp_signs
})
}
}
end
},
-- showing color of hex values, etc
{
'nvchad/nvim-colorizer.lua',
opts = {
filetypes = {
'*',
'!markdown'
},
user_default_options = {
RGB = true,
RRGGBB = true,
RRGGBBAA = true,
AARRGGBB = true,
rgb_fn = true,
hsl_fn = true,
css_fn = true,
mode = "virtualtext",
virtualtext = "",
},
-- all the sub-options of filetypes apply to buftypes
buftypes = {
"*",
"!prompt",
"!popup"
},
}
},
-- fileexplorer on the side
{
"nvim-tree/nvim-tree.lua",
cmd = "NvimTreeToggle",
dependencies = {
{
"nvim-tree/nvim-web-devicons",
lazy = true
},
},
opts = {
sort_by = "case_sensitive",
view = {
width = 30,
},
filters = {
dotfiles = true,
},
renderer = {
group_empty = true,
icons = {
glyphs = {
git = Git_signs
},
},
}
}
},
-- better language highlighting by improved parsing
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
dependencies = {
-- automatically close html-tags
'windwp/nvim-ts-autotag',
-- color brackets
'p00f/nvim-ts-rainbow',
},
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"css",
"html",
"markdown",
"markdown_inline",
"latex",
"python",
"lua",
},
highlight = { enable = true },
autotag = { enable = true },
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
-- colors = {},
-- termcolors = {}
}
})
end
},
-- folding improvements
{
'kevinhwang91/nvim-ufo',
dependencies = { 'kevinhwang91/promise-async' },
config = function()
require('ufo').setup()
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { '*' },
callback = function() require("ufo").closeAllFolds() end
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { '*' },
callback = function() require("ufo").openAllFolds() end
})
end
},
-- fuzzy finder
{
'nvim-telescope/telescope.nvim',
version = '0.1.2',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {}
},
-- clean up white spaces and empty lines before writing
{
"mcauley-penney/tidy.nvim",
opts = {
filetype_exclude = {}
}
},
-- todo symbols and highlighting
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
keywords = {
ERRO = { icon = Error_sign, color = "error" },
WARN = { icon = Warn_sign, color = "warning" },
HACK = { icon = Hack_sign, color = "warning" },
HINT = { icon = Hint_sign, color = "hint" },
TODO = { icon = Todo_sign, color = "info" },
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
PERF = { icon = Perfect_sign, color = "default" },
TEST = { icon = Test_sign, color = "test" }
},
colors = {
default = { "Operator" }
}
}
},
-- additional quote/parantheses funtions
{
'kylechui/nvim-surround',
version = "*",
event = "VeryLazy",
opts = {}
},
-- commenting improvements
{
'numToStr/Comment.nvim',
opts = {}
},
-- latex asynchronous pdf rendering
{
'frabjous/knap',
ft = { 'tex' },
config = function()
vim.g.knap_settings = {
texoutputext = "pdf",
textopdf = "pdflatex -synctex=1 -halt-on-error -interaction=batchmode %docroot%",
textopdfviewerlaunch =
"zathura --synctex-editor-command 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%{input}'\"'\"',%{line},0)\"' %outputfile%",
textopdfviewerrefresh = "none",
textopdfforwardjump = "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%"
}
end
},
-- improved wild menu
{
'gelguy/wilder.nvim',
dependencies = {
{
"nvim-tree/nvim-web-devicons",
lazy = true
},
'roxma/nvim-yarp',
'roxma/vim-hug-neovim-rpc',
'romgrk/fzy-lua-native'
},
config = function()
local wilder = require('wilder')
wilder.setup({
modes = { ':', '/', '?' },
accept_key = '<CR>',
reject_key = '<C-e>'
})
wilder.set_option('renderer', wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
}))
wilder.set_option('pipeline', {
wilder.branch(
wilder.python_file_finder_pipeline({
file_command = { 'find', '.', '-type', 'f', '-printf', '%P\n' },
dir_command = { 'find', '.', '-type', 'd', '-printf', '%P\n' },
filters = { 'fuzzy_filter', 'difflib_sorter' },
}),
wilder.cmdline_pipeline({
language = 'python',
fuzzy = 2,
}),
wilder.python_search_pipeline({
pattern = wilder.python_fuzzy_pattern(),
sorter = wilder.python_difflib_sorter(),
engine = 're',
})
),
})
end,
},
-- scrollbar with git and diagnostics support for easier navigation
{
'petertriho/nvim-scrollbar',
dependencies = {
'kevinhwang91/nvim-hlslens',
'lewis6991/gitsigns.nvim'
},
config = function()
require("scrollbar").setup({
marks = {
Cursor = {
highlight = "Normal"
},
Search = {
highlight = "Special"
},
Error = {
highlight = "DiagnosticSignError"
},
Warn = {
highlight = "DiagnosticSignWarn"
},
Info = {
highlight = "DiagnosticSignInfo"
},
Hint = {
highlight = "DiagnosticSignHint"
},
Misc = {
highlight = "Special"
},
GitAdd = {
highlight = "GitGutterAdd"
},
GitChange = {
highlight = "GitGutterChange"
},
GitDelete = {
highlight = "GitGutterDelete"
}
},
excluded_filetypes = {
"cmp_docs",
"cmp_menu",
"noice",
"prompt",
"TelescopePrompt",
"NvimTree",
"Navbuddy",
"FTerm",
"",
},
})
require("scrollbar.handlers.search").setup()
require("scrollbar.handlers.gitsigns").setup()
end
},
-- floating terminal to toggle
{
'numToStr/FTerm.nvim',
opts = {}
},
-- side by side git diffs for merge conflicts
{
'sindrets/diffview.nvim',
opts = {}
},
-- list of errors
{
'folke/trouble.nvim',
dependencies = {
{
'nvim-tree/nvim-web-devicons',
lazy = true
}
},
opts = {}
},
-- improve spelling check for coding to feature camelcase, etc
{
'kamykn/spelunker.vim',
dependencies = { 'kamykn/popup-menu.nvim' },
config = function()
vim.o.nospell = true
vim.g.enable_spelunker_vim = 0
vim.g.spelunker_disable_acronym_checking = 1
end
},
-- improved gui for renaming
{
'filipdutescu/renamer.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {}
},
-- rename files in buffer
{
'qpkorr/vim-renamer',
priority = 100,
config = function()
require('renamer')
end
},
-- markdown improvements
{
'preservim/vim-markdown',
ft = { 'markdown' },
dependencies = { 'godlygeek/tabular' },
config = function()
end
},
-- import plugins from the plugins directory
{ import = 'plugins' },
},
-- lazy.nvim configuration
{

@ -0,0 +1,7 @@
return {
-- commenting improvements
{
'numtostr/comment.nvim',
opts = {}
}
}

@ -0,0 +1,7 @@
return {
-- side by side git diffs for merge conflicts
{
'sindrets/diffview.nvim',
opts = {}
}
}

@ -0,0 +1,7 @@
return {
-- floating terminal to toggle
{
'numtostr/fterm.nvim',
opts = {}
}
}

@ -0,0 +1,7 @@
return {
-- display git status per line
{
'lewis6991/gitsigns.nvim',
opts = {}
}
}

@ -0,0 +1,11 @@
return {
-- show indentation lines
{
'lukas-reineke/indent-blankline.nvim',
event = "BufReadPre",
opts = {
show_current_context = true,
show_current_context_start = true
}
}
}

@ -0,0 +1,17 @@
return {
-- latex asynchronous pdf rendering
{
'frabjous/knap',
ft = { 'tex' },
config = function()
vim.g.knap_settings = {
texoutputext = "pdf",
textopdf = "pdflatex -synctex=1 -halt-on-error -interaction=batchmode %docroot%",
textopdfviewerlaunch =
"zathura --synctex-editor-command 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%{input}'\"'\"',%{line},0)\"' %outputfile%",
textopdfviewerrefresh = "none",
textopdfforwardjump = "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%"
}
end
}
}

@ -0,0 +1,14 @@
return {
-- show function signature while typing
{
'ray-x/lsp_signature.nvim',
opts = {
bind = true,
handler_opts = {
border = "none"
},
hint_prefix = Hint_sign,
hint_scheme = "DiagnosticSignHint"
}
}
}

@ -0,0 +1,68 @@
return {
-- statusline
{
'nvim-lualine/lualine.nvim',
dependencies = {
{
'nvim-tree/nvim-web-devicons',
lazy = true
},
{
'f-person/git-blame.nvim',
config = function()
vim.g.gitblame_display_virtual_text = 0
end
},
{ 'tiyn/tccs.nvim' },
},
config = function()
require('lualine').setup({
options = {
globalstatus = true,
symbols = {
error = Error_sign,
warn = Warn_sign,
hint = Hint_sign,
info = Info_sign
},
theme = 'tccs',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
},
sections = {
lualine_b = {
{
require('gitblame').get_current_blame_text,
cond = require('gitblame').is_blame_text_available
}
},
lualine_c = {},
lualine_x = {
'encoding',
'fileformat',
{
'filetype',
icon_only = true
}
},
lualine_y = {
{
'filename',
file_status = true,
newfile_status = true,
path = 1,
shorting_target = 50,
symbols = {
modified = Lualine_signs["modified"],
readonly = Lualine_signs["readonly"],
unnamed = Lualine_signs["unnamed"],
newfile = Lualine_signs["newfile"],
}
}
},
lualine_z = { 'progress', 'location' },
}
})
end
}
}

@ -0,0 +1,16 @@
return {
-- preview for markdown filetypes
{
"iamcco/markdown-preview.nvim",
ft = { 'markdown' },
build = "cd app && yarn install",
config = function()
vim.cmd([[
function OpenMarkdownPreview (url)
execute "silent ! firefox --kiosk --new-window " . a:url
endfunction
]])
vim.g.mkdp_browserfunc = "OpenMarkdownPreview"
end
}
}

@ -0,0 +1,32 @@
return {
-- lang server installations
{
'williamboman/mason.nvim',
dependencies = {
{
'jose-elias-alvarez/null-ls.nvim',
config = function()
require("null-ls").setup({
sources = {
require("null-ls").builtins.formatting.black,
require("null-ls").builtins.formatting.mdformat
}
})
end
},
{
'jay-babu/mason-null-ls.nvim',
opts = {
automatic_installation = true,
ensure_installed = { "black", "mdformat" }
}
},
},
opts = {
ui = {
icons = Install_signs
}
}
}
}

@ -0,0 +1,7 @@
return {
-- automatic closing of brackets
{
'windwp/nvim-autopairs',
opts = {}
}
}

@ -0,0 +1,84 @@
return {
-- autocompletion and its sources and snippets
{
'hrsh7th/nvim-cmp',
dependencies = {
'nvim-lua/plenary.nvim',
'onsails/lspkind-nvim',
-- cmp sources
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'lukas-reineke/cmp-under-comparator',
-- luasnip
{
'l3mon4d3/luasnip',
config = function()
require("luasnip.loaders.from_snipmate")
end,
dependencies = { 'saadparwaiz1/cmp_luasnip' }
},
},
config = function()
local cmp = require("cmp")
cmp.setup {
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
},
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end
},
mapping = {
['<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" }),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true
}
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' },
{ name = 'buffer' },
{ name = 'luasnip' }
},
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
preset = "codicons",
maxwidth = 50,
menu = Menu_signs,
symbol_map = Lsp_signs
})
}
}
end
}
}

@ -0,0 +1,29 @@
return {
-- showing color of hex values, etc
{
'nvchad/nvim-colorizer.lua',
opts = {
filetypes = {
'*',
'!markdown'
},
user_default_options = {
RGB = true,
RRGGBB = true,
RRGGBBAA = true,
AARRGGBB = true,
rgb_fn = true,
hsl_fn = true,
css_fn = true,
mode = "virtualtext",
virtualtext = "",
},
-- all the sub-options of filetypes apply to buftypes
buftypes = {
"*",
"!prompt",
"!popup"
},
}
}
}

@ -0,0 +1,71 @@
return {
-- lang server management
{
'neovim/nvim-lspconfig',
dependencies = {
'williamboman/mason-lspconfig.nvim',
{
'hrsh7th/cmp-nvim-lsp',
config = function()
Capabilities = require("cmp_nvim_lsp").default_capabilities()
Capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
end
},
-- navigation menu
{
'SmiteshP/nvim-navbuddy',
config = function()
local navbuddy = require("nvim-navbuddy")
Attach_func = function(client, bufnr)
navbuddy.attach(client, bufnr)
end
end,
dependencies = {
'neovim/nvim-lspconfig',
'SmiteshP/nvim-navic',
'MunifTanjim/nui.nvim'
}
},
},
config = function()
require("mason-lspconfig").setup({
automatic_setup = true,
ensure_installed = {
"bashls",
"lua_ls",
"marksman",
"nimls",
"pylsp",
"texlab"
}
})
local servers = {
lua_ls = {
Lua = {
diagnostics = {
globals = { 'vim' }
},
telemetry = { enable = false },
},
}
}
local default = { __index = function() return {} end }
setmetatable(servers, default)
require("mason-lspconfig").setup_handlers({
function(server_name)
require('lspconfig')[server_name].setup({
on_attach = Attach_func,
capabilities = Capabilities,
flags = {
debounce_text_changes = 150
},
settings = servers[server_name]
})
end
})
end
}
}

@ -0,0 +1,59 @@
return {
-- scrollbar with git and diagnostics support for easier navigation
{
'petertriho/nvim-scrollbar',
dependencies = {
'kevinhwang91/nvim-hlslens',
'lewis6991/gitsigns.nvim'
},
config = function()
require("scrollbar").setup({
marks = {
Cursor = {
highlight = "Normal"
},
Search = {
highlight = "Special"
},
Error = {
highlight = "DiagnosticSignError"
},
Warn = {
highlight = "DiagnosticSignWarn"
},
Info = {
highlight = "DiagnosticSignInfo"
},
Hint = {
highlight = "DiagnosticSignHint"
},
Misc = {
highlight = "Special"
},
GitAdd = {
highlight = "GitGutterAdd"
},
GitChange = {
highlight = "GitGutterChange"
},
GitDelete = {
highlight = "GitGutterDelete"
}
},
excluded_filetypes = {
"cmp_docs",
"cmp_menu",
"noice",
"prompt",
"TelescopePrompt",
"NvimTree",
"Navbuddy",
"FTerm",
"",
},
})
require("scrollbar.handlers.search").setup()
require("scrollbar.handlers.gitsigns").setup()
end
}
}

@ -0,0 +1,9 @@
return {
-- additional quote/parantheses funtions
{
'kylechui/nvim-surround',
version = "*",
event = "VeryLazy",
opts = {}
}
}

@ -0,0 +1,30 @@
return {
-- fileexplorer on the side
{
"nvim-tree/nvim-tree.lua",
cmd = "NvimTreeToggle",
dependencies = {
{
"nvim-tree/nvim-web-devicons",
lazy = true
},
},
opts = {
sort_by = "case_sensitive",
view = {
width = 30,
},
filters = {
dotfiles = true,
},
renderer = {
group_empty = true,
icons = {
glyphs = {
git = Git_signs
},
},
}
}
}
}

@ -0,0 +1,36 @@
return {
-- better language highlighting by improved parsing
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
dependencies = {
-- automatically close html-tags
'windwp/nvim-ts-autotag',
-- color brackets
'p00f/nvim-ts-rainbow',
},
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"css",
"html",
"markdown",
"markdown_inline",
"latex",
"python",
"lua",
},
highlight = { enable = true },
autotag = { enable = true },
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
-- colors = {},
-- termcolors = {}
}
})
end
}
}

@ -0,0 +1,20 @@
return {
-- folding improvements
{
'kevinhwang91/nvim-ufo',
dependencies = { 'kevinhwang91/promise-async' },
config = function()
require('ufo').setup()
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { '*' },
callback = function() require("ufo").closeAllFolds() end
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { '*' },
callback = function() require("ufo").openAllFolds() end
})
end
}
}

@ -0,0 +1,8 @@
return {
-- improved gui for renaming
{
'filipdutescu/renamer.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {}
}
}

@ -0,0 +1,12 @@
return {
-- improve spelling check for coding to feature camelcase, etc
{
'kamykn/spelunker.vim',
dependencies = { 'kamykn/popup-menu.nvim' },
config = function()
vim.o.nospell = true
vim.g.enable_spelunker_vim = 0
vim.g.spelunker_disable_acronym_checking = 1
end
}
}

@ -0,0 +1,13 @@
return {
-- colorscheme
{
'tiyn/tccs.nvim',
lazy = false,
priority = 1000,
config = function()
require('tccs').setup({
require('tccs').load()
})
end
}
}

@ -0,0 +1,9 @@
return {
-- fuzzy finder
{
'nvim-telescope/telescope.nvim',
version = '0.1.2',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {}
}
}

@ -0,0 +1,9 @@
return {
-- clean up white spaces and empty lines before writing
{
"mcauley-penney/tidy.nvim",
opts = {
filetype_exclude = {}
}
}
}

@ -0,0 +1,22 @@
return {
-- todo symbols and highlighting
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
keywords = {
ERRO = { icon = Error_sign, color = "error" },
WARN = { icon = Warn_sign, color = "warning" },
HACK = { icon = Hack_sign, color = "warning" },
HINT = { icon = Hint_sign, color = "hint" },
TODO = { icon = Todo_sign, color = "info" },
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
PERF = { icon = Perfect_sign, color = "default" },
TEST = { icon = Test_sign, color = "test" }
},
colors = {
default = { "Operator" }
}
}
}
}

@ -0,0 +1,13 @@
return {
-- list of errors
{
'folke/trouble.nvim',
dependencies = {
{
'nvim-tree/nvim-web-devicons',
lazy = true
}
},
opts = {}
}
}

@ -0,0 +1,10 @@
return {
-- markdown improvements
{
'preservim/vim-markdown',
ft = { 'markdown' },
dependencies = { 'godlygeek/tabular' },
config = function()
end
}
}

@ -0,0 +1,10 @@
return {
-- rename files in buffer
{
'qpkorr/vim-renamer',
priority = 100,
config = function()
require('renamer')
end
}
}

@ -0,0 +1,46 @@
return {
-- improved wild menu
{
'gelguy/wilder.nvim',
dependencies = {
{
"nvim-tree/nvim-web-devicons",
lazy = true
},
'roxma/nvim-yarp',
'roxma/vim-hug-neovim-rpc',
'romgrk/fzy-lua-native'
},
config = function()
local wilder = require('wilder')
wilder.setup({
modes = { ':', '/', '?' },
accept_key = '<CR>',
reject_key = '<C-e>'
})
wilder.set_option('renderer', wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
}))
wilder.set_option('pipeline', {
wilder.branch(
wilder.python_file_finder_pipeline({
file_command = { 'find', '.', '-type', 'f', '-printf', '%P\n' },
dir_command = { 'find', '.', '-type', 'd', '-printf', '%P\n' },
filters = { 'fuzzy_filter', 'difflib_sorter' },
}),
wilder.cmdline_pipeline({
language = 'python',
fuzzy = 2,
}),
wilder.python_search_pipeline({
pattern = wilder.python_fuzzy_pattern(),
sorter = wilder.python_difflib_sorter(),
engine = 're',
})
),
})
end,
}
}
Loading…
Cancel
Save