style: format with scripts/fmt.bash

This commit is contained in:
Price Hiller 2024-03-16 13:01:28 -05:00
parent 13169cdecd
commit c56f4ad68d
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
28 changed files with 172 additions and 236 deletions

View File

@ -3,7 +3,7 @@
main() { main() {
local mon_count local mon_count
mon_count="$(hyprctl monitors -j | jq length)" mon_count="$(hyprctl monitors -j | jq length)"
if (( mon_count > 1 )); then if ((mon_count > 1)); then
hyprctl keyword monitor "eDP-1, disable" hyprctl keyword monitor "eDP-1, disable"
fi fi
} }

View File

@ -19,7 +19,7 @@ M.setup = function()
local fts_to_lang_registration = { local fts_to_lang_registration = {
["azure-pipelines"] = "yaml", ["azure-pipelines"] = "yaml",
["dockerignore"] = "gitignore", ["dockerignore"] = "gitignore",
["zsh"] = "bash" ["zsh"] = "bash",
} }
vim.iter(fts_to_lang_registration):each(function(filetype, language) vim.iter(fts_to_lang_registration):each(function(filetype, language)

View File

@ -28,7 +28,7 @@ M.setup = function()
[vim.diagnostic.severity.WARN] = "", [vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.INFO] = "", [vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "", [vim.diagnostic.severity.HINT] = "",
} },
}, },
float = { float = {
focusable = true, focusable = true,

View File

@ -15,9 +15,9 @@ vim.g.neovide_remember_window_size = false
vim.g.neovide_fullscreen = false vim.g.neovide_fullscreen = false
-- Allow clipboard copy paste in neovim -- Allow clipboard copy paste in neovim
vim.keymap.set({ 'n', 'v' }, '<D-v>', '"+P') -- Paste normal and visual mode vim.keymap.set({ "n", "v" }, "<D-v>", '"+P') -- Paste normal and visual mode
vim.keymap.set({ 'i', 'c' }, '<D-v>', '<C-R>+') -- Paste insert and command mode vim.keymap.set({ "i", "c" }, "<D-v>", "<C-R>+") -- Paste insert and command mode
vim.keymap.set('t', '<D-v>', [[<C-\><C-N>"+P]]) -- Paste terminal mode vim.keymap.set("t", "<D-v>", [[<C-\><C-N>"+P]]) -- Paste terminal mode
-- Next/prev tabs -- Next/prev tabs
vim.keymap.set({ "", "!", "v", "t" }, "<D-x>", "<cmd>tabnext<CR>", { noremap = true, silent = true }) vim.keymap.set({ "", "!", "v", "t" }, "<D-x>", "<cmd>tabnext<CR>", { noremap = true, silent = true })
@ -25,4 +25,3 @@ vim.keymap.set({ "", "!", "v", "t" }, "<D-z>", "<cmd>tabprevious<CR>", { noremap
-- Spawn new terminal in new tab -- Spawn new terminal in new tab
vim.keymap.set({ "", "!", "v", "t" }, "<D-t>", "<cmd>tabnew | terminal<CR>", { noremap = true, silent = true }) vim.keymap.set({ "", "!", "v", "t" }, "<D-t>", "<cmd>tabnew | terminal<CR>", { noremap = true, silent = true })

View File

@ -2,7 +2,7 @@ return {
{ {
"LunarVim/bigfile.nvim", "LunarVim/bigfile.nvim",
opts = { opts = {
filesize = 10 filesize = 10,
} },
} },
} }

View File

@ -272,7 +272,10 @@ return {
--- If the completion item looks like a file path and exists, go ahead and --- If the completion item looks like a file path and exists, go ahead and
--- abbreviate it relative to the home directory --- abbreviate it relative to the home directory
if vim.fn.isdirectory(completion_item.abbr) == 1 or vim.fn.filereadable(completion_item.abbr) == 1 then if
vim.fn.isdirectory(completion_item.abbr) == 1
or vim.fn.filereadable(completion_item.abbr) == 1
then
completion_item.abbr = vim.fn.fnamemodify(completion_item.abbr, ":~") completion_item.abbr = vim.fn.fnamemodify(completion_item.abbr, ":~")
end end
@ -296,7 +299,7 @@ return {
disallow_fullfuzzy_matching = false, disallow_fullfuzzy_matching = false,
disallow_partial_matching = false, disallow_partial_matching = false,
disallow_fuzzy_matching = false, disallow_fuzzy_matching = false,
disallow_prefix_unmatching = false disallow_prefix_unmatching = false,
}, },
window = { window = {
documentation = { documentation = {
@ -433,7 +436,7 @@ return {
"!", "!",
}, },
}, },
priority = 100 priority = 100,
}, },
{ name = "cmdline_history", max_item_count = 3 }, { name = "cmdline_history", max_item_count = 3 },
{ name = "fuzzy_buffer", max_item_count = 3 }, { name = "fuzzy_buffer", max_item_count = 3 },

View File

@ -21,10 +21,10 @@ return {
}, },
ft = { "sql" }, ft = { "sql" },
keys = { keys = {
{ "<leader>a", desc = "Dadbod" }, { "<leader>a", desc = "Dadbod" },
{ "<leader>aa", "<cmd>DBUIToggle<CR>", desc = "Dadbod: Toggle UI" }, { "<leader>aa", "<cmd>DBUIToggle<CR>", desc = "Dadbod: Toggle UI" },
{ "<leader>ac", "<cmd>DBUIAddConnection<CR>", desc = "Dadbod: Add Connection" }, { "<leader>ac", "<cmd>DBUIAddConnection<CR>", desc = "Dadbod: Add Connection" },
{ "<leader>ab", "<cmd>DBUIFindBuffer<CR>", desc = "Dadbod: Find Buffer" }, { "<leader>ab", "<cmd>DBUIFindBuffer<CR>", desc = "Dadbod: Find Buffer" },
}, },
init = function() init = function()
vim.g.db_ui_use_nerd_fonts = 1 vim.g.db_ui_use_nerd_fonts = 1

View File

@ -14,7 +14,7 @@ return {
end, end,
-- I know this is a lie below, but I'm used to the key being LSP bound, so fuck it -- I know this is a lie below, but I'm used to the key being LSP bound, so fuck it
desc = "LSP: Format", desc = "LSP: Format",
mode = { "v", "n" } mode = { "v", "n" },
}, },
}, },
opts = function() opts = function()

View File

@ -14,7 +14,7 @@ return {
icons = false, icons = false,
run_in_floaterm = true, run_in_floaterm = true,
trouble = true, trouble = true,
luasnip = true luasnip = true,
}) })
end, end,
event = { "CmdlineEnter" }, event = { "CmdlineEnter" },

View File

@ -52,8 +52,8 @@ return {
{ "NvimNotifyTrace", { fg = colors.oniViolet } }, { "NvimNotifyTrace", { fg = colors.oniViolet } },
{ "StatusLineNC", { bg = nil } }, { "StatusLineNC", { bg = nil } },
{ "WinBarNC", { bg = nil } }, { "WinBarNC", { bg = nil } },
{ "Visual", { bg = colors.sumiInk5 }}, { "Visual", { bg = colors.sumiInk5 } },
{ "CursorLine", { bg = colors.sumiInk4 }}, { "CursorLine", { bg = colors.sumiInk4 } },
{ "CursorLineNr", { fg = colors.roninYellow, bg = palette.theme.ui.bg_m1 } }, { "CursorLineNr", { fg = colors.roninYellow, bg = palette.theme.ui.bg_m1 } },
{ "CursorLineFold", { fg = colors.crystalBlue, bg = palette.theme.ui.bg_m1 } }, { "CursorLineFold", { fg = colors.crystalBlue, bg = palette.theme.ui.bg_m1 } },
{ "CursorLineSign", { bg = palette.theme.ui.bg_m1 } }, { "CursorLineSign", { bg = palette.theme.ui.bg_m1 } },
@ -194,7 +194,14 @@ return {
{ "TreesitterContext", { bg = colors.sumiInk0 } }, { "TreesitterContext", { bg = colors.sumiInk0 } },
{ "FloatTitle", { bg = "NONE" } }, { "FloatTitle", { bg = "NONE" } },
{ "DiffviewFilePanelTitle", { fg = colors.crystalBlue } }, { "DiffviewFilePanelTitle", { fg = colors.crystalBlue } },
{ "DiffviewDiffDeleteDim", { fg = function() return get_hl("Comment")().fg end } }, {
"DiffviewDiffDeleteDim",
{
fg = function()
return get_hl("Comment")().fg
end,
},
},
{ "LspInlayHint", { fg = colors.springViolet2, bg = colors.winterBlue } }, { "LspInlayHint", { fg = colors.springViolet2, bg = colors.winterBlue } },
{ "@text", { fg = colors.fujiWhite } }, { "@text", { fg = colors.fujiWhite } },
{ "RainbowDelimiterRed", { fg = colors.peachRed } }, { "RainbowDelimiterRed", { fg = colors.peachRed } },

View File

@ -477,9 +477,9 @@ return {
maxMemoryMB = 60000, maxMemoryMB = 60000,
flake = { flake = {
autoArchive = true, autoArchive = true,
autoEvalInputs = true autoEvalInputs = true,
} },
} },
}, },
}, },
}) })

View File

@ -7,36 +7,36 @@ return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-go", "nvim-neotest/neotest-go",
"mrcjkb/rustaceanvim", "mrcjkb/rustaceanvim",
"nvim-neotest/neotest-plenary" "nvim-neotest/neotest-plenary",
}, },
keys = { keys = {
{ "<localleader>n", desc = "> Neotest" }, { "<localleader>n", desc = "> Neotest" },
{ "<localleader>nrr", "<cmd>Neotest run<CR>", desc = "Neotest: Run Test" }, { "<localleader>nrr", "<cmd>Neotest run<CR>", desc = "Neotest: Run Test" },
{ "<localleader>nrl", "<cmd>Neotest run file<CR>", desc = "Neotest: Run Tests in File" }, { "<localleader>nrl", "<cmd>Neotest run file<CR>", desc = "Neotest: Run Tests in File" },
{ "<localleader>nrl", "<cmd>Neotest run last<CR>", desc = "Neotest: Run Last Tests" }, { "<localleader>nrl", "<cmd>Neotest run last<CR>", desc = "Neotest: Run Last Tests" },
{ "<localleader>np", "<cmd>Neotest output-panel<CR>", desc = "Neotest: Output Panel" }, { "<localleader>np", "<cmd>Neotest output-panel<CR>", desc = "Neotest: Output Panel" },
{ "<localleader>no", "<cmd>Neotest output<CR>", desc = "Neotest: Output" }, { "<localleader>no", "<cmd>Neotest output<CR>", desc = "Neotest: Output" },
{ "<localleader>nn", "<cmd>Neotest summary toggle<CR>", desc = "Neotest: Summary Toggle" }, { "<localleader>nn", "<cmd>Neotest summary toggle<CR>", desc = "Neotest: Summary Toggle" },
{ "<localleader>nk", "<cmd>Neotest jump prev<CR>", desc = "Neotest: Jump Prev" }, { "<localleader>nk", "<cmd>Neotest jump prev<CR>", desc = "Neotest: Jump Prev" },
{ "<localleader>nj", "<cmd>Neotest jump next<CR>", desc = "Neotest: Jump Next" }, { "<localleader>nj", "<cmd>Neotest jump next<CR>", desc = "Neotest: Jump Next" },
{ "<localleader>na", "<cmd>Neotest attach<CR>", desc = "Neotest: Attach" }, { "<localleader>na", "<cmd>Neotest attach<CR>", desc = "Neotest: Attach" },
}, },
opts = function() opts = function()
return { return {
diagnostic = { diagnostic = {
enable = true, enable = true,
severity = 1 severity = 1,
}, },
discovery = { discovery = {
concurrent = 4 concurrent = 4,
}, },
status = { status = {
virtual_text = true virtual_text = true,
}, },
adapters = { adapters = {
require("neotest-plenary"), require("neotest-plenary"),
require("neotest-go"), require("neotest-go"),
require('rustaceanvim.neotest') require("rustaceanvim.neotest"),
}, },
} }
end, end,

View File

@ -8,7 +8,7 @@ return {
"Nmlogs", "Nmlogs",
"Nmdelete", "Nmdelete",
"Nmread", "Nmread",
"Nmwrite" "Nmwrite",
}, },
config = function() config = function()
require("netman") require("netman")

View File

@ -25,7 +25,11 @@ return {
local hl = vim.api.nvim_get_hl(0, { name = name, link = false }) local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
vim.api.nvim_set_hl(0, name, vim.tbl_deep_extend("force", hl, { bg = bg, force = true })) vim.api.nvim_set_hl(0, name, vim.tbl_deep_extend("force", hl, { bg = bg, force = true }))
local cul_hl_name = name .. "Cul" local cul_hl_name = name .. "Cul"
vim.api.nvim_set_hl(0, cul_hl_name, vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true })) vim.api.nvim_set_hl(
0,
cul_hl_name,
vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true })
)
sign.culhl = cul_hl_name sign.culhl = cul_hl_name
vim.fn.sign_define(sign.name, sign) vim.fn.sign_define(sign.name, sign)
end end

View File

@ -206,7 +206,7 @@ return {
frecency = { frecency = {
show_scores = true, show_scores = true,
auto_validate = true, auto_validate = true,
db_safe_mode = false db_safe_mode = false,
}, },
}, },
}) })

View File

@ -109,14 +109,15 @@ end
U.select_hl = function(name, fields) U.select_hl = function(name, fields)
---@return vim.api.keyset.highlight ---@return vim.api.keyset.highlight
return function() return function()
return vim.iter(U.get_hl(name)()):filter(function(k, _) return vim.iter(U.get_hl(name)())
return vim.list_contains(fields, k) :filter(function(k, _)
end):fold({}, function(t, k, v) return vim.list_contains(fields, k)
t[k] = v end)
return t :fold({}, function(t, k, v)
end) t[k] = v
return t
end)
end end
end end
return U return U

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
get-album-info () { get-album-info() {
local class local class
local text="" local text=""
@ -25,7 +25,6 @@ get-album-info () {
done done
} }
main() { main() {
get-album-info get-album-info
} }

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
main () { main() {
local notify_application_name="RF Status" local notify_application_name="RF Status"
local enable_airplane_mode=true local enable_airplane_mode=true
@ -11,7 +11,6 @@ main () {
local device local device
local device_type local device_type
for rf_status in $(rfkill -J | jq '.rfkilldevices[]' | jq -r tostring); do for rf_status in $(rfkill -J | jq '.rfkilldevices[]' | jq -r tostring); do
rf_soft_status="$(printf "%s" "${rf_status}" | jq -r '.soft')" rf_soft_status="$(printf "%s" "${rf_status}" | jq -r '.soft')"
rf_hard_status="$(printf "%s" "${rf_status}" | jq -r '.hard')" rf_hard_status="$(printf "%s" "${rf_status}" | jq -r '.hard')"
@ -45,7 +44,6 @@ main () {
fi fi
fi fi
} }
main main

View File

@ -8,33 +8,33 @@ return {
key_tables = { key_tables = {
-- NOTE: Pane Resizing Submap -- NOTE: Pane Resizing Submap
resize_pane = { resize_pane = {
{ key = "LeftArrow", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) }, { key = "LeftArrow", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "h", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) }, { key = "h", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "RightArrow", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) }, { key = "RightArrow", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) },
{ key = "l", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) }, { key = "l", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) },
{ key = "UpArrow", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) }, { key = "UpArrow", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "k", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) }, { key = "k", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "DownArrow", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) }, { key = "DownArrow", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
{ key = "j", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) }, { key = "j", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
-- Cancel the mode by pressing escape -- Cancel the mode by pressing escape
{ key = "Escape", action = "PopKeyTable" }, { key = "Escape", action = "PopKeyTable" },
}, },
-- NOTE: Pane Rotate Position Submap -- NOTE: Pane Rotate Position Submap
rotate_panes = { rotate_panes = {
{ key = "h", action = wezterm.action.RotatePanes("CounterClockwise") }, { key = "h", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "LeftArrow", action = wezterm.action.RotatePanes("CounterClockwise") }, { key = "LeftArrow", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "l", action = wezterm.action.RotatePanes("Clockwise") }, { key = "l", action = wezterm.action.RotatePanes("Clockwise") },
{ key = "RightArrow", action = wezterm.action.RotatePanes("Clockwise") }, { key = "RightArrow", action = wezterm.action.RotatePanes("Clockwise") },
{ key = "Escape", action = "PopKeyTable" }, { key = "Escape", action = "PopKeyTable" },
} },
}, },
keys = { keys = {
{ {
key = "r", key = "r",
mods = "SUPER", mods = "SUPER",
action = "ReloadConfiguration" action = "ReloadConfiguration",
}, },
{ {
key = "z", key = "z",
@ -71,7 +71,7 @@ return {
CloseCurrentTab = { confirm = false }, CloseCurrentTab = { confirm = false },
}), }),
}, },
{ key = "Copy", action = wezterm.action({ CopyTo = "Clipboard" }) }, { key = "Copy", action = wezterm.action({ CopyTo = "Clipboard" }) },
{ key = "Paste", action = wezterm.action({ PasteFrom = "Clipboard" }) }, { key = "Paste", action = wezterm.action({ PasteFrom = "Clipboard" }) },
-- NOTE: Pane Splitting -- NOTE: Pane Splitting
{ {
@ -115,9 +115,9 @@ return {
mods = "CTRL", mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Down" }), action = wezterm.action({ ActivatePaneDirection = "Down" }),
}, },
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" }, { key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" }, { key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "0", mods = "CTRL", action = "ResetFontSize" }, { key = "0", mods = "CTRL", action = "ResetFontSize" },
-- NOTE: Leader dependent binds -- NOTE: Leader dependent binds
{ key = "h", mods = "LEADER", action = wezterm.action({ EmitEvent = "trigger-nvim-with-scrollback" }) }, { key = "h", mods = "LEADER", action = wezterm.action({ EmitEvent = "trigger-nvim-with-scrollback" }) },
@ -153,7 +153,6 @@ return {
name = "rotate_panes", name = "rotate_panes",
one_shot = false, one_shot = false,
}), }),
} },
}, },
} }

View File

@ -1,4 +1,4 @@
return { return {
window_decorations = "TITLE | RESIZE", window_decorations = "TITLE | RESIZE",
win32_system_backdrop = "Acrylic" win32_system_backdrop = "Acrylic",
} }

View File

@ -57,7 +57,6 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid
title = "N/A" title = "N/A"
end end
if tab.is_active then if tab.is_active then
bg = color_names.kanagawa.sumiInk0 bg = color_names.kanagawa.sumiInk0
fg = color_names.kanagawa.oniViolet fg = color_names.kanagawa.oniViolet
@ -146,9 +145,10 @@ wezterm.on("update-right-status", function(window, pane)
local key_table = window:active_key_table() local key_table = window:active_key_table()
if key_table then if key_table then
leader = leader_text leader = leader_text
key_table = "󰌌 " .. key_table:gsub("_", " "):gsub("(%l)(%w*)", function (a,b) key_table = "󰌌 "
return string.upper(a)..b .. key_table:gsub("_", " "):gsub("(%l)(%w*)", function(a, b)
end) return string.upper(a) .. b
end)
end end
-- Color palette for the backgrounds of each cell -- Color palette for the backgrounds of each cell
@ -157,8 +157,8 @@ wezterm.on("update-right-status", function(window, pane)
{ bg = color_names.kanagawa.carpYellow, fg = color_names.kanagawa.sumiInk0 }, { bg = color_names.kanagawa.carpYellow, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.springGreen, fg = color_names.kanagawa.sumiInk0 }, { bg = color_names.kanagawa.springGreen, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.crystalBlue, fg = color_names.kanagawa.sumiInk0 }, { bg = color_names.kanagawa.crystalBlue, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.oniViolet, fg = color_names.kanagawa.sumiInk0 }, { bg = color_names.kanagawa.oniViolet, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.waveRed, fg = color_names.kanagawa.sumiInk0 }, { bg = color_names.kanagawa.waveRed, fg = color_names.kanagawa.sumiInk0 },
} }
-- The elements to be formatted -- The elements to be formatted
local elements = {} local elements = {}

View File

@ -1,49 +1,49 @@
{ {
"aururl": "https://aur.archlinux.org", "aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?", "aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/sam/.cache/yay", "buildDir": "/home/sam/.cache/yay",
"editor": "", "editor": "",
"editorflags": "", "editorflags": "",
"makepkgbin": "makepkg", "makepkgbin": "makepkg",
"makepkgconf": "", "makepkgconf": "",
"pacmanbin": "pacman", "pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf", "pacmanconf": "/etc/pacman.conf",
"redownload": "no", "redownload": "no",
"answerclean": "", "answerclean": "",
"answerdiff": "", "answerdiff": "",
"answeredit": "", "answeredit": "",
"answerupgrade": "", "answerupgrade": "",
"gitbin": "git", "gitbin": "git",
"gpgbin": "gpg", "gpgbin": "gpg",
"gpgflags": "", "gpgflags": "",
"mflags": "", "mflags": "",
"sortby": "votes", "sortby": "votes",
"searchby": "name-desc", "searchby": "name-desc",
"gitflags": "", "gitflags": "",
"removemake": "ask", "removemake": "ask",
"sudobin": "sudo", "sudobin": "sudo",
"sudoflags": "", "sudoflags": "",
"version": "12.1.0", "version": "12.1.0",
"requestsplitn": 150, "requestsplitn": 150,
"completionrefreshtime": 7, "completionrefreshtime": 7,
"maxconcurrentdownloads": 0, "maxconcurrentdownloads": 0,
"bottomup": true, "bottomup": true,
"sudoloop": false, "sudoloop": false,
"timeupdate": false, "timeupdate": false,
"devel": true, "devel": true,
"cleanAfter": false, "cleanAfter": false,
"provides": false, "provides": false,
"pgpfetch": true, "pgpfetch": true,
"cleanmenu": true, "cleanmenu": true,
"diffmenu": true, "diffmenu": true,
"editmenu": false, "editmenu": false,
"combinedupgrade": false, "combinedupgrade": false,
"useask": false, "useask": false,
"batchinstall": false, "batchinstall": false,
"singlelineresults": false, "singlelineresults": false,
"separatesources": true, "separatesources": true,
"debug": false, "debug": false,
"rpc": true, "rpc": true,
"doubleconfirm": true, "doubleconfirm": true,
"rebuild": "no" "rebuild": "no"
} }

View File

@ -1,6 +0,0 @@
#compdef aws
_aws () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/aws_zsh_completer.sh
if [[ -f $e ]]; then source $e; fi
}

View File

@ -1,60 +0,0 @@
# Source this file to activate auto completion for zsh using the bash
# compatibility helper. Make sure to run `compinit` before, which should be
# given usually.
#
# % source /path/to/zsh_complete.sh
#
# Typically that would be called somewhere in your .zshrc.
#
# Note, the overwrite of _bash_complete() is to export COMP_LINE and COMP_POINT
# That is only required for zsh <= edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
#
# https://github.com/zsh-users/zsh/commit/edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
#
# zsh relases prior to that version do not export the required env variables!
autoload -Uz bashcompinit
bashcompinit -i
_bash_complete() {
local ret=1
local -a suf matches
local -x COMP_POINT COMP_CWORD
local -a COMP_WORDS COMPREPLY BASH_VERSINFO
local -x COMP_LINE="$words"
local -A savejobstates savejobtexts
(( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
(( COMP_CWORD = CURRENT - 1))
COMP_WORDS=( $words )
BASH_VERSINFO=( 2 05b 0 1 release )
savejobstates=( ${(kv)jobstates} )
savejobtexts=( ${(kv)jobtexts} )
[[ ${argv[${argv[(I)nospace]:-0}-1]} = -o ]] && suf=( -S '' )
matches=( ${(f)"$(compgen $@ -- ${words[CURRENT]})"} )
if [[ -n $matches ]]; then
if [[ ${argv[${argv[(I)filenames]:-0}-1]} = -o ]]; then
compset -P '*/' && matches=( ${matches##*/} )
compset -S '/*' && matches=( ${matches%%/*} )
compadd -Q -f "${suf[@]}" -a matches && ret=0
else
compadd -Q "${suf[@]}" -a matches && ret=0
fi
fi
if (( ret )); then
if [[ ${argv[${argv[(I)default]:-0}-1]} = -o ]]; then
_default "${suf[@]}" && ret=0
elif [[ ${argv[${argv[(I)dirnames]:-0}-1]} = -o ]]; then
_directories "${suf[@]}" && ret=0
fi
fi
return ret
}
complete -C aws_completer aws

View File

@ -4,8 +4,12 @@ init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/completions" local wkdir="${BASE_ZSH_CONFIG_DIR}/config/completions"
FPATH="${FPATH}:${wkdir}/completions" FPATH="${FPATH}:${wkdir}/completions"
autoload -Uz compinit autoload bashcompinit && bashcompinit
compinit autoload -Uz compinit && compinit
if command -v aws_completer >/dev/null 2>&1; then
complete -C "$(command -v aws_completer)" aws
fi
} }
init init

View File

@ -1,5 +1,5 @@
{ {
"RoslynExtensionsOptions": { "RoslynExtensionsOptions": {
"enableDecompilationSupport": true "enableDecompilationSupport": true
} }
} }

View File

@ -1,31 +1,22 @@
# Some of these functions were taken from https://github.com/NixOS/nixpkgs/blob/master/lib/ # Some of these functions were taken from https://github.com/NixOS/nixpkgs/blob/master/lib/
{ lib ? (import <nixpkgs> { }).lib }: { lib ? (import <nixpkgs> { }).lib }: rec {
rec { hasSuffix = suffix: string:
hasSuffix =
suffix:
string:
let let
lenSuffix = builtins.stringLength suffix; lenSuffix = builtins.stringLength suffix;
lenString = builtins.stringLength string; lenString = builtins.stringLength string;
in in (lenString >= lenSuffix
( && (builtins.substring (lenString - lenSuffix) lenString string)
lenString >= lenSuffix && (builtins.substring (lenString - lenSuffix) lenString string) == suffix == suffix);
);
recurseDir = dir: recurseDir = dir:
let let dirContents = builtins.readDir dir;
dirContents = builtins.readDir dir; in (builtins.concatMap (dirItem:
in let
(builtins.concatMap itemType = builtins.getAttr dirItem dirContents;
(dirItem: itemPath = dir + "/${dirItem}";
let in if itemType == "directory" then
itemType = builtins.getAttr dirItem dirContents; (recurseDir itemPath)
itemPath = dir + "/${dirItem}"; else
in [ itemPath ]) (builtins.attrNames dirContents));
if itemType == "directory" then
(recurseDir itemPath)
else
[ itemPath ])
(builtins.attrNames dirContents));
recurseFilesInDir = dir: suffix: recurseFilesInDir = dir: suffix:
(builtins.filter (file: hasSuffix "${suffix}" file) (recurseDir dir)); (builtins.filter (file: hasSuffix "${suffix}" file) (recurseDir dir));
recurseFilesInDirs = dirs: suffix: recurseFilesInDirs = dirs: suffix:
@ -35,14 +26,13 @@ rec {
let let
f = attrPath: f = attrPath:
lib.zipAttrsWith (n: values: lib.zipAttrsWith (n: values:
if lib.tail values == [ ] if lib.tail values == [ ] then
then lib.head values lib.head values
else if lib.all builtins.isList values else if lib.all builtins.isList values then
then lib.unique (lib.concatLists values) lib.unique (lib.concatLists values)
else if lib.all builtins.isAttrs values else if lib.all builtins.isAttrs values then
then f (attrPath ++ [ n ]) values f (attrPath ++ [ n ]) values
else lib.last values else
); lib.last values);
in in f [ ] attrList;
f [ ] attrList;
} }

View File

@ -4,9 +4,7 @@ let
"age1yubikey1qfnj0k4mkzrn8ef5llwh2sv6hd7ckr0qml3n9hzdpz9c59ypvryhyst87k0" "age1yubikey1qfnj0k4mkzrn8ef5llwh2sv6hd7ckr0qml3n9hzdpz9c59ypvryhyst87k0"
"age1ur2lr3z6d2eftgxcalc6s5x9840ew9x43upl9k23wg0ugacrn5as4zl6sj" "age1ur2lr3z6d2eftgxcalc6s5x9840ew9x43upl9k23wg0ugacrn5as4zl6sj"
]; ];
secrets = let dir = "files"; secrets = let dir = "files"; in { };
in {
};
in if agenix then in if agenix then
(builtins.listToAttrs (builtins.concatMap (secretName: [{ (builtins.listToAttrs (builtins.concatMap (secretName: [{
name = builtins.toString secretName; name = builtins.toString secretName;