diff --git a/.gitignore b/.gitignore index c481e10..44ee30e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Local overrides *.local .pre-commit-config.yaml +.github/workflows *.private # SSH / GPG diff --git a/dot_config/hypr/hyprland.conf.tmpl b/dot_config/hypr/hyprland.conf.tmpl index 0d6183c..2b74d8a 100644 --- a/dot_config/hypr/hyprland.conf.tmpl +++ b/dot_config/hypr/hyprland.conf.tmpl @@ -165,8 +165,8 @@ env = TERMINAL, $terminal # https://wiki.hypr.land/Configuring/Variables/#general general { - gaps_in = 0 - gaps_out = 5 + gaps_in = 3 + gaps_out = 11 gaps_workspaces = 50 border_size = 2 diff --git a/dot_config/hyprpanel/config.json b/dot_config/hyprpanel/config.json index 60f4d54..45d01d4 100644 --- a/dot_config/hyprpanel/config.json +++ b/dot_config/hyprpanel/config.json @@ -374,5 +374,28 @@ "bar.customModules.hyprsunset.onLabel": "", "bar.customModules.hyprsunset.offLabel": "", "bar.clock.icon": "", - "theme.bar.buttons.clock.spacing": "0em" + "theme.bar.buttons.clock.spacing": "0em", + "scalingPriority": "gdk", + "tear": true, + "bar.windowtitle.custom_title": true, + "theme.bar.buttons.windowtitle.enableBorder": false, + "bar.workspaces.workspaceMask": false, + "bar.workspaces.showWsIcons": false, + "bar.workspaces.showApplicationIcons": false, + "bar.workspaces.show_numbered": false, + "bar.workspaces.show_icons": true, + "bar.workspaces.monitorSpecific": true, + "bar.workspaces.numbered_active_indicator": "color", + "bar.windowtitle.title_map": [ + [ + "kitty", + "󰄛", + "Kitty" + ], + [ + "equibop", + "", + "Discord" + ] + ] } \ No newline at end of file diff --git a/dot_config/nvim/lua/config/autocmds.lua b/dot_config/nvim/lua/config/autocmds.lua index 6e2b749..66ce826 100644 --- a/dot_config/nvim/lua/config/autocmds.lua +++ b/dot_config/nvim/lua/config/autocmds.lua @@ -1,5 +1,4 @@ -- Autocmds are loaded after plugins --- Source: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Helper function for creating augroups with clear = true local function augroup(name) diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua index bedcdce..3a35971 100644 --- a/dot_config/nvim/lua/config/keymaps.lua +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -1,5 +1,4 @@ -- Keymaps are loaded after plugins --- Source: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua local map = vim.keymap.set @@ -52,12 +51,12 @@ map("n", "|", "v", { desc = "Split window right" }) map("n", "wd", "c", { desc = "Delete window" }) -- Diagnostics (basic ones handled by lsp.lua, these are error-specific) -map("n", "]e", function() vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR }) end, { desc = "Next error" }) -map("n", "[e", function() vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR }) end, { desc = "Prev error" }) +-- stylua: ignore +map("n", "]e", function() vim.diagnostic.jump({ severity = vim.diagnostic.severity.ERROR }) end, { desc = "Next error" }) +-- stylua: ignore +map("n", "[e", function() vim.diagnostic.jump({ severity = vim.diagnostic.severity.ERROR }) end, { desc = "Prev error" }) --- Quickfix -map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" }) -map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" }) +-- Note: Quickfix [q/]q handled by diagnostics.lua (Trouble-aware) -- New file map("n", "fn", "enew", { desc = "New file" }) diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua index 90ed4fc..583d73e 100644 --- a/dot_config/nvim/lua/config/lazy.lua +++ b/dot_config/nvim/lua/config/lazy.lua @@ -22,7 +22,6 @@ require("lazy").setup({ defaults = { lazy = true, }, - install = { colorscheme = { "habamax" } }, checker = { enabled = true, notify = false, diff --git a/dot_config/nvim/lua/plugins/bufferline.lua b/dot_config/nvim/lua/plugins/bufferline.lua new file mode 100644 index 0000000..aaf77e6 --- /dev/null +++ b/dot_config/nvim/lua/plugins/bufferline.lua @@ -0,0 +1,76 @@ +-- lua/plugins/bufferline.lua +return { + "akinsho/bufferline.nvim", + version = "*", + event = "VeryLazy", + dependencies = { + "nvim-tree/nvim-web-devicons", + "echasnovski/mini.bufremove", + }, + opts = function() + local diag_icons = { + Error = " ", + Warn = " ", + Info = " ", + Hint = "󰌵 ", + } + + local function bufdelete(bufnr) + require("mini.bufremove").delete(bufnr, false) + end + + return { + options = { + close_command = bufdelete, + right_mouse_command = bufdelete, + + diagnostics = "nvim_lsp", + always_show_bufferline = false, + + diagnostics_indicator = function(_, _, diag) + local ret = "" + if diag.error and diag.error > 0 then + ret = ret .. diag_icons.Error .. diag.error .. " " + end + if diag.warning and diag.warning > 0 then + ret = ret .. diag_icons.Warn .. diag.warning + end + return vim.trim(ret) + end, + + offsets = { + { + filetype = "neo-tree", + text = "Neo-tree", + highlight = "Directory", + text_align = "left", + }, + { + filetype = "snacks_layout_box", + }, + }, + + ---@param opts bufferline.IconFetcherOpts + get_element_icon = function(opts) + local devicons = require("nvim-web-devicons") + local icon, hl = devicons.get_icon_by_filetype(opts.filetype, { default = true }) + return icon, hl + end, + }, + } + end, + config = function(_, opts) + require("bufferline").setup(opts) + + -- Small safety refresh: helps keep tabline correct after session restores / buffer churn + vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, { + callback = function() + vim.schedule(function() + pcall(function() + vim.cmd("redrawtabline") + end) + end) + end, + }) + end, +} diff --git a/dot_config/nvim/lua/plugins/catppuccin.lua b/dot_config/nvim/lua/plugins/catppuccin.lua index 99d9c11..12787c8 100644 --- a/dot_config/nvim/lua/plugins/catppuccin.lua +++ b/dot_config/nvim/lua/plugins/catppuccin.lua @@ -1,5 +1,4 @@ -- Colorscheme: Catppuccin --- Mocha flavour with integrations for all UI plugins return { { "catppuccin/nvim", @@ -8,7 +7,7 @@ return { priority = 1000, opts = { flavour = "mocha", - transparent_background = false, + transparent_background = true, term_colors = true, styles = { comments = { "italic" }, diff --git a/dot_config/nvim/lua/plugins/chezmoi.lua b/dot_config/nvim/lua/plugins/chezmoi.lua index a3cedd6..2f169b5 100644 --- a/dot_config/nvim/lua/plugins/chezmoi.lua +++ b/dot_config/nvim/lua/plugins/chezmoi.lua @@ -14,13 +14,60 @@ return { "xvzc/chezmoi.nvim", init = function() - -- auto chezmoi apply and enter + -- auto chezmoi apply and enter when editing source files vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { pattern = { vim.env.HOME .. "/Chezmoi/Source/*" }, callback = function() vim.schedule(require("chezmoi.commands.__edit").watch) end, }) + + -- Cache for managed files (to avoid calling chezmoi on every save) + local managed_files_cache = {} + local cache_checked = false + + -- Function to check if a file is managed by chezmoi + local function is_chezmoi_managed(filepath) + -- Build cache on first check + if not cache_checked then + local result = vim.fn.systemlist("chezmoi managed --include=files 2>/dev/null") + if vim.v.shell_error == 0 then + for _, file in ipairs(result) do + -- chezmoi managed returns paths relative to home + local full_path = vim.env.HOME .. "/" .. file + managed_files_cache[full_path] = true + end + end + cache_checked = true + end + return managed_files_cache[filepath] == true + end + + -- Auto re-add managed files on save + vim.api.nvim_create_autocmd("BufWritePost", { + group = vim.api.nvim_create_augroup("chezmoi_auto_add", { clear = true }), + callback = function(event) + local filepath = vim.fn.expand("%:p") + if is_chezmoi_managed(filepath) then + vim.fn.jobstart({ "chezmoi", "re-add", filepath }, { + on_exit = function(_, code) + if code == 0 then + vim.notify("Chezmoi: re-added " .. vim.fn.fnamemodify(filepath, ":~"), vim.log.levels.INFO) + else + vim.notify("Chezmoi: failed to re-add " .. filepath, vim.log.levels.ERROR) + end + end, + }) + end + end, + }) + + -- Command to refresh the managed files cache + vim.api.nvim_create_user_command("ChezmoiRefreshCache", function() + managed_files_cache = {} + cache_checked = false + vim.notify("Chezmoi managed files cache cleared", vim.log.levels.INFO) + end, { desc = "Refresh chezmoi managed files cache" }) end, }, } diff --git a/dot_config/nvim/lua/plugins/completion.lua b/dot_config/nvim/lua/plugins/completion.lua index 2bac176..cfc7378 100644 --- a/dot_config/nvim/lua/plugins/completion.lua +++ b/dot_config/nvim/lua/plugins/completion.lua @@ -1,4 +1,4 @@ --- Completion engine with nvim-cmp and mini.snippets integration +-- Completions with nvim-cmp and mini.snippets -- Source order: nvim_lsp first, then snippets, then buffer (after 3 chars), then path return { @@ -17,7 +17,7 @@ return { end, }, - -- Completion engine + -- Completion nvim-cmp { "hrsh7th/nvim-cmp", event = "InsertEnter", @@ -55,7 +55,9 @@ return { [""] = cmp.mapping.abort(), [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping(function(fallback) - if cmp.visible() then + if vim.lsp.inline_completion.get() then + vim.lsp.inline_completion.accept() + elseif cmp.visible() then cmp.select_next_item() else fallback() diff --git a/dot_config/nvim/lua/plugins/copilot.lua b/dot_config/nvim/lua/plugins/copilot.lua index 3b16a81..e8b4826 100644 --- a/dot_config/nvim/lua/plugins/copilot.lua +++ b/dot_config/nvim/lua/plugins/copilot.lua @@ -30,28 +30,4 @@ return { }, }, }, - - -- Copilot as cmp source (optional - can use ghost text instead) - { - "zbirenbaum/copilot-cmp", - dependencies = "copilot.lua", - opts = {}, - config = function(_, opts) - local copilot_cmp = require("copilot_cmp") - copilot_cmp.setup(opts) - - -- Add copilot to cmp sources if cmp is loaded - vim.api.nvim_create_autocmd("LspAttach", { - callback = function() - local cmp_ok, cmp = pcall(require, "cmp") - if cmp_ok then - local config = cmp.get_config() - table.insert(config.sources, 1, { name = "copilot", group_index = 1 }) - cmp.setup(config) - end - end, - once = true, - }) - end, - }, } diff --git a/dot_config/nvim/lua/plugins/cord.lua b/dot_config/nvim/lua/plugins/cord.lua index b850f32..d5958d7 100644 --- a/dot_config/nvim/lua/plugins/cord.lua +++ b/dot_config/nvim/lua/plugins/cord.lua @@ -33,6 +33,9 @@ return { return activity end, }, + idle = { + enabled = false, + }, assets = {}, } end, diff --git a/dot_config/nvim/lua/plugins/formatting.lua b/dot_config/nvim/lua/plugins/formatting.lua index 3955de0..e245cf4 100644 --- a/dot_config/nvim/lua/plugins/formatting.lua +++ b/dot_config/nvim/lua/plugins/formatting.lua @@ -23,6 +23,10 @@ return { markdown = { "prettier" }, json = { "prettier" }, jsonc = { "prettier" }, + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, } for _, formatter_opts in pairs(formatters) do diff --git a/dot_config/nvim/lua/plugins/lang/yaml.lua b/dot_config/nvim/lua/plugins/lang/yaml.lua index b1a0cc2..41ae193 100644 --- a/dot_config/nvim/lua/plugins/lang/yaml.lua +++ b/dot_config/nvim/lua/plugins/lang/yaml.lua @@ -36,7 +36,7 @@ return { capabilities = vim.tbl_deep_extend("force", capabilities, cmp_lsp.default_capabilities()) end - -- Configure yamlls with SchemaStore + -- Configure yamlls with SchemaStore (includes kubernetes schemas automatically) vim.lsp.config("yamlls", { capabilities = capabilities, settings = { @@ -45,16 +45,19 @@ return { enable = false, -- Disable built-in schemaStore url = "", -- Avoid fetching from URL }, - schemas = require("schemastore").yaml.schemas(), + schemas = require("schemastore").yaml.schemas({ + extra = { + -- Add kubernetes schema for common k8s file patterns + { + description = "Kubernetes", + fileMatch = { "**/kubernetes/**/*.yaml", "**/k8s/**/*.yaml", "*.k8s.yaml" }, + name = "kubernetes", + url = "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.29.0-standalone-strict/all.json", + }, + }, + }), }, }, - on_attach = function(client, bufnr) - -- Kubernetes file detection - local filename = vim.api.nvim_buf_get_name(bufnr) - if filename:match("kubernetes") or filename:match("k8s") then - client.config.settings.yaml.schemas["kubernetes"] = filename - end - end, }) end, }, diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index eff3d74..0b3ae5b 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -73,12 +73,43 @@ return { vim.lsp.config("zls", { capabilities = capabilities }) vim.lsp.config("taplo", { capabilities = capabilities }) + -- TypeScript/JavaScript LSP + vim.lsp.config("ts_ls", { + capabilities = capabilities, + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + }, + }, + javascript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + }, + }, + }, + }) + + -- JSON LSP (SchemaStore configured in lang/json.lua) + vim.lsp.config("jsonls", { capabilities = capabilities }) + + -- QML LSP (for Qt/Quickshell) + vim.lsp.config("qmlls", { + capabilities = capabilities, + cmd = { "qmlls6" }, -- Qt6 binary name on most distros + filetypes = { "qml", "qmljs" }, + }) + -- Setup Mason require("mason").setup() -- Setup mason-lspconfig with Mason 2.0 automatic_enable require("mason-lspconfig").setup({ - ensure_installed = { "lua_ls", "gopls", "nil_ls", "zls", "taplo" }, + ensure_installed = { "lua_ls", "gopls", "nil_ls", "zls", "taplo", "ts_ls", "jsonls" }, automatic_enable = { exclude = { "rust_analyzer" }, -- rustaceanvim handles Rust (Plan 03-09) }, diff --git a/dot_config/nvim/lua/plugins/lualine.lua b/dot_config/nvim/lua/plugins/lualine.lua index c7c40f1..fd47e2a 100644 --- a/dot_config/nvim/lua/plugins/lualine.lua +++ b/dot_config/nvim/lua/plugins/lualine.lua @@ -1,5 +1,4 @@ -- Statusline: Lualine --- LazyVim-equivalent sections with catppuccin theme return { { "nvim-lualine/lualine.nvim", @@ -35,18 +34,20 @@ return { return { options = { - theme = "catppuccin", + theme = "auto", globalstatus = true, disabled_filetypes = { statusline = { "dashboard", "snacks_dashboard" }, }, - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, }, sections = { lualine_a = { "mode" }, - lualine_b = { "branch" }, + lualine_b = { "filename" }, lualine_c = { + { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, + { "filename", path = 1 }, { "diagnostics", symbols = { @@ -56,8 +57,6 @@ return { hint = icons.diagnostics.Hint, }, }, - { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, - { "filename", path = 1 }, }, lualine_x = { { @@ -80,12 +79,13 @@ return { }, }, lualine_y = { - { "progress", separator = " ", padding = { left = 1, right = 0 } }, + "branch", + { "progress", separator = " ", padding = { left = 1, right = 0 } }, { "location", padding = { left = 0, right = 1 } }, }, lualine_z = { function() - return " " .. os.date("%R") + return " " .. os.date("%R") end, }, }, diff --git a/dot_config/nvim/lua/plugins/mini.lua b/dot_config/nvim/lua/plugins/mini.lua index bd12150..6543af3 100644 --- a/dot_config/nvim/lua/plugins/mini.lua +++ b/dot_config/nvim/lua/plugins/mini.lua @@ -31,13 +31,13 @@ return { -- Default mappings: -- sa = add, sd = delete, sr = replace, sf = find, sF = find left, sh = highlight mappings = { - add = "sa", -- Add surrounding - delete = "sd", -- Delete surrounding - find = "sf", -- Find surrounding (right) - find_left = "sF", -- Find surrounding (left) - highlight = "sh", -- Highlight surrounding - replace = "sr", -- Replace surrounding - update_n_lines = "sn", -- Update n_lines + add = "gsa", -- Add surrounding + delete = "gsd", -- Delete surrounding + find = "gsf", -- Find surrounding (right) + find_left = "gsF", -- Find surrounding (left) + highlight = "gsh", -- Highlight surrounding + replace = "gsr", -- Replace surrounding + update_n_lines = "gsn", -- Update n_lines }, }, }, diff --git a/dot_config/nvim/lua/plugins/snacks.lua b/dot_config/nvim/lua/plugins/snacks.lua index b99124a..41c9b31 100644 --- a/dot_config/nvim/lua/plugins/snacks.lua +++ b/dot_config/nvim/lua/plugins/snacks.lua @@ -9,29 +9,46 @@ return { local header_art = get_header(nil, true) local greeting_data = greeting.get_greeting() - -- Check if we're in a git repo + -- Get chezmoi source path + local chezmoi_source = vim.fn.system("chezmoi source-path"):gsub("%s+$", "") + if vim.v.shell_error ~= 0 or chezmoi_source == "" then + chezmoi_source = vim.fn.expand("~/.local/share/chezmoi") + end + + -- Check if in a git repo local is_git_repo = vim.fn.isdirectory(".git") == 1 or vim.fn.system("git rev-parse --is-inside-work-tree 2>/dev/null"):match("true") - -- Check window width for layout decision (threshold: 160 columns for side-by-side) + -- Check window width for layout (threshold: 160 columns for side-by-side) local is_wide_window = vim.o.columns >= 160 - -- Startup + clock section helper - local function startup_clock_section(pane_num) + -- Info box section (date + plugins + startup time in bordered box) + local function info_box_section(pane_num) return function() + local date_text = "󰃭 " .. os.date("Today is %a %d %b") local stats = require("lazy").stats() local ms = math.floor(stats.startuptime * 100 + 0.5) / 100 - local time = os.date("%H:%M") + local plugins_text = "󰒲 " .. tostring(stats.loaded) .. "/" .. tostring(stats.count) .. " plugins loaded in " .. ms .. "ms" + + -- Center the shorter line by adding equal padding on both sides + local max_len = math.max(#date_text, #plugins_text) + local date_diff = max_len - #date_text + local date_left_pad = string.rep(" ", math.floor(date_diff / 2)) + local date_right_pad = string.rep(" ", math.ceil(date_diff / 2)) + local plugins_diff = max_len - #plugins_text + local plugins_left_pad = string.rep(" ", math.floor(plugins_diff / 2)) + local plugins_right_pad = string.rep(" ", math.ceil(plugins_diff / 2)) + local section = { align = "center", + padding = 1, text = { - { "󰥔 ", hl = "SnacksDashboardIcon" }, - { time, hl = "SnacksDashboardKey" }, - { "", hl = "SnacksDashboardDesc" }, - { " loaded ", hl = "SnacksDashboardIcon" }, - { tostring(stats.loaded) .. "/" .. tostring(stats.count), hl = "SnacksDashboardKey" }, - { " in ", hl = "SnacksDashboardDesc" }, - { ms .. "ms", hl = "SnacksDashboardKey" }, + { "┌ ", hl = "SnacksDashboardDesc" }, + { date_left_pad .. date_text .. date_right_pad, hl = "SnacksDashboardDesc" }, + { " ┐\n", hl = "SnacksDashboardDesc" }, + { "└ ", hl = "SnacksDashboardDesc" }, + { plugins_left_pad .. plugins_text .. plugins_right_pad, hl = "SnacksDashboardDesc" }, + { " ┘", hl = "SnacksDashboardDesc" }, }, } if pane_num then @@ -41,19 +58,19 @@ return { end end - -- Build final dashboard sections + -- final dashboard sections local dashboard_sections if is_git_repo and is_wide_window then -- Wide window + git repo: Two-pane layout (header left, onefetch right) dashboard_sections = { { pane = 1, section = "header" }, - { pane = 1, section = "keys", gap = 1, padding = 1 }, { pane = 1, text = greeting_data.main, align = "center", gap = 1, padding = 1 }, } if greeting_data.late then - table.insert(dashboard_sections, { pane = 1, text = greeting_data.late, align = "center", padding = 1 }) + table.insert(dashboard_sections, { pane = 1, text = greeting_data.late, align = "center", padding = 0.5 }) end - table.insert(dashboard_sections, startup_clock_section(1)) + table.insert(dashboard_sections, info_box_section(1)) + table.insert(dashboard_sections, { pane = 1, section = "keys", gap = 1, padding = 1 }) -- Git info on pane 2 table.insert(dashboard_sections, { pane = 2, @@ -68,38 +85,52 @@ return { -- Narrow window + git repo: onefetch replaces header dashboard_sections = { { section = "terminal", cmd = "onefetch --no-color-palette", ttl = 0, width = 80, height = 20, padding = 1 }, - { section = "keys", gap = 1, padding = 1 }, { text = greeting_data.main, align = "center", gap = 1, padding = 1 }, } if greeting_data.late then - table.insert(dashboard_sections, { text = greeting_data.late, align = "center", padding = 1 }) + table.insert(dashboard_sections, { text = greeting_data.late, align = "center", padding = 0.5 }) end - table.insert(dashboard_sections, startup_clock_section(nil)) + table.insert(dashboard_sections, info_box_section(nil)) + table.insert(dashboard_sections, { section = "keys", gap = 1, padding = 1 }) else -- Not in git repo: normal dashboard with header dashboard_sections = { { section = "header" }, - { section = "keys", gap = 1, padding = 1 }, { text = greeting_data.main, align = "center", gap = 1, padding = 1 }, } if greeting_data.late then - table.insert(dashboard_sections, { text = greeting_data.late, align = "center", padding = 1 }) + table.insert(dashboard_sections, { text = greeting_data.late, align = "center", padding = 0.5 }) end - table.insert(dashboard_sections, startup_clock_section(nil)) + table.insert(dashboard_sections, info_box_section(nil)) + table.insert(dashboard_sections, { section = "keys", gap = 1, padding = 1 }) end return { bigfile = { enabled = true }, dashboard = { enabled = true, + width = 40, preset = { keys = { { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.picker.files()" }, { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, { icon = " ", key = "p", desc = "Projects", action = ":lua Snacks.picker.projects()" }, { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.picker.grep()" }, - { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.picker.recent()" }, - { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.picker.files({ cwd = vim.fn.stdpath('config') })", }, + { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.picker.recent()" }, + { + icon = " ", + key = "c", + desc = "Config", + action = ":lua Snacks.picker.files({ cwd = vim.fn.stdpath('config') })", + }, + { + icon = "󱆃 ", + key = "C", + desc = "Chezmoi", + action = function() + Snacks.picker.files({ cwd = chezmoi_source }) + end, + }, { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, { icon = " ", key = "q", desc = "Quit", action = ":qa" }, }, diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index 789118e..5f05f87 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -1,5 +1,6 @@ -- Treesitter: AST-based syntax highlighting, indentation, and text objects -- Foundation for all code intelligence features +-- Silly LLM written comments return { { "nvim-treesitter/nvim-treesitter", @@ -10,7 +11,7 @@ return { "nvim-treesitter/nvim-treesitter-textobjects", }, config = function() - -- IMPORTANT: Use treesitter.configs.setup(), NOT treesitter.setup() + -- Use treesitter.configs.setup(), NOT treesitter.setup() require("nvim-treesitter.configs").setup({ ensure_installed = { -- Target languages @@ -26,7 +27,7 @@ return { "git_rebase", "gitignore", "diff", - -- Core (always needed) + -- Core "lua", "vim", "vimdoc", diff --git a/dot_config/nvim/lua/utils/dashboard-headers.lua b/dot_config/nvim/lua/utils/dashboard-headers.lua index af6c493..57048e6 100644 --- a/dot_config/nvim/lua/utils/dashboard-headers.lua +++ b/dot_config/nvim/lua/utils/dashboard-headers.lua @@ -1,48 +1,67 @@ local headers = { - { - [[]], - [[ ██████ ]], - [[ ████▒▒▒▒▒▒████ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ]], - [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓ ]], - [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▒▒▓▓ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ██ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], - [[ ██▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒██▒▒▒▒██ ]], - [[ ████ ██▒▒██ ██▒▒▒▒██ ██▒▒██ ]], - [[ ██ ██ ████ ████ ]], - [[ ]], - [[]], - }, - { - " ██ ██ ", - " ██▒▒██ ██▒▒██ ", - " ██▒▒▓▓██████▓▓▒▒██ ", - " ██▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▓▓██ ", - " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", - " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", - " ██▒▒▒▒██▒▒▒▒██▒▒▒▒██▒▒▒▒██ ", - " ██▒▒▒▒▒▒▒▒██▒▒██▒▒▒▒▒▒▒▒██ ", - " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", - " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", - " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", - " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", - " ██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██ ", - " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", - " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ████ ", - " ██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██ ██▒▒▒▒██", - " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ██▓▓██", - " ██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒██ ██▒▒██", - " ██▓▓▒▒▒▒██▒▒██▒▒▒▒▒▒██▒▒██▒▒▒▒▓▓██████▒▒▒▒██", - " ██▓▓▒▒██▒▒██▒▒▒▒▒▒██▒▒██▒▒▓▓██▒▒▒▒▓▓▒▒██ ", - " ██████▒▒██████████▒▒████████████████ ", - " ██████ ██████ ", - }, + { + [[]], + [[ ██████ ]], + [[ ████▒▒▒▒▒▒████ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ]], + [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓ ]], + [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▒▒▓▓ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒██▒▒▒▒██ ]], + [[ ████ ██▒▒██ ██▒▒▒▒██ ██▒▒██ ]], + [[ ██ ██ ████ ████ ]], + [[ ]], + [[]], + }, + { + " ██ ██ ", + " ██▒▒██ ██▒▒██ ", + " ██▒▒▓▓██████▓▓▒▒██ ", + " ██▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▓▓██ ", + " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", + " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", + " ██▒▒▒▒██▒▒▒▒██▒▒▒▒██▒▒▒▒██ ", + " ██▒▒▒▒▒▒▒▒██▒▒██▒▒▒▒▒▒▒▒██ ", + " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", + " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", + " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", + " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", + " ██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██ ", + " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ", + " ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ████ ", + " ██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██ ██▒▒▒▒██", + " ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ██▓▓██", + " ██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒██ ██▒▒██", + " ██▓▓▒▒▒▒██▒▒██▒▒▒▒▒▒██▒▒██▒▒▒▒▓▓██████▒▒▒▒██", + " ██▓▓▒▒██▒▒██▒▒▒▒▒▒██▒▒██▒▒▓▓██▒▒▒▒▓▓▒▒██ ", + " ██████▒▒██████████▒▒████████████████ ", + " ██████ ██████ ", + }, + { + [[ ]], + [[ _.oo. ]], + [[ _.u[[/;:,. .odMMMMMM' ]], + [[ .o888UU[[[/;:-. .o@P^ MMM^ ]], + [[ oN88888UU[[[/;::-. dP^ ]], + [[ dNMMNN888UU[[[/;:--. .o@P^ ]], + [[ ,MMMMMMN888UU[[/;::-. o@^ ]], + [[ NNMMMNN888UU[[[/~.o@P^ ]], + [[ 888888888UU[[[/o@^-.. ]], + [[ oI8888UU[[[/o@P^:--.. ]], + [[ .@^ YUU[[[/o@^;::---.. ]], + [[ oMP ^/o@P^;:::---.. ]], + [[ .dMMM .o@^ ^;::---... ]], + [[ dMMMMMMM@^` `^^^^ ]], + [[ YMMMUP^ ]], + [[ ^^ ]], + [[ ]], + }, } --- Get a header from the list of headers @@ -50,17 +69,17 @@ local headers = { ---@param random boolean|nil If true, return a random header ---@return table Header lines local function get_header(index, random) - if random then - -- Return a random header if random is true - math.randomseed(os.time()) -- Seed to get a different random each time - return headers[math.random(1, #headers)] - elseif index then - -- Return the header at the specified index - return headers[index] - else - -- Default to the first header if neither is specified - return headers[1] - end + if random then + -- Return a random header if random is true + math.randomseed(os.time()) -- Seed to get a different random each time + return headers[math.random(1, #headers)] + elseif index then + -- Return the header at the specified index + return headers[index] + else + -- Default to the first header if neither is specified + return headers[1] + end end return get_header diff --git a/dot_config/nvim/lua/utils/greeting.lua b/dot_config/nvim/lua/utils/greeting.lua index 81422a8..6e2335c 100644 --- a/dot_config/nvim/lua/utils/greeting.lua +++ b/dot_config/nvim/lua/utils/greeting.lua @@ -21,10 +21,10 @@ function M.get_greeting() local icon if hour >= 5 and hour < 12 then greeting = "Good morning" - icon = "🌤️ " + icon = " " elseif hour >= 12 and hour < 18 then greeting = "Good afternoon" - icon = "☀️ " + icon = " " else greeting = "Good evening" icon = " " @@ -33,10 +33,10 @@ function M.get_greeting() local main = { { icon, hl = "SnacksDashboardIcon" }, { greeting .. " ", hl = "SnacksDashboardDesc" }, - { user, hl = "SnacksDashboardKey" }, + { user, hl = "Keyword" }, { ", welcome to ", hl = "SnacksDashboardDesc" }, - { hostname, hl = "SnacksDashboardKey" }, - { " ", hl = "SnacksDashboardIcon" }, + { hostname, hl = "Keyword" }, + { "  ", hl = "Keyword" }, } local late = nil diff --git a/dot_config/yazi/init.lua b/dot_config/yazi/init.lua index e2e6645..3ce2648 100644 --- a/dot_config/yazi/init.lua +++ b/dot_config/yazi/init.lua @@ -18,6 +18,14 @@ function Linemode:size_and_mtime() return string.format("%s %s", size and ya.readable_size(size) or "-", time) end +-- Whoosh bookmark manager +require("whoosh"):setup({ + -- Use only letters for keys since numbers are used by relative-motions + keys = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + jump_notify = false, + home_alias_enabled = true, +}) + require("restore"):setup({ -- Set the position for confirm and overwrite prompts. -- Don't forget to set height: `h = xx` diff --git a/dot_config/yazi/keymap.toml b/dot_config/yazi/keymap.toml index d0e529e..75bf82f 100644 --- a/dot_config/yazi/keymap.toml +++ b/dot_config/yazi/keymap.toml @@ -1,5 +1,46 @@ +# Whoosh bookmark manager +[[mgr.prepend_keymap]] +on = "[" +run = "plugin whoosh jump_by_key" +desc = "Jump bookmark by key" + +[[mgr.prepend_keymap]] +on = "}" +run = "plugin whoosh jump_by_fzf" +desc = "Fuzzy search bookmarks" + +[[mgr.prepend_keymap]] +on = [ "]", "a" ] +run = "plugin whoosh save" +desc = "Add bookmark (hovered)" + +[[mgr.prepend_keymap]] +on = [ "]", "A" ] +run = "plugin whoosh save_cwd" +desc = "Add bookmark (current dir)" + +[[mgr.prepend_keymap]] +on = [ "]", "t" ] +run = "plugin whoosh save_temp" +desc = "Add temp bookmark (hovered)" + +[[mgr.prepend_keymap]] +on = [ "]", "d" ] +run = "plugin whoosh delete_by_key" +desc = "Delete bookmark by key" + +[[mgr.prepend_keymap]] +on = [ "]", "D" ] +run = "plugin whoosh delete_by_fzf" +desc = "Delete bookmarks by fzf" + +[[mgr.prepend_keymap]] +on = [ "]", "r" ] +run = "plugin whoosh rename_by_key" +desc = "Rename bookmark by key" + [[mgr.prepend_keymap]] on = "M" run = "plugin mount" diff --git a/dot_zshrc b/dot_zshrc index 80a24e4..a852823 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -114,6 +114,12 @@ bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down #####^Binds^##### +# Quickshell default config QML import path +export QML_IMPORT_PATH="${QML_IMPORT_PATH:+$QML_IMPORT_PATH:}$HOME/.config/quickshell/default/lib" + + ######################### ##### End of .zshrc ##### ######################### + +