1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-03-19 14:44:46 +01:00

updated neovim to use modern lazy

This commit is contained in:
2026-03-16 02:32:33 +01:00
parent 768a4b0aec
commit 435b829937
63 changed files with 2185 additions and 163 deletions

View File

@@ -0,0 +1,15 @@
return {
-- vs code like topbar
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
opts = {
theme = {
normal = { bg = "#272727" },
},
},
}

View File

@@ -0,0 +1,33 @@
return {
-- rainbow auto-pairs
"saghen/blink.pairs",
version = "*", -- (recommended) only required with prebuilt binaries
-- download prebuilt binaries from github releases
dependencies = "saghen/blink.download",
--- @module 'blink.pairs'
--- @type blink.pairs.Config
opts = {
mappings = {
enabled = true,
pairs = {
["("] = ")",
["["] = "]",
["{"] = "}",
["'"] = "'",
['"'] = '"',
["`"] = "`",
},
},
highlights = {
enabled = true,
groups = {
"BlinkPairsOrange",
"BlinkPairsPurple",
"BlinkPairsBlue",
},
priority = 200,
ns = vim.api.nvim_create_namespace("blink.pairs"),
},
debug = false,
},
}

View File

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

View File

@@ -0,0 +1,18 @@
return {
-- improved refactoring
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
markdown = { "mdformat" },
python = { "isort", "yapf" },
sh = { "shfmt" },
bash = { "shfmt" },
zsh = { "shfmt" },
tex = { "latexindent" },
yaml = { "yamlfmt" },
},
})
end,
}

View File

@@ -0,0 +1,16 @@
return {
-- improved csv handling
"hat0uma/csvview.nvim",
opts = {
parser = { comments = { "#", "//" } },
keymaps = {
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
},
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
return {
-- preview definitions using floating windows
"rmagatti/goto-preview",
dependencies = "rmagatti/logger.nvim",
config = function()
require("goto-preview").setup({})
end,
}

View File

@@ -0,0 +1,7 @@
return {
-- show indentation lines
"lukas-reineke/indent-blankline.nvim",
event = "BufReadPre",
main = "ibl",
opts = {},
}

View File

@@ -0,0 +1,13 @@
return {
-- improved movement
url = "https://codeberg.org/andyg/leap.nvim",
config = function()
require("leap").opts.highlight_unlabeled_phase_one_targets = true
require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" }
require("leap").opts.special_keys.prev_target = "<backspace>"
require("leap").opts.special_keys.prev_group = "<backspace>"
require("leap.user").set_repeat_keys("<enter>", "<backspace>")
require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?"
require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?"
end,
}

View File

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

View File

@@ -0,0 +1,80 @@
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" },
{
"tiyn/action-hints.nvim",
config = function()
require("action-hints").setup({
template = {
-- definition = { text = "D", color = "#add8e6" },
-- references = { text = "R%s", color = "#ff6666" },
definition = { text = Definition_sign, color = "#add8e6" },
references = { text = Reference_sign, color = "#ff6666" },
},
})
end,
},
},
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 = {
require("action-hints").statusline,
"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,
}

View File

@@ -0,0 +1,50 @@
return {
-- lang server installations
"williamboman/mason.nvim",
dependencies = {
{
"nvimtools/none-ls.nvim",
config = function()
require("null-ls").setup({
sources = {
-- assembler
require("null-ls").builtins.formatting.asmfmt,
-- lua
require("null-ls").builtins.formatting.stylua,
-- markdown
require("null-ls").builtins.formatting.mdformat,
-- python
require("null-ls").builtins.formatting.isort,
require("null-ls").builtins.formatting.yapf,
-- shell
require("null-ls").builtins.formatting.shfmt,
-- yaml
require("null-ls").builtins.formatting.yamlfmt,
},
})
end,
},
{
"jay-babu/mason-null-ls.nvim",
opts = {
automatic_installation = true,
ensure_installed = {
-- assembler
"asmfmt",
-- lua
"stylua",
-- markdown
"mdformat",
-- python
"isort",
"yapf",
-- shell
"shfmt",
-- yaml
"yamlfmt",
},
},
},
},
opts = { ui = { icons = Install_signs } },
}

View File

@@ -0,0 +1,7 @@
return {
-- decorations for the current line mode
"mvllow/modes.nvim",
config = function()
require("modes").setup()
end,
}

View File

@@ -0,0 +1,85 @@
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",
"uga-rosa/cmp-dictionary",
"lukas-reineke/cmp-under-comparator",
-- luasnip
{
"l3mon4d3/luasnip",
config = function()
require("luasnip.loaders.from_snipmate").lazy_load()
end,
version = "v2.*",
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 = "luasnip" },
{ name = "path" },
{ name = "buffer" },
{ name = "dictionary" },
},
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
preset = "codicons",
maxwidth = 50,
menu = Menu_signs,
symbol_map = Lsp_signs,
}),
},
})
end,
}

View File

@@ -0,0 +1,27 @@
return {
-- showing color of hex values, etc
"ChristianChiarulli/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",
},
},
}

View File

@@ -0,0 +1,9 @@
return {
-- hover documentation
"tiyn/nvim-docs-view",
lazy = true,
cmd = "DocsViewToggle",
opts = {
position = "bottom",
},
}

View File

@@ -0,0 +1,7 @@
return {
-- improved virtual text
"kevinhwang91/nvim-hlslens",
opts = {
calm_down = true,
},
}

View File

@@ -0,0 +1,98 @@
return {
-- lang server management
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason-lspconfig.nvim",
{
"mrcjkb/rustaceanvim",
version = "^6",
lazy = false,
},
{
"hrsh7th/cmp-nvim-lsp",
config = function()
Capabilities = require("cmp_nvim_lsp").default_capabilities()
Capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
end,
},
},
config = function()
require("mason-lspconfig").setup({
automatic_setup = true,
ensure_installed = {
-- assembler
-- "asm_lsp", -- TODO: needs extra steps to install (rust)
-- c
"clangd",
-- docker
"dockerls",
-- go
"gopls",
-- html
"html",
-- json
"jsonls",
-- xml
"lemminx",
-- latex
-- "ltex", -- TODO: needs extra steps to install
"texlab",
-- lua
"lua_ls",
-- markdown
"marksman",
-- nim
-- "nimls", -- TODO: needs extra steps to install (nimble)
-- python
"pyright",
-- r
-- "r_language_server", -- TODO: installation takes really long
-- shell
"bashls",
-- sql
"sqlls",
-- typescript / javascript
"ts_ls",
-- yaml
"yamlls",
},
})
local default_flags = {
debounce_text_changes = 150,
allow_incremental_sync = true,
progress = true,
}
local servers = {
ltex = {
settings = {
ltex = {
-- language = "de-DE",
enabled = { "latex", "markdown" },
},
},
},
lua_ls = {
settings = {
lua = {
diagnostics = { globals = { "vim" } },
telemetry = { enable = false },
},
},
},
pyright = {},
}
for name, config in pairs(servers) do
vim.lsp.config(
name,
vim.tbl_extend("force", config, {
on_attach = on_attach,
capabilities = Capabilities,
flags = default_flags,
})
)
end
end,
}

View File

@@ -0,0 +1,57 @@
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,
}

View File

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

View File

@@ -0,0 +1,28 @@
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,
},
},
},
},
}

View File

@@ -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",
"rust",
"lua",
"yaml",
},
-- highlight = { enable = true },
autotag = { enable = false },
-- rainbow = {
-- enable = true,
-- extended_mode = true,
-- max_file_lines = nil,
-- -- colors = {},
-- -- termcolors = {}
-- }
})
end,
}

View File

@@ -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,
}

View File

@@ -0,0 +1,8 @@
return {
-- rename files in buffer
"stevearc/oil.nvim",
---@module 'oil'
---@type oil.setupopts
opts = {},
dependencies = { "nvim-mini/mini.icons" },
}

View File

@@ -0,0 +1,12 @@
return {
-- outline for code
"hedyhli/outline.nvim",
opts = {
outline_window = {
width = 25,
},
symbols = {
icon_source = "lspkind",
},
},
}

View File

@@ -0,0 +1,7 @@
return {
-- improved gui for renaming
"filipdutescu/renamer.nvim",
branch = "master",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
}

View File

@@ -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,
},
}

View File

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

View File

@@ -0,0 +1,12 @@
return {
-- fuzzy finder
{
"nvim-telescope/telescope.nvim",
version = "0.1.2",
dependencies = {
"nvim-lua/plenary.nvim",
"archie-judd/telescope-words.nvim",
},
opts = {},
},
}

View File

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

View File

@@ -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" },
},
},
},
}

View File

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

View File

@@ -0,0 +1,4 @@
return {
-- tree style undo visualizer
"mbbill/undotree",
}

View File

@@ -0,0 +1,5 @@
return {
-- better substitutions
"tpope/vim-abolish",
config = function() end,
}

View File

@@ -0,0 +1,4 @@
return {
-- highlight other occurences of the same word
"RRethy/vim-illuminate",
}

View File

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

View File

@@ -0,0 +1,8 @@
return {
-- highlighting for the viper verification language
"tiyn/viper.nvim",
event = { "BufReadPre *.vpr", "FileType viper" },
config = function()
require("viper").setup()
end,
}

View File

@@ -0,0 +1,4 @@
return {
-- improved keybindings, previewing them
"folke/which-key.nvim",
}

View File

@@ -0,0 +1,74 @@
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",
"nixprime/cpsm",
},
config = function()
local wilder = require("wilder")
wilder.setup({
modes = { ":", "/", "?" },
accept_key = "<CR>",
reject_key = "<C-e>",
})
wilder.set_option("pipeline", {
wilder.branch(
wilder.python_file_finder_pipeline({
file_command = function(ctx, arg)
if string.find(arg, ".") ~= nil then
return { "fd", "-tf", "-H" }
else
return { "fd", "-tf" }
end
end,
dir_command = { "fd", "-td" },
filters = { "cpsm_filter" },
}),
wilder.substitute_pipeline({
pipeline = wilder.python_search_pipeline({
skip_cmdtype_check = 1,
pattern = wilder.python_fuzzy_pattern({
start_at_boundary = 0,
}),
}),
}),
wilder.cmdline_pipeline({
fuzzy = 2,
fuzzy_filter = wilder.lua_fzy_filter(),
}),
{
wilder.check(function(ctx, x)
return x == ""
end),
wilder.history(),
},
wilder.python_search_pipeline({
pattern = wilder.python_fuzzy_pattern({
start_at_boundary = 0,
}),
})
),
})
local highlighters = {
wilder.pcre2_highlighter(),
wilder.lua_fzy_highlighter(),
}
wilder.set_option(
"renderer",
wilder.popupmenu_renderer({
highlighter = highlighters,
left = { " ", wilder.popupmenu_devicons() },
right = { " ", wilder.popupmenu_scrollbar() },
})
)
end,
},
}

View File

@@ -0,0 +1,5 @@
return {
-- improved movement of windows
"sindrets/winshift.nvim",
opts = {},
}