style(wezterm): use double quotes

This commit is contained in:
Price Hiller 2022-07-08 21:07:14 -05:00
parent 25b07797c4
commit d185b04c98
10 changed files with 92 additions and 72 deletions

View File

@ -1,3 +1,3 @@
column_width = 120
indent_type = 'Spaces'
quote_style = 'AutoPreferSingle'
indent_type = "Spaces"
quote_style = "AutoPreferDouble"

View File

@ -0,0 +1,17 @@
local wezterm = require("wezterm")
wezterm.on("trigger-nvim-with-scrollback", function(window, pane)
local scrollback_lines = require("config.misc").scrollback_lines
local scrollback = pane:get_lines_as_text(scrollback_lines)
local name = os.tmpname()
local f = io.open(name, "w+")
f:write(scrollback)
f:flush()
f:close()
window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name } } }), pane)
wezterm.sleep_ms(1000)
os.remove(name)
end)
return {}

View File

@ -1,26 +1,26 @@
local wezterm = require('wezterm')
local wezterm = require("wezterm")
return {
-- use_cap_height_to_scale_fallback_fonts = true,
font = wezterm.font_with_fallback({
{
family = 'JetBrains Mono',
weight = 'DemiBold',
family = "JetBrains Mono",
weight = "DemiBold",
},
-- NOTE: Attempt to resolve missing symbols etc.
-- <built-in>, BuiltIn
{ family = 'Symbols Nerd Font Mono', scale = 0.8 },
'Noto Sans Symbols2',
'PowerlineExtraSymbols',
{ family = 'FiraCode NF', weight = 'DemiBold', scale = 1.2 },
{ family = "Symbols Nerd Font Mono", scale = 0.8 },
"Noto Sans Symbols2",
"PowerlineExtraSymbols",
{ family = "FiraCode NF", weight = "DemiBold", scale = 1.2 },
-- <built-in>, BuiltIn
-- Assumed to have Emoji Presentation
-- Pixel sizes: [128]
'Noto Color Emoji',
"Noto Color Emoji",
-- <built-in>, BuiltIn
'Last Resort High-Efficiency',
"Last Resort High-Efficiency",
}),
font_size = 14,
}

View File

@ -1,62 +1,63 @@
local wezterm = require('wezterm')
local wezterm = require("wezterm")
return {
disable_default_key_bindings = true,
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 100000 },
-- disable_default_key_bindings = true,
leader = { key = "a", mods = "CTRL", timeout_milliseconds = 100000 },
keys = {
{ key = 'r', mods = 'SUPER', action = 'ReloadConfiguration' },
{ key = 'z', mods = 'SUPER', action = wezterm.action({ ActivateTabRelative = -1 }) },
{ key = 'x', mods = 'SUPER', action = wezterm.action({ ActivateTabRelative = 1 }) },
{ key = 't', mods = 'SUPER', action = wezterm.action({ SpawnTab = 'CurrentPaneDomain' }) },
{ key = 'w', mods = 'ALT', action = wezterm.action({ CloseCurrentPane = { confirm = false } }) },
{ key = 'w', mods = 'SUPER', action = wezterm.action({ CloseCurrentTab = { confirm = false } }) },
{ key = 'c', mods = 'SUPER', action = wezterm.action({ CopyTo = 'Clipboard' }) },
{ key = 'v', mods = 'SUPER', action = wezterm.action({ PasteFrom = 'Clipboard' }) },
{ key = "r", mods = "SUPER", action = "ReloadConfiguration" },
{ key = "z", mods = "SUPER", action = wezterm.action({ ActivateTabRelative = -1 }) },
{ key = "x", mods = "SUPER", action = wezterm.action({ ActivateTabRelative = 1 }) },
{ key = "t", mods = "SUPER", action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }) },
{ key = "w", mods = "ALT", action = wezterm.action({ CloseCurrentPane = { confirm = false } }) },
{ key = "w", mods = "SUPER", action = wezterm.action({ CloseCurrentTab = { confirm = false } }) },
{ key = "c", mods = "SUPER", action = wezterm.action({ CopyTo = "Clipboard" }) },
{ key = "v", mods = "SUPER", action = wezterm.action({ PasteFrom = "Clipboard" }) },
-- NOTE: Pane Splitting
{
key = 'RightArrow',
mods = 'SHIFT',
action = wezterm.action({ SplitPane = { direction = 'Right' } }),
key = "RightArrow",
mods = "SHIFT",
action = wezterm.action({ SplitPane = { direction = "Right" } }),
},
{
key = 'LeftArrow',
mods = 'SHIFT',
action = wezterm.action({ SplitPane = { direction = 'Left' } }),
key = "LeftArrow",
mods = "SHIFT",
action = wezterm.action({ SplitPane = { direction = "Left" } }),
},
{
key = 'UpArrow',
mods = 'SHIFT',
action = wezterm.action({ SplitPane = { direction = 'Up' } }),
key = "UpArrow",
mods = "SHIFT",
action = wezterm.action({ SplitPane = { direction = "Up" } }),
},
{
key = 'DownArrow',
mods = 'SHIFT',
action = wezterm.action({ SplitPane = { direction = 'Down' } }),
key = "DownArrow",
mods = "SHIFT",
action = wezterm.action({ SplitPane = { direction = "Down" } }),
},
-- NOTE: Pane Selecting
{
key = 'RightArrow',
mods = 'CTRL',
action = wezterm.action({ ActivatePaneDirection = 'Right' }),
key = "RightArrow",
mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Right" }),
},
{
key = 'LeftArrow',
mods = 'CTRL',
action = wezterm.action({ ActivatePaneDirection = 'Left' }),
key = "LeftArrow",
mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Left" }),
},
{
key = 'UpArrow',
mods = 'CTRL',
action = wezterm.action({ ActivatePaneDirection = 'Up' }),
key = "UpArrow",
mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Up" }),
},
{
key = 'DownArrow',
mods = 'CTRL',
action = wezterm.action({ ActivatePaneDirection = 'Down' }),
key = "DownArrow",
mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Down" }),
},
{ key = '=', mods = 'CTRL', action = 'IncreaseFontSize' },
{ key = '-', mods = 'CTRL', action = 'DecreaseFontSize' },
{ key = '0', mods = 'CTRL', action = 'ResetFontAndWindowSize' },
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "0", mods = "CTRL", action = "ResetFontAndWindowSize" },
{ key = "h", mods = "CTRL", action = wezterm.action({ EmitEvent = "trigger-nvim-with-scrollback" }) },
},
key_tables = {},
}

View File

@ -1,5 +1,6 @@
return {
automatically_reload_config = true,
window_close_confirmation = 'NeverPrompt',
exit_behavior = 'Close',
window_close_confirmation = "NeverPrompt",
exit_behavior = "Close",
scrollback_lines = 20000,
}

View File

@ -1,5 +1,5 @@
return {
freetype_load_target = 'Normal',
freetype_load_target = "Normal",
window_padding = {
left = 0,
right = 0,

View File

@ -1,4 +1,4 @@
local wezterm = require('wezterm')
local wezterm = require("wezterm")
return {
hide_tab_bar_if_only_one_tab = true,

View File

@ -1,15 +1,15 @@
local M = {}
M.colors = {
tokyonight_night = {
foreground = '#c0caf5',
background = '#0f111d',
cursor_bg = '#c0caf5',
cursor_border = '#c0caf5',
cursor_fg = '#1a1b26',
selection_bg = '#33467C',
selection_fg = '#c0caf5',
ansi = { '#15161E', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#a9b1d6' },
brights = { '#414868', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#c0caf5' },
foreground = "#c0caf5",
background = "#0f111d",
cursor_bg = "#c0caf5",
cursor_border = "#c0caf5",
cursor_fg = "#1a1b26",
selection_bg = "#33467C",
selection_fg = "#c0caf5",
ansi = { "#15161E", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#a9b1d6" },
brights = { "#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5" },
},
}

View File

@ -1,8 +1,8 @@
local colors = require('config.theme.colors')
local colors = require("config.theme.colors")
return {
enable_scroll_bar = true,
window_decorations = 'RESIZE',
window_decorations = "RESIZE",
window_background_opacity = 0.97,
text_background_opacity = 1.0,
colors = colors.theme,

View File

@ -1,12 +1,13 @@
local mergeable_table = require('lib').mergeable_table
local mergeable_table = require("lib").mergeable_table
-- NOTE: Should be merged
local fonts = require('config.fonts')
local theme = require('config.theme.theme')
local tabbar = require('config.tabbar')
local rendering = require('config.rendering')
local keybinds = require('config.keybinds')
local misc = require('config.misc')
local events = require("config.events")
local fonts = require("config.fonts")
local theme = require("config.theme.theme")
local tabbar = require("config.tabbar")
local rendering = require("config.rendering")
local keybinds = require("config.keybinds")
local misc = require("config.misc")
local config = mergeable_table.merge(fonts, theme, tabbar, misc, rendering, keybinds)
local config = mergeable_table.merge(events, fonts, theme, tabbar, misc, rendering, keybinds)
return config