Compare commits

..

No commits in common. "b2d7666b0740659584e5b03df32f2c640e41086c" and "fbceea242d9ffb058c664d2ab640e4b34167c1bc" have entirely different histories.

25 changed files with 306 additions and 430 deletions

View file

@ -7,15 +7,7 @@
-- by RRethy (https://github.com/RRethy/nvim-base16)
-- {{scheme-name}} scheme by {{scheme-author}}
local function exists(plugin)
local status, lib = pcall(require, plugin)
if(status) then return true end
return false
end
if exists("mini.base16") then
require('mini.base16').setup({
palette = {
require('base16-colorscheme').setup({
base00 = '#{{base00-hex}}',
base01 = '#{{base01-hex}}',
base02 = '#{{base02-hex}}',
@ -32,11 +24,6 @@ if exists("mini.base16") then
base0D = '#{{base0D-hex}}',
base0E = '#{{base0E-hex}}',
base0F = '#{{base0F-hex}}'
},
})
end
if exists("lualine") then
require("lualine").setup()
end
-- vim: filetype=lua

View file

@ -69,9 +69,6 @@ riverctl map normal $mod+Shift E spawn "bemoji -nt"
# Open translation helper
riverctl map normal $mod+Shift T spawn "bemenu-translate"
# Open item from library
riverctl map normal $mod+Shift L spawn "papis -s picktool dmenu open"
# Desktop theming
# shellcheck disable=SC2016
riverctl map normal $mod+Shift S spawn 'flavourchoose'
@ -253,8 +250,8 @@ if exist swww; then
riverctl spawn "swww init"
outputs=$(swww query | cut -d':' -f1)
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg"
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_r.jpg"
elif [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg"
fi

View file

@ -46,11 +46,6 @@ song_status_format = "$5$b%t $5$/b• $3%a $5• $6%b {(Disc %d) }$5• $4%y"
song_library_format = "{{%a - %t}|{%f}}{$R%l}"
empty_tag_marker = ""
empty_tag_color = "9"
media_library_primary_tag = "album_artist"
media_library_sort_by_mtime = "no"
media_library_hide_album_dates = "yes"
media_library_albums_split_by_date = "no"
data_fetching_delay = "yes"
[global]
user_interface = "alternative" #(classic/alternative)

View file

@ -4,13 +4,15 @@
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"aerial.nvim": { "branch": "master", "commit": "3748e87a316a68754341cdffcef44fee61dee51c" },
"aerial.nvim": { "branch": "master", "commit": "63ec2bfc3d9b8ce1fd943fff14781504d8ee250e" },
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
"cmp-beancount": { "branch": "main", "commit": "da154ea94d598e6649d6ad01efa0a8611eff460d" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" },
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
@ -18,48 +20,50 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" },
"cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" },
"cmp-tmux": { "branch": "main", "commit": "97ec06b8030b8bf6d1fd83d49bdd16c98e04c845" },
"cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
"conform.nvim": { "branch": "master", "commit": "3d59cbd01a4b74124c5a6fb23b8cc63e5c2db3d5" },
"conform.nvim": { "branch": "master", "commit": "cbc5745bf7519acaf3a5cbaaa677fd556aa813d7" },
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
"dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" },
"fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" },
"friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" },
"dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" },
"fidget.nvim": { "branch": "main", "commit": "3a93300c076109d86c7ce35ec67a8034ae6ba9db" },
"friendly-snippets": { "branch": "main", "commit": "69a2c1675b66e002799f5eef803b87a12f593049" },
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" },
"git-conflict.nvim": { "branch": "main", "commit": "4e0191c9a0ae05d7fbdcdc7f15cd358f56d23bfb" },
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
"glance.nvim": { "branch": "master", "commit": "8ed5cf3b3b1231ea696d88c9efd977027429d869" },
"headlines.nvim": { "branch": "master", "commit": "d39c4e6ed8963717bc9b2dc39fada8fe1039e9bf" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"image.nvim": { "branch": "master", "commit": "9b6248bd8b58b505559e31eb581b7c4638369ec3" },
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lightspeed.nvim": { "branch": "main", "commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05" },
"lsp-setup.nvim": { "branch": "main", "commit": "22ba14fb5c4208fd93f616d7b99bb47656e6e144" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" },
"markmap.nvim": { "branch": "main", "commit": "3befc2a54c2448a16c30c1c7762aab263f22946a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "bf0f4f8062d3acbe0afcc61db01a4d19d96310e4" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mason.nvim": { "branch": "main", "commit": "baf99d94c3380640d19af9c70c0541bd6e7cd0cb" },
"mdeval.nvim": { "branch": "master", "commit": "2c32e2f3e7d8f222e7a4724989f218d036e1081d" },
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
"molten-nvim": { "branch": "main", "commit": "21d766c2d60e5f6e03f507e7f3e382a2a927ad41" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"neotest": { "branch": "master", "commit": "b47c99265253f0a31a428b698c59ec0bc956e78d" },
"molten-nvim": { "branch": "main", "commit": "c263b4df09b14ed5245f0a15381d3363c2edf05a" },
"neotest": { "branch": "master", "commit": "1ee3fcc150207f33dba8c9b3f478e5a0148d661d" },
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-FeMaco.lua": { "branch": "main", "commit": "6af458f0196215f397db31a6e1fb2df795811693" },
"nvim-base16": { "branch": "master", "commit": "96e308958625a84940d5e443475465abf99c7bd9" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-coverage": { "branch": "main", "commit": "cf4b5c61dfac977026a51a2bcad9173c272986ce" },
"nvim-lint": { "branch": "master", "commit": "966ab3dc37eee3e413692264b44a3011b05a6060" },
"nvim-lspconfig": { "branch": "master", "commit": "41f40dc4b86f3e166cf08115f621001972565a20" },
"nvim-lint": { "branch": "master", "commit": "6427b17058a74891bb287b275356bbc445b5924c" },
"nvim-lspconfig": { "branch": "master", "commit": "7eed8b2150192e5ad05e1886fdf133493ddf2928" },
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" },
"nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" },
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
"nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
"nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" },
"nvim-treesitter-context": { "branch": "master", "commit": "2017a0d7fc2d3790d823feddedada506984a10ce" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "55d11124c45e9bb506703f73e5775652ed5357e9" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
"nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
"nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
"otter.nvim": { "branch": "main", "commit": "cf29fc255bce78fd03565b40722438c0ab3ce05d" },
@ -72,11 +76,11 @@
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
"undotree": { "branch": "main", "commit": "80552a0180b49e5ba072c89ae91ce5d4e3aed36b" },
"vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" },
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
"vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" },
"vim-exchange": { "branch": "master", "commit": "d6c1e9790bcb8df27c483a37167459bbebe0112e" },
"vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" },
"vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
"vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" },
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },

View file

@ -18,6 +18,18 @@ vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
group = vim.api.nvim_create_augroup("passnoleak", { clear = true }),
})
-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH
vim.defer_fn(function()
vim.loop.kill(pid, WINCH)
end, 20)
end,
desc = "Fix neovim sizing issues if opening same time as alacritty",
group = vim.api.nvim_create_augroup("alacritty_fixsize", { clear = true }),
})
-- remove line numbers from terminal buffers
vim.api.nvim_create_autocmd({ "TermOpen" }, {
desc = "Hide buffer numbers for terminals",

View file

@ -9,4 +9,3 @@ for _, source in ipairs({
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
end
end

View file

@ -132,5 +132,5 @@ map("n", "<localleader>ZE", ":setlocal spell! spelllang=en_us<cr>", { desc = "To
map("n", "<localleader>ZB", ":setlocal spell! spelllang=en_gb<cr>", { desc = "Toggle EN_GB spellcheck" })
map("n", "<localleader>ZD", ":setlocal spell! spelllang=de_de<cr>", { desc = "Toggle DE_DE spellcheck" })
-- undo last spelling mistake from insert and normal mode
map("i", "<c-z>", "<C-G>u<Esc>e[s1z=`]a<C-G>u")
map("n", "<localleader>z", "mse[s1z=`s", { desc = "Fix last spell error" })
map("i", "<c-z>", "<C-G>u<Esc>[s1z=`]a<C-G>u")
map("n", "<localleader>z", "ms[s1z=`s", { desc = "Fix last spell error" })

View file

@ -79,12 +79,7 @@ local function on_attach(client, bufnr)
)
map("n", "<localleader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = bufnr, desc = "Codeactions" })
map("n", "<localleader>ln", "<cmd>lua vim.lsp.buf.rename()<cr>", { buffer = bufnr, desc = "Rename element" })
if vim.fn.exists(":Glance") then
map("n", "<localleader>lr", "<cmd>Glance references<cr>", { buffer = bufnr, desc = "References" })
map("n", "<localleader>lf", "<cmd>Glance definitions<cr>", { buffer = bufnr, desc = "Definition" })
map("n", "<localleader>lt", "<cmd>Glance type_definitions<cr>", { buffer = bufnr, desc = "Type definition" })
map("n", "<localleader>lm", "<cmd>Glance implementations<cr>", { buffer = bufnr, desc = "Implementation" })
elseif vim.fn.exists(":Telescope") then
if vim.fn.exists(":Telescope") then
map("n", "<localleader>lr", "<cmd>Telescope lsp_references<cr>", { buffer = bufnr, desc = "References" })
map("n", "<localleader>lf", "<cmd>Telescope lsp_definitions<cr>", { buffer = bufnr, desc = "Definition" })
map(
@ -133,7 +128,7 @@ local function on_attach(client, bufnr)
end
-- Display diagnostics as virtual text only if not in insert mode
-- /r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
-- https://lr.artemislena.eu/r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
vim.api.nvim_create_autocmd("InsertEnter", {
callback = function()
vim.diagnostic.config({ virtual_text = false })

View file

@ -0,0 +1,57 @@
require("mini.ai").setup()
require("mini.comment").setup({
hooks = {
pre = function()
require("ts_context_commentstring.internal").update_commentstring()
end,
},
})
require("mini.cursorword").setup({ delay = 500 })
require("mini.fuzzy").setup()
require("mini.indentscope").setup({
symbol = "",
draw = { animation = require("mini.indentscope").gen_animation.none() },
options = { indent_at_cursor = false },
})
require("mini.map").setup()
require("mini.move").setup() -- has not hit stable yet
require("mini.pairs").setup()
require("mini.trailspace").setup()
local starter = require("mini.starter")
starter.setup({
evaluate_single = true,
items = {
starter.sections.builtin_actions(),
starter.sections.recent_files(10, false),
starter.sections.recent_files(10, true),
-- Use this if you set up 'mini.sessions'
starter.sections.telescope(),
},
content_hooks = {
starter.gen_hook.adding_bullet(),
starter.gen_hook.padding(3, 2),
starter.gen_hook.aligning("center", "center"),
},
})
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true })
require("mini.bracketed").setup({
{
buffer = { suffix = "b", options = {} },
comment = { suffix = "c", options = {} },
conflict = { suffix = "", options = {} },
diagnostic = { suffix = "d", options = {} },
file = { suffix = "f", options = {} },
indent = { suffix = "", options = {} }, -- disable since we use indentscope above
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} },
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "", options = {} }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
},
})

View file

@ -0,0 +1,85 @@
require("toggleterm").setup({
open_mapping = [[<leader>=]],
insert_mappings = false, -- don't map the key in insert mode
terminal_mappings = false,
})
local Terminal = require("toggleterm.terminal").Terminal
-- need to disable indentlines since they obscure first line of terminal
if require("util").is_available("mini.nvim") then
vim.api.nvim_create_autocmd({ "TermOpen" }, {
pattern = "*",
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end
local function custom_term_set_toggle_key(term)
vim.keymap.set("t", "<C-\\>", function()
term:toggle()
end, { silent = true, buffer = true })
end
-- create python window
local function get_python_cmd()
if vim.fn.executable("ptipython") then
return "ptipython"
end
if vim.fn.executable("ipython") then
return "ipython"
end
if vim.fn.executable("ptpython") then
return "ptpython"
end
if vim.fn.executable("python") then
return "python"
end
end
local terms = {
lazygit = Terminal:new({
cmd = "lazygit",
hidden = true,
direction = "float",
float_opts = { border = "curved" },
on_open = custom_term_set_toggle_key,
}),
python = Terminal:new({
cmd = get_python_cmd(),
hidden = true,
direction = "float",
float_opts = { border = "curved" },
on_open = custom_term_set_toggle_key,
}),
}
-- create a lazygit window with the lazygit command
local function toggle_custom_term(term, bang, vertsize)
vertsize = vertsize or vim.o.columns * 0.4
if not bang then
term.direction = "float"
term:toggle()
else
term.direction = "vertical"
term:resize(vertsize)
term:toggle()
end
end
local function _Pythonterm_toggle(opts)
toggle_custom_term(terms.python, opts.bang)
end
local function _Lazygit_toggle(opts)
toggle_custom_term(terms.lazygit, opts.bang, vim.o.columns * 0.6)
end
vim.api.nvim_create_user_command(
"Lazygit",
_Lazygit_toggle,
{ desc = "Toggle floating Lazygit terminal", bang = true }
)
vim.api.nvim_create_user_command(
"Pythonterm",
_Pythonterm_toggle,
{ desc = "Toggle floating Python terminal", bang = true }
)

View file

@ -44,53 +44,7 @@ return {
},
},
-- jump between letters with improved fFtT quicksearch, mimics sneak
{
"folke/flash.nvim",
event = "VeryLazy",
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{ "ggandor/lightspeed.nvim", event = "BufEnter" },
-- personal dict improvements for git sync
{ "micarmst/vim-spellsync", event = "VeryLazy" },
@ -103,9 +57,43 @@ return {
{
"echasnovski/mini.nvim",
version = "*",
config = function()
require("plugins.config.mini")
end,
event = "VimEnter", -- need to load pretty soon for Starter screen
keys = {
{ "<leader>sm", ":lua MiniMap.toggle()<cr>", { silent = true, desc = "minimap" } },
{ "<leader>ss", ":lua MiniStarter.open()<cr>", { desc = "startpage" } },
{
"<localleader>w",
function()
require("mini.trailspace").trim()
end,
},
},
},
-- simpler, programmable and multiple terminal toggling for nvim
{
"akinsho/nvim-toggleterm.lua",
config = function()
require("plugins.config.toggleterm")
end,
cmd = { "ToggleTerm", "TermExec", "Lazygit", "Pythonterm" },
keys = {
{ "<leader>sg", ":Lazygit<cr>" },
{ "<leader>sG", ":Lazygit!<cr>" },
{ "<leader>sp", ":Pythonterm<cr>" },
{ "<leader>sP", ":Pythonterm!<cr>" },
},
},
-- colorschemes
{
"RRethy/nvim-base16",
lazy = false,
commit = "96e3089",
priority = 1000,
dependencies = { "rktjmp/fwatch.nvim" },
config = function()
-- automatic callback to invoke 'mini.base16' when colorscheme file is changed
local colorsfile = vim.fn.stdpath("state") .. "/colorscheme.lua"
local function source_colors()
if vim.fn.filereadable(colorsfile) == 1 then
@ -114,6 +102,7 @@ return {
end
-- set on startup
source_colors()
-- continuously watch colors file for changes
local fwatch = require("fwatch")
fwatch.watch(colorsfile, {
@ -121,95 +110,10 @@ return {
source_colors()
end),
})
require("mini.ai").setup()
require("mini.comment").setup({
hooks = {
pre = function()
-- use treesitter commentstring functionality if it's installed
if require("util").is_available("ts_context_commentstring") then
require("ts_context_commentstring.internal").update_commentstring()
end
end,
},
})
require("mini.cursorword").setup({ delay = 500 })
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true, underline = false })
vim.api.nvim_set_hl(0, "MiniCursorwordCurrent", { bold = true, underline = false })
require("mini.fuzzy").setup()
require("mini.indentscope").setup({
symbol = "",
draw = { animation = require("mini.indentscope").gen_animation.none() },
options = { indent_at_cursor = false },
})
require("mini.map").setup()
require("mini.move").setup()
require("mini.operators").setup()
require("mini.pairs").setup()
require("mini.trailspace").setup()
local starter = require("mini.starter")
starter.setup({
evaluate_single = true,
items = {
starter.sections.builtin_actions(),
starter.sections.recent_files(10, true),
starter.sections.recent_files(10, false),
-- Use this if you set up 'mini.sessions'
-- starter.sections.sessions(),
starter.sections.telescope(),
},
content_hooks = {
starter.gen_hook.adding_bullet(),
starter.gen_hook.padding(3, 2),
starter.gen_hook.aligning("center", "center"),
},
})
require("mini.bracketed").setup({
{
buffer = { suffix = "b", options = {} },
comment = { suffix = "c", options = {} },
conflict = { suffix = "", options = {} },
diagnostic = { suffix = "d", options = {} },
file = { suffix = "f", options = {} },
indent = { suffix = "", options = {} }, -- disable since we use indentscope above
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} },
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "", options = {} }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
},
})
end,
event = "VimEnter", -- need to load pretty soon for Starter screen
keys = {
{
"<leader>sm",
function()
require("mini.map").toggle()
end,
silent = true, desc = "minimap" ,
},
{
"<leader>ss",
function()
require("mini.starter").open()
end,
silent = true, desc = "startpage" ,
},
{
"<localleader>w",
function()
require("mini.trailspace").trim()
end,
desc = "Trim trailing whitespace",
},
},
},
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
{ "stevearc/stickybuf.nvim", config = true },
-- make it a little less painful to open really big (>2mb) files by disabling features
-- { "LunarVim/bigfile.nvim", lazy = false },
{ "LunarVim/bigfile.nvim", lazy = false },
}

View file

@ -1,4 +1,9 @@
return {
-- adds exchange operator with cx. common use: cxiw . on 2 words to switch
{
"tommcdo/vim-exchange",
event = "VeryLazy",
},
-- Align tables and other alignable things
{
"junegunn/vim-easy-align",
@ -9,7 +14,7 @@ return {
},
},
-- surround things with other things using ys/cs/ds
{ "kylechui/nvim-surround", config = true, event = "InsertEnter" },
{ "kylechui/nvim-surround", version = "*", config = true, event = "VeryLazy" },
-- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
{

View file

@ -1,38 +1,3 @@
local linters = {
astro = { "eslint_d" },
bash = { "shellcheck" },
javascript = { "eslint_d" },
javascriptreact = { "eslint_d" },
markdown = { "markdownlint", "vale" },
quarto = { "markdownlint", "vale" },
sh = { "shellcheck" },
svelte = { "eslint_d" },
text = { "vale" },
typescript = { "eslint_d" },
typescriptreact = { "eslint_d" },
}
local formatters = {
angular = { { "prettierd", "prettier" } },
astro = { { "prettierd", "prettier" } },
bash = { "shfmt" },
bib = { "bibtex-tidy" },
css = { { "prettierd", "prettier" } },
graphql = { { "prettierd", "prettier" } },
html = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" },
lua = { "stylua" },
python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
vue = { { "prettierd", "prettier" } },
yaml = { { "prettierd", "prettier" } },
zsh = { "shfmt" },
}
return {
-- vista-like outline view for code
{
@ -101,29 +66,40 @@ return {
config = function()
require("plugins.config.lsp")
end,
keys = { { "<leader>vs", ":LspInfo<cr>", desc = "LspInfo" } },
},
-- very very pretty lsp 'peek' menus
{
"DNLHC/glance.nvim",
opts = { border = { enable = true }, theme = { enable = true, mode = "auto" } },
cmd = { "Glance" },
keys = { {
"<leader>vs",
":LspInfo<cr>",
desc = "LspInfo",
} },
},
-- linting setup
{
"mfussenegger/nvim-lint",
config = function()
local linters = {
astro = { "eslint_d" },
bash = { "shellcheck" },
javascript = { "eslint_d" },
javascriptreact = { "eslint_d" },
markdown = { "markdownlint", "vale" },
quarto = { "markdownlint", "vale" },
sh = { "shellcheck" },
svelte = { "eslint_d" },
text = { "vale" },
typescript = { "eslint_d" },
typescriptreact = { "eslint_d" },
}
require("lint").linters_by_ft = linters
vim.api.nvim_create_autocmd({ "BufWritePost", "InsertLeave" }, {
callback = function()
if not vim.g.disable_autolint then
if not vim.g.disable_autoformat then
require("lint").try_lint()
end
end,
})
end,
event = { "BufWritePost", "InsertLeave" },
event = { "BufReadPost", "BufNewFile" },
},
-- formatting setup
@ -138,7 +114,27 @@ return {
end
return { lsp_fallback = true }
end,
formatters_by_ft = formatters,
formatters_by_ft = {
angular = { { "prettierd", "prettier" } },
astro = { { "prettierd", "prettier" } },
bash = { "shfmt" },
bib = { "bibtex-tidy" },
css = { { "prettierd", "prettier" } },
graphql = { { "prettierd", "prettier" } },
html = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" },
lua = { "stylua" },
python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
vue = { { "prettierd", "prettier" } },
yaml = { { "prettierd", "prettier" } },
zsh = { "shfmt" },
},
formatters = {
-- enable python isort functionality
ruff_fix = {

View file

@ -7,8 +7,8 @@ return {
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {},
always_divide_middle = true,
},
@ -17,8 +17,8 @@ return {
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
lualine_y = { "progress", "location" },
lualine_z = { "hostname" },
},
inactive_sections = {
lualine_a = {},
@ -45,13 +45,13 @@ return {
override_vim_notify = true,
},
},
event = { "VeryLazy" },
event = "VimEnter",
},
-- make all vim.ui interfaces prettyy
{ "stevearc/dressing.nvim", config = true, event = "VeryLazy" },
-- numbers to absolute for all buffers but the current which is relative
{ "jeffkreeftmeijer/vim-numbertoggle", event = "InsertEnter" },
{ "jeffkreeftmeijer/vim-numbertoggle", event = "BufEnter" },
-- auto-hiding colorcolumn
{
"m4xshen/smartcolumn.nvim",
@ -111,105 +111,4 @@ return {
},
},
},
-- simpler, programmable and multiple terminal toggling for nvim
{
"akinsho/nvim-toggleterm.lua",
config = function()
require("toggleterm").setup({
open_mapping = [[<leader>=]],
insert_mappings = false, -- don't map the key in insert mode
terminal_mappings = false,
})
local Terminal = require("toggleterm.terminal").Terminal
-- need to disable indentlines since they obscure first line of terminal
if require("util").is_available("mini.nvim") then
vim.api.nvim_create_autocmd({ "TermOpen" }, {
pattern = "*",
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end
local function custom_term_set_toggle_key(term)
vim.keymap.set("t", "<C-\\>", function()
term:toggle()
end, { silent = true, buffer = true })
end
-- create python window
local function get_python_cmd()
if vim.fn.executable("py") then
return "py"
end
if vim.fn.executable("ptipython") then
return "ptipython"
end
if vim.fn.executable("ipython") then
return "ipython"
end
if vim.fn.executable("ptpython") then
return "ptpython"
end
if vim.fn.executable("python") then
return "python"
end
end
local terms = {
lazygit = Terminal:new({
cmd = "lazygit",
hidden = true,
direction = "float",
float_opts = { border = "curved" },
on_open = custom_term_set_toggle_key,
}),
python = Terminal:new({
cmd = get_python_cmd(),
hidden = true,
direction = "float",
float_opts = { border = "curved" },
on_open = custom_term_set_toggle_key,
}),
}
-- create a lazygit window with the lazygit command
local function toggle_custom_term(term, bang, vertsize)
vertsize = vertsize or vim.o.columns * 0.4
if not bang then
term.direction = "float"
term:toggle()
else
term.direction = "vertical"
term:resize(vertsize)
term:toggle()
end
end
local function _Pythonterm_toggle(opts)
toggle_custom_term(terms.python, opts.bang)
end
local function _Lazygit_toggle(opts)
toggle_custom_term(terms.lazygit, opts.bang, vim.o.columns * 0.6)
end
vim.api.nvim_create_user_command(
"Lazygit",
_Lazygit_toggle,
{ desc = "Toggle floating Lazygit terminal", bang = true }
)
vim.api.nvim_create_user_command(
"Pythonterm",
_Pythonterm_toggle,
{ desc = "Toggle floating Python terminal", bang = true }
)
end,
cmd = { "ToggleTerm", "TermExec", "Lazygit", "Pythonterm" },
keys = {
{ "<leader>sg", ":Lazygit<cr>", desc = "git floating" },
{ "<leader>sG", ":Lazygit!<cr>", desc = "git buffer" },
{ "<leader>sp", ":Pythonterm<cr>", desc = "python floating" },
{ "<leader>sP", ":Pythonterm!<cr>", desc = "python buffer" },
},
},
}

View file

@ -209,9 +209,3 @@ redistributional
HIC
LMIC
hukou
Theil
unobservables
familialization
FTA
gray
quantifiability

View file

@ -6,8 +6,8 @@ text/html; render-prettyhtml %s; nametemplate=%s.html; copiousoutput;
text/plain; $EDITOR %s ;
# show calendar invites
text/calendar; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal
application/ics; mutt-ics; description=ics details; copiousoutput; print=khal import %s; needsterminal
text/calendar; mutt-ics; copiousoutput
application/ics; mutt-ics; copiousoutput
# open images externally
image/*; imv %s ;

View file

@ -35,7 +35,7 @@ redirects = {
"farside": ["invidious"],
},
"stackoverflow": {
"source": ["stackoverflow.com", "askubuntu.com"],
"source": ["stackoverflow.com"],
"farside": ["anonymousoverflow"],
},
"lbry": {
@ -109,44 +109,6 @@ redirects = {
"search.nezumi.party",
],
},
"biblioreads": {
"source": ["goodreads.com"],
"target": [
"biblioreads.eu.org",
"biblioreads.vercel.app",
"biblioreads.mooo.com",
"bl.vern.cc",
"biblioreads.lunar.icu",
"read.whateveritworks.org",
"biblioreads.privacyfucking.rocks",
"read.seitan-ayoub.lol",
"read.freedit.eu",
"biblioreads.ducks.party",
"biblioreads.snine.nl",
"biblioreads.privacyredirect.com",
],
},
"safetwitch": {
"source": ["twitch.tv"],
"target": [
"safetwitch.drgns.space",
"safetwitch.projectsegfau.lt",
"stream.whateveritworks.org",
"safetwitch.datura.network",
"ttv.vern.cc",
"safetwitch.frontendfriendly.xyz",
"ttv.femboy.band",
"twitch.seitan-ayoub.lol",
"st.ggtyler.dev",
"safetwitch.lunar.icu",
"twitch.sudovanilla.com",
"safetwitch.r4fo.com",
"safetwitch.ducks.party",
"safetwitch.nogafam.fr",
"safetwitch.privacyredirect.com",
"st.ngn.tf",
],
},
}

View file

@ -64,7 +64,7 @@ class SciHubLinkParser(html.parser.HTMLParser):
self.current = match["url"] if match and match["url"] else None
def get_scihub_url(wiki_page: str = "https://en.wikipedia.org/wiki/Sci-Hub"):
def get_scihub_url(wiki_page: str = "https://wikiless.org/wiki/Sci-Hub"):
resp = requests.get(wiki_page)
parser = SciHubLinkParser()
parser.feed(resp.text)

View file

@ -39,7 +39,7 @@ set classify+='λ ::*.ml,,*.mli::,
\  ::*.scss::,
\  ::*.py,,*.pyc,,*.pyd,,*.pyo::,
\  ::*.php::,
\  ::*.markdown,,*.md,,*.qmd::,
\  ::*.markdown,,*.md::,
\  ::*.json::,
\  ::*.js::,
\  ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::,

View file

@ -470,11 +470,11 @@ filetype *.sqlite,*.db
\ sqlite3 %f,
" tabular data
filetype *.csv,*.xlsx,*.tsv,*.json
filextype *.csv, *.xlsx, *.tsv, *.json
\ {Open with visidata}
\ vd %f,
fileviewer *.tsv,*.csv
\ tidy-viewer --color-always %c
\ tidy-viewer --color-always --title %c
" \ xsv sample 100 %c | xsv table -c8 -p1 -w1,
" \ {cat %c | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S; }
fileviewer *.xlsx

View file

@ -67,27 +67,15 @@ local function setup()
wezterm.log_info("toggling the leader")
local overrides = window:get_config_overrides() or {}
if not overrides.leader then
wezterm.log_info("enabling leader key")
wezterm.log_info("leader wasn't set")
overrides.leader = { key = "s", mods = "SUPER" }
else
wezterm.log_info("disabling leader key")
wezterm.log_info("leader was set")
overrides.leader = nil
end
window:set_config_overrides(overrides)
end)
wezterm.on("toggle-tabbar", function(window, _)
local overrides = window:get_config_overrides() or {}
if overrides.enable_tab_bar == false then
wezterm.log_info("showing tab bar")
overrides.enable_tab_bar = true
else
wezterm.log_info("hiding tab bar")
overrides.enable_tab_bar = false
end
window:set_config_overrides(overrides)
end)
end
return { setup = setup }

View file

@ -100,7 +100,6 @@ local keys = {
action = act.EmitEvent("ActivatePaneDirection-Right"),
},
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "T", mods = "CTRL", action = act.EmitEvent("toggle-tabbar") },
}
-- Leader + number to activate that tab
for i = 1, 8 do

View file

@ -25,7 +25,6 @@ end
local settings = {
enable_wayland = true,
enable_tab_bar = true,
hide_tab_bar_if_only_one_tab = true,
use_fancy_tab_bar = false,
tab_bar_at_bottom = true,

View file

@ -5,7 +5,7 @@ local-config-file = .papis.config
opentool = sioyek
picktool = papis-tui
mark-opener-format = sioyek --page {mark[value]}
mark-opener = sioyek --page {mark[value]}
file-browser = vifm
# edit info.yaml as new papers are added

View file

@ -5,7 +5,6 @@ close_window q
open_document_embedded o
toggle_custom_color <C-r>
toggle_two_page_mode d
goto_begining gg
goto_end G