From 5a77be0d38500d8cbdb503c4b297689edc0f4ef9 Mon Sep 17 00:00:00 2001 From: lew Date: Mon, 23 Feb 2026 15:07:08 +0000 Subject: [PATCH] Add .config/nvim/colors/colibri-transparent.lua Add .config/nvim/colors/colibri.lua Add .config/nvim/.luarc.json Add .config/nvim/init.lua Add .config/nvim/lazy-lock.json Add .config/nvim/lua/config/00_lazy.lua Add .config/nvim/lua/config/10_opts.lua Add .config/nvim/lua/config/20_keymaps.lua Add .config/nvim/lua/config/30_autocmds.lua Add .config/nvim/lua/config/40_statusline.lua Add .config/nvim/lua/plugin/00_treesitter.lua Add .config/nvim/lua/plugin/01_lsp.lua Add .config/nvim/lua/plugin/02_completion.lua Add .config/nvim/lua/plugin/03_tmux.lua Add .config/nvim/lua/plugin/04_fzflua.lua Add .config/nvim/lua/plugin/05_whichkey.lua Add .config/nvim/lua/plugin/06_leap.lua Add .config/nvim/lua/plugin/07_oil.lua Add .config/nvim/lua/plugin/09_gitsigns.lua Add .config/nvim/lua/plugin/10_conform.lua Add .config/nvim/lua/plugin/11_yanky.lua Add .config/nvim/lua/plugin/12_neoscroll.lua Add .config/nvim/lua/plugins/dankcolors.lua Add .config/nvim/snippets/global.json Add .config/nvim/snippets/lua.json Add .config/nvim/snippets/package.json Add .config/nvim/stylua.toml --- .../nvim/colors/colibri-transparent.lua | 197 ++++++++++++++++++ private_dot_config/nvim/colors/colibri.lua | 197 ++++++++++++++++++ private_dot_config/nvim/dot_luarc.json | 8 + private_dot_config/nvim/init.lua | 40 ++++ private_dot_config/nvim/lazy-lock.json | 29 +++ .../nvim/lua/config/00_lazy.lua | 29 +++ .../nvim/lua/config/10_opts.lua | 44 ++++ .../nvim/lua/config/20_keymaps.lua | 38 ++++ .../nvim/lua/config/30_autocmds.lua | 8 + .../nvim/lua/config/40_statusline.lua | 19 ++ .../nvim/lua/plugin/00_treesitter.lua | 15 ++ private_dot_config/nvim/lua/plugin/01_lsp.lua | 49 +++++ .../nvim/lua/plugin/02_completion.lua | 67 ++++++ .../nvim/lua/plugin/03_tmux.lua | 48 +++++ .../nvim/lua/plugin/04_fzflua.lua | 33 +++ .../nvim/lua/plugin/05_whichkey.lua | 34 +++ .../nvim/lua/plugin/06_leap.lua | 45 ++++ private_dot_config/nvim/lua/plugin/07_oil.lua | 35 ++++ .../nvim/lua/plugin/09_gitsigns.lua | 36 ++++ .../nvim/lua/plugin/10_conform.lua | 39 ++++ .../nvim/lua/plugin/11_yanky.lua | 19 ++ .../nvim/lua/plugin/12_neoscroll.lua | 8 + .../nvim/lua/plugins/dankcolors.lua | 91 ++++++++ private_dot_config/nvim/snippets/global.json | 17 ++ private_dot_config/nvim/snippets/lua.json | 1 + private_dot_config/nvim/snippets/package.json | 1 + private_dot_config/nvim/stylua.toml | 4 + 27 files changed, 1151 insertions(+) create mode 100644 private_dot_config/nvim/colors/colibri-transparent.lua create mode 100644 private_dot_config/nvim/colors/colibri.lua create mode 100644 private_dot_config/nvim/dot_luarc.json create mode 100644 private_dot_config/nvim/init.lua create mode 100644 private_dot_config/nvim/lazy-lock.json create mode 100644 private_dot_config/nvim/lua/config/00_lazy.lua create mode 100644 private_dot_config/nvim/lua/config/10_opts.lua create mode 100644 private_dot_config/nvim/lua/config/20_keymaps.lua create mode 100644 private_dot_config/nvim/lua/config/30_autocmds.lua create mode 100644 private_dot_config/nvim/lua/config/40_statusline.lua create mode 100644 private_dot_config/nvim/lua/plugin/00_treesitter.lua create mode 100644 private_dot_config/nvim/lua/plugin/01_lsp.lua create mode 100644 private_dot_config/nvim/lua/plugin/02_completion.lua create mode 100644 private_dot_config/nvim/lua/plugin/03_tmux.lua create mode 100644 private_dot_config/nvim/lua/plugin/04_fzflua.lua create mode 100644 private_dot_config/nvim/lua/plugin/05_whichkey.lua create mode 100644 private_dot_config/nvim/lua/plugin/06_leap.lua create mode 100644 private_dot_config/nvim/lua/plugin/07_oil.lua create mode 100644 private_dot_config/nvim/lua/plugin/09_gitsigns.lua create mode 100644 private_dot_config/nvim/lua/plugin/10_conform.lua create mode 100644 private_dot_config/nvim/lua/plugin/11_yanky.lua create mode 100644 private_dot_config/nvim/lua/plugin/12_neoscroll.lua create mode 100644 private_dot_config/nvim/lua/plugins/dankcolors.lua create mode 100644 private_dot_config/nvim/snippets/global.json create mode 100644 private_dot_config/nvim/snippets/lua.json create mode 100644 private_dot_config/nvim/snippets/package.json create mode 100644 private_dot_config/nvim/stylua.toml diff --git a/private_dot_config/nvim/colors/colibri-transparent.lua b/private_dot_config/nvim/colors/colibri-transparent.lua new file mode 100644 index 0000000..762fdf8 --- /dev/null +++ b/private_dot_config/nvim/colors/colibri-transparent.lua @@ -0,0 +1,197 @@ +-- stylua: ignore start +local p = { + none = "NONE", + fg = "#a4a0e8", + bg = "NONE", + + bg_l = "NONE", + accent = "#dbbfef", + + white = "#ffffff", + gray_l = "#cccccc", + gray = "#697C81", + gray_d = "#5a5977", + black = "#281733", + + pink = "#f22c86", + red = "#f47868", + orange = "#efba5d", + green = "#9ff28f", + green_d = "#35bf86", + yellow = "#ffcd1c", + chamois = "#E8DCA0", + almond = "#eccdba", + blue = "#61afef", + delta = "#6F44F0", + selection = "#540099", +} + +local function l(name) return { link = name } end + +local highlights = { + -- Core UI + Normal = { fg = p.fg, bg = p.bg }, + NormalNC = l("Normal"), + NormalFloat = { fg = p.fg, bg = p.black }, + Visual = { fg = p.none, bg = p.selection }, + VisualNOS = { fg = p.fg, bg = p.none }, + FloatBorder = l("NormalFloat"), + WinSeparator = { fg = p.bg_l }, + + -- Cursor / lines + Cursor = { fg = p.bg, bg = p.white }, + CursorIM = l("Cursor"), + lCursor = l("Cursor"), + CursorLine = { bg = p.bg_l }, + ColorColumn = l("CursorLine"), + CursorColumn = l("CursorLine"), + CursorLineNr = { fg = p.white }, + + -- Gutter + Folded = { fg = p.gray, bg = p.none }, + LineNr = { fg = p.gray, bg = p.none }, + NonText = l("LineNr"), + SpecialKey = l("LineNr"), + + -- Menus / popups + Pmenu = { fg = p.white, bg = p.black }, + PmenuSel = { fg = p.none, bg = p.bg_l }, + PmenuSbar = { fg = p.none, bg = p.black }, + PmenuThumb = { fg = p.none, bg = p.white }, + WildMenu = { fg = p.black, bg = p.blue }, + Terminal = l("Pmenu"), + + -- Tabs + TabLine = l("LineNr"), + TabLineSel = { fg = p.white, bg = p.none }, + TabLineFill = { fg = p.none, bg = p.black }, + + -- Bars + WinBar = { fg = p.fg, bg = p.bg }, + WinBarNC = { fg = p.gray, bg = p.bg }, + + -- Status + StatusLine = { fg = p.white, bg = p.bg_l }, + StatusLineNC = { fg = p.gray, bg = p.none }, + + -- Search / match + IncSearch = { fg = p.yellow, bg = p.gray }, + CurSearch = l("IncSearch"), + Search = { fg = p.black, bg = p.yellow }, + QuickFixLine = { fg = p.black, bg = p.yellow }, + MatchParen = { fg = p.none, bg = p.gray_d }, + + -- Diff + DiffAdd = { fg = p.black, bg = p.green }, + DiffChange = { fg = p.yellow, bg = p.none }, + DiffDelete = { fg = p.bg_l, bg = p.red }, + DiffText = { fg = p.black, bg = p.yellow }, + DiffAdded = { fg = p.green }, + DiffNewFile = l("DiffAdded"), + DiffRemoved = { fg = p.red }, + DiffChanged = { fg = p.blue }, + DiffFile = l("DiffChanged"), + DiffOldFile = { fg = p.yellow }, + DiffLine = { fg = p.bg_l }, + DiffIndexLine = { fg = p.green_d }, + + -- Messages + Title = { fg = p.white }, + ErrorMsg = { fg = p.red, bg = p.none }, + WarningMsg = { fg = p.yellow, bg = p.none }, + Question = { fg = p.delta, bg = p.none }, + + -- Spell + SpellBad = { undercurl = true }, + SpellCap = l("SpellBad"), + SpellLocal = l("SpellBad"), + SpellRare = l("SpellBad"), + + -- Syntax + Comment = { fg = p.gray, bg = p.none }, + SpecialComment = l("Comment"), + Ignore = l("Comment"), + Todo = l("Comment"), + Constant = { fg = p.blue, bg = p.none }, + String = { fg = p.gray_l, bg = p.none }, + Character = { fg = p.orange, bg = p.none }, + Number = { fg = p.chamois, bg = p.none }, + Float = l("Number"), + Boolean = { fg = p.almond, bg = p.none }, + Identifier = { fg = p.fg, bg = p.none }, + Delimiter = l("Identifier"), + Function = { fg = p.accent, bg = p.none, bold = true }, + Statement = { fg = p.almond, bg = p.none }, + Conditional = l("Statement"), + Repeat = l("Statement"), + Label = l("Statement"), + Exception = l("Statement"), + Include = l("Statement"), + Define = l("Statement"), + Tag = l("Statement"), + Operator = { fg = p.white, bg = p.none }, + Keyword = { fg = p.almond, bg = p.none }, + PreProc = { fg = p.accent, bg = p.none }, + Macro = l("PreProc"), + PreCondit = l("PreProc"), + Type = { fg = p.white, bg = p.none }, + StorageClass = l("Type"), + Structure = l("Type"), + Typedef = l("Type"), + Special = { fg = p.accent, bg = p.none }, + SpecialChar = l("Special"), + Underlined = { fg = p.white, bg = p.none }, + Debug = { fg = "#634450", bg = p.none }, + Conceal = { fg = p.gray, bg = p.none }, + Directory = { fg = p.blue, bg = p.none }, + + -- Diagnostics + DiagnosticError = { fg = p.red }, + DiagnosticHint = { fg = p.gray_l }, + DiagnosticInfo = { fg = p.delta }, + DiagnosticWarn = { fg = p.yellow }, + DiagnosticUnderlineError = { sp = p.red, undercurl = true }, + DiagnosticUnderlineHint = l("DiagnosticUnderlineError"), + DiagnosticUnderlineInfo = l("DiagnosticUnderlineError"), + DiagnosticUnderlineWarn = l("DiagnosticUnderlineError"), + + -- Lsp UI + LspInlayHint = l("Comment"), + LspCodeLens = { fg = p.gray_d }, + LspCodeLensSeparator = l("LspCodeLens"), + LspReferenceText = { fg = p.none, bg = p.bg }, + LspReferenceRead = l("LspReferenceText"), + LspReferenceWrite = l("LspReferenceText"), + + -- Lsp captures + ["@lsp.typemod.selfKeyword.defaultLibrary"] = { fg = p.green, bg = p.none }, + ["@lsp.type.parameter"] = l("Identifier"), + ["@lsp.type.variable"] = l("Identifier"), + ["@lsp.typemod.variable.defaultLibrary"] = l("Identifier"), + ["@lsp.typemod.enumMember.defaultLibrary"] = l("Constant"), + ["@lsp.typemod.variable.readonly"] = l("Constant"), + ["@lsp.type.operator"] = l("Operator"), + ["@lsp.type.property"] = l("Operator"), + ["@lsp.type.keyword"] = l("Keyword"), + ["@lsp.type.macro"] = l("PreProc"), + ["@lsp.type.builtinType"] = l("Type"), + ["@lsp.typemod.function.defaultLibrary"] = l("Function"), + ["@lsp.typemod.function.global"] = l("Function"), + ["@lsp.typemod.method.defaultLibrary"] = l("Function"), + ["@lsp.typemod.method.reference"] = l("Function"), + ["@lsp.typemod.method.trait"] = l("Function"), +} +-- stylua: ignore end + +if vim.fn.exists("syntax_on") == 1 then + vim.cmd("hi clear") + vim.cmd.syntax("reset") +end + +vim.o.background = "dark" +vim.o.termguicolors = true +vim.g.colors_name = "colibri" + +for name, value in pairs(highlights) do + vim.api.nvim_set_hl(0, name, value) +end diff --git a/private_dot_config/nvim/colors/colibri.lua b/private_dot_config/nvim/colors/colibri.lua new file mode 100644 index 0000000..abe1a7e --- /dev/null +++ b/private_dot_config/nvim/colors/colibri.lua @@ -0,0 +1,197 @@ +-- stylua: ignore start +local p = { + none = "NONE", + fg = "#a4a0e8", + bg = "#3b224c", + + bg_l = "#452859", + accent = "#dbbfef", + + white = "#ffffff", + gray_l = "#cccccc", + gray = "#697C81", + gray_d = "#5a5977", + black = "#281733", + + pink = "#f22c86", + red = "#f47868", + orange = "#efba5d", + green = "#9ff28f", + green_d = "#35bf86", + yellow = "#ffcd1c", + chamois = "#E8DCA0", + almond = "#eccdba", + blue = "#61afef", + delta = "#6F44F0", + selection = "#540099", +} + +local function l(name) return { link = name } end + +local highlights = { + -- Core UI + Normal = { fg = p.fg, bg = p.bg }, + NormalNC = l("Normal"), + NormalFloat = { fg = p.fg, bg = p.black }, + Visual = { fg = p.none, bg = p.selection }, + VisualNOS = { fg = p.fg, bg = p.none }, + FloatBorder = l("NormalFloat"), + WinSeparator = { fg = p.bg_l }, + + -- Cursor / lines + Cursor = { fg = p.bg, bg = p.white }, + CursorIM = l("Cursor"), + lCursor = l("Cursor"), + CursorLine = { bg = p.bg_l }, + ColorColumn = l("CursorLine"), + CursorColumn = l("CursorLine"), + CursorLineNr = { fg = p.white }, + + -- Gutter + Folded = { fg = p.gray, bg = p.none }, + LineNr = { fg = p.gray, bg = p.none }, + NonText = l("LineNr"), + SpecialKey = l("LineNr"), + + -- Menus / popups + Pmenu = { fg = p.white, bg = p.black }, + PmenuSel = { fg = p.none, bg = p.bg_l }, + PmenuSbar = { fg = p.none, bg = p.black }, + PmenuThumb = { fg = p.none, bg = p.white }, + WildMenu = { fg = p.black, bg = p.blue }, + Terminal = l("Pmenu"), + + -- Tabs + TabLine = l("LineNr"), + TabLineSel = { fg = p.white, bg = p.none }, + TabLineFill = { fg = p.none, bg = p.black }, + + -- Bars + WinBar = { fg = p.fg, bg = p.bg }, + WinBarNC = { fg = p.gray, bg = p.bg }, + + -- Status + StatusLine = { fg = p.white, bg = p.bg_l }, + StatusLineNC = { fg = p.gray, bg = p.none }, + + -- Search / match + IncSearch = { fg = p.yellow, bg = p.gray }, + CurSearch = l("IncSearch"), + Search = { fg = p.black, bg = p.yellow }, + QuickFixLine = { fg = p.black, bg = p.yellow }, + MatchParen = { fg = p.none, bg = p.gray_d }, + + -- Diff + DiffAdd = { fg = p.black, bg = p.green }, + DiffChange = { fg = p.yellow, bg = p.none }, + DiffDelete = { fg = p.bg_l, bg = p.red }, + DiffText = { fg = p.black, bg = p.yellow }, + DiffAdded = { fg = p.green }, + DiffNewFile = l("DiffAdded"), + DiffRemoved = { fg = p.red }, + DiffChanged = { fg = p.blue }, + DiffFile = l("DiffChanged"), + DiffOldFile = { fg = p.yellow }, + DiffLine = { fg = p.bg_l }, + DiffIndexLine = { fg = p.green_d }, + + -- Messages + Title = { fg = p.white }, + ErrorMsg = { fg = p.red, bg = p.none }, + WarningMsg = { fg = p.yellow, bg = p.none }, + Question = { fg = p.delta, bg = p.none }, + + -- Spell + SpellBad = { undercurl = true }, + SpellCap = l("SpellBad"), + SpellLocal = l("SpellBad"), + SpellRare = l("SpellBad"), + + -- Syntax + Comment = { fg = p.gray, bg = p.none }, + SpecialComment = l("Comment"), + Ignore = l("Comment"), + Todo = l("Comment"), + Constant = { fg = p.blue, bg = p.none }, + String = { fg = p.gray_l, bg = p.none }, + Character = { fg = p.orange, bg = p.none }, + Number = { fg = p.chamois, bg = p.none }, + Float = l("Number"), + Boolean = { fg = p.almond, bg = p.none }, + Identifier = { fg = p.fg, bg = p.none }, + Delimiter = l("Identifier"), + Function = { fg = p.accent, bg = p.none, bold = true }, + Statement = { fg = p.almond, bg = p.none }, + Conditional = l("Statement"), + Repeat = l("Statement"), + Label = l("Statement"), + Exception = l("Statement"), + Include = l("Statement"), + Define = l("Statement"), + Tag = l("Statement"), + Operator = { fg = p.white, bg = p.none }, + Keyword = { fg = p.almond, bg = p.none }, + PreProc = { fg = p.accent, bg = p.none }, + Macro = l("PreProc"), + PreCondit = l("PreProc"), + Type = { fg = p.white, bg = p.none }, + StorageClass = l("Type"), + Structure = l("Type"), + Typedef = l("Type"), + Special = { fg = p.accent, bg = p.none }, + SpecialChar = l("Special"), + Underlined = { fg = p.white, bg = p.none }, + Debug = { fg = "#634450", bg = p.none }, + Conceal = { fg = p.gray, bg = p.none }, + Directory = { fg = p.blue, bg = p.none }, + + -- Diagnostics + DiagnosticError = { fg = p.red }, + DiagnosticHint = { fg = p.gray_l }, + DiagnosticInfo = { fg = p.delta }, + DiagnosticWarn = { fg = p.yellow }, + DiagnosticUnderlineError = { sp = p.red, undercurl = true }, + DiagnosticUnderlineHint = l("DiagnosticUnderlineError"), + DiagnosticUnderlineInfo = l("DiagnosticUnderlineError"), + DiagnosticUnderlineWarn = l("DiagnosticUnderlineError"), + + -- Lsp UI + LspInlayHint = l("Comment"), + LspCodeLens = { fg = p.gray_d }, + LspCodeLensSeparator = l("LspCodeLens"), + LspReferenceText = { fg = p.none, bg = p.bg }, + LspReferenceRead = l("LspReferenceText"), + LspReferenceWrite = l("LspReferenceText"), + + -- Lsp captures + ["@lsp.typemod.selfKeyword.defaultLibrary"] = { fg = p.green, bg = p.none }, + ["@lsp.type.parameter"] = l("Identifier"), + ["@lsp.type.variable"] = l("Identifier"), + ["@lsp.typemod.variable.defaultLibrary"] = l("Identifier"), + ["@lsp.typemod.enumMember.defaultLibrary"] = l("Constant"), + ["@lsp.typemod.variable.readonly"] = l("Constant"), + ["@lsp.type.operator"] = l("Operator"), + ["@lsp.type.property"] = l("Operator"), + ["@lsp.type.keyword"] = l("Keyword"), + ["@lsp.type.macro"] = l("PreProc"), + ["@lsp.type.builtinType"] = l("Type"), + ["@lsp.typemod.function.defaultLibrary"] = l("Function"), + ["@lsp.typemod.function.global"] = l("Function"), + ["@lsp.typemod.method.defaultLibrary"] = l("Function"), + ["@lsp.typemod.method.reference"] = l("Function"), + ["@lsp.typemod.method.trait"] = l("Function"), +} +-- stylua: ignore end + +if vim.fn.exists("syntax_on") == 1 then + vim.cmd("hi clear") + vim.cmd.syntax("reset") +end + +vim.o.background = "dark" +vim.o.termguicolors = true +vim.g.colors_name = "colibri" + +for name, value in pairs(highlights) do + vim.api.nvim_set_hl(0, name, value) +end diff --git a/private_dot_config/nvim/dot_luarc.json b/private_dot_config/nvim/dot_luarc.json new file mode 100644 index 0000000..50e6d5c --- /dev/null +++ b/private_dot_config/nvim/dot_luarc.json @@ -0,0 +1,8 @@ +{ + "diagnostics.globals": [ + "vim" + ], + "diagnostics.disable": [ + "param-type-mismatch" + ] +} \ No newline at end of file diff --git a/private_dot_config/nvim/init.lua b/private_dot_config/nvim/init.lua new file mode 100644 index 0000000..0ff4f07 --- /dev/null +++ b/private_dot_config/nvim/init.lua @@ -0,0 +1,40 @@ +-- init.lua +-- +-- Configuration Structure: +-- ├ init.lua -- Bootstraps config (you are here) +-- ├ lua/ +-- │ ├ colors/ -- colorscheme definitions +-- │ │ ├ colibri -- the Helix theme +-- │ │ ├ colibri-transparent -- the Helix theme (no bg) +-- │ ├ config/ -- Startup configuration files +-- │ │ ├ 00_lazy.lua -- Bootstraps lazy.nvim +-- │ │ ├ 10_opts.lua -- Built-in Neovim options +-- │ │ ├ 20_keymaps.lua -- Custom keymaps +-- │ │ ├ 30_autocmds.lua -- Custom autocommands +-- │ │ └ 40_statusline.lua -- Minimal statusline +-- │ └ plugin/ -- Plugin configurations for lazy.nvim +-- │ ├ 00_treesitter.lua -- Treesitter configuration +-- │ ├ 01_lsp.lua -- Mason and LSP configurations +-- │ ├ 02_completion.lua -- Autocompletion (blink.cmp, mini.snippets) +-- │ ├ 03_tmux.lua -- Tmux integrations +-- │ ├ 04_fzflua.lua -- Fuzzy pickers with fzf-lua +-- │ ├ 05_whichkey.lua -- Displays keymaps on input +-- │ ├ 06_leap.lua -- Enables word hopping in buffer +-- │ ├ 07_oil.lua -- Treat filesystem as a buffer +-- │ ├ 09_gitsigns.lua -- Git integration (Gitsigns) +-- │ ├ 10_conform.lua -- Formatting (vim-sleuth, conform) +-- │ ├ 11_yanky.lua -- Yank and put enhancements +-- │ └ 12_neoscroll.lua -- Animations +-- └ snippets/ -- Snippet definitions +-- ├ package.json -- Snippet repository metadata +-- ├ global.json -- Global text snippets +-- ├ lua.json -- Lua-specific snippets +-- └ etc. -- Other language-specific snippets + +require("config.00_lazy") +require("config.10_opts") +require("config.20_keymaps") +require("config.30_autocmds") +require("config.40_statusline") + +-- vim.cmd.colorscheme("colibri-transparent") diff --git a/private_dot_config/nvim/lazy-lock.json b/private_dot_config/nvim/lazy-lock.json new file mode 100644 index 0000000..82ee661 --- /dev/null +++ b/private_dot_config/nvim/lazy-lock.json @@ -0,0 +1,29 @@ +{ + "base16-nvim": { "branch": "master", "commit": "21f2946e45cb92a336638d68c8de292fdf451d0c" }, + "blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fzf-lua": { "branch": "main", "commit": "123cc546c4618f5fd90d5db2da5643e76979162c" }, + "gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "leap.nvim": { "branch": "main", "commit": "1fc7f38b69cc4644505e3ff74ba69b1682a85dd9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" }, + "mini.pairs": { "branch": "main", "commit": "b316e68f2d242d5bd010deaab645daa27ed86297" }, + "mini.snippets": { "branch": "main", "commit": "b4065ca6b33e4df2897672d3bb760cfc93f4390a" }, + "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, + "nvim-lspconfig": { "branch": "master", "commit": "b7c48a7111534b66bee077da8035ac7208a294ff" }, + "nvim-scissors": { "branch": "main", "commit": "659627e50af4d26ccbde6cf891a849814a919337" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" }, + "oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" }, + "roslyn.nvim": { "branch": "main", "commit": "e2901d86d7c1702b88c02b9616802845dc6d49f8" }, + "tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, + "yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" } +} diff --git a/private_dot_config/nvim/lua/config/00_lazy.lua b/private_dot_config/nvim/lua/config/00_lazy.lua new file mode 100644 index 0000000..3daaa98 --- /dev/null +++ b/private_dot_config/nvim/lua/config/00_lazy.lua @@ -0,0 +1,29 @@ +-- 00_lazy.lua +-- Bootstraps lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +require("lazy").setup({ + spec = { + { import = "plugin" }, + { import = "plugins" }, + }, + install = { colorscheme = { "habamax" } }, + checker = { enabled = true, notify = false }, +}) diff --git a/private_dot_config/nvim/lua/config/10_opts.lua b/private_dot_config/nvim/lua/config/10_opts.lua new file mode 100644 index 0000000..4db6566 --- /dev/null +++ b/private_dot_config/nvim/lua/config/10_opts.lua @@ -0,0 +1,44 @@ +-- 10_opts.lua +-- stylua: ignore start +-- General =================================== +vim.g.mapleader = " " +vim.o.mouse = "" +vim.o.mousescroll = "ver:25,hor:6" +vim.o.switchbuf = "usetab" +vim.o.undofile = true +-- UI ======================================== +vim.o.breakindent = true +vim.o.breakindentopt = "list:-1" +vim.o.colorcolumn = "+1" +vim.o.cursorline = true +vim.o.linebreak = true +vim.o.list = true +vim.o.number = true +vim.o.relativenumber = true +vim.o.pumheight = 10 +vim.o.ruler = false +vim.o.signcolumn = "yes" +vim.o.splitbelow = true +vim.o.splitright = true +vim.o.winborder = "single" +vim.o.wrap = false +vim.o.cursorlineopt = "screenline,number" +-- Folds ===================================== +vim.o.foldlevel = 10 +vim.o.foldmethod = "indent" +vim.o.foldnestmax = 10 +vim.o.foldtext = "" +-- Editing =================================== +vim.o.autoindent = true +vim.o.expandtab = true +vim.o.ignorecase = true +vim.o.incsearch = true +vim.o.infercase = true +vim.o.smartcase = true +vim.o.smartindent = true +vim.o.virtualedit = "block" +vim.o.iskeyword = "@,48-57,_,192-255,-" +vim.o.tabstop = 2 +vim.o.shiftwidth = 2 +-- Diagnostic ================================ +vim.diagnostic.config({ virtual_text = true }) diff --git a/private_dot_config/nvim/lua/config/20_keymaps.lua b/private_dot_config/nvim/lua/config/20_keymaps.lua new file mode 100644 index 0000000..12c4a95 --- /dev/null +++ b/private_dot_config/nvim/lua/config/20_keymaps.lua @@ -0,0 +1,38 @@ +-- 20_keymaps.lua +---@diagnostic disable: unused-local, unused-function +-- stylua: ignore start + +local map = function(mode, lhs, rhs, desc) + vim.keymap.set(mode, lhs, rhs, { noremap = true, desc = desc }) +end + +local nop = function(lhs) map({ "n", "v" }, lhs, "", "") end +local nmap = function(lhs, rhs, desc) map("n", lhs, rhs, desc) end +local xmap = function(lhs, rhs, desc) map("x", lhs, rhs, desc) end + +local nmap_leader = function(lhs, rhs, desc) nmap("" .. lhs, rhs, desc) end + +nop('s') +nop('v') + +nmap_leader(';', 'vsplit', 'vsplit') +nmap_leader('-', 'split', 'hsplit') + +nmap_leader('ca', 'lua vim.lsp.buf.code_action()', 'lsp code action') +nmap_leader('ci', 'lua vim.lsp.buf.implementation()', 'lsp find implementation') +nmap_leader('cr', 'lua vim.lsp.buf.references()', 'lsp find references') +nmap_leader('cR', 'lua vim.lsp.buf.rename()', 'lsp rename') + +local c = function(rhs) + return function() + local count = vim.v.count1 + for _ = 1, count do + vim.cmd(rhs) + end + end +end + +nmap(">", c("normal! >>"), "indent") +nmap("<", c("normal! <<"), "dedent") +xmap(">", ">gv", "indent and reselect") +xmap("<", "sa", + "ScissorsAddNewSnippet", + mode = { "n", "x" }, + desc = "Save selection as snippet", + }, + { + "se", + "ScissorsEditSnippet", + mode = { "n", "x" }, + desc = "Edit existing snippet", + }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/03_tmux.lua b/private_dot_config/nvim/lua/plugin/03_tmux.lua new file mode 100644 index 0000000..50daf45 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/03_tmux.lua @@ -0,0 +1,48 @@ +return { + { + "aserowy/tmux.nvim", + opts = { + copy_sync = { + enable = true, + ignore_buffers = { empty = false }, + redirect_to_clipboard = false, + register_offset = 0, + sync_clipboard = false, + sync_registers = true, + sync_registers_keymap_put = true, + sync_registers_keymap_reg = true, + sync_deletes = true, + sync_unnamed = true, + }, + navigation = { + cycle_navigation = true, + enable_default_keybindings = false, + persist_zoom = false, + }, + resize = { + enable_default_keybindings = false, + resize_step_x = 5, + resize_step_y = 3, + }, + swap = { + cycle_navigation = false, + enable_default_kebindings = false, + }, + }, + -- stylua: ignore + keys = { + { "", function() require("tmux").move_left() end, }, + { "", function() require("tmux").move_right() end, }, + { "", function() require("tmux").move_top() end, }, + { "", function() require("tmux").move_bottom() end, }, + { "", function() require("tmux").resize_left() end, }, + { "", function() require("tmux").resize_right() end, }, + { "", function() require("tmux").resize_top() end, }, + { "", function() require("tmux").resize_bottom() end, }, + { "", function() require("tmux").swap_left() end, }, + { "", function() require("tmux").swap_right() end, }, + { "", function() require("tmux").swap_top() end, }, + { "", function() require("tmux").swap_bottom() end, }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/04_fzflua.lua b/private_dot_config/nvim/lua/plugin/04_fzflua.lua new file mode 100644 index 0000000..a0985b8 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/04_fzflua.lua @@ -0,0 +1,33 @@ +return { + { + "ibhagwan/fzf-lua", + dependencies = { { "nvim-mini/mini.icons" }, { "folke/trouble.nvim" } }, + opts = function(_, _) + local config = require("fzf-lua.config") + local actions = require("trouble.sources.fzf").actions + config.defaults.actions.files["ctrl-t"] = actions.open + return { + winopts = { + preview = { + vertical = "down:65%", + flip_columns = 120, + }, + }, + files = { git_icons = true }, + } + end, + -- stylua: ignore + keys = { + { 'f"', "FzfLua registers", mode = { "n" }, desc = "fzf registers" }, + { "fb", "FzfLua buffers", mode = { "n" }, desc = "fzf buffers" }, + { "fc", "FzfLua commands", mode = { "n" }, desc = "fzf commands" }, + { "fe", "FzfLua changes", mode = { "n" }, desc = "fzf edits" }, + { "ff", "FzfLua files", mode = { "n" }, desc = "fzf files" }, + { "fg", "FzfLua live_grep", mode = { "n" }, desc = "fzf grep" }, + { "fh", "FzfLua command_history", mode = { "n" }, desc = "fzf cmd history" }, + { "fk", "FzfLua keymaps", mode = { "n" }, desc = "fzf keymaps" }, + { "fr", "FzfLua oldfiles", mode = { "n" }, desc = "fzf oldfiles" }, + { "fs", "FzfLua", mode = { "n" }, desc = "fzf something else" }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/05_whichkey.lua b/private_dot_config/nvim/lua/plugin/05_whichkey.lua new file mode 100644 index 0000000..c5f442d --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/05_whichkey.lua @@ -0,0 +1,34 @@ +return { + { + "folke/which-key.nvim", + event = "VeryLazy", + dependencies = { "echasnovski/mini.icons" }, + opts = function() + local i = require("mini.icons") + + return { + preset = "helix", + delay = function(ctx) + return ctx.plugin and 0 or 20 + end, + -- stylua: ignore + spec = { + { "f", group = "find" }, + { "a", group = "ai" }, + { "g", group = "git" }, + { "c", group = "lsp actions", icon = i.get("lsp", "class") }, + { "s", group = "snippets", icon = i.get("directory", "snippets") }, + }, + } + end, + keys = { + { + "?", + function() + require("which-key").show({ global = true }) + end, + desc = "show local keymaps", + }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/06_leap.lua b/private_dot_config/nvim/lua/plugin/06_leap.lua new file mode 100644 index 0000000..1db45ad --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/06_leap.lua @@ -0,0 +1,45 @@ +return { + { + "ggandor/leap.nvim", + config = function() + require("leap").opts.preview = function(ch0, ch1, ch2) + return not ( + ch1:match("%s") + or (ch0:match("%a") and ch1:match("%a") and ch2:match("%a")) + ) + end + + -- hop label at start of word, rather than the end + require("leap").opts.on_beacons = function(targets, _, _) + for _, t in ipairs(targets) do + if t.label and t.beacon then + t.beacon[1] = 0 + end + end + end + + -- gray out backdrop when selecting + vim.api.nvim_set_hl(0, "LeapBackdrop", { link = "Comment" }) + + require("leap").opts.equivalence_classes = { + " \t\r\n", + "([{", + ")]}", + "'\"`", + } + + vim.keymap.set({ "n", "x", "o" }, "s", function() + require("leap").leap({ target_windows = vim.api.nvim_list_wins() }) + if vim.fn.mode() == "v" then + vim.cmd("normal! iw") + end + end) + + vim.keymap.set({ "n", "o" }, "gs", function() + require("leap.remote").action({ + input = vim.fn.mode(true):match("o") and "" or "v", + }) + end) + end, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/07_oil.lua b/private_dot_config/nvim/lua/plugin/07_oil.lua new file mode 100644 index 0000000..aead4bc --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/07_oil.lua @@ -0,0 +1,35 @@ +return { + { + "stevearc/oil.nvim", + dependencies = { { "nvim-mini/mini.icons" } }, + opts = { + use_default_keymaps = false, + view_options = { + show_hidden = true, + }, + keymaps = { + ["g?"] = { "actions.show_help", mode = "n" }, + [""] = "actions.select", + [""] = "actions.preview", + ["-"] = { "actions.parent", mode = "n" }, + ["="] = { "actions.open_cwd", mode = "n" }, + ["+"] = { "actions.cd", mode = "n" }, + [";"] = { "actions.select", opts = { vertical = true } }, + ["-"] = { "actions.select", opts = { horizontal = true } }, + ["x"] = "actions.open_external", + ["g."] = { "actions.toggle_hidden", mode = "n" }, + }, + float = { + padding = 2, + max_width = 0, + max_height = 0, + border = nil, + preview_split = "auto", + }, + }, + lazy = false, + keys = { + { "o", mode = "n", "Oil", desc = "oil" }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/09_gitsigns.lua b/private_dot_config/nvim/lua/plugin/09_gitsigns.lua new file mode 100644 index 0000000..74b7160 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/09_gitsigns.lua @@ -0,0 +1,36 @@ +return { + { + "lewis6991/gitsigns.nvim", + opts = {}, + keys = { + { + "gb", + function() + require("gitsigns").blame_line() + end, + desc = "git blame current line", + }, + { + "g]", + function() + require("gitsigns").nav_hunk("next") + end, + desc = "git next hunk", + }, + { + "g[", + function() + require("gitsigns").nav_hunk("prev") + end, + desc = "git prev hunk", + }, + { + "gp", + function() + require("gitsigns").preview_hunk_inline() + end, + desc = "git preview hunk", + }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/10_conform.lua b/private_dot_config/nvim/lua/plugin/10_conform.lua new file mode 100644 index 0000000..2a925fb --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/10_conform.lua @@ -0,0 +1,39 @@ +return { + { + "tpope/vim-sleuth", + }, + { + "stevearc/conform.nvim", + event = { "BufWritePre" }, + cmd = { "ConformInfo" }, + keys = { + { + "af", + function() + require("conform").format({ async = true }) + end, + mode = "", + desc = "format buffer", + }, + }, + opts = { + formatters_by_ft = { + lua = { "stylua" }, + python = { "isort", "black" }, + javascript = { "prettierd", "prettier", stop_after_first = true }, + }, + default_format_opts = { + lsp_format = "fallback", + }, + format_on_save = { timeout_ms = 500 }, + formatters = { + shfmt = { + append_args = { "-i", "2" }, + }, + }, + }, + init = function() + vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" + end, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/11_yanky.lua b/private_dot_config/nvim/lua/plugin/11_yanky.lua new file mode 100644 index 0000000..0e60578 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/11_yanky.lua @@ -0,0 +1,19 @@ +return { + { + "gbprod/yanky.nvim", + -- stylua: ignore + keys = { + { "y", "(YankyYank)", desc = "yank" }, + { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "put after" }, + { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "put before" }, + { "[p", "(YankyPutIndentBeforeLinewise)", mode = { "n", "x" }, desc = "put after line" }, + { "]p", "(YankyPutIndentAfterLinewise)", mode = { "n", "x" }, desc = "put before line" }, + { "", "(YankyPreviousEntry)", mode = "n", desc = "previous yank" }, + { "", "(YankyNextEntry)", mode = "n", desc = "next yank" }, + { "fy", "YankyRingHistory", mode = { "n", "x" }, desc = "yank history" }, + }, + opts = { + preserve_cursor_position = { enabled = true }, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugin/12_neoscroll.lua b/private_dot_config/nvim/lua/plugin/12_neoscroll.lua new file mode 100644 index 0000000..67c9a48 --- /dev/null +++ b/private_dot_config/nvim/lua/plugin/12_neoscroll.lua @@ -0,0 +1,8 @@ +return { + { + "karb94/neoscroll.nvim", + opts = { + duration_multiplier = 0.3, + }, + }, +} diff --git a/private_dot_config/nvim/lua/plugins/dankcolors.lua b/private_dot_config/nvim/lua/plugins/dankcolors.lua new file mode 100644 index 0000000..cc3e830 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/dankcolors.lua @@ -0,0 +1,91 @@ +return { + { + "RRethy/base16-nvim", + priority = 1000, + config = function() + require('base16-colorscheme').setup({ + base00 = '#131314', + base01 = '#131314', + base02 = '#7f8389', + base03 = '#7f8389', + base04 = '#d1d6de', + base05 = '#f8fbff', + base06 = '#f8fbff', + base07 = '#f8fbff', + base08 = '#ff9fbb', + base09 = '#ff9fbb', + base0A = '#d4dde9', + base0B = '#a5feb1', + base0C = '#f3f7ff', + base0D = '#d4dde9', + base0E = '#ecf4ff', + base0F = '#ecf4ff', + }) + + vim.api.nvim_set_hl(0, 'Visual', { + bg = '#7f8389', + fg = '#f8fbff', + bold = true + }) + vim.api.nvim_set_hl(0, 'Statusline', { + bg = '#d4dde9', + fg = '#131314', + }) + vim.api.nvim_set_hl(0, 'LineNr', { fg = '#7f8389' }) + vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#f3f7ff', bold = true }) + + vim.api.nvim_set_hl(0, 'Statement', { + fg = '#ecf4ff', + bold = true + }) + vim.api.nvim_set_hl(0, 'Keyword', { link = 'Statement' }) + vim.api.nvim_set_hl(0, 'Repeat', { link = 'Statement' }) + vim.api.nvim_set_hl(0, 'Conditional', { link = 'Statement' }) + + vim.api.nvim_set_hl(0, 'Function', { + fg = '#d4dde9', + bold = true + }) + vim.api.nvim_set_hl(0, 'Macro', { + fg = '#d4dde9', + italic = true + }) + vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' }) + + vim.api.nvim_set_hl(0, 'Type', { + fg = '#f3f7ff', + bold = true, + italic = true + }) + vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' }) + + vim.api.nvim_set_hl(0, 'String', { + fg = '#a5feb1', + italic = true + }) + + vim.api.nvim_set_hl(0, 'Operator', { fg = '#d1d6de' }) + vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#d1d6de' }) + vim.api.nvim_set_hl(0, '@punctuation.bracket', { link = 'Delimiter' }) + vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' }) + + vim.api.nvim_set_hl(0, 'Comment', { + fg = '#7f8389', + italic = true + }) + + local current_file_path = vim.fn.stdpath("config") .. "/lua/plugins/dankcolors.lua" + if not _G._matugen_theme_watcher then + local uv = vim.uv or vim.loop + _G._matugen_theme_watcher = uv.new_fs_event() + _G._matugen_theme_watcher:start(current_file_path, {}, vim.schedule_wrap(function() + local new_spec = dofile(current_file_path) + if new_spec and new_spec[1] and new_spec[1].config then + new_spec[1].config() + print("Theme reload") + end + end)) + end + end + } +} diff --git a/private_dot_config/nvim/snippets/global.json b/private_dot_config/nvim/snippets/global.json new file mode 100644 index 0000000..f1202b0 --- /dev/null +++ b/private_dot_config/nvim/snippets/global.json @@ -0,0 +1,17 @@ +{ + "Current datetime": { + "prefix": "cdtm", + "body": "$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND", + "description": "Insert current datetime (YYYY-mm-dd HH:MM:SS)" + }, + "Current date": { + "prefix": "cdate", + "body": "$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE", + "description": "Insert current date (YYYY-mm-dd)" + }, + "Current time": { + "prefix": "ctime", + "body": "$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND", + "description": "Insert current time (HH:MM:SS)" + } +} diff --git a/private_dot_config/nvim/snippets/lua.json b/private_dot_config/nvim/snippets/lua.json new file mode 100644 index 0000000..7f8c961 --- /dev/null +++ b/private_dot_config/nvim/snippets/lua.json @@ -0,0 +1 @@ +{"newplugin":{"body":["return {"," {"," '${1:plugin}',"," },","}"],"prefix":"newplugin"}} \ No newline at end of file diff --git a/private_dot_config/nvim/snippets/package.json b/private_dot_config/nvim/snippets/package.json new file mode 100644 index 0000000..07abdd3 --- /dev/null +++ b/private_dot_config/nvim/snippets/package.json @@ -0,0 +1 @@ +{"description":"This package.json has been generated by nvim-scissors.","name":"my-snippets","contributes":{"snippets":[{"language":["lua"],"path":"./lua.json"}]}} \ No newline at end of file diff --git a/private_dot_config/nvim/stylua.toml b/private_dot_config/nvim/stylua.toml new file mode 100644 index 0000000..2600da7 --- /dev/null +++ b/private_dot_config/nvim/stylua.toml @@ -0,0 +1,4 @@ +column_width = 80 +indent_type = "Spaces" +quote_style = "AutoPreferDouble" +indent_width = 2