diff --git a/lua/plugins/blink-supermaven.lua b/lua/plugins/blink-supermaven.lua new file mode 100644 index 0000000..33c06ef --- /dev/null +++ b/lua/plugins/blink-supermaven.lua @@ -0,0 +1,26 @@ +-- Native supermaven source for blink.cmp (mirrors the astrocommunity blink-copilot pattern). +-- Inline ghost text + accept come from `astrocommunity.completion.supermaven-nvim`; +-- this additionally surfaces supermaven suggestions in the blink menu so / work. +return { + "Huijiro/blink-cmp-supermaven", + lazy = true, + specs = { + { + "saghen/blink.cmp", + optional = true, + opts = { + sources = { + default = { "supermaven" }, + providers = { + supermaven = { + name = "supermaven", + module = "blink-cmp-supermaven", + score_offset = 100, + async = true, + }, + }, + }, + }, + }, + }, +} diff --git a/lua/plugins/external-tui.lua b/lua/plugins/external-tui.lua new file mode 100644 index 0000000..26bb913 --- /dev/null +++ b/lua/plugins/external-tui.lua @@ -0,0 +1,30 @@ +--- External TUIs without a dedicated snacks.nvim integration (nvim-external-tui). +--- Tools that DO have a native snacks path (lazygit -> Snacks.lazygit, +--- lazydocker -> Snacks.terminal) are wired directly in astrocore.lua. +---@type LazySpec +return { + "gfontenot/nvim-external-tui", + dependencies = { "folke/snacks.nvim" }, + event = "VeryLazy", + config = function() + local external_tui = require "external-tui" + + external_tui.setup { + -- the `scooter` win style (snacks opts.styles in user.lua) renders the + -- terminal as a borderless right-hand 30% split + terminal_provider = { + snacks = { win = { style = "scooter" } }, + }, + } + + -- :Scooter — find & replace TUI; picking a result closes the terminal + -- and opens the file at that line in this nvim instance. Visual range + -- (:'<,'>Scooter) and args (:Scooter term) prefill the search text. + external_tui.add { + user_cmd = "Scooter", + cmd = "scooter", + text_flag = "--search-text", + editor_flag = "--editor-command", -- scooter >= 0.8.4 + } + end, +} diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua new file mode 100644 index 0000000..82a9f96 --- /dev/null +++ b/lua/plugins/heirline.lua @@ -0,0 +1,140 @@ +--- Custom statusline (heirline via astroui.status components): +--- left = NvChad style: mode pill with separators, file info, git branch/diff +--- right = VSCode style: diagnostics (NvChad icons), LSP, Ln/Col, Spaces, +--- encoding, EOL, filetype — flat text, no powerline chunks +---@type LazySpec +return { + { + "AstroNvim/astroui", + ---@type AstroUIOpts + opts = { + icons = { + VimIcon = "", + GitBranch = "", + GitAdd = "", + GitChange = "", + GitDelete = "", + -- NvChad diagnostic icons + DiagnosticError = "󰅙", + DiagnosticWarn = "", + DiagnosticInfo = "󰋼", + DiagnosticHint = "󰛩", + }, + status = { + -- NvChad-style slanted separators for the left-side sections + separators = { + left = { "", "" }, + right = { " ", "" }, + }, + colors = function(hl) + local get_hlgroup = require("astroui").get_hlgroup + local comment_fg = get_hlgroup("Comment").fg + hl.git_branch_fg = comment_fg + hl.git_added = comment_fg + hl.git_changed = comment_fg + hl.git_removed = comment_fg + hl.blank_bg = get_hlgroup("Folded").fg + hl.file_info_bg = get_hlgroup("Visual").bg + return hl + end, + attributes = { + mode = { bold = true }, + }, + }, + }, + }, + + { + "rebelot/heirline.nvim", + opts = function(_, opts) + local status = require "astroui.status" + + opts.statusline = { + hl = { fg = "fg", bg = "bg" }, + + -- ────────────────── left: NvChad ────────────────── + status.component.mode { + mode_text = { + icon = { kind = "VimIcon", padding = { right = 1, left = 1 } }, + }, + surround = { + separator = "left", + color = function() return { main = status.hl.mode_bg(), right = "blank_bg" } end, + }, + }, + status.component.builder { + { provider = "" }, + surround = { + separator = "left", + color = { main = "blank_bg", right = "file_info_bg" }, + }, + }, + status.component.file_info { + filename = { fallback = "Empty" }, + filetype = false, + file_read_only = false, + padding = { right = 1 }, + surround = { separator = "left", condition = false }, + }, + status.component.git_branch { + git_branch = { padding = { left = 1 } }, + surround = { separator = "none" }, + }, + status.component.git_diff { + padding = { left = 1 }, + surround = { separator = "none" }, + }, + + status.component.fill(), + + -- ────────────────── right: VSCode ────────────────── + status.component.diagnostics { + padding = { right = 1 }, + surround = { separator = "none" }, + }, + status.component.lsp { + lsp_progress = false, + padding = { right = 1 }, + surround = { separator = "none" }, + }, + status.component.builder { + { + provider = function() + local pos = vim.api.nvim_win_get_cursor(0) + return ("Ln %d, Col %d"):format(pos[1], pos[2] + 1) + end, + }, + padding = { right = 2 }, + }, + status.component.builder { + { + provider = function() + if vim.bo.expandtab then return ("Spaces: %d"):format(vim.bo.shiftwidth) end + return ("Tab Size: %d"):format(vim.bo.tabstop) + end, + }, + padding = { right = 2 }, + }, + status.component.builder { + { + provider = function() + local enc = (vim.bo.fileencoding ~= "" and vim.bo.fileencoding) or vim.o.encoding + local eol = ({ unix = "LF", dos = "CRLF", mac = "CR" })[vim.bo.fileformat] or vim.bo.fileformat + return ("%s %s"):format(enc:upper(), eol) + end, + }, + padding = { right = 2 }, + }, + status.component.file_info { + file_icon = false, + filename = false, + filetype = {}, + file_modified = false, + file_read_only = false, + padding = { right = 1 }, + surround = { separator = "none", condition = false }, + }, + } + end, + }, +}