dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim: fix loading current session
wezterm: better status infos
2be0fb3e736d797c7a2a3dd9fe69283ae6ce0815
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (6)
41 +* add fonts to dotfiles (how to keep size under control?)
42 42 * write plugin to parse lsp settings locally and apply them
43 43 * is there a use case for a plugin that parses local plugin configuration overrides?
44 44 * kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java
neovim/lua/bugabinga/sessions.lua
Modified 2 2 local map
= require 'std.map' 3 3 local auto
= require 'std.auto' 5 5 local sessions
= vim.fs.normalize( vim.fn.stdpath
'data' .. '/sessions' )
6 +vim.fn.mkdir( sessions,
'p' )
8 9 local file_exists = function ( path )
48 49 local load_current_session = function ()
50 + local cwd
= vim.uv.cwd()
51 + local session
= encode( cwd )
52 + load_session( session )
51 55 local load_any_session = function ()
wezterm/.lsp.settings.lua
Addednew file mode 100644 4 + runtime = {
version =
'Lua 5.4', },
wezterm/bugabinga/auto_dark_mode.lua
Modified 3 3 local wez
= require 'wezterm' 7 7 local get_appearance = function()
9 - return wez.gui.get_appearance()
9 + return wez.gui.get_appearance()
14 14 local scheme_for_appearance = function(appearance)
15 - if appearance:find
'Dark' then 15 + if appearance:find(
'Dark',
1,
true)
then 22 -wez.on(
'window-config-reloaded',
function(window)
23 - local overrides
= window:get_config_overrides()
or {}
24 - local appearance
= window:get_appearance()
25 - local scheme
= scheme_for_appearance(appearance)
26 - if overrides.color_scheme
~= scheme
then 27 - overrides.color_scheme
= scheme
28 - window:set_config_overrides(overrides)
32 32 return scheme_for_appearance(get_appearance())
wezterm/bugabinga/key_binds.lua
Modified138 138 action
= wez.action.ActivateCommandPalette,
142 + mods =
'LEADER|SHIFT',
143 + action = wez.action.ShowLauncherArgs {
144 + flags =
'FUZZY|WORKSPACES',
wezterm/bugabinga/status.lua
Modified21 21 wez.on(
'update-status',
function(window, pane)
22 - local name
= window:active_key_table()
22 + local key_table
= window:active_key_table()
23 23 local current_workspace
= window:active_workspace()
24 24 local zoomed_state
= zoomed(pane)
30 - for _, font
in pairs(window:effective_config().font.font)
do 31 - table.
insert(fonts, font.family)
30 + local config
= window:effective_config()
31 + local font_size
= config.font_size
32 + for _, font
in pairs(config.font.font)
do 33 + table.
insert(fonts,
string.
format(
'%s:%s', font.family, font_size))
33 35 local font
= wez.format {
34 36 {
Text =
' Font ' },
40 42 local status
= {
' ' }
43 + if leader
then table.
insert(status, leader)
end 44 + if key_table
then table.
insert(status, key_table)
end 41 45 if zoomed_state
then table.
insert(status, zoomed_state)
end 42 46 if current_workspace
then table.
insert(status, current_workspace)
end 43 - if leader
then table.
insert(status, leader)
end 44 47 if font
then table.
insert(status, font)
end 46 49 window:set_right_status(
table.
concat(status, DELIMITER))