Compare commits

...

14 commits

Author SHA1 Message Date
12d186d871
waybar: Improve events block icon rendering
Using the 'alt' json return field to set the icon and change the icon
within waybar itself instead of doing so manually in the script. This
makes us a little more flexible and puts all the 'what' is rendered that
is specific to waybar into waybar (keeping the 'how' it's rendered in
the style.css).
2024-07-25 22:15:12 +02:00
6905ce3ea7
waybar: Change calendar block whitespace
When there are no new calendar events for the current day we do not
display any whitespace after the icon.
2024-07-25 22:01:50 +02:00
7a051952fc
nvim: Update which-key mapping functions
Use new which-key mapping `.add()` functions after `.register()` has
been deprecated with which-key 3.0.0.
2024-07-24 14:53:48 +02:00
d45d220b52
nvim: Update plugins 2024-07-24 14:13:14 +02:00
1b4f73ae9b
nvim: Do not establish quarto molten session on open
We now disable the automatic establishing of quarto molten sessions
(using the virtual environment provided python interpreter) as soon as
the file is opened since it can have some negative side-effects and also
slows down quarto file opening.
Instead, use the `JupyterStart` command to establish a jupyter session
in the correct environment and initialize a molten session.

The behaviour can be re-enabled with
`vim.g.quarto_auto_init_molten_session = true`.
2024-07-24 14:13:01 +02:00
a94b1ccbb2
nvim: Add vs shell alias to start vim stratchpad 2024-07-24 14:09:47 +02:00
4779617b2b
newsboat: Change sync and read toggle keys
Changed keys to be a little more coherent with neomutt setup: o/O reload
the current or all feeds (previously r/R);
m/M mark the current feed/all feeds read (previously a/A) if in the feed
list. If in another dialog, m toggles the individual selected article
read.
2024-07-20 16:54:10 +02:00
0b5c7d09d5
nvim: Remove quarto fn snippet
Removed `fn` snippet from quarto snippets since we already have the
functionally equivalent `]]` snippet for markdown (which quarto
extends).
2024-07-20 16:50:42 +02:00
88f187160a
nvim: FormatDisable disables globally with a bang
Switch the functionality of `FormatDisable` command around: Disables for
the local buffer by default and disables globally if called with a bang.
2024-07-20 16:50:00 +02:00
d2a2537df0
nvim: Enable json lsp 2024-07-20 16:48:54 +02:00
f5592b5e85
vifm: JupyterStart always uses sessionfile
Make JupyterStart always use the buffer sessionfile (or create the
default one if none exists) instead of only on first run.
2024-07-20 16:48:34 +02:00
a16364a61b
sioyek: Enable highlights for all search results
All search results are highlighted, not just the currently selected. As
of now only works with the development version of the program not the
current release version (2.0.0).
2024-07-20 16:47:13 +02:00
9deacabbef
vifm: Add batch file modification shortcut
Use `,r` to enter an $EDITOR instance in which you can
rename/delete/modify the files in the current directory. (using vidir
program under the hood)
2024-07-20 16:45:55 +02:00
9a7b8c824d
qutebrowser: Switch to html ddg startpage 2024-07-20 16:44:35 +02:00
20 changed files with 143 additions and 109 deletions

View file

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

View file

@ -1,10 +1,14 @@
#!/usr/bin/env python
# from https://gist.github.com/bjesus/178a9bd3453470d74803945dbbf9ed40
# 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 json
import subprocess
from html import escape
data = {}
@ -17,19 +21,19 @@ output = subprocess.check_output("khal list now " + next_week, shell=True)
output = output.decode("utf-8")
lines = output.split("\n")
new_lines = []
new_lines: list[str] = []
for line in lines:
clean_line = escape(line).split(" ::")[0]
if len(clean_line) and not clean_line[0] in ["0", "1", "2"]:
if len(clean_line) and clean_line[0] not in ["0", "1", "2"]:
clean_line = "\n<b>" + clean_line + "</b>"
new_lines.append(clean_line)
output = "\n".join(new_lines).strip()
if today in output:
data["text"] = "" + output.split("\n")[1]
else:
data["text"] = ""
data["alt"] = "no-event"
data["tooltip"] = output
if today in output:
data["text"] = output.split("\n")[1]
data["alt"] = "event"
print(json.dumps(data))

View file

@ -1,8 +1,10 @@
local map = vim.keymap.set
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>c"] = { name = "+codecells" } })
require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } })
require("which-key").add({
{ "<localleader>c", group = "codecells" },
{ "<localleader>e", group = "criticmarkup" },
})
end
if require("core.util").is_available("zk") and require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then
@ -23,7 +25,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" })
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>p"] = { name = "+prose" } })
require("which-key").add({ "<localleader>p", group = "prose" })
end
-- show nice md preview in browser (auto-syncs scrolling)
if require("core.util").is_available("peek") then

View file

@ -1,3 +1,4 @@
local default_buffer_session = function()
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"
@ -15,7 +16,7 @@ local startsession = function(file, args)
local path = require("core.util").get_python_venv_bin()
if not path then
return
return
end
vim.g["python3_host_prog"] = path
@ -41,30 +42,17 @@ local startsession = function(file, args)
})
end
vim.api.nvim_create_user_command("JupyterStart", function()
startsession()
startsession(vim.b["sessionfile"] or default_buffer_session())
end, {})
vim.api.nvim_create_autocmd({"InsertEnter", "BufEnter"}, {
callback = function()
if vim.b["sessionfile"] == nil then
local path = default_buffer_session()
vim.b["sessionfile"] = path
vim.schedule_wrap(startsession(path))
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())
if vim.g.quarto_auto_init_molten_session then
vim.api.nvim_create_autocmd({ "InsertEnter", "BufEnter" }, {
callback = function()
if vim.b["sessionfile"] == nil then
local path = default_buffer_session()
vim.b["sessionfile"] = path
vim.schedule_wrap(startsession(path))
end
end,
})
end

View file

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

View file

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

View file

@ -1,3 +1,9 @@
-- 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 disable_builtins = function(builtins)
for _, plugin in pairs(builtins) do

View file

@ -20,6 +20,7 @@ local servers = {
eslint = {},
gopls = {},
julials = {},
jsonls = {},
ltex = { autostart = false },
lua_ls = {
settings = {
@ -63,7 +64,7 @@ local function on_attach(_, bufnr)
)
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>l"] = { name = "+language" } })
require("which-key").add({ "<localleader>l", group = "language" })
end
map(
"n",
@ -126,7 +127,7 @@ local function on_attach(_, bufnr)
else
vim.diagnostic.disable(0)
end
end, { buffer = bufnr, desc = "Disable buffer diagnostics" })
end, { buffer = bufnr, desc = "Toggle Diagnostics" })
end
-- Display diagnostics as virtual text only if not in insert mode
@ -159,9 +160,9 @@ lspconfig.marksman.setup({
on_attach = function(client, bufnr)
-- TODO: for some reason this stays true even after rootdir switch?
if client.config.in_zk_notebook then
vim.defer_fn(function()
vim.lsp.buf_detach_client(bufnr, client.id)
end, 1000)
vim.defer_fn(function()
vim.lsp.buf_detach_client(bufnr, client.id)
end, 1000)
end
on_attach(client, bufnr)
end,

View file

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

View file

@ -46,6 +46,10 @@ return {
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 above" })
if require("core.util").is_available("which-key") then
require("which-key").add({ "<localleader>c", group = "codecells" })
end
end,
ft = { "quarto" },
},
@ -114,7 +118,7 @@ return {
callback = function()
local map = vim.keymap.set
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>c"] = { name = "+codecells" } })
require("which-key").add({ "<localleader>c", group = "codecells" })
end
-- Operate jupyter notebooks from within vim
map(

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -74,19 +74,33 @@ bind-key h quit searchresultslist
bind-key g home
bind-key G end
bind-key ^F pagedown
bind-key ^U pageup
bind-key ^B halfpageup
bind-key ^B pageup
bind-key ^D halfpagedown
bind-key ^U halfpageup
bind-key n next-unread
bind-key N prev-unread
bind-key ^n next-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 rev-sort
bind-key U show-urls
bind-key a toggle-article-read
bind-key f goto-url
bind-key z toggle-show-read-feeds

View file

@ -322,6 +322,9 @@ noremap ,pc :!pdftk %f cat output output.pdf
nnoremap ,t :!vifm-thumbnailer -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
noremap <silent> w : if layoutis('only')
\| if &lines + 50 < &columns | vsplit | else | split | endif

View file

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