Compare commits

..

No commits in common. "12d186d871857180bcb2df415118c1912bd22759" and "19c95400f79f3b74bdb0fe60c4c5afea539f30a5" have entirely different histories.

20 changed files with 110 additions and 144 deletions

View file

@ -49,16 +49,12 @@
"on-click-right": "$TERMINAL start --class float glances" "on-click-right": "$TERMINAL start --class float glances"
}, },
"custom/events": { "custom/events": {
"exec-if": "command -v khal >/dev/null 2>&1", "format": "{}",
"exec": "~/.config/waybar/modules/khal.py 2>/dev/null",
"return-type": "json",
"interval": 300, "interval": 300,
"on-click": "$TERMINAL start --class float ikhal", "exec": "~/.config/waybar/modules/khal.py 2>/dev/null",
"format": "{icon}{}", "exec-if": "command -v khal >/dev/null 2>&1",
"format-icons": { "return-type": "json",
"event": " ", "on-click": "$TERMINAL start --class float ikhal"
"no-event": "",
},
}, },
"memory": { "memory": {
"interval": 30, "interval": 30,
@ -142,7 +138,7 @@
"tag-labels": [ "", "", "", "", "", "", "", "", "", "" ] "tag-labels": [ "", "", "", "", "", "", "", "", "", "" ]
}, },
"river/mode": { "river/mode": {
"format": "{} ", "format": "{} 󱐁",
}, },
"river/window": { "river/window": {
"format": " {}", "format": " {}",
@ -176,7 +172,7 @@
"interval": 60, "interval": 60,
}, },
"custom/vidl": { "custom/vidl": {
"format": "{icon}{}", "format": "{} {icon}",
"format-alt-click": "right", "format-alt-click": "right",
"format-icons": { "format-icons": {
"default": "" "default": ""

View file

@ -1,14 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python
# from https://gist.github.com/bjesus/178a9bd3453470d74803945dbbf9ed40 # from https://gist.github.com/bjesus/178a9bd3453470d74803945dbbf9ed40
# List upcoming khal events in simple json container fit for waybar # List upcoming khal events in simple json container fit for waybar
#
# Hovering over the item displays all upcoming
# The icon changes if there are events today, and displays the
# closest upcoming one.
import subprocess
import datetime import datetime
import json import json
import subprocess
from html import escape from html import escape
data = {} data = {}
@ -21,19 +17,19 @@ output = subprocess.check_output("khal list now " + next_week, shell=True)
output = output.decode("utf-8") output = output.decode("utf-8")
lines = output.split("\n") lines = output.split("\n")
new_lines: list[str] = [] new_lines = []
for line in lines: for line in lines:
clean_line = escape(line).split(" ::")[0] clean_line = escape(line).split(" ::")[0]
if len(clean_line) and clean_line[0] not in ["0", "1", "2"]: if len(clean_line) and not clean_line[0] in ["0", "1", "2"]:
clean_line = "\n<b>" + clean_line + "</b>" clean_line = "\n<b>" + clean_line + "</b>"
new_lines.append(clean_line) new_lines.append(clean_line)
output = "\n".join(new_lines).strip() output = "\n".join(new_lines).strip()
data["alt"] = "no-event" if today in output:
data["text"] = "" + output.split("\n")[1]
else:
data["text"] = ""
data["tooltip"] = output data["tooltip"] = output
if today in output:
data["text"] = output.split("\n")[1]
data["alt"] = "event"
print(json.dumps(data)) print(json.dumps(data))

View file

@ -1,10 +1,8 @@
local map = vim.keymap.set local map = vim.keymap.set
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ require("which-key").register({ ["<localleader>c"] = { name = "+codecells" } })
{ "<localleader>c", group = "codecells" }, require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } })
{ "<localleader>e", group = "criticmarkup" },
})
end end
if require("core.util").is_available("zk") and require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then if require("core.util").is_available("zk") and require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then
@ -25,7 +23,7 @@ map("n", "<localleader>co", "o```python<cr><cr>```<esc>k", { desc = "Insert quar
map("n", "<localleader>cO", "O```python<cr><cr>```<esc>k", { desc = "Insert quarto cell above" }) map("n", "<localleader>cO", "O```python<cr><cr>```<esc>k", { desc = "Insert quarto cell above" })
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>p", group = "prose" }) require("which-key").register({ ["<localleader>p"] = { name = "+prose" } })
end end
-- show nice md preview in browser (auto-syncs scrolling) -- show nice md preview in browser (auto-syncs scrolling)
if require("core.util").is_available("peek") then if require("core.util").is_available("peek") then

View file

@ -1,4 +1,3 @@
local default_buffer_session = function() local default_buffer_session = function()
local buffer_path = vim.api.nvim_buf_get_name(0) or vim.fn.tempname() local buffer_path = vim.api.nvim_buf_get_name(0) or vim.fn.tempname()
local temp_path = vim.fn.stdpath("run") .. "/molten-sessions" .. buffer_path .. ".json" local temp_path = vim.fn.stdpath("run") .. "/molten-sessions" .. buffer_path .. ".json"
@ -42,10 +41,9 @@ local startsession = function(file, args)
}) })
end end
vim.api.nvim_create_user_command("JupyterStart", function() vim.api.nvim_create_user_command("JupyterStart", function()
startsession(vim.b["sessionfile"] or default_buffer_session()) startsession()
end, {}) end, {})
if vim.g.quarto_auto_init_molten_session then
vim.api.nvim_create_autocmd({"InsertEnter", "BufEnter"}, { vim.api.nvim_create_autocmd({"InsertEnter", "BufEnter"}, {
callback = function() callback = function()
if vim.b["sessionfile"] == nil then if vim.b["sessionfile"] == nil then
@ -55,4 +53,18 @@ if vim.g.quarto_auto_init_molten_session then
end end
end, end,
}) })
end -- -- -- TODO find better way to enable lsp key mappings for quarto buffers
-- -- local prefix = require("which-key").register
-- -- prefix({ ["<localleader>l"] = { name = "+lsp" } })
-- -- map("n", "<localleader>li", "<cmd>LspInfo<cr>", { buffer = bufnr, desc = "Lsp Info" })
-- -- map("n", "<localleader>ld", "<cmd>lua vim.diagnostic.open_float()<cr>", { buffer = bufnr, desc = "Line diagnostics" })
-- -- 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" })
-- -- map("n", "<localleader>lr", "<cmd>lua vim.lsp.buf.references()<cr>", { buffer = bufnr, desc = "References" })
-- --
-- -- map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", { buffer = bufnr, desc = "Declaration" })
-- -- map("n", "gs", "<cmd>lua vim.lsp.buf.signature_help()<cr>", { buffer = bufnr, desc = "Signature help" })
-- -- map("n", "gI", "<cmd>lua vim.lsp.buf.implementation()<cr>", { buffer = bufnr, desc = "Implementation" })
-- -- map("n", "gt", "<cmd>lua vim.lsp.buf.type_definition()<cr>", { buffer = bufnr, desc = "Type definition" })
-- vim.g["python3_host_prog"] = vim.fn.expand(require("core.util").get_python_venv())

View file

@ -4,9 +4,9 @@
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"aerial.nvim": { "branch": "master", "commit": "7e2615991cf110f6688112abcb45cf338248d1f6" }, "aerial.nvim": { "branch": "master", "commit": "4d10acbcb760802ea74381ac3ed98cbb6e5f7805" },
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" }, "bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
"cmp-beancount": { "branch": "main", "commit": "29e23297c06b9d69771e4b14e0fb3b9d583a150e" }, "cmp-beancount": { "branch": "main", "commit": "c8a2533828b84546ae279d60137aec92bd52dc72" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
@ -23,12 +23,12 @@
"cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
"conform.nvim": { "branch": "master", "commit": "ae213f5169d5d0c6abbe76e1438d932772fc1657" }, "conform.nvim": { "branch": "master", "commit": "60e6fbddbdf37d7790de07dc7420beefaf650e5e" },
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
"dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" }, "git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" },
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
@ -37,40 +37,40 @@
"image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" }, "image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" },
"img-clip.nvim": { "branch": "main", "commit": "fc30500c35663aa1762697f5aba31d43b86028f0" }, "img-clip.nvim": { "branch": "main", "commit": "fc30500c35663aa1762697f5aba31d43b86028f0" },
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" }, "jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
"lazy.nvim": { "branch": "main", "commit": "839f9e78e78dc935b1188fb16583365991739c51" }, "lazy.nvim": { "branch": "main", "commit": "c882227f1fdc4580d14212df8f814a0772951e3d" },
"lsp-setup.nvim": { "branch": "main", "commit": "6e4e977512ce426d8b52c27f3b6e6aefc73e1452" }, "lsp-setup.nvim": { "branch": "main", "commit": "6e4e977512ce426d8b52c27f3b6e6aefc73e1452" },
"ltex_extra.nvim": { "branch": "dev", "commit": "57192d7ae5ba8cef3c10e90f2cd62d4a7cdaab69" }, "ltex_extra.nvim": { "branch": "dev", "commit": "57192d7ae5ba8cef3c10e90f2cd62d4a7cdaab69" },
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
"markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" }, "markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" },
"mason-conform.nvim": { "branch": "main", "commit": "abce2be529f3b4b336c56d0ba6336a9144e0fee6" }, "mason-conform.nvim": { "branch": "main", "commit": "abce2be529f3b4b336c56d0ba6336a9144e0fee6" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason-nvim-lint": { "branch": "main", "commit": "b579a00ee39dcd590b1023028dc8fb3d203a67b0" }, "mason-nvim-lint": { "branch": "main", "commit": "637a5b8f1b454753ec70289c4996d88a50808642" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mdeval.nvim": { "branch": "master", "commit": "2c32e2f3e7d8f222e7a4724989f218d036e1081d" }, "mdeval.nvim": { "branch": "master", "commit": "2c32e2f3e7d8f222e7a4724989f218d036e1081d" },
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" }, "mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" },
"molten-nvim": { "branch": "main", "commit": "eb6d0fe33e14989b0f1fbe25d9732889ee57bd1a" }, "molten-nvim": { "branch": "main", "commit": "df5ccef3b6fda3582f7746e45327ee031f668826" },
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" }, "neotest": { "branch": "master", "commit": "f30bab1faef13d47f3905e065215c96a42d075ad" },
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" }, "nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "08bd34bf0ed79723f62764c7f9ca70516d461d0d" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" }, "nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" },
"nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" },
"nvim-lspconfig": { "branch": "master", "commit": "fa6c2a64100c6f692bbec29bbbc8ec2663c9e869" }, "nvim-lspconfig": { "branch": "master", "commit": "53a3c6444ec5006b567071614c83edc8ad651f6d" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" },
"nvim-tree.lua": { "branch": "master", "commit": "f9ff00bc06d7cb70548a3847d7a2a05e928bc988" }, "nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
"nvim-treesitter-context": { "branch": "master", "commit": "5efba33af0f39942e426340da7bc15d7dec16474" }, "nvim-treesitter-context": { "branch": "master", "commit": "5efba33af0f39942e426340da7bc15d7dec16474" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "a8d2844bba925d9450ef7ab215f3b054028288ca" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "a8d2844bba925d9450ef7ab215f3b054028288ca" },
"nvim-ts-autotag": { "branch": "main", "commit": "1624866a1379fc1861797f0ed05899a9c1d2ff61" }, "nvim-ts-autotag": { "branch": "main", "commit": "ddfccbf0df1b9349c2b9e9b17f4afa8f9b6c1ed1" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"otter.nvim": { "branch": "main", "commit": "837f258040d0174ff8495584088046f98499b1ac" }, "otter.nvim": { "branch": "main", "commit": "45db1799625eacda838c196c728974058d922d80" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
@ -78,11 +78,11 @@
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" }, "smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" }, "stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "935bedf39c440de2f97ce58dbbb44a40402057c1" },
"telescope-luasnip.nvim": { "branch": "master", "commit": "11668478677de360dea45cf2b090d34f21b8ae07" }, "telescope-luasnip.nvim": { "branch": "master", "commit": "11668478677de360dea45cf2b090d34f21b8ae07" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"texpresso.vim": { "branch": "main", "commit": "1cc949fde8ed3220968039b6b1b6ccdd9f475087" }, "texpresso.vim": { "branch": "main", "commit": "1cc949fde8ed3220968039b6b1b6ccdd9f475087" },
"trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, "trouble.nvim": { "branch": "main", "commit": "57761ba7148164f0315ed203e714ac242329abd4" },
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" }, "undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
"vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" }, "vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" },
@ -91,8 +91,8 @@
"vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" }, "vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" },
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" }, "vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" }, "wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },
"which-key.nvim": { "branch": "main", "commit": "48cdaaab93a4c85cac8eb271bb48307ed337787f" }, "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" },
"wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" }, "wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" },
"zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }, "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" },
"zk-nvim": { "branch": "main", "commit": "66b9b490e930fb77f93a2a0c64e0da9a5144fd0a" } "zk-nvim": { "branch": "main", "commit": "66b9b490e930fb77f93a2a0c64e0da9a5144fd0a" }
} }

View file

@ -2,13 +2,11 @@ local map = vim.keymap.set
local is_available = require("core.util").is_available local is_available = require("core.util").is_available
if is_available("which-key") then if is_available("which-key") then
local prefix = require("which-key").add local prefix = require("which-key").register
prefix({ prefix({ ["<leader>v"] = { name = "+vim" } })
{ "<leader>v", group = "vim" }, prefix({ ["<leader>s"] = { name = "+show" } })
{ "<leader>s", group = "show" }, prefix({ ["<localleader>s"] = { name = "+set" } })
{ "<localleader>s", group = "set" }, prefix({ ["<localleader>Z"] = { name = "+spelling" } })
{ "<localleader>Z", group = "spelling" },
})
end end
-- The general ideas behind these mappings: -- The general ideas behind these mappings:

View file

@ -1,9 +1,3 @@
-- Change (personal) plugin options
-- mainly intended for things I have not packaged as plugin but may
-- require options to be set.
vim.g.quarto_auto_init_molten_session = false
-- Change (Neo)Vim default options
local default_builtins_disabled = { "netrw", "netrwPlugin" } local default_builtins_disabled = { "netrw", "netrwPlugin" }
local disable_builtins = function(builtins) local disable_builtins = function(builtins)
for _, plugin in pairs(builtins) do for _, plugin in pairs(builtins) do

View file

@ -20,7 +20,6 @@ local servers = {
eslint = {}, eslint = {},
gopls = {}, gopls = {},
julials = {}, julials = {},
jsonls = {},
ltex = { autostart = false }, ltex = { autostart = false },
lua_ls = { lua_ls = {
settings = { settings = {
@ -64,7 +63,7 @@ local function on_attach(_, bufnr)
) )
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>l", group = "language" }) require("which-key").register({ ["<localleader>l"] = { name = "+language" } })
end end
map( map(
"n", "n",
@ -127,7 +126,7 @@ local function on_attach(_, bufnr)
else else
vim.diagnostic.disable(0) vim.diagnostic.disable(0)
end end
end, { buffer = bufnr, desc = "Toggle Diagnostics" }) end, { buffer = bufnr, desc = "Disable buffer diagnostics" })
end end
-- Display diagnostics as virtual text only if not in insert mode -- Display diagnostics as virtual text only if not in insert mode

View file

@ -86,8 +86,8 @@ return {
{ "micarmst/vim-spellsync", event = "VeryLazy" }, { "micarmst/vim-spellsync", event = "VeryLazy" },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
config = true,
event = "CursorHold", event = "CursorHold",
opts = { icons = { mappings = false } },
}, },
-- collection of plugins -- collection of plugins
{ {

View file

@ -46,10 +46,6 @@ return {
map("n", "[c", "?^```<cr>n}:nohl<cr>", { desc = "Codecell last" }) map("n", "[c", "?^```<cr>n}:nohl<cr>", { desc = "Codecell last" })
map("n", "<localleader>co", "o```{python}<cr><cr>```<esc>k", { desc = "Insert quarto cell below" }) map("n", "<localleader>co", "o```{python}<cr><cr>```<esc>k", { desc = "Insert quarto cell below" })
map("n", "<localleader>cO", "O```{python}<cr><cr>```<esc>k", { desc = "Insert quarto cell above" }) map("n", "<localleader>cO", "O```{python}<cr><cr>```<esc>k", { desc = "Insert quarto cell above" })
if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>c", group = "codecells" })
end
end, end,
ft = { "quarto" }, ft = { "quarto" },
}, },
@ -118,7 +114,7 @@ return {
callback = function() callback = function()
local map = vim.keymap.set local map = vim.keymap.set
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>c", group = "codecells" }) require("which-key").register({ ["<localleader>c"] = { name = "+codecells" } })
end end
-- Operate jupyter notebooks from within vim -- Operate jupyter notebooks from within vim
map( map(

View file

@ -1,22 +1,18 @@
return { return {
{ {
"akinsho/git-conflict.nvim", "akinsho/git-conflict.nvim",
event = { "InsertEnter", "CursorHold" }, event = "VeryLazy",
config = function() config = function()
require("git-conflict").setup({ require("git-conflict").setup({
default_mappings = false, default_mappings = false,
disable_diagnostics = true, disable_diagnostics = true,
}) })
if require("core.util").is_available("which-key") then vim.keymap.set("n", "<localleader>ho", "<Plug>(git-conflict-ours)", { desc = "Conflict use ours" })
require("which-key").add({ "<localleader>h", group = "git" }) vim.keymap.set("n", "<localleader>hO", "<Plug>(git-conflict-theirs)", { desc = "Conflict use theirs" })
end vim.keymap.set("n", "<localleader>hm", "<Plug>(git-conflict-both)", { desc = "Conflict use both" })
local map = vim.keymap.set vim.keymap.set("n", "<localleader>hM", "<Plug>(git-conflict-none)", { desc = "Conflict use none" })
map("n", "<localleader>ho", "<Plug>(git-conflict-ours)", { desc = "Conflict use ours" }) vim.keymap.set("n", "[H", "<Plug>(git-conflict-prev-conflict)", { desc = "Prev git conflict" })
map("n", "<localleader>hO", "<Plug>(git-conflict-theirs)", { desc = "Conflict use theirs" }) vim.keymap.set("n", "]H", "<Plug>(git-conflict-next-conflict)", { desc = "Next git conflict" })
map("n", "<localleader>hm", "<Plug>(git-conflict-both)", { desc = "Conflict use both" })
map("n", "<localleader>hM", "<Plug>(git-conflict-none)", { desc = "Conflict use none" })
map("n", "[H", "<Plug>(git-conflict-prev-conflict)", { desc = "Prev git conflict" })
map("n", "]H", "<Plug>(git-conflict-next-conflict)", { desc = "Next git conflict" })
end, end,
lazy = false, -- TODO needs to be force refreshed in lazy loaded mode unfortunately lazy = false, -- TODO needs to be force refreshed in lazy loaded mode unfortunately
}, },
@ -60,7 +56,7 @@ return {
-- Actions -- Actions
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>h", group = "git" }) require("which-key").register({ ["<localleader>h"] = { name = "+git" } })
end end
map({ "n", "v" }, "<localleader>hs", ":Gitsigns stage_hunk<CR>", { desc = "stage hunk" }) map({ "n", "v" }, "<localleader>hs", ":Gitsigns stage_hunk<CR>", { desc = "stage hunk" })
map({ "n", "v" }, "<localleader>hr", ":Gitsigns reset_hunk<CR>", { desc = "reset hunk" }) map({ "n", "v" }, "<localleader>hr", ":Gitsigns reset_hunk<CR>", { desc = "reset hunk" })

View file

@ -141,9 +141,7 @@ return {
"stevearc/conform.nvim", "stevearc/conform.nvim",
config = function() config = function()
require("conform").setup({ require("conform").setup({
lsp_format = "fallback", lsp_format = "fallback",
format_after_save = function(bufnr) format_after_save = function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return return
@ -154,10 +152,10 @@ return {
}) })
vim.api.nvim_create_user_command("FormatDisable", function(args) vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then if args.bang then
vim.g.disable_autoformat = true -- FormatDisable! will disable formatting just for this buffer
else
-- FormatDisable! will disable formatting globally
vim.b.disable_autoformat = true vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end end
end, { end, {
desc = "Disable formatting on save", desc = "Disable formatting on save",
@ -264,7 +262,7 @@ return {
}, },
}) })
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>t", group = "test" }) require("which-key").register({ ["<localleader>t"] = { name = "+test" } })
end end
end, end,
ft = { "python" }, ft = { "python" },

View file

@ -94,11 +94,10 @@ local prose_plugs = {
"mickael-menu/zk-nvim", "mickael-menu/zk-nvim",
config = function() config = function()
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ local prefix = require("which-key").register
{ "<leader>n", group = "notes" }, prefix({ ["<leader>n"] = { name = "+notes" } })
{ "<localleader>n", group = "note" }, prefix({ ["<localleader>n"] = { name = "+note" } })
{ "<localleader>n", group = "note", mode = "v" }, prefix({ ["<localleader>n"] = { name = "+note", mode = "v" } })
})
require("zk.commands").add("ZkOrphans", function(opts) require("zk.commands").add("ZkOrphans", function(opts)
opts = vim.tbl_extend("force", { orphan = true }, opts or {}) opts = vim.tbl_extend("force", { orphan = true }, opts or {})

View file

@ -10,7 +10,7 @@ return {
cmd = "Telescope", cmd = "Telescope",
config = function() config = function()
if require("core.util").is_available("which-key") then if require("core.util").is_available("which-key") then
require("which-key").add({ "<leader>f", group = "find" }) require("which-key").register({ ["<leader>f"] = { name = "+find" } })
end end
-- Setup up telescope fuzzy finding settings -- Setup up telescope fuzzy finding settings
-- --
@ -40,7 +40,7 @@ return {
-- FIXME Find way to only invoke this *IF* trouble plugin is found -- FIXME Find way to only invoke this *IF* trouble plugin is found
i = { ["<c-t>"] = require("trouble.sources.telescope").open }, i = { ["<c-t>"] = require("trouble.sources.telescope").open },
n = { ["<c-t>"] = require("trouble.sources.telescope").open }, n = { ["<c-t>"] = require("trouble.sources.telescope").open },
}, }
}, },
pickers = { pickers = {
buffers = { theme = "ivy" }, buffers = { theme = "ivy" },

View file

@ -65,6 +65,11 @@ snippet eref Equation crossref
snippet cite Citation snippet cite Citation
[@${1:bib-key}] [@${1:bib-key}]
snippet fn Footnote
[^${1:id}]
[^${1}]: ${2:text}
snippet shortcode Shortcode snippet shortcode Shortcode
{{< $0 >}} {{< $0 >}}

View file

@ -8,5 +8,4 @@ if exist nvim; then
# open notes with my vim zettelkasten plugin # open notes with my vim zettelkasten plugin
# TODO better implementation conditional on zk & zettelkasten existing # TODO better implementation conditional on zk & zettelkasten existing
alias vn='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit ~/documents/notes/index.md"' alias vn='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit ~/documents/notes/index.md"'
alias vs='nvim +"lua require \"personal.scratchpad\".create()"'
fi fi

View file

@ -77,5 +77,3 @@ state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state")
colorscheme=f"{state_dir}/qutebrowser/colorscheme.py" colorscheme=f"{state_dir}/qutebrowser/colorscheme.py"
if os.path.isfile(colorscheme): if os.path.isfile(colorscheme):
config.source(colorscheme) config.source(colorscheme)
c.url.start_pages = "https://start.duckduckgo.com/html"

View file

@ -74,33 +74,19 @@ bind-key h quit searchresultslist
bind-key g home bind-key g home
bind-key G end bind-key G end
bind-key ^F pagedown bind-key ^F pagedown
bind-key ^B pageup bind-key ^U pageup
bind-key ^B halfpageup
bind-key ^D halfpagedown bind-key ^D halfpagedown
bind-key ^U halfpageup
bind-key n next-unread bind-key n next-unread
bind-key N prev-unread bind-key N prev-unread
bind-key ^n next-unread-feed articlelist bind-key ^n next-unread-feed articlelist
bind-key ^p prev-unread-feed articlelist bind-key ^p prev-unread-feed articlelist
unbind-key R
unbind-key r
bind-key O reload-all
bind-key o reload
unbind-key A
bind-key M mark-all-feeds-read feedlist
bind-key m mark-feed-read feedlist
bind-key m toggle-article-read articlelist
bind-key m toggle-article-read article
bind-key m toggle-article-read article
bind-key m toggle-article-read tagselection
bind-key m toggle-article-read filterselection
bind-key m toggle-article-read searchresultslist
bind-key s sort bind-key s sort
bind-key S rev-sort bind-key S rev-sort
bind-key U show-urls bind-key U show-urls
bind-key a toggle-article-read
bind-key f goto-url bind-key f goto-url
bind-key z toggle-show-read-feeds bind-key z toggle-show-read-feeds

View file

@ -322,9 +322,6 @@ noremap ,pc :!pdftk %f cat output output.pdf
nnoremap ,t :!vifm-thumbnailer -t %u %c<cr> nnoremap ,t :!vifm-thumbnailer -t %u %c<cr>
nnoremap ,T :!vifm-thumbnailer -r -t %u %c<cr> nnoremap ,T :!vifm-thumbnailer -r -t %u %c<cr>
" batch rename or delete files in current dir
nnoremap ,r :!vidir<cr>
" allows preview to work for normal view and single pane view " allows preview to work for normal view and single pane view
noremap <silent> w : if layoutis('only') noremap <silent> w : if layoutis('only')
\| if &lines + 50 < &columns | vsplit | else | split | endif \| if &lines + 50 < &columns | vsplit | else | split | endif

View file

@ -8,7 +8,6 @@ should_launch_new_instance 1 # seems to not be working?
should_launch_new_window 1 should_launch_new_window 1
should_load_tutorial_when_no_other_file 0 should_load_tutorial_when_no_other_file 0
check_for_updates_on_startup 0 check_for_updates_on_startup 0
should_highlight_unselected_search 1
startup_commands toggle_custom_color startup_commands toggle_custom_color