feat: Sync complete config - Fish, Ghostty, Neovim Scratch

- Add missing Fish configs (direnv, ssh function)
- Add Tokyo Night theme for Ghostty
- Complete Neovim scratch config sync
- Rewrite install.sh for new structure
- Add comprehensive README.md
This commit is contained in:
2025-10-13 10:00:52 +02:00
parent 5a7a2fdf9f
commit 8230492c3a
60 changed files with 1893 additions and 4382 deletions

View File

@@ -0,0 +1,147 @@
-- ============================================================================
-- Completion - nvim-cmp Configuration
-- ============================================================================
return {
{
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
-- Snippet Engine
{
'L3MON4D3/LuaSnip',
build = (function()
return 'make install_jsregexp'
end)(),
dependencies = {
'rafamadriz/friendly-snippets',
},
},
'saadparwaiz1/cmp_luasnip',
-- Completion Sources
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
},
config = function()
local cmp = require('cmp')
local luasnip = require('luasnip')
-- Friendly snippets laden
require('luasnip.loaders.from_vscode').lazy_load()
-- Custom Snippets für Go
luasnip.add_snippets('go', {
luasnip.snippet('iferr', {
luasnip.text_node('if err != nil {'),
luasnip.text_node({ '', '\treturn err' }),
luasnip.text_node({ '', '}' }),
}),
})
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
-- Keymaps
mapping = cmp.mapping.preset.insert({
-- Select next/prev item
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll docs
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Confirm completion
['<CR>'] = cmp.mapping.confirm({ select = true }),
-- Manual trigger
['<C-Space>'] = cmp.mapping.complete({}),
-- Tab für Snippet forward/backward + completion
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
-- Sources (Priorität von oben nach unten)
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
},
-- Window styling
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
-- Formatting
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, item)
local icons = {
Text = '',
Method = '󰆧',
Function = '󰊕',
Constructor = '',
Field = '󰇽',
Variable = '󰂡',
Class = '󰠱',
Interface = '',
Module = '',
Property = '󰜢',
Unit = '',
Value = '󰎠',
Enum = '',
Keyword = '󰌋',
Snippet = '',
Color = '󰏘',
File = '󰈙',
Reference = '',
Folder = '󰉋',
EnumMember = '',
Constant = '󰏿',
Struct = '',
Event = '',
Operator = '󰆕',
TypeParameter = '󰅲',
}
item.kind = string.format('%s %s', icons[item.kind] or '', item.kind)
item.menu = ({
nvim_lsp = '[LSP]',
luasnip = '[Snippet]',
buffer = '[Buffer]',
path = '[Path]',
})[entry.source.name]
return item
end,
},
})
end,
},
}

View File

@@ -0,0 +1,67 @@
-- ============================================================================
-- Editor - Quality of Life Plugins
-- ============================================================================
return {
-- Auto pairs
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = true,
},
-- Comment.nvim
{
'numToStr/Comment.nvim',
event = { 'BufReadPost', 'BufNewFile' },
dependencies = {
'JoosepAlviste/nvim-ts-context-commentstring',
},
config = function()
require('Comment').setup({
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
})
end,
},
-- Surround
{
'kylechui/nvim-surround',
version = '*',
event = 'VeryLazy',
config = true,
},
-- Better escape
{
'max397574/better-escape.nvim',
event = 'InsertEnter',
config = function()
require('better_escape').setup({
mapping = { 'jk', 'jj' },
timeout = 200,
})
end,
},
-- Which-key (zeigt Keybindings)
{
'folke/which-key.nvim',
event = 'VeryLazy',
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- Deine Leader-Gruppen
spec = {
{ '<leader>f', group = 'Find' },
{ '<leader>g', group = 'Git' },
{ '<leader>h', group = 'Hunk' },
{ '<leader>t', group = 'Toggle' },
{ '<leader>c', group = 'Code' },
{ '<leader>w', group = 'Workspace' },
},
},
},
}

View File

@@ -0,0 +1,77 @@
-- ============================================================================
-- Formatting - conform.nvim
-- ============================================================================
return {
{
'stevearc/conform.nvim',
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>cf',
function()
require('conform').format({ async = true, lsp_fallback = true })
end,
mode = '',
desc = 'Format buffer',
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return {
timeout_ms = 500,
lsp_fallback = true,
}
end,
formatters_by_ft = {
-- TypeScript/JavaScript
javascript = { 'prettier' },
typescript = { 'prettier' },
javascriptreact = { 'prettier' },
typescriptreact = { 'prettier' },
-- Go
go = { 'gofumpt', 'goimports' },
-- Web
html = { 'prettier' },
css = { 'prettier' },
json = { 'prettier' },
yaml = { 'prettier' },
markdown = { 'prettier' },
-- Lua
lua = { 'stylua' },
-- Shell
sh = { 'shfmt' },
},
},
init = function()
-- Autoformat toggle commands
vim.api.nvim_create_user_command('FormatDisable', function(args)
if args.bang then
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = 'Disable autoformat-on-save',
bang = true,
})
vim.api.nvim_create_user_command('FormatEnable', function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = 'Re-enable autoformat-on-save',
})
end,
},
}

View File

@@ -0,0 +1,72 @@
-- ============================================================================
-- Git Integration
-- ============================================================================
return {
-- Gitsigns - Git gutter signs
{
'lewis6991/gitsigns.nvim',
event = { 'BufReadPre', 'BufNewFile' },
opts = {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, { expr = true, desc = 'Next git hunk' })
map('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, { expr = true, desc = 'Previous git hunk' })
-- Actions
map('n', '<leader>hs', gs.stage_hunk, { desc = 'Stage hunk' })
map('n', '<leader>hr', gs.reset_hunk, { desc = 'Reset hunk' })
map('v', '<leader>hs', function() gs.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end, { desc = 'Stage hunk' })
map('v', '<leader>hr', function() gs.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end, { desc = 'Reset hunk' })
map('n', '<leader>hS', gs.stage_buffer, { desc = 'Stage buffer' })
map('n', '<leader>hu', gs.undo_stage_hunk, { desc = 'Undo stage hunk' })
map('n', '<leader>hR', gs.reset_buffer, { desc = 'Reset buffer' })
map('n', '<leader>hp', gs.preview_hunk, { desc = 'Preview hunk' })
map('n', '<leader>hb', function() gs.blame_line({ full = true }) end, { desc = 'Blame line' })
map('n', '<leader>tb', gs.toggle_current_line_blame, { desc = 'Toggle blame line' })
map('n', '<leader>hd', gs.diffthis, { desc = 'Diff this' })
map('n', '<leader>hD', function() gs.diffthis('~') end, { desc = 'Diff this ~' })
map('n', '<leader>td', gs.toggle_deleted, { desc = 'Toggle deleted' })
end,
},
},
-- Fugitive - Git commands
{
'tpope/vim-fugitive',
cmd = { 'Git', 'G', 'Gdiffsplit', 'Gread', 'Gwrite', 'Ggrep', 'GMove', 'GDelete', 'GBrowse', 'GRemove', 'GRename', 'Glgrep', 'Gedit' },
keys = {
{ '<leader>gs', '<cmd>Git<cr>', desc = 'Git status' },
{ '<leader>gc', '<cmd>Git commit<cr>', desc = 'Git commit' },
{ '<leader>gp', '<cmd>Git push<cr>', desc = 'Git push' },
{ '<leader>gl', '<cmd>Git log<cr>', desc = 'Git log' },
{ '<leader>gb', '<cmd>Git blame<cr>', desc = 'Git blame' },
{ '<leader>gd', '<cmd>Gdiffsplit<cr>', desc = 'Git diff' },
},
},
}

View File

@@ -0,0 +1,31 @@
-- ============================================================================
-- Harpoon - Schneller File Wechsel
-- ============================================================================
return {
{
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require('harpoon')
-- REQUIRED: Setup
harpoon:setup()
-- Basic Keymaps
vim.keymap.set('n', '<leader>a', function() harpoon:list():add() end, { desc = 'Harpoon: Add file' })
vim.keymap.set('n', '<leader>h', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = 'Harpoon: Menu' })
-- Quick file navigation (1-4)
vim.keymap.set('n', '<C-j>', function() harpoon:list():select(1) end, { desc = 'Harpoon: File 1' })
vim.keymap.set('n', '<C-k>', function() harpoon:list():select(2) end, { desc = 'Harpoon: File 2' })
vim.keymap.set('n', '<C-l>', function() harpoon:list():select(3) end, { desc = 'Harpoon: File 3' })
vim.keymap.set('n', '<C-;>', function() harpoon:list():select(4) end, { desc = 'Harpoon: File 4' })
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-P>', function() harpoon:list():prev() end, { desc = 'Harpoon: Previous' })
vim.keymap.set('n', '<C-S-N>', function() harpoon:list():next() end, { desc = 'Harpoon: Next' })
end,
},
}

View File

@@ -0,0 +1,276 @@
-- ============================================================================
-- LSP Configuration - TypeScript/Playwright & Go optimiert
-- ============================================================================
return {
{
'neovim/nvim-lspconfig',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
-- Mason: LSP Server installer
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
-- Status updates für LSP
{ 'j-hui/fidget.nvim', opts = {} },
-- Neodev für Neovim config entwicklung
{ 'folke/neodev.nvim', opts = {} },
},
config = function()
-- LSP Capabilities für completion
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- Mason Setup
require('mason').setup({
ui = {
border = 'rounded',
icons = {
package_installed = '',
package_pending = '',
package_uninstalled = ''
}
}
})
-- Mason-LSPConfig: Automatische Server Installation
require('mason-lspconfig').setup({
ensure_installed = {
-- Primary (TypeScript/Playwright)
'ts_ls', -- TypeScript/JavaScript
-- Secondary (Go)
'gopls', -- Go
-- Supporting
'lua_ls', -- Lua (für Neovim config)
'html', -- HTML
'cssls', -- CSS
'jsonls', -- JSON
'yamlls', -- YAML
'dockerls', -- Dockerfile
'docker_compose_language_service', -- Docker Compose
},
})
-- LSP Keybindings (nur wenn LSP attached)
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end
-- Navigation
map('gd', require('telescope.builtin').lsp_definitions, 'Goto Definition')
map('gr', require('telescope.builtin').lsp_references, 'Goto References')
map('gI', require('telescope.builtin').lsp_implementations, 'Goto Implementation')
map('gD', vim.lsp.buf.declaration, 'Goto Declaration')
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type Definition')
-- Documentation
map('K', vim.lsp.buf.hover, 'Hover Documentation')
map('<C-k>', vim.lsp.buf.signature_help, 'Signature Help')
-- Actions
map('<leader>ca', vim.lsp.buf.code_action, 'Code Action')
map('<leader>rn', vim.lsp.buf.rename, 'Rename')
-- Workspace
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Workspace Symbols')
-- Highlight references unter cursor
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.documentHighlightProvider then
local highlight_augroup = vim.api.nvim_create_augroup('lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
end
end,
})
-- ========== Server Configurations ==========
-- TypeScript/JavaScript (ts_ls)
vim.lsp.config('ts_ls', {
capabilities = capabilities,
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = 'all',
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = 'all',
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
},
})
-- Go (gopls)
vim.lsp.config('gopls', {
capabilities = capabilities,
settings = {
gopls = {
gofumpt = true,
codelenses = {
gc_details = false,
generate = true,
regenerate_cgo = true,
run_govulncheck = true,
test = true,
tidy = true,
upgrade_dependency = true,
vendor = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
analyses = {
fieldalignment = true,
nilness = true,
unusedparams = true,
unusedwrite = true,
useany = true,
},
usePlaceholders = true,
completeUnimported = true,
staticcheck = true,
directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' },
semanticTokens = true,
},
},
})
-- Lua (lua_ls)
vim.lsp.config('lua_ls', {
capabilities = capabilities,
settings = {
Lua = {
completion = {
callSnippet = 'Replace',
},
diagnostics = {
globals = { 'vim' },
},
},
},
})
-- JSON mit Schema Support
vim.lsp.config('jsonls', {
capabilities = capabilities,
settings = {
json = {
schemas = require('schemastore').json.schemas(),
validate = { enable = true },
},
},
})
-- YAML mit Schema Support
vim.lsp.config('yamlls', {
capabilities = capabilities,
settings = {
yaml = {
schemaStore = {
enable = false,
url = '',
},
schemas = require('schemastore').yaml.schemas(),
},
},
})
-- HTML
vim.lsp.config('html', {
capabilities = capabilities,
})
-- CSS
vim.lsp.config('cssls', {
capabilities = capabilities,
})
-- Docker
vim.lsp.config('dockerls', {
capabilities = capabilities,
})
vim.lsp.config('docker_compose_language_service', {
capabilities = capabilities,
})
-- ========== Diagnostics Configuration ==========
vim.diagnostic.config({
virtual_text = {
prefix = '',
source = 'if_many',
},
signs = true,
underline = true,
update_in_insert = false,
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
})
-- Diagnostic signs
local signs = { Error = '', Warn = '', Hint = '', Info = '»' }
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end
-- LSP Hover border
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{ border = 'rounded' }
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{ border = 'rounded' }
)
end,
},
-- SchemaStore für JSON/YAML
{
'b0o/schemastore.nvim',
lazy = true,
},
}

View File

@@ -0,0 +1,113 @@
-- ============================================================================
-- Neo-tree - File Explorer
-- ============================================================================
return {
{
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons',
'MunifTanjim/nui.nvim',
},
cmd = 'Neotree',
keys = {
{ '<leader>e', '<cmd>Neotree toggle right<CR>', desc = 'Explorer toggle' },
{ '<leader>ef', '<cmd>Neotree focus filesystem right<CR>', desc = 'Explorer focus' },
{ '<leader>eb', '<cmd>Neotree focus buffers right<CR>', desc = 'Explorer buffers' },
{ '<leader>eg', '<cmd>Neotree focus git_status right<CR>', desc = 'Explorer git' },
},
config = function()
require('neo-tree').setup({
close_if_last_window = false,
popup_border_style = 'rounded',
enable_git_status = true,
enable_diagnostics = true,
default_component_configs = {
indent = {
indent_size = 2,
padding = 1,
with_markers = true,
indent_marker = '',
last_indent_marker = '',
with_expanders = true,
expander_collapsed = '',
expander_expanded = '',
},
icon = {
folder_closed = '',
folder_open = '',
folder_empty = '󰜌',
default = '*',
},
modified = {
symbol = '[+]',
},
git_status = {
symbols = {
added = '',
modified = '',
deleted = '',
renamed = '',
untracked = '',
ignored = '',
unstaged = '',
staged = '',
conflict = '',
}
},
},
window = {
position = 'right',
width = 35,
mappings = {
['<space>'] = 'none',
['<2-LeftMouse>'] = 'open',
['<cr>'] = 'open',
['S'] = 'open_split',
['s'] = 'open_vsplit',
['t'] = 'open_tabnew',
['C'] = 'close_node',
['z'] = 'close_all_nodes',
['R'] = 'refresh',
['a'] = {
'add',
config = {
show_path = 'relative'
}
},
['d'] = 'delete',
['r'] = 'rename',
['y'] = 'copy_to_clipboard',
['x'] = 'cut_to_clipboard',
['p'] = 'paste_from_clipboard',
['q'] = 'close_window',
['?'] = 'show_help',
}
},
filesystem = {
filtered_items = {
visible = false,
hide_dotfiles = false,
hide_gitignored = false,
hide_by_name = {
'node_modules'
},
never_show = {
'.DS_Store',
},
},
follow_current_file = {
enabled = true,
leave_dirs_open = false,
},
use_libuv_file_watcher = true,
},
})
end,
},
}

View File

@@ -0,0 +1,89 @@
-- ============================================================================
-- Telescope - Fuzzy Finder
-- ============================================================================
return {
{
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
cond = function()
return vim.fn.executable('make') == 1
end,
},
{ 'nvim-telescope/telescope-ui-select.nvim' },
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
local telescope = require('telescope')
local actions = require('telescope.actions')
telescope.setup({
defaults = {
prompt_prefix = ' ',
selection_caret = ' ',
path_display = { 'truncate' },
sorting_strategy = 'ascending',
layout_config = {
horizontal = {
prompt_position = 'top',
preview_width = 0.55,
},
vertical = {
mirror = false,
},
width = 0.87,
height = 0.80,
preview_cutoff = 120,
},
mappings = {
i = {
['<C-n>'] = actions.cycle_history_next,
['<C-p>'] = actions.cycle_history_prev,
['<C-j>'] = actions.move_selection_next,
['<C-k>'] = actions.move_selection_previous,
},
},
},
pickers = {
find_files = {
hidden = true,
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
},
},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
},
},
})
-- Extensions laden
pcall(telescope.load_extension, 'fzf')
pcall(telescope.load_extension, 'ui-select')
-- Keymaps
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Help tags' })
vim.keymap.set('n', '<leader>fo', builtin.oldfiles, { desc = 'Recent files' })
vim.keymap.set('n', '<leader>fw', builtin.grep_string, { desc = 'Current word' })
vim.keymap.set('n', '<leader>fd', builtin.diagnostics, { desc = 'Diagnostics' })
vim.keymap.set('n', '<leader>fr', builtin.resume, { desc = 'Resume' })
vim.keymap.set('n', '<leader>f.', builtin.oldfiles, { desc = 'Recent files' })
vim.keymap.set('n', '<leader>/', builtin.current_buffer_fuzzy_find, { desc = 'Search in buffer' })
-- Git
vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = 'Git commits' })
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = 'Git files' })
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = 'Git status' })
end,
},
}

View File

@@ -0,0 +1,103 @@
-- ============================================================================
-- Treesitter - Syntax Highlighting
-- ============================================================================
return {
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
event = { 'BufReadPost', 'BufNewFile' },
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
config = function()
require('nvim-treesitter.configs').setup({
-- Parser die automatisch installiert werden
ensure_installed = {
-- Primary
'typescript',
'tsx',
'javascript',
'go',
-- Supporting
'lua',
'vim',
'vimdoc',
'html',
'css',
'json',
'yaml',
'toml',
'markdown',
'markdown_inline',
'bash',
'dockerfile',
'git_config',
'git_rebase',
'gitcommit',
'gitignore',
},
-- Auto-install parser wenn fehlt
auto_install = true,
-- Syntax highlighting
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
-- Indentation
indent = {
enable = true,
},
-- Incremental selection
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<C-space>',
node_incremental = '<C-space>',
scope_incremental = false,
node_decremental = '<bs>',
},
},
-- Text objects
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
[']f'] = '@function.outer',
[']c'] = '@class.outer',
},
goto_next_end = {
[']F'] = '@function.outer',
[']C'] = '@class.outer',
},
goto_previous_start = {
['[f'] = '@function.outer',
['[c'] = '@class.outer',
},
goto_previous_end = {
['[F'] = '@function.outer',
['[C'] = '@class.outer',
},
},
},
})
end,
},
}

View File

@@ -0,0 +1,76 @@
-- ============================================================================
-- UI - Colorscheme & Statusline
-- ============================================================================
return {
-- Tokyonight Theme
{
'folke/tokyonight.nvim',
lazy = false,
priority = 1000,
config = function()
require('tokyonight').setup({
style = 'night',
transparent = true,
terminal_colors = true,
styles = {
sidebars = 'transparent',
floats = 'transparent',
},
on_colors = function(colors)
colors.bg_statusline = colors.none
end,
})
vim.cmd.colorscheme('tokyonight-night')
end,
},
-- Lualine Statusline
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
event = 'VeryLazy',
opts = {
options = {
theme = 'tokyonight',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
globalstatus = true,
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = {
{
'filename',
path = 1, -- Relativer Pfad
symbols = {
modified = '[+]',
readonly = '[-]',
unnamed = '[No Name]',
}
}
},
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
},
},
-- Indent guides
{
'lukas-reineke/indent-blankline.nvim',
event = { 'BufReadPost', 'BufNewFile' },
main = 'ibl',
opts = {
indent = {
char = '',
},
scope = {
show_start = false,
show_end = false,
},
},
},
}