first commit

This commit is contained in:
2026-02-13 04:20:30 +01:00
commit 2bd6b181f4
159 changed files with 194785 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
return {
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000,
lazy = false,
config = function()
require('catppuccin').setup({
flavour = 'mocha', -- latte, frappe, macchiato, mocha
transparent_background = true, -- disables setting the background color.
})
-- setup must be called before loading
vim.cmd.colorscheme('catppuccin')
end,
}

View File

@@ -0,0 +1,6 @@
return {
-- 'norcalli/nvim-colorizer.lua',
-- config = function()
-- require('colorizer').setup({ '*' })
-- end,
}

View File

@@ -0,0 +1,37 @@
return {
'stevearc/conform.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local conform = require('conform')
conform.setup({
formatters_by_ft = {
lua = { 'stylua' },
cpp = { 'clang-format' },
c = { 'clang-format' },
html = { 'prettier' },
css = { 'prettier' },
javascript = { 'prettier' },
python = { 'autopep8', 'isort' },
bash = { 'beautysh' },
csh = { 'beautysh' },
ksh = { 'beautysh' },
sh = { 'beautysh' },
zsh = { 'beautysh' },
},
-- format_on_save = {
-- lsp_fallback = true,
-- async = false,
-- timeout_ms = 1000,
-- },
})
vim.keymap.set({ 'n', 'v' }, '<leader>cf', function()
conform.format({
lsp_fallback = true,
async = false,
timeout_ms = 1000,
})
end, { desc = 'Format file or range (in visual mode)' })
end,
}

View File

@@ -0,0 +1,48 @@
return {
'lewis6991/gitsigns.nvim',
config = function()
local gitsigns = require('gitsigns')
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 = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1,
},
-- yadm = {
-- enable = false,
-- },
})
end,
}

View File

@@ -0,0 +1,4 @@
return {
'nmac427/guess-indent.nvim',
config = true,
}

View File

@@ -0,0 +1,102 @@
return {
'neovim/nvim-lspconfig',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'hrsh7th/cmp-nvim-lsp', -- LSP source for nvim-cmp,
{ 'folke/neodev.nvim', config = true },
},
config = function()
require('vim.lsp.protocol')
require('mason-lspconfig').setup({
automatic_enable = true,
})
vim.lsp.config('*', {
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false,
},
},
},
},
})
vim.lsp.config('lua_ls', {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if
path ~= vim.fn.stdpath('config')
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc'))
then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
-- Tell the language server which version of Lua you're using (most
-- likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Tell the language server how to find Lua modules same way as Neovim
-- (see `:h lua-module-load`)
path = {
'lua/?.lua',
'lua/?/init.lua',
},
},
-- Make the server aware of Neovim runtime files
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
-- Depending on the usage, you might want to add additional paths
-- here.
'${3rd}/luv/library'
-- '${3rd}/busted/library'
},
-- Or pull in all of 'runtimepath'.
-- NOTE: this is a lot slower and will cause issues when working on
-- your own configuration.
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
-- library = {
-- vim.api.nvim_get_runtime_file('', true),
-- }
},
})
end,
settings = {
Lua = {},
},
})
vim.diagnostic.config({
virtual_text = {
prefix = '', -- Could be '■', '●', '▎', 'x'
},
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '',
[vim.diagnostic.severity.HINT] = '󰌶 ',
},
texthl = {
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
},
numhl = {
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
},
},
})
end,
}

View File

@@ -0,0 +1,11 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {
options = {
theme = 'catppuccin',
section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' },
},
},
}

View File

@@ -0,0 +1,75 @@
return {
'williamboman/mason.nvim',
dependencies = {
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
},
config = function()
require('mason').setup({
ui = { border = 'rounded' },
})
require('mason-lspconfig').setup({
automatic_enable = true,
})
require('mason-tool-installer').setup({
ensure_installed = {
-- lua scripting
'stylua', -- lua formatter
'lua_ls',
-- vimrc editing
'vimls',
-- editorconfig stuff
'editorconfig-checker',
-- system administration's related stuff
'ansiblels',
'yamllint',
'systemdlint',
-- 'nginx_language_server',
'dockerls',
'docker_compose_language_service',
-- shell scripting
'shellcheck',
'bashls',
'beautysh',
-- python
'python-lsp-server',
'pylint',
'autopep8',
'mypy',
'isort',
-- c/c++
'clangd',
'clang-format',
'cmakelang',
'cmakelint',
'checkmake',
-- latex
'texlab',
'latexindent',
-- web development
'html',
'cssls',
'stylelint',
'eslint',
'standardjs',
'jsonlint',
-- databases
'sqlfluff',
-- misc
'jinja_lsp',
},
})
end,
}

View File

@@ -0,0 +1,9 @@
return {
'rcarriga/nvim-notify',
config = function()
vim.notify = require("notify")
vim.notify.setup({
background_colour = "#000000",
})
end
}

View File

@@ -0,0 +1,10 @@
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts = {
disable_filetype = { 'TelescopePrompt', 'spectre_panel', 'snacks_picker_input', 'vim' },
enable_afterquote = false,
enable_bracket_in_quote = false,
ignored_next_char = '[%w%.]', -- will ignore alphanumeric and `.` symbol
},
}

View File

@@ -0,0 +1,76 @@
return {
'hrsh7th/nvim-cmp',
dependencies = {
'hrsh7th/cmp-buffer', -- source for text in buffer
'hrsh7th/cmp-path', -- source for file system paths
'saadparwaiz1/cmp_luasnip', -- snippets source for nvim-cmp
{ 'L3MON4D3/LuaSnip', config = true }, -- snippets plugin
'onsails/lspkind.nvim', -- vs-code like pictograms
},
config = function()
local cmp = require('cmp')
local luasnip = require('luasnip')
local window_style = cmp.config.window.bordered({
winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None',
col_offset = -3,
side_padding = 0,
})
cmp.setup({
view = {
docs = { auto_open = false },
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- use luasnip engine
end,
},
window = {
completion = window_style,
documentation = window_style,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-g>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = false }),
['<C-d>'] = cmp.mapping(function(fallback)
if cmp.visible_docs() then
cmp.close_docs()
elseif cmp.visible() then
cmp.open_docs()
else
fallback()
end
end),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp', max_item_count = 10, keyword_length = 1 },
{ name = 'luasnip', max_item_count = 10, keyword_length = 1 },
{ name = 'buffer', max_item_count = 10, keyword_length = 1 },
{ name = 'path', max_item_count = 10, keyword_length = 1 },
}),
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, vim_item)
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, '%s', { trimempty = true })
kind.kind = ' ' .. (strings[1] or '') .. ' '
kind.menu = ' (' .. (strings[2] or '') .. ')'
return kind
end,
},
enabled = function()
-- disable completion in comments
local context = require('cmp.config.context')
-- keep command mode completion enabled when cursor is in a comment
if vim.api.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,
})
end,
}

View File

@@ -0,0 +1,19 @@
return {
'klen/nvim-config-local',
config = function()
require('config-local').setup({
-- Default options (optional)
-- Config file patterns to load (lua supported)
config_files = { '.nvim.lua', '.nvimrc', '.exrc' },
-- Where the plugin keeps files data
hashfile = vim.fn.stdpath('data') .. '/config-local',
autocommands_create = true, -- Create autocommands (VimEnter, DirectoryChanged)
commands_create = true, -- Create commands (ConfigLocalSource, ConfigLocalEdit, ConfigLocalTrust, ConfigLocalDeny)
silent = true, -- Disable plugin messages (Config loaded/denied)
lookup_parents = false, -- Lookup config files in parent directories
})
end,
}

View File

@@ -0,0 +1,30 @@
return {
'mfussenegger/nvim-lint',
config = function()
require('lint').linters_by_ft = {
['yaml.ansible'] = { 'ansible_lint' },
bash = { 'shellcheck' },
make = { 'checkmake' },
cmake = { 'cmakelint' },
cpp = { 'clangtidy' },
c = { 'clangtidy' },
editorconfig = { 'editorconfig-checker' },
html = { 'tidy' },
json = { 'jsonlint' },
sql = { 'sqlfluff' },
js = { 'standardjs' },
css = { 'stylelint' },
systemd = { 'systemdlint' },
yaml = { 'yamllint' },
zsh = { 'zsh' },
python = { 'pylint', 'mypy' },
}
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
callback = function()
-- try_lint without arguments runs the linters defined in `linters_by_ft`
-- for the current filetype
require('lint').try_lint()
end,
})
end,
}

View File

@@ -0,0 +1,22 @@
return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
lazy = false,
config = function()
local treesitter = require('nvim-treesitter')
treesitter.setup({})
treesitter.install({
'c',
'cpp',
'lua',
'bash',
'json',
'yaml',
'vim',
'dockerfile',
'gitignore',
'html',
'css',
})
end,
}

View File

@@ -0,0 +1,13 @@
return {
'windwp/nvim-ts-autotag',
config = function()
require('nvim-ts-autotag').setup({
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
})
end,
}

View File

@@ -0,0 +1,11 @@
return {
'nvim-orgmode/orgmode',
event = 'VeryLazy',
config = function()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
}

View File

@@ -0,0 +1,21 @@
return {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('telescope').setup({
pickers = {
find_files = { theme = 'dropdown' },
grep_string = { theme = 'dropdown' },
live_grep = { theme = 'dropdown' },
},
})
-- key bindings
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
end,
}

View File

@@ -0,0 +1,5 @@
return {
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = true,
}

View File

@@ -0,0 +1,37 @@
return {
'folke/trouble.nvim',
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = 'Trouble',
keys = {
{
'<leader>xx',
'<cmd>Trouble diagnostics toggle<cr>',
desc = 'Diagnostics (Trouble)',
},
{
'<leader>xX',
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
desc = 'Buffer Diagnostics (Trouble)',
},
{
'<leader>cs',
'<cmd>Trouble symbols toggle focus=false<cr>',
desc = 'Symbols (Trouble)',
},
{
'<leader>cl',
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
desc = 'LSP Definitions / references / ... (Trouble)',
},
{
'<leader>xL',
'<cmd>Trouble loclist toggle<cr>',
desc = 'Location List (Trouble)',
},
{
'<leader>xQ',
'<cmd>Trouble qflist toggle<cr>',
desc = 'Quickfix List (Trouble)',
},
},
}

View File

@@ -0,0 +1,6 @@
return {
'mbbill/undotree',
config = function()
vim.keymap.set('n', '<leader>ut', vim.cmd.UndotreeToggle)
end,
}

View File

@@ -0,0 +1,4 @@
return {
'michaeljsmith/vim-indent-object',
config = function() end,
}

View File

@@ -0,0 +1,4 @@
return {
'roxma/vim-tmux-clipboard',
config = function() end,
}

View File

@@ -0,0 +1,18 @@
return {
'folke/which-key.nvim',
event = 'VeryLazy',
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
'<leader>?',
function()
require('which-key').show({ global = false })
end,
desc = 'Buffer Local Keymaps (which-key)',
},
},
}