just lua things

This commit is contained in:
Daylin Morgan 2023-04-24 09:59:25 -05:00
parent 20a8e419aa
commit 5dd59d3a1e
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
4 changed files with 45 additions and 42 deletions

View file

@ -31,7 +31,7 @@ require("lazy").setup({
"gzip", "gzip",
-- "matchit", -- "matchit",
-- "matchparen", -- "matchparen",
-- "netrwPlugin", "netrwPlugin",
"tarPlugin", "tarPlugin",
"tohtml", "tohtml",
"tutor", "tutor",

View file

@ -46,7 +46,7 @@ return {
"shfmt", "shfmt",
"ruff", "ruff",
"ruff-lsp", "ruff-lsp",
"nimlsp", -- "nimlsp",
"lua-language-server", "lua-language-server",
}, },
}, },

View file

@ -1,4 +1,4 @@
local wezterm = require "wezterm"; local wezterm = require("wezterm")
-- color variant hex codes -- color variant hex codes
local colors = { local colors = {
@ -28,7 +28,7 @@ local colors = {
surface0 = "#ccd0da", surface0 = "#ccd0da",
crust = "#dce0e8", crust = "#dce0e8",
mantle = "#e6e9ef", mantle = "#e6e9ef",
base = "#eff1f5" base = "#eff1f5",
}, },
frappe = { frappe = {
rosewater = "#f2d5cf", rosewater = "#f2d5cf",
@ -56,7 +56,7 @@ local colors = {
surface0 = "#414559", surface0 = "#414559",
base = "#303446", base = "#303446",
mantle = "#292c3c", mantle = "#292c3c",
crust = "#232634" crust = "#232634",
}, },
macchiato = { macchiato = {
rosewater = "#f4dbd6", rosewater = "#f4dbd6",
@ -84,7 +84,7 @@ local colors = {
surface0 = "#363a4f", surface0 = "#363a4f",
base = "#24273a", base = "#24273a",
mantle = "#1e2030", mantle = "#1e2030",
crust = "#181926" crust = "#181926",
}, },
mocha = { mocha = {
rosewater = "#f5e0dc", rosewater = "#f5e0dc",
@ -112,8 +112,8 @@ local colors = {
surface0 = "#313244", surface0 = "#313244",
base = "#1e1e2e", base = "#1e1e2e",
mantle = "#181825", mantle = "#181825",
crust = "#11111b" crust = "#11111b",
} },
} }
local catppuccin = {} local catppuccin = {}
@ -134,7 +134,7 @@ function catppuccin.select(palette)
colors[palette].blue, colors[palette].blue,
colors[palette].pink, colors[palette].pink,
colors[palette].sky, colors[palette].sky,
colors[palette].overlay2 colors[palette].overlay2,
}, },
brights = { brights = {
colors[palette].overlay1, colors[palette].overlay1,
@ -144,41 +144,41 @@ function catppuccin.select(palette)
colors[palette].blue, colors[palette].blue,
colors[palette].pink, colors[palette].pink,
colors[palette].sky, colors[palette].sky,
colors[palette].text colors[palette].text,
}, },
tab_bar = { tab_bar = {
background = colors[palette].base, background = colors[palette].base,
active_tab = { active_tab = {
bg_color = colors[palette].surface2, bg_color = colors[palette].surface2,
fg_color = colors[palette].text fg_color = colors[palette].text,
}, },
inactive_tab = { inactive_tab = {
bg_color = colors[palette].base, bg_color = colors[palette].base,
fg_color = colors[palette].text fg_color = colors[palette].text,
}, },
inactive_tab_hover = { inactive_tab_hover = {
bg_color = colors[palette].surface2, bg_color = colors[palette].surface2,
fg_color = colors[palette].text fg_color = colors[palette].text,
}, },
new_tab = { new_tab = {
bg_color = colors[palette].base, bg_color = colors[palette].base,
fg_color = colors[palette].text fg_color = colors[palette].text,
}, },
new_tab_hover = { new_tab_hover = {
bg_color = colors[palette].surface2, bg_color = colors[palette].surface2,
fg_color = colors[palette].text, fg_color = colors[palette].text,
italic = true italic = true,
} },
}, },
visual_bell = colors[palette].surface0, visual_bell = colors[palette].surface0,
indexed = { indexed = {
[16] = colors[palette].peach, [16] = colors[palette].peach,
[17] = colors[palette].rosewater [17] = colors[palette].rosewater,
}, },
scrollbar_thumb = colors[palette].surface2, scrollbar_thumb = colors[palette].surface2,
split = colors[palette].crust, split = colors[palette].crust,
-- nightbuild only -- nightbuild only
compose_cursor = colors[palette].flamingo compose_cursor = colors[palette].flamingo,
} }
end end
@ -187,23 +187,26 @@ local function scheme_for_appearance(appearance, options)
if appearance:find("Dark") then if appearance:find("Dark") then
return catppuccin.select(options.sync_flavours.dark) return catppuccin.select(options.sync_flavours.dark)
else else
return catppuccin.select(options.sync_flavours.light) -- return catppuccin.select(options.sync_flavours.light)
return catppuccin.select(options.sync_flavours.dark)
end end
end end
function catppuccin.setup(options) function catppuccin.setup(options)
-- default to not syncing with the OS theme -- default to not syncing with the OS theme
local should_sync = true local should_sync = true
if options.sync == false then should_sync = false end if options.sync == false then
should_sync = false
end
-- default options -- default options
options = { options = {
sync = should_sync, sync = should_sync,
sync_flavours = options.sync_flavours or { sync_flavours = options.sync_flavours or {
light = "latte", light = "latte",
dark = "mocha" dark = "mocha",
}, },
flavour = options.flavour or "mocha" flavour = options.flavour or "mocha",
} }
-- if sync is enabled, hook into the window-config-reloaded event -- if sync is enabled, hook into the window-config-reloaded event

View file

@ -3,29 +3,29 @@ local catppuccin = require("colors/catppuccin").setup({})
local keys = require("keys") local keys = require("keys")
-- add wezterm to title for wm usage -- add wezterm to title for wm usage
wezterm.on("format-window-title", function() wezterm.on("format-window-title", function()
return " - Wezterm" return " - Wezterm"
end) end)
local padding = 10 local padding = 10
return { return {
-- window_background_opacity = 0.9, -- window_background_opacity = 0.9,
window_padding = { window_padding = {
left = padding, left = padding,
right = padding, right = padding,
top = padding, top = padding,
bottom = padding, bottom = padding,
}, },
font = wezterm.font("MonoLisa Nerd Font"), font = wezterm.font("MonoLisa Nerd Font"),
adjust_window_size_when_changing_font_size = false, adjust_window_size_when_changing_font_size = false,
initial_cols = 80, initial_cols = 80,
colors = catppuccin, colors = catppuccin,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
hide_tab_bar_if_only_one_tab = true, hide_tab_bar_if_only_one_tab = true,
tab_bar_at_bottom = true, tab_bar_at_bottom = true,
disable_default_key_bindings = true, disable_default_key_bindings = true,
bold_brightens_ansi_colors = true, bold_brightens_ansi_colors = true,
default_gui_startup_args = { "start", "--always-new-process" }, default_gui_startup_args = { "start", "--always-new-process" },
keys = keys.keys, keys = keys.keys,
key_tables = keys.key_tables, key_tables = keys.key_tables,
} }