modified
dotfiles/neovim/init.lua
@@ -3,3 +3,70 @@ vim.opt.syntax = "on"vim.cmd.colorscheme("habamax")vim.api.nvim_set_hl(0, "Normal", { bg = "#000000" })vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#000000" })-- Statuslinevim.opt.laststatus = 2vim.opt.showmode = falselocal mode_map = { ["n"] = { text = " NORMAL ", hl = "StMode_Normal" }, ["i"] = { text = " INSERT ", hl = "StMode_Insert" }, ["v"] = { text = " VISUAL ", hl = "StMode_Visual" }, ["V"] = { text = " V-LINE ", hl = "StMode_Visual" }, ["\22"] = { text = " V-BLOCK ", hl = "StMode_Visual" }, ["c"] = { text = " COMMAND ", hl = "StMode_Command" }, ["R"] = { text = " REPLACE ", hl = "StMode_Replace" }, ["t"] = { text = " TERMINAL ", hl = "StMode_Terminal" },}vim.api.nvim_set_hl(0, "StMode_Normal", { fg = "#000000", bg = "#7c8f8f", bold = true })vim.api.nvim_set_hl(0, "StMode_Insert", { fg = "#000000", bg = "#6a9955", bold = true })vim.api.nvim_set_hl(0, "StMode_Visual", { fg = "#000000", bg = "#c586c0", bold = true })vim.api.nvim_set_hl(0, "StMode_Command", { fg = "#000000", bg = "#ce9178", bold = true })vim.api.nvim_set_hl(0, "StMode_Replace", { fg = "#000000", bg = "#d16969", bold = true })vim.api.nvim_set_hl(0, "StMode_Terminal", { fg = "#000000", bg = "#569cd6", bold = true })vim.api.nvim_set_hl(0, "StFile", { fg = "#d4d4d4", bg = "#1e1e1e" })vim.api.nvim_set_hl(0, "StFileMod", { fg = "#ce9178", bg = "#1e1e1e" })vim.api.nvim_set_hl(0, "StMid", { fg = "#808080", bg = "#0a0a0a" })vim.api.nvim_set_hl(0, "StRight", { fg = "#808080", bg = "#1e1e1e" })vim.api.nvim_set_hl(0, "StPos", { fg = "#d4d4d4", bg = "#1e1e1e", bold = true })local function git_branch() local branch = vim.fn.system("git -C " .. vim.fn.expand("%:p:h") .. " rev-parse --abbrev-ref HEAD 2>/dev/null") if vim.v.shell_error ~= 0 then return "" end return " " .. branch:gsub("%s+", "")endlocal branch_cache = ""local branch_timer = (vim.uv or vim.loop).new_timer()branch_timer:start(0, 5000, vim.schedule_wrap(function() branch_cache = git_branch()end))function Statusline() local mode_key = vim.api.nvim_get_mode().mode:sub(1, 1) if mode_key == "\22" then mode_key = "\22" end local mode = mode_map[mode_key] or mode_map["n"] local filename = vim.fn.expand("%:t") if filename == "" then filename = "[No Name]" end local modified = vim.bo.modified and " +" or "" local ft = vim.bo.filetype ~= "" and vim.bo.filetype or "plain" local ln = vim.fn.line(".") local col = vim.fn.col(".") local pct = math.floor(vim.fn.line(".") / math.max(vim.fn.line("$"), 1) * 100) return table.concat({ "%#" .. mode.hl .. "#", mode.text, "%#StFile#", " ", filename, "%#StFileMod#", modified, "%#StMid#", " ", branch_cache, "%=", "%#StRight#", ft, " ", "%#StPos#", " ", ln, ":", col, " ", pct, "%% ", })endvim.opt.statusline = "%!v:lua.Statusline()"
@@ -0,0 +1,30 @@# Colors and terminalset -g default-terminal "xterm-256color"set -ga terminal-overrides ",xterm-256color:Tc"# Status bar positionset -g status-position bottomset -g status-interval 5# Status bar colorsset -g status-style "bg=#0a0a0a,fg=#808080"# Left: session nameset -g status-left-length 30set -g status-left "#[bg=#7c8f8f,fg=#000000,bold] #S #[bg=#0a0a0a] "# Right: pane info, date, timeset -g status-right-length 60set -g status-right "#[fg=#808080]Pane #(expr #{pane_index} + 1)/#{window_panes} #[fg=#808080]| #[fg=#808080]#(TZ='America/New_York' date +'%%b %%d') #[bg=#7c8f8f,fg=#000000,bold] #(TZ='America/New_York' date +'%%I:%%M %%p') "# Window list stylingset -g window-status-format " #I:#W "set -g window-status-current-format "#[bg=#1e1e1e,fg=#d4d4d4,bold] #I:#W "set -g window-status-separator ""# Pane bordersset -g pane-border-style "fg=#333333"set -g pane-active-border-style "fg=#7c8f8f"# Message stylingset -g message-style "bg=#1e1e1e,fg=#d4d4d4"