This commit is contained in:
Jonas H
2026-02-28 00:00:19 +01:00
parent be00903d76
commit 1c0a1b5d7a
22 changed files with 1711 additions and 0 deletions

24
nvim/.config/nvim/LICENSE Normal file
View File

@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

View File

@@ -0,0 +1,9 @@
**This repo is supposed to used as config by NvChad users!**
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
# Credits
1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier!

View File

@@ -0,0 +1,339 @@
-- Bearded Arc colorscheme
-- Accurate port from NvChad base46 theme with proper highlight group mappings
vim.cmd("hi clear")
if vim.fn.exists("syntax_on") then
vim.cmd("syntax reset")
end
vim.o.background = "dark"
vim.g.colors_name = "bearded-arc"
-- Base 30 color palette (UI colors)
local base_30 = {
white = "#ABB7C1",
darker_black = "#19212e",
black = "#1c2433",
black2 = "#232b3a",
one_bg = "#262e3d",
one_bg2 = "#303847",
one_bg3 = "#3a4251",
grey = "#444c5b",
grey_fg = "#4e5665",
grey_fg2 = "#58606f",
light_grey = "#626a79",
red = "#FF738A",
baby_pink = "#F38CEC",
pink = "#ee9cdd",
line = "#303847",
green = "#3CEC85",
vibrant_green = "#9bdead",
nord_blue = "#6da4cd",
blue = "#69C3FF",
yellow = "#EACD61",
sun = "#f6d96d",
purple = "#bd93ff",
dark_purple = "#B78AFF",
teal = "#12c7c4",
orange = "#FF955C",
cyan = "#22ECDB",
statusline_bg = "#232b3a",
lightbg = "#303847",
pmenu_bg = "#3CEC85",
folder_bg = "#69C3FF",
}
-- Base 16 color palette (syntax colors)
local base_16 = {
base00 = "#1c2433",
base01 = "#262e3d",
base02 = "#303847",
base03 = "#444c5b",
base04 = "#a1adb7",
base05 = "#c3cfd9",
base06 = "#ABB7C1",
base07 = "#08bdba",
base08 = "#FF738A",
base09 = "#FF955C",
base0A = "#EACD61",
base0B = "#3CEC85",
base0C = "#77aed7",
base0D = "#69C3FF",
base0E = "#22ECDB",
base0F = "#B78AFF",
}
-- Helper function to set highlights
local function hi(group, opts)
local cmd = "hi " .. group
if opts.fg then cmd = cmd .. " guifg=" .. opts.fg end
if opts.bg then cmd = cmd .. " guibg=" .. opts.bg end
if opts.sp then cmd = cmd .. " guisp=" .. opts.sp end
if opts.style then cmd = cmd .. " gui=" .. opts.style end
vim.cmd(cmd)
end
-- === UI ELEMENTS (from defaults.lua) ===
-- Line Numbers & Sidebar (CRITICAL FIX)
hi("LineNr", { fg = base_30.grey })
hi("CursorLineNr", { fg = base_30.white })
hi("SignColumn", { fg = base_16.base03 })
hi("FoldColumn", { fg = base_30.grey, bg = base_16.base00 })
hi("Folded", { fg = base_30.light_grey, bg = base_16.base01 })
-- Main Editor
hi("Normal", { fg = base_16.base05, bg = base_16.base00 })
hi("NormalFloat", { bg = base_30.darker_black })
hi("FloatBorder", { fg = base_30.blue })
hi("FloatTitle", { fg = base_30.white, bg = base_30.grey })
-- Cursor and Lines
hi("Cursor", { fg = base_16.base00, bg = base_16.base05 })
hi("CursorLine", { bg = base_30.black2 })
hi("CursorColumn", { bg = base_16.base01 })
hi("ColorColumn", { bg = base_16.base01 })
-- Visual Selection
hi("Visual", { bg = base_30.one_bg2 })
hi("VisualNOS", { bg = base_30.one_bg2 })
-- Search
hi("Search", { fg = base_16.base00, bg = base_16.base0A })
hi("IncSearch", { fg = base_16.base01, bg = base_16.base09 })
hi("Substitute", { fg = base_16.base01, bg = base_16.base0A })
-- Window Separators
hi("WinSeparator", { fg = base_30.line })
hi("WinBar", { bg = base_30.statusline_bg })
hi("WinBarNC", { bg = base_30.statusline_bg })
-- Completion Menu
hi("Pmenu", { bg = base_30.one_bg })
hi("PmenuSbar", { bg = base_30.one_bg })
hi("PmenuSel", { bg = base_30.pmenu_bg, fg = base_30.black })
hi("PmenuThumb", { bg = base_30.grey })
-- Statusline & Tabline
hi("StatusLine", { bg = base_30.statusline_bg })
hi("StatusLineNC", { bg = base_30.statusline_bg })
hi("TabLine", { fg = base_30.light_grey, bg = base_30.black2 })
hi("TabLineSel", { fg = base_30.white, bg = base_30.black })
hi("TabLineFill", { bg = base_30.black2 })
-- Messages & Prompts
hi("ErrorMsg", { fg = base_16.base08, bg = base_16.base00 })
hi("WarningMsg", { fg = base_16.base0A })
hi("MoreMsg", { fg = base_16.base0B })
hi("ModeMsg", { fg = base_16.base0B })
hi("Question", { fg = base_16.base0D })
-- Special Elements
hi("MatchParen", { bg = base_30.grey, fg = base_30.white })
hi("NonText", { fg = base_16.base03 })
hi("SpecialKey", { fg = base_16.base03 })
hi("Conceal", { fg = base_16.base0D, bg = base_16.base00 })
hi("Directory", { fg = base_16.base0D })
hi("Title", { fg = base_16.base0D })
-- === SYNTAX HIGHLIGHTING (from syntax.lua) ===
hi("Comment", { fg = base_30.grey_fg, style = "italic" })
-- Constants
hi("Constant", { fg = base_16.base09 })
hi("String", { fg = base_16.base0B })
hi("Character", { fg = base_16.base08 })
hi("Number", { fg = base_16.base09 })
hi("Boolean", { fg = base_16.base09 })
hi("Float", { fg = base_16.base09 })
-- Identifiers
hi("Identifier", { fg = base_16.base08 })
hi("Function", { fg = base_16.base0D })
-- Statements
hi("Statement", { fg = base_16.base0E })
hi("Conditional", { fg = base_16.base0E })
hi("Repeat", { fg = base_16.base0E })
hi("Label", { fg = base_16.base0A })
hi("Operator", { fg = base_16.base05 })
hi("Keyword", { fg = base_16.base0E })
hi("Exception", { fg = base_16.base08 })
-- PreProcessor
hi("PreProc", { fg = base_16.base0A })
hi("Include", { fg = base_16.base0D })
hi("Define", { fg = base_16.base0E })
hi("Macro", { fg = base_16.base08 })
hi("PreCondit", { fg = base_16.base0A })
-- Types
hi("Type", { fg = base_16.base0A })
hi("StorageClass", { fg = base_16.base0A })
hi("Structure", { fg = base_16.base0E })
hi("Typedef", { fg = base_16.base0A })
-- Special
hi("Special", { fg = base_16.base0C })
hi("SpecialChar", { fg = base_16.base0F })
hi("Tag", { fg = base_16.base0A })
hi("Delimiter", { fg = base_16.base0F })
hi("SpecialComment", { fg = base_16.base0C })
hi("Debug", { fg = base_16.base08 })
-- Errors
hi("Error", { fg = base_16.base00, bg = base_16.base08 })
hi("Todo", { fg = base_16.base0A, bg = base_16.base01 })
hi("Underlined", { fg = base_16.base0B, style = "underline" })
hi("Ignore", { fg = base_16.base0C })
-- === DIFF ===
hi("DiffAdd", { fg = base_16.base0B, bg = base_16.base00 })
hi("DiffChange", { fg = base_16.base0E, bg = base_16.base00 })
hi("DiffDelete", { fg = base_16.base08, bg = base_16.base00 })
hi("DiffText", { fg = base_16.base0D, bg = base_16.base01 })
hi("Added", { fg = base_30.green })
hi("Changed", { fg = base_30.yellow })
hi("Removed", { fg = base_30.red })
-- === GIT SIGNS ===
hi("GitSignsAdd", { fg = base_30.green })
hi("GitSignsChange", { fg = base_30.yellow })
hi("GitSignsDelete", { fg = base_30.red })
-- === LSP DIAGNOSTICS (from lsp.lua) ===
hi("DiagnosticError", { fg = base_30.red })
hi("DiagnosticWarn", { fg = base_30.yellow })
hi("DiagnosticInfo", { fg = base_30.green })
hi("DiagnosticHint", { fg = base_30.purple })
hi("DiagnosticUnderlineError", { sp = base_30.red, style = "underline" })
hi("DiagnosticUnderlineWarn", { sp = base_30.yellow, style = "underline" })
hi("DiagnosticUnderlineInfo", { sp = base_30.green, style = "underline" })
hi("DiagnosticUnderlineHint", { sp = base_30.purple, style = "underline" })
hi("LspReferenceText", { bg = base_30.one_bg3 })
hi("LspReferenceRead", { bg = base_30.one_bg3 })
hi("LspReferenceWrite", { bg = base_30.one_bg3 })
hi("LspInlayHint", { fg = base_30.light_grey, bg = base_30.black2 })
hi("LspSignatureActiveParameter", { fg = base_30.black, bg = base_30.green })
-- === TELESCOPE (from telescope.lua) ===
hi("TelescopeBorder", { fg = base_30.grey, bg = base_30.darker_black })
hi("TelescopePromptBorder", { fg = base_30.grey, bg = base_30.darker_black })
hi("TelescopePromptNormal", { fg = base_16.base05, bg = base_30.darker_black })
hi("TelescopeResultsBorder", { fg = base_30.grey, bg = base_30.darker_black })
hi("TelescopeResultsNormal", { bg = base_30.darker_black })
hi("TelescopePreviewBorder", { fg = base_30.grey, bg = base_30.darker_black })
hi("TelescopePreviewNormal", { bg = base_30.darker_black })
hi("TelescopeSelection", { bg = base_30.one_bg2, fg = base_30.white })
hi("TelescopeSelectionCaret", { fg = base_30.cyan, bg = base_30.one_bg2 })
hi("TelescopeMatching", { fg = base_30.blue, style = "bold" })
-- === TREESITTER (from treesitter.lua) ===
hi("@variable", { fg = base_16.base05 })
hi("@variable.builtin", { fg = base_16.base09 })
hi("@variable.parameter", { fg = base_16.base08 })
hi("@variable.member", { fg = base_16.base08 })
hi("@constant", { fg = base_16.base08 })
hi("@constant.builtin", { fg = base_16.base09 })
hi("@constant.macro", { fg = base_16.base08 })
hi("@string", { fg = base_16.base0B })
hi("@string.regex", { fg = base_16.base0C })
hi("@string.escape", { fg = base_16.base0C })
hi("@character", { fg = base_16.base08 })
hi("@number", { fg = base_16.base09 })
hi("@boolean", { fg = base_16.base09 })
hi("@float", { fg = base_16.base09 })
hi("@function", { fg = base_16.base0D })
hi("@function.builtin", { fg = base_16.base0D })
hi("@function.macro", { fg = base_16.base08 })
hi("@function.method", { fg = base_16.base0D })
hi("@constructor", { fg = base_16.base0C })
hi("@parameter", { fg = base_16.base08 })
hi("@keyword", { fg = base_16.base0E })
hi("@keyword.function", { fg = base_16.base0E })
hi("@keyword.return", { fg = base_16.base0E })
hi("@keyword.operator", { fg = base_16.base0E })
hi("@conditional", { fg = base_16.base0E })
hi("@repeat", { fg = base_16.base0E })
hi("@label", { fg = base_16.base0A })
hi("@operator", { fg = base_16.base05 })
hi("@exception", { fg = base_16.base08 })
hi("@type", { fg = base_16.base0A })
hi("@type.builtin", { fg = base_16.base0A })
hi("@type.qualifier", { fg = base_16.base0E })
hi("@structure", { fg = base_16.base0E })
hi("@include", { fg = base_16.base0D })
hi("@property", { fg = base_16.base08 })
hi("@field", { fg = base_16.base08 })
hi("@punctuation.delimiter", { fg = base_16.base0F })
hi("@punctuation.bracket", { fg = base_16.base05 })
hi("@punctuation.special", { fg = base_16.base08 })
hi("@comment", { fg = base_30.grey_fg, style = "italic" })
hi("@comment.todo", { fg = base_30.grey, bg = base_30.white })
hi("@comment.note", { fg = base_30.white, bg = base_30.blue })
hi("@comment.warning", { fg = base_30.black, bg = base_30.yellow })
hi("@comment.error", { fg = base_30.white, bg = base_30.red })
hi("@tag", { fg = base_16.base08 })
hi("@tag.attribute", { fg = base_16.base0A })
hi("@tag.delimiter", { fg = base_16.base0F })
hi("@markup.strong", { style = "bold" })
hi("@markup.italic", { style = "italic" })
hi("@markup.underline", { style = "underline" })
hi("@markup.strike", { style = "strikethrough" })
hi("@markup.heading", { fg = base_16.base0D, style = "bold" })
hi("@markup.link", { fg = base_16.base08, style = "underline" })
hi("@markup.link.url", { fg = base_16.base0B, style = "underline" })
hi("@markup.list", { fg = base_16.base08 })
-- === NVIM-TREE ===
hi("NvimTreeNormal", { bg = base_30.darker_black })
hi("NvimTreeNormalNC", { bg = base_30.darker_black })
hi("NvimTreeRootFolder", { fg = base_30.red, style = "bold" })
hi("NvimTreeGitDirty", { fg = base_30.yellow })
hi("NvimTreeGitNew", { fg = base_30.green })
hi("NvimTreeGitDeleted", { fg = base_30.red })
hi("NvimTreeSpecialFile", { fg = base_30.yellow, style = "underline" })
hi("NvimTreeIndentMarker", { fg = base_30.grey })
hi("NvimTreeImageFile", { fg = base_30.dark_purple })
hi("NvimTreeSymlink", { fg = base_30.cyan })
hi("NvimTreeFolderName", { fg = base_30.blue })
hi("NvimTreeFolderIcon", { fg = base_30.folder_bg })
hi("NvimTreeOpenedFolderName", { fg = base_30.blue })
-- === WHICH-KEY ===
hi("WhichKey", { fg = base_30.blue })
hi("WhichKeyGroup", { fg = base_30.green })
hi("WhichKeyDesc", { fg = base_16.base05 })
hi("WhichKeySeparator", { fg = base_30.grey })
hi("WhichKeyFloat", { bg = base_30.darker_black })
hi("WhichKeyBorder", { fg = base_30.blue, bg = base_30.darker_black })
-- === HEALTH CHECK ===
hi("healthSuccess", { fg = base_30.green, bg = base_30.black })

View File

@@ -0,0 +1,5 @@
-- WESL filetype settings
vim.opt_local.shiftwidth = 4 -- Indentation width for >> and <<
vim.opt_local.tabstop = 4 -- Width of a tab character
vim.opt_local.softtabstop = 4 -- Number of spaces for tab in insert mode
vim.opt_local.expandtab = true -- Use spaces instead of tabs

View File

@@ -0,0 +1,5 @@
-- WGSL filetype settings
vim.opt_local.shiftwidth = 4 -- Indentation width for >> and <<
vim.opt_local.tabstop = 4 -- Width of a tab character
vim.opt_local.softtabstop = 4 -- Number of spaces for tab in insert mode
vim.opt_local.expandtab = true -- Use spaces instead of tabs

View File

@@ -0,0 +1,26 @@
vim.g.mapleader = " "
-- bootstrap lazy and all plugins
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
local repo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
end
vim.opt.rtp:prepend(lazypath)
local lazy_config = require "configs.lazy"
-- load plugins
require("lazy").setup({
{ import = "plugins" },
}, lazy_config)
-- load theme
vim.cmd.colorscheme("bearded-arc")
-- Load standalone config (migrated from NvChad)
require "options"
require "autocmds"
require "mappings"

View File

@@ -0,0 +1,25 @@
{
"auto-session": { "branch": "main", "commit": "dcbc339a1a0e6505f755d980ad11f892b6a8d492" },
"barbar.nvim": { "branch": "master", "commit": "539d73def39c9172b4d4d769f14090e08f37b29d" },
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"claudecode.nvim": { "branch": "main", "commit": "aa9a5cebebdbfa449c1c5ff229ba5d98e66bafed" },
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
"fzf-lua": { "branch": "main", "commit": "fb8c50ba62a0daa433b7ac2b78834f318322b879" },
"gitsigns.nvim": { "branch": "main", "commit": "31217271a7314c343606acb4072a94a039a19fb5" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"leap.nvim": { "branch": "main", "commit": "9a26da7a14c09cd84c05a4e8326890ef0f92a590" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
"nvim-lspconfig": { "branch": "master", "commit": "f4e9d367d4e067d7a5fabc9fd3f1349b291eb718" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "ecce93ff7db4461e942c03e0fcc64bd785df4057" },
"vgit.nvim": { "branch": "main", "commit": "796a183620ffcab17fc00baff3187006463cbaef" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yazi.nvim": { "branch": "main", "commit": "1874d812de12881d1da8c19c8ce2f94f36d00a6b" },
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }
}

View File

@@ -0,0 +1,50 @@
-- Standalone autocmds (migrated from NvChad)
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "BufRead", "BufNewFile" }, { pattern = "*.wesl", command = "setfiletype wesl" })
-- Register wgsl as the treesitter language for wesl files
vim.treesitter.language.register("wgsl", "wesl")
-- Terminal group
local terminal_group = vim.api.nvim_create_augroup("terminal", { clear = true })
-- Auto-close terminal buffers on exit
autocmd("TermClose", {
group = terminal_group,
command = "bdelete!"
})
-- Start terminal in insert mode for autoscroll
autocmd("TermOpen", {
group = terminal_group,
command = "startinsert"
})
-- User event that loads after UIEnter + only if file buf is there
-- This is used by plugins for lazy loading via "User FilePost" event
autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
group = vim.api.nvim_create_augroup("FilePost", { clear = true }),
callback = function(args)
local file = vim.api.nvim_buf_get_name(args.buf)
local buftype = vim.api.nvim_get_option_value("buftype", { buf = args.buf })
if not vim.g.ui_entered and args.event == "UIEnter" then
vim.g.ui_entered = true
end
if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then
vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false })
vim.api.nvim_del_augroup_by_name "FilePost"
vim.schedule(function()
vim.api.nvim_exec_autocmds("FileType", {})
if vim.g.editorconfig then
require("editorconfig").config(args.buf)
end
end)
end
end,
})

View File

@@ -0,0 +1,103 @@
-- Barbar configuration with bearded-arc colors
local colors = {
bg = "#1c2433", -- black (main bg)
bg_inactive = "#232b3a", -- black2 (inactive tabs)
fg = "#c3cfd9", -- base05
fg_inactive = "#626a79", -- light_grey
white = "#ABB7C1", -- white (active text)
selected_bg = "#303847", -- one_bg2 (selected tab bg)
modified = "#3CEC85", -- green
error = "#FF738A", -- red
warn = "#EACD61", -- yellow
info = "#69C3FF", -- blue
hint = "#bd93ff", -- purple
nord_blue = "#6da4cd", -- accent color
}
require("barbar").setup({
animation = false,
auto_hide = false,
tabpages = true,
clickable = true,
focus_on_close = "left",
highlight_alternate = false,
highlight_inactive_file_icons = false,
highlight_visible = false,
icons = {
buffer_index = false,
buffer_number = false,
button = "",
diagnostics = {
[vim.diagnostic.severity.ERROR] = { enabled = true, icon = " " },
[vim.diagnostic.severity.WARN] = { enabled = false },
[vim.diagnostic.severity.INFO] = { enabled = false },
[vim.diagnostic.severity.HINT] = { enabled = false },
},
gitsigns = {
added = { enabled = false },
changed = { enabled = false },
deleted = { enabled = false },
},
filetype = {
custom_colors = false,
enabled = false,
},
separator = { left = "", right = "" },
separator_at_end = true,
modified = { button = "" },
pinned = { button = "󰐃 ", filename = true },
preset = "default",
alternate = { filetype = { enabled = false } },
current = { buffer_index = false },
inactive = { button = "" },
visible = { modified = { buffer_number = false } },
},
insert_at_end = false,
insert_at_start = false,
maximum_padding = 1,
minimum_padding = 1,
maximum_length = 15,
minimum_length = 15, -- Set to same as maximum for uniform width
semantic_letters = true,
sidebar_filetypes = {
undotree = { text = "undotree" },
},
no_name_title = nil,
})
-- Set custom highlight groups to match bearded-arc theme
vim.api.nvim_set_hl(0, "BufferCurrent", { fg = colors.white, bg = colors.bg, bold = true })
vim.api.nvim_set_hl(0, "BufferCurrentIndex", { fg = colors.white, bg = colors.bg })
vim.api.nvim_set_hl(0, "BufferCurrentMod", { fg = colors.modified, bg = colors.bg, bold = true })
vim.api.nvim_set_hl(0, "BufferCurrentSign", { fg = colors.nord_blue, bg = colors.bg })
vim.api.nvim_set_hl(0, "BufferCurrentTarget", { fg = colors.error, bg = colors.bg, bold = true })
vim.api.nvim_set_hl(0, "BufferVisible", { fg = colors.fg, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferVisibleIndex", { fg = colors.fg, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferVisibleMod", { fg = colors.modified, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferVisibleSign", { fg = colors.fg_inactive, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferVisibleTarget", { fg = colors.error, bg = colors.bg_inactive, bold = true })
vim.api.nvim_set_hl(0, "BufferInactive", { fg = colors.fg_inactive, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferInactiveIndex", { fg = colors.fg_inactive, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferInactiveMod", { fg = colors.modified, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferInactiveSign", { fg = colors.fg_inactive, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferInactiveTarget", { fg = colors.error, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferTabpages", { fg = colors.nord_blue, bg = colors.bg_inactive, bold = true })
vim.api.nvim_set_hl(0, "BufferTabpageFill", { fg = colors.fg_inactive, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferOffset", { fg = colors.fg_inactive, bg = colors.bg_inactive })
-- Error diagnostics highlight
vim.api.nvim_set_hl(0, "BufferCurrentERROR", { fg = colors.error, bg = colors.bg })
vim.api.nvim_set_hl(0, "BufferVisibleERROR", { fg = colors.error, bg = colors.bg_inactive })
vim.api.nvim_set_hl(0, "BufferInactiveERROR", { fg = colors.error, bg = colors.bg_inactive })

View File

@@ -0,0 +1,20 @@
-- Track which mode we're in (work or normal)
vim.g.claude_mode = "normal"
local function get_claude_command()
if vim.g.claude_mode == "work" then
return {
bin = "sh",
bin_args = {
"-c",
"CLAUDE_CONFIG_DIR=~/.claude-work claude"
},
}
else
return {
bin = "claude",
}
end
end
require("claudecode").setup(get_claude_command())

View File

@@ -0,0 +1,15 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
}
return options

View File

@@ -0,0 +1,24 @@
return {
-- Recognized filetypes for C#
filetypes = { "cs", "vb" },
-- Root directory detection: looks for .sln, .csproj, or version control folders
root_dir = function(fname)
local util = require("lspconfig.util")
return util.root_pattern("*.sln")(fname)
or util.root_pattern("*.csproj")(fname)
or util.root_pattern(".git", ".hg")(fname)
or util.path.dirname(fname)
end,
-- Additional settings for csharp_ls (expand as needed)
settings = {
csharp = {
formatting = {
enable = true, -- Enable formatting if supported
},
-- Add further csharp_ls settings here
},
},
}

View File

@@ -0,0 +1,123 @@
-- fzf-lua configuration with bearded-arc colors
require("fzf-lua").setup({
"default-title",
winopts = {
height = 0.85,
width = 0.80,
row = 0.35,
col = 0.50,
border = "rounded",
preview = {
border = "rounded",
wrap = "nowrap",
hidden = "nohidden",
vertical = "down:45%",
horizontal = "right:60%",
layout = "flex",
flip_columns = 120,
scrollbar = "float",
},
},
fzf_opts = {
["--no-scrollbar"] = true,
["--info"] = "inline-right",
},
keymap = {
builtin = {
["<C-d>"] = "preview-page-down",
["<C-u>"] = "preview-page-up",
},
fzf = {
["ctrl-q"] = "select-all+accept",
["tab"] = "down",
["shift-tab"] = "up",
},
},
files = {
prompt = "Files ",
file_icons = true,
git_icons = false,
fd_opts = [[--color=never --type f --hidden --follow --exclude .git --exclude node_modules]],
file_ignore_patterns = {"%.git$", "%.xml$" },
},
grep = {
prompt = "Grep ",
input_prompt = "Grep For ",
file_icons = true,
git_icons = false,
rg_opts = "--column --line-number --no-heading --color=always --smart-case --max-columns=4096 -e",
},
oldfiles = {
prompt = "History ",
cwd_only = false,
stat_file = true,
include_current_session = true,
},
buffers = {
prompt = "Buffers ",
file_icons = true,
color_icons = true,
sort_lastused = true,
},
lsp = {
prompt_postfix = " ",
file_icons = true,
git_icons = false,
lsp_icons = true,
symbols = {
prompt = "Symbols ",
async = true,
symbol_icons = {
File = " ",
Module = " ",
Namespace = " ",
Package = " ",
Class = " ",
Method = " ",
Property = " ",
Field = " ",
Constructor = " ",
Enum = " ",
Interface = " ",
Function = " ",
Variable = " ",
Constant = " ",
String = " ",
Number = " ",
Boolean = " ",
Array = " ",
Object = " ",
Key = " ",
Null = " ",
EnumMember = " ",
Struct = " ",
Event = " ",
Operator = " ",
TypeParameter = " ",
},
},
},
diagnostics = {
prompt = "Diagnostics ",
file_icons = true,
git_icons = false,
diag_icons = true,
icon_padding = " ",
severity_sort = true,
severity_limit = nil,
severity_bound = nil,
fzf_opts = {
["--tiebreak"] = "index",
},
signs = {
["Error"] = { text = " ", texthl = "DiagnosticError" },
["Warn"] = { text = " ", texthl = "DiagnosticWarn" },
["Info"] = { text = " ", texthl = "DiagnosticInfo" },
["Hint"] = { text = " ", texthl = "DiagnosticHint" },
},
},
})
-- Setup fzf-lua as vim.ui.select provider
require("fzf-lua").register_ui_select()

View File

@@ -0,0 +1,47 @@
return {
defaults = { lazy = true },
install = { colorscheme = { "nvchad" } },
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"tohtml",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
},
},
},
}

View File

@@ -0,0 +1,138 @@
-- LSP capabilities (with blink.cmp completion support)
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
-- on_attach function with LSP keybindings
local on_attach = function(client, bufnr)
local function opts(desc)
return { buffer = bufnr, desc = "LSP " .. desc }
end
local map = vim.keymap.set
-- Navigation
map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration")
map("n", "gd", vim.lsp.buf.definition, opts "Go to definition")
map("n", "gi", vim.lsp.buf.implementation, opts "Go to implementation")
map("n", "gr", vim.lsp.buf.references, opts "Show references")
map("n", "<leader>sh", vim.lsp.buf.signature_help, opts "Show signature help")
map("n", "<leader>D", vim.lsp.buf.type_definition, opts "Go to type definition")
-- Workspace
map("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder")
map("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder")
map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts "List workspace folders")
-- Actions
map("n", "<leader>ra", vim.lsp.buf.rename, opts "Rename symbol")
map({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts "Code action")
-- Diagnostics (already mapped in mappings.lua, but keeping for consistency)
map("n", "[d", vim.diagnostic.goto_prev, opts "Go to previous diagnostic")
map("n", "]d", vim.diagnostic.goto_next, opts "Go to next diagnostic")
map("n", "<leader>q", vim.diagnostic.setloclist, opts "Set loclist")
end
-- Disable semantic tokens (performance optimization)
local on_init = function(client, _)
if client.supports_method "textDocument/semanticTokens" then
client.server_capabilities.semanticTokensProvider = nil
end
end
local servers = {
rust_analyzer = {
filetypes = { "rust" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
completion = {
addCallParenthesis = true,
addCallArgumentSnippets = false,
postfix = {
enabled = false,
},
},
callInfo = {
full = false,
},
}
}
},
csharp_ls = {
filetypes = { "cs" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
clangd = {
filetypes = { "c", "cpp", "objc", "objcpp" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
glsl_analyzer = {
filetypes = { "glsl" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
wgsl_analyzer = {
filetypes = { "wgsl", "wesl" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
pylsp = {
filetypes = { "python" },
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
ron_lsp = {
cmd = { "ron-lsp" },
filetypes = { "ron" },
root_dir = function(fname)
local util = require("lspconfig.util")
return util.root_pattern("Cargo.toml", ".git")(fname) or vim.loop.cwd()
end,
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
},
}
for server, opts in pairs(servers) do
vim.lsp.config(server, opts)
if opts.filetypes then
vim.api.nvim_create_autocmd("FileType", {
pattern = opts.filetypes,
callback = function()
vim.lsp.enable(server)
end,
})
else
vim.lsp.enable(server)
end
end

View File

@@ -0,0 +1,211 @@
-- Lualine configuration with bearded-arc theme colors
local colors = {
bg = "#232b3a", -- statusline_bg
fg = "#c3cfd9", -- base05
white = "#ABB7C1", -- white
black = "#1c2433", -- black
grey = "#444c5b", -- grey
light_grey = "#626a79", -- light_grey
-- Mode colors
nord_blue = "#6da4cd", -- normal mode
cyan = "#22ECDB", -- visual mode
dark_purple = "#B78AFF", -- insert mode
green = "#3CEC85", -- success/terminal
red = "#FF738A", -- errors/replace
yellow = "#EACD61", -- warnings
orange = "#FF955C", -- command
blue = "#69C3FF", -- info
-- Section backgrounds
lightbg = "#303847", -- file section bg
}
-- Custom theme based on bearded-arc
local bearded_arc_theme = {
normal = {
a = { bg = colors.nord_blue, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
c = { bg = colors.bg, fg = colors.fg },
},
insert = {
a = { bg = colors.dark_purple, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
},
visual = {
a = { bg = colors.cyan, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
},
replace = {
a = { bg = colors.red, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
},
command = {
a = { bg = colors.orange, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
},
terminal = {
a = { bg = colors.green, fg = colors.black, gui = "bold" },
b = { bg = colors.lightbg, fg = colors.white },
},
inactive = {
a = { bg = colors.bg, fg = colors.grey },
b = { bg = colors.bg, fg = colors.grey },
c = { bg = colors.bg, fg = colors.grey },
},
}
-- Custom component for LSP status
local function lsp_status()
local clients = vim.lsp.get_clients({ bufnr = 0 })
if #clients == 0 then
return ""
end
local client_names = {}
for _, client in ipairs(clients) do
table.insert(client_names, client.name)
end
return " " .. table.concat(client_names, ", ")
end
-- Custom component for LSP diagnostics count
local function lsp_diagnostics()
local error_count = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
local warn_count = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
local info_count = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
local hint_count = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
local parts = {}
if error_count > 0 then
table.insert(parts, string.format("%%#DiagnosticError# %d", error_count))
end
if warn_count > 0 then
table.insert(parts, string.format("%%#DiagnosticWarn# %d", warn_count))
end
if info_count > 0 then
table.insert(parts, string.format("%%#DiagnosticInfo# %d", info_count))
end
if hint_count > 0 then
table.insert(parts, string.format("%%#DiagnosticHint# %d", hint_count))
end
return table.concat(parts, " ")
end
-- Custom component for git status
local function git_status()
local gitsigns = vim.b.gitsigns_status_dict
if not gitsigns then
return ""
end
local parts = {}
if gitsigns.added and gitsigns.added > 0 then
table.insert(parts, string.format("%%#GitSignsAdd#+%d", gitsigns.added))
end
if gitsigns.changed and gitsigns.changed > 0 then
table.insert(parts, string.format("%%#GitSignsChange#~%d", gitsigns.changed))
end
if gitsigns.removed and gitsigns.removed > 0 then
table.insert(parts, string.format("%%#GitSignsDelete#-%d", gitsigns.removed))
end
return table.concat(parts, " ")
end
require("lualine").setup({
options = {
theme = bearded_arc_theme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = { "alpha", "dashboard", "NvimTree", "neo-tree" },
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = true,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
},
},
sections = {
lualine_a = {
{
"mode",
fmt = function(str)
return str:sub(1, 1) -- Show only first letter (N, I, V, etc.)
end,
},
},
lualine_b = {
{
"branch",
icon = "",
color = { fg = colors.light_grey },
},
{
git_status,
color = { bg = colors.lightbg },
},
},
lualine_c = {
{
"filename",
path = 1, -- Relative path
symbols = {
modified = " ",
readonly = " ",
unnamed = "[No Name]",
newfile = " ",
},
color = { bg = colors.lightbg, fg = colors.white },
},
{
lsp_diagnostics,
color = { bg = colors.bg },
},
},
lualine_x = {
{
lsp_status,
color = { fg = colors.nord_blue, bg = colors.bg },
},
{
"filetype",
colored = true,
icon_only = false,
icon = { align = "right" },
},
},
lualine_y = {
{
"progress",
color = { bg = colors.lightbg, fg = colors.white },
},
},
lualine_z = {
{
"location",
icon = "",
color = { bg = colors.green, fg = colors.black },
},
},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = { "lazy", "mason" },
})

View File

@@ -0,0 +1,174 @@
-- Standalone mappings (migrated from NvChad + custom)
local map = vim.keymap.set
-- === Basic Mappings ===
-- Command mode
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>", { desc = "Escape insert mode" })
-- Insert mode navigation
map("i", "<C-b>", "<ESC>^i", { desc = "Move beginning of line" })
map("i", "<C-e>", "<End>", { desc = "Move end of line" })
map("i", "<C-h>", "<Left>", { desc = "Move left" })
map("i", "<C-l>", "<Right>", { desc = "Move right" })
-- Window navigation
map("n", "<C-h>", "<C-w>h", { desc = "Switch window left" })
map("n", "<C-l>", "<C-w>l", { desc = "Switch window right" })
-- General
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "Clear highlights" })
map("n", "<C-s>", "<cmd>w<CR>", { desc = "Save file" })
map("n", "<C-c>", "<cmd>%y+<CR>", { desc = "Copy whole file" })
-- Toggle options
map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "Toggle line number" })
map("n", "<leader>rn", "<cmd>set rnu!<CR>", { desc = "Toggle relative number" })
-- Format
map({ "n", "x" }, "<leader>fm", function()
require("conform").format { lsp_fallback = true }
end, { desc = "Format file" })
-- Comment
map("n", "<leader>/", "gcc", { desc = "Toggle comment", remap = true })
map("v", "<leader>/", "gc", { desc = "Toggle comment", remap = true })
-- === LSP Mappings ===
map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" })
-- === Barbar buffer navigation ===
map("n", "<Tab>", "<cmd>BufferNext<cr>", { desc = "Next buffer" })
map("n", "<S-Tab>", "<cmd>BufferPrevious<cr>", { desc = "Previous buffer" })
map("n", "<leader>x", "<cmd>BufferClose<cr>", { desc = "Close buffer" })
map("n", "<leader>X", "<cmd>BufferClose!<cr>", { desc = "Force close buffer" })
map("n", "<leader>bn", "<cmd>enew<cr>", { desc = "New buffer" })
map("n", "<leader>bj", "<cmd>BufferPick<cr>", { desc = "Jump to buffer" })
map("n", "<leader>bp", "<cmd>BufferPin<cr>", { desc = "Pin/unpin buffer" })
map("n", "<A-,>", "<cmd>BufferPrevious<cr>", { desc = "Previous buffer" })
map("n", "<A-.>", "<cmd>BufferNext<cr>", { desc = "Next buffer" })
map("n", "<A-<>", "<cmd>BufferMovePrevious<cr>", { desc = "Move buffer left" })
map("n", "<A->>", "<cmd>BufferMoveNext<cr>", { desc = "Move buffer right" })
map("n", "<leader>bc", "<cmd>BufferCloseAllButCurrent<cr>", { desc = "Close all but current" })
map("n", "<leader>bC", "<cmd>BufferCloseAllButPinned<cr>", { desc = "Close all but pinned" })
map("n", "<A-1>", "<cmd>BufferGoto 1<cr>", { desc = "Go to buffer 1" })
map("n", "<A-2>", "<cmd>BufferGoto 2<cr>", { desc = "Go to buffer 2" })
map("n", "<A-3>", "<cmd>BufferGoto 3<cr>", { desc = "Go to buffer 3" })
map("n", "<A-4>", "<cmd>BufferGoto 4<cr>", { desc = "Go to buffer 4" })
map("n", "<A-5>", "<cmd>BufferGoto 5<cr>", { desc = "Go to buffer 5" })
map("n", "<A-6>", "<cmd>BufferGoto 6<cr>", { desc = "Go to buffer 6" })
map("n", "<A-7>", "<cmd>BufferGoto 7<cr>", { desc = "Go to buffer 7" })
map("n", "<A-8>", "<cmd>BufferGoto 8<cr>", { desc = "Go to buffer 8" })
map("n", "<A-9>", "<cmd>BufferGoto 9<cr>", { desc = "Go to buffer 9" })
map("n", "<A-0>", "<cmd>BufferLast<cr>", { desc = "Go to last buffer" })
-- === fzf-lua ===
local fzf = require('fzf-lua')
-- File finding
map("n", "<leader>ff", function() fzf.files() end, { desc = "Find files" })
map("n", "<leader>fa", function() fzf.files({ cmd = "fd --type f --hidden --follow --exclude .git" }) end, { desc = "Find all files" })
map("n", "<leader>fo", function() fzf.oldfiles() end, { desc = "Recent files" })
map("n", "<leader>fb", function() fzf.buffers() end, { desc = "Find buffers" })
-- Grep
map("n", "<leader>fw", function() fzf.live_grep() end, { desc = "Live grep" })
map("n", "<leader>fz", function() fzf.lgrep_curbuf() end, { desc = "Find in current buffer" })
-- Git
map("n", "<leader>cm", function() fzf.git_commits() end, { desc = "Git commits" })
map("n", "<leader>gt", function() fzf.git_status() end, { desc = "Git status" })
-- Other
map("n", "<leader>fh", function() fzf.help_tags() end, { desc = "Help tags" })
map("n", "<leader>ma", function() fzf.marks() end, { desc = "Marks" })
-- LSP
map('n', '<leader>fs', function() fzf.lsp_document_symbols() end, { desc = 'Document symbols' })
map('n', '<leader>fd', function() fzf.diagnostics_document({ severity_limit = vim.diagnostic.severity.ERROR }) end, { desc = "Buffer diagnostics" })
map('n', '<leader>fD', function() fzf.diagnostics_workspace({ severity_limit = vim.diagnostic.severity.ERROR }) end, { desc = "Workspace diagnostics" })
map('n', '<leader>fr', function() fzf.lsp_references() end, { desc = 'References' })
map('n', '<leader>fW', function() vim.diagnostic.open_float() end, { desc = "Open diagnostics window" })
map("n", "<leader>ca", function() vim.lsp.buf.code_action() end, { desc = 'Code action'})
-- === Themery ===
map("n", "<leader>th", "<cmd>Themery<CR>", { desc = "Theme switcher" })
-- === WhichKey ===
map("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "Show all keymaps" })
map("n", "<leader>wk", function()
vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ")
end, { desc = "Query lookup" })
-- === NvimTree ===
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle nvimtree" })
map("n", "<leader>e", "<cmd>NvimTreeFocus<CR>", { desc = "Focus nvimtree" })
-- === VGit ===
map('n', '<C-k>', function() require('vgit').hunk_up() end, { desc = 'Previous hunk' })
map('n', '<C-j>', function() require('vgit').hunk_down() end, { desc = 'Next hunk' })
map('n', '<leader>gs', function() require('vgit').buffer_hunk_stage() end, { desc = 'Stage hunk' })
map('n', '<leader>gr', function() require('vgit').buffer_hunk_reset() end, { desc = 'Reset hunk' })
map('n', '<leader>gp', function() require('vgit').buffer_hunk_preview() end, { desc = 'Preview hunk' })
map('n', '<leader>gb', function() require('vgit').buffer_blame_preview() end, { desc = 'Blame buffer' })
map('n', '<leader>gf', function() require('vgit').buffer_diff_preview() end, { desc = 'Show buffer diff' })
map('n', '<leader>gh', function() require('vgit').buffer_history_preview() end, { desc = 'Show buffer history' })
map('n', '<leader>gu', function() require('vgit').buffer_reset() end, { desc = 'Reset buffer' })
map('n', '<leader>gx', function() require('vgit').toggle_diff_preference() end, { desc = 'Toggle diff view' })
map('n', '<leader>gd', function() require('vgit').project_diff_preview() end, { desc = 'Show project diff' })
-- === Custom scrolling ===
map("n", "<C-Up>", "10k", { remap = true })
map("n", "<C-Down>", "10j", { remap = true })
-- === Move lines ===
map("n", "ø", ":m -2<CR>==", { desc = "Move line up" })
map("v", "ø", ":'<,'>m '<-2<CR>gv=gv", { desc = "Move selection up" })
map("n", "æ", ":m +1<CR>==", { desc = "Move line down" })
map("v", "æ", ":'<,'>m '>+1<CR>gv=gv", { desc = "Move selection down" })
-- === Cargo ===
map("n", "<leader>cr", function()
vim.cmd("vsplit")
vim.cmd("terminal cargo run")
end, { desc = "Cargo run in terminal" })
map("n", "<leader>cb", function()
vim.cmd("vsplit")
vim.cmd("terminal cargo build")
end, { desc = "Cargo build in terminal" })
-- === Claude Code ===
map("n", "<leader>cc", "<cmd>ClaudeCodeAdd %<cr>", { desc = "Add current file to Claude" })
map("v", "<leader>cc", "<cmd>ClaudeCodeSend<cr>", { desc = "Send to Claude Code" })
-- Create command for Claude context with range support
vim.api.nvim_create_user_command("ClaudeContext", function(opts)
local filepath = vim.fn.fnamemodify(vim.fn.expand("%"), ":.")
local context = string.format("@%s#L%d-%d", filepath, opts.line1, opts.line2)
vim.fn.setreg("+", context)
vim.notify("Copied: " .. context, vim.log.levels.INFO)
end, { range = true })
map("v", "<leader>cy", ":ClaudeContext<CR>", { desc = "Copy selection as Claude Code context" })
map("n", "<leader>ct", function()
vim.g.claude_mode = vim.g.claude_mode == "work" and "normal" or "work"
vim.notify("Claude mode: " .. vim.g.claude_mode, vim.log.levels.INFO)
end, { desc = "Toggle Claude mode (work/normal)" })

View File

@@ -0,0 +1,69 @@
-- Standalone options (migrated from NvChad)
local opt = vim.opt
local o = vim.o
local g = vim.g
-- UI
o.laststatus = 3 -- Global statusline
o.showmode = false -- Don't show mode (statusline handles it)
o.cursorline = true -- Highlight current line
o.cursorlineopt = "number" -- Only highlight line number
-- Clipboard
o.clipboard = "unnamedplus" -- Use system clipboard
-- Indenting
o.expandtab = true -- Use spaces instead of tabs
o.shiftwidth = 2 -- Indent width
o.smartindent = true -- Smart autoindenting
o.tabstop = 2 -- Tab width
o.softtabstop = 2 -- Backspace removes 2 spaces
-- UI elements
opt.fillchars = { eob = " " } -- Hide ~ on empty lines
o.ignorecase = true -- Ignore case in search
o.smartcase = true -- Case-sensitive if uppercase in search
o.mouse = "a" -- Enable mouse
-- Numbers
o.number = true -- Show line numbers
o.numberwidth = 2 -- Line number column width
o.ruler = false -- Don't show cursor position (statusline handles it)
-- Disable nvim intro
opt.shortmess:append "sI"
-- Sign column
o.signcolumn = "yes" -- Always show sign column
-- Splits
o.splitbelow = true -- Horizontal splits go below
o.splitright = true -- Vertical splits go right
-- Timeouts
o.timeoutlen = 400 -- Time to wait for mapped sequence
-- Files
o.undofile = true -- Persistent undo
-- Update time (used by gitsigns and swap file)
o.updatetime = 250
-- Navigation
opt.whichwrap:append "<>[]hl" -- Move to next/prev line with these keys
-- Disable unused providers (performance)
g.loaded_node_provider = 0
g.loaded_python3_provider = 0
g.loaded_perl_provider = 0
g.loaded_ruby_provider = 0
-- Add Mason binaries to PATH
local is_windows = vim.fn.has "win32" ~= 0
local sep = is_windows and "\\" or "/"
local delim = is_windows and ";" or ":"
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
-- User overrides
o.scrolloff = 10 -- Keep 10 lines visible above/below cursor

View File

@@ -0,0 +1,138 @@
-- LSP, completion, treesitter, and code formatting
return {
-- LSP server manager
{
"williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonUninstall", "MasonUpdate" },
opts = {
PATH = "skip",
ui = {
icons = {
package_pending = " ",
package_installed = " ",
package_uninstalled = " ",
},
},
max_concurrent_installers = 10,
},
},
-- Bridge between mason and lspconfig
{
"williamboman/mason-lspconfig.nvim",
dependencies = { "williamboman/mason.nvim" },
},
-- LSP configuration
{
"neovim/nvim-lspconfig",
event = "User FilePost",
config = function()
require "configs.lspconfig"
end,
},
-- Syntax highlighting
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
build = ":TSUpdate",
opts = {
ensure_installed = {
"lua", "vim", "vimdoc",
"rust", "c", "cpp", "glsl", "wgsl", "python",
},
highlight = {
enable = true,
use_languagetree = true,
},
indent = { enable = false },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
-- Completion engine (load on insert or command mode for faster startup)
{
"saghen/blink.cmp",
version = "1.*",
event = { "InsertEnter", "CmdlineEnter" },
dependencies = {
"saghen/blink.compat",
optional = true,
opts = {},
},
opts = {
keymap = {
preset = 'none',
['<Tab>'] = { 'select_next', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' },
['<Esc>'] = { 'hide', 'fallback' },
['<CR>'] = { 'accept', 'fallback' },
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
},
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = 'mono'
},
signature = {
enabled = true,
},
completion = {
menu = { border = "rounded" },
list = { selection = { auto_insert = false } },
},
sources = {
transform_items = function(_, items)
return vim.tbl_filter(function(item)
return item.kind ~= require('blink.cmp.types').CompletionItemKind.Snippet
end, items)
end,
},
},
},
-- Inline diagnostic messages
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy",
priority = 1000,
config = function()
require('tiny-inline-diagnostic').setup({
preset = "powerline",
})
vim.diagnostic.config({
virtual_text = false,
severity_sort = true,
})
end
},
-- Code formatter
{
'stevearc/conform.nvim',
opts = {
formatters_by_ft = {
wgsl = { 'wgslfmt' },
wesl = { 'wgslfmt' },
},
formatters = {
wgslfmt = {
command = 'wgslfmt',
args = { '-' },
stdin = true,
},
},
},
},
-- Filetype-specific plugins
{
"elkowar/yuck.vim",
ft = "yuck",
},
-- Disabled plugins
{ "hrsh7th/nvim-cmp", enabled = false },
}

View File

@@ -0,0 +1,30 @@
-- Core editor plugins
return {
-- Keybinding helper (lazy load on first key after leader)
{
"folke/which-key.nvim",
event = "VeryLazy",
},
-- Motion plugin (s/S for jumping) - load on key press
{
url = "https://codeberg.org/andyg/leap.nvim",
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward" },
},
config = function()
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap-forward)')
vim.keymap.set({'n', 'x', 'o'}, 'S', '<Plug>(leap-backward)')
end,
},
-- Session management (defer loading)
{
"rmagatti/auto-session",
event = "VimEnter",
opts = {
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
},
},
}

View File

@@ -0,0 +1,83 @@
-- Git, fuzzy finding, and file navigation
return {
-- Git signs in gutter
{
"lewis6991/gitsigns.nvim",
event = "User FilePost",
opts = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "󰍵" },
topdelete = { text = "" },
changedelete = { text = "󱕖" },
untracked = { text = "" },
},
},
},
-- Advanced git integration (defer until file is loaded)
{
'tanvirtin/vgit.nvim',
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons' },
event = 'User FilePost',
config = function()
require("vgit").setup({
settings = {
live_blame = {
enabled = false,
},
},
})
end,
},
-- Fuzzy finder
{
"ibhagwan/fzf-lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "VeryLazy",
config = function()
require("configs.fzf")
end,
},
-- File manager
{
"mikavilpas/yazi.nvim",
version = "*",
event = "VeryLazy",
dependencies = {
{ "nvim-lua/plenary.nvim", lazy = true },
},
keys = {
{
"<leader>-",
mode = { "n", "v" },
"<cmd>Yazi<cr>",
desc = "Open yazi at current file",
},
{
"<C-y>",
"<cmd>Yazi<cr>",
desc = "Open yazi at current file",
},
},
opts = {
open_for_directories = false,
keymaps = {
show_help = "<f1>",
},
},
init = function()
vim.g.loaded_netrwPlugin = 1
end,
},
{ "coder/claudecode.nvim",
event = "VeryLazy",
dependencies = { "folke/snacks.nvim" },
config = function()
require("configs.claudecode")
end
},
}

View File

@@ -0,0 +1,53 @@
-- UI and visual plugins
return {
-- Statusline
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "VeryLazy",
config = function()
require("configs.lualine")
end,
},
-- Buffer tabs
{
"romgrk/barbar.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "VeryLazy",
config = function()
require("configs.barbar")
end,
},
-- Improved UI for vim.ui.input and vim.ui.select (LSP rename, code actions, etc.)
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
input = {
enabled = true,
win = {
relative = "cursor",
row = 1,
col = 0,
},
},
select = {
enabled = false,
},
indent = {
enabled = true,
char = "",
},
notifier = {
enabled = true,
timeout = 6000,
},
quickfile = { enabled = false },
statuscolumn = { enabled = false },
words = { enabled = false },
},
},
}