From dc9f9373febba6c6dbbf618ce2f7982556152a41 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Sep 2023 07:41:37 +0200 Subject: [PATCH 01/25] nvim: Remove obsolete mappings Removed easyread and nabla toggles since the plugins are removed. --- nvim/.config/nvim/lua/core/mappings.lua | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index d06fc1c..feff72b 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -271,16 +271,6 @@ map( [[:lua require('wrapping').toggle_wrap_mode() ]], { silent = true, desc = "toggle wrap mode" } ) --- PLUGIN: easyread.nvim -map("n", "ss", ":EasyreadToggle", { silent = true, desc = "toggle speedreading" }) --- PLUGIN: nabla.nvim -map("n", "sv", 'lua require("nabla").popup()', { silent = true, desc = "latex formula popup" }) -map( - "n", - "sV", - 'lua require("nabla").toggle_virt({autogen = true, silent = true})', - { silent = true, desc = "toggle formula notation" } -) -- PLUGIN: nvim-colorizer map("n", "sc", "ColorizerToggle", { silent = true, desc = "toggle colorizer" }) map( From e016b0a056532b18d99b1591a2a2c24835b783ff Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Sep 2023 07:43:49 +0200 Subject: [PATCH 02/25] nvim: Remap lsp go to next/previous error Mapped to `[D` / `]D`, reflecting the capitalization of going to the next general diagnostic (`[d`/`]d`). Now it is similar to spelling mistakes and spelling errors (`]s[s`/`]S[S` respectively). --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index b2d611d..25ae1cb 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -48,13 +48,13 @@ local function on_attach(client, bufnr) map("n", "]d", "lua vim.diagnostic.goto_next()", { buffer = bufnr, desc = "Next diagnostic" }) map( "n", - "[e", + "[D", "lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})", { buffer = bufnr, desc = "Previous error" } ) map( "n", - "]e", + "]D", "lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})", { buffer = bufnr, desc = "Next error" } ) From 8a5381a4aa22b1c53e1e52a0b4ff3dd91fc1fbda Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Sep 2023 08:37:29 +0200 Subject: [PATCH 03/25] nvim: Add test setup for python to ide Added neotest with some mappings to run tests and view outputs, as well as neotest-python for now to make it work under python. Added registering with which-key if it exists. --- nvim/.config/nvim/lua/plugins/ide.lua | 86 ++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index 1fe0a9e..47321bf 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -13,6 +13,8 @@ return { backends = { "treesitter", "lsp", "markdown", "man" }, }, }, + + -- lsp setup { "junnplus/lsp-setup.nvim", dependencies = { @@ -51,6 +53,7 @@ return { require("plugins.config.lsp") end, }, + -- completion setup { "hrsh7th/nvim-cmp", branch = "main", @@ -82,7 +85,88 @@ return { end, event = { "InsertEnter", "CmdlineEnter", "VeryLazy" }, }, + -- loading animations for some LSP { "j-hui/fidget.nvim", config = true, tag = "legacy", event = "VeryLazy" }, - -- a pretend-lsp for formatters and linters + + -- testing setup + { + "nvim-neotest/neotest", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + "antoinemadec/FixCursorHold.nvim", + + "nvim-neotest/neotest-python", + }, + config = function() + require("neotest").setup({ + adapters = { + require("neotest-python"), + }, + }) + for _, v in pairs(require("lazy").plugins()) do + if v[1] == "folke/which-key.nvim" then + require("which-key").register({ ["t"] = { name = "+test" } }) + break + end + end + end, + keys = { + { + "st", + [[lua require('neotest').summary.toggle()]], + desc = "toggle test list", + silent = true, + }, + { + "sT", + [[lua require('neotest').output_panel.toggle()]], + desc = "toggle test output", + silent = true, + }, + { + "to", + [[lua require('neotest').output.open()]], + desc = "toggle test output", + silent = true, + }, + { + "tt", + [[lua require('neotest').run.run()]], + desc = "run nearest test", + silent = true, + }, + { + "td", + [[lua require('neotest').run.run({strategy = "dap"})]], + desc = "debug nearest test", + silent = true, + }, -- REQUIRES DAP + { + "tT", + [[lua require('neotest').run.run(vim.fn.expand("%"))]], + desc = "test current file", + silent = true, + }, + { + "tr", + [[lua require('neotest').run.run_last()]], + desc = "re-run last test", + silent = true, + }, + { + "tw", + [[lua require('neotest').watch.toggle()]], + desc = "watch current test", + silent = true, + }, + { + "tW", + [[lua require('neotest').watch.toggle(vim.fn.expand("%"))]], + desc = "watch current file", + silent = true, + }, + }, + }, } From 41934d3000427393c4a253abf25947c705eee843 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:38:57 +0200 Subject: [PATCH 04/25] nvim: Attach ruff client to active python environment --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index 25ae1cb..d3b6704 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -126,15 +126,29 @@ lsp.setup({ local lspconfig = require("lspconfig") +local python_path -- ensure python virtualenv is determined automatically on lsp start lspconfig.pyright.setup({ on_attach = function(client, bufnr) - on_attach(client, bufnr) - local python_path, _ = require("util").get_python_venv(client.config.root_dir) - vim.notify_once(string.format("[PYTHON VENV]\n%s", python_path)) + if python_path == nil then + python_path, _ = require("util").get_python_venv(client.config.root_dir) + end + print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) client.config.settings.python.pythonPath = python_path + on_attach(client, bufnr) end, }) +lspconfig.ruff_lsp.setup({ + on_attach = function(client, bufnr) + if python_path == nil then + python_path, _ = require("util").get_python_venv(client.config.root_dir) + end + print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) + client.config.settings.python.pythonPath = python_path + on_attach(client, bufnr) + end, +}) + -- set up arduino with the help of arduino.nvim plugin if require("util").is_available("arduino") then lspconfig.arduino_language_server.setup({ From 497b19fcbe25385977ef002b2e189860fc6b954b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:39:51 +0200 Subject: [PATCH 05/25] nvim: Add util function to grab plugin conditionally --- nvim/.config/nvim/lua/util/init.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/util/init.lua b/nvim/.config/nvim/lua/util/init.lua index ce2e2aa..c200e2f 100644 --- a/nvim/.config/nvim/lua/util/init.lua +++ b/nvim/.config/nvim/lua/util/init.lua @@ -5,10 +5,18 @@ local T = {} ---@param plugin string The plugin to search for ---@return boolean available # Whether the plugin is available function T.is_available(plugin) - local lazy_config_avail, lazy_config = pcall(require, "lazy.core.config") - return lazy_config_avail and lazy_config.plugins[plugin] ~= nil + return T.get_plugin(plugin) and true or false end +-- Get the plugin file handle if it exists, return nil otherwise +function T.get_plugin(plugin) + local status, lib = pcall(require, plugin) + if(status) then return lib end + return nil +end + +-- get the current python environment +-- return its path function T.get_python_venv(workspace) return require("util.pyenv").get_path(workspace) end From 23793795d6cfd2d72c9d237885c09883b5bdd114 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:40:26 +0200 Subject: [PATCH 06/25] nvim: Add coverage support for python testing Use `,tp` to load a coverage report and show it in the gutter. Use `,tP` to toggle it off and on. Use `,ts` to show a summary instead. --- nvim/.config/nvim/lua/plugins/ide.lua | 56 ++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index 47321bf..0af92e3 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -102,14 +102,15 @@ return { config = function() require("neotest").setup({ adapters = { - require("neotest-python"), + require("neotest-python")({ + -- with coverage requires coverage.py and pytest-cov installed + args = { "--cov" }, + }), }, }) - for _, v in pairs(require("lazy").plugins()) do - if v[1] == "folke/which-key.nvim" then - require("which-key").register({ ["t"] = { name = "+test" } }) - break - end + local status, wk = pcall(require, "which-key") + if status then + wk.register({ ["t"] = { name = "+test" } }) end end, keys = { @@ -169,4 +170,47 @@ return { }, }, }, + -- TODO needs to pick up poetry env for python, + -- currently just hard-codes running through poetry + { + "andythigpen/nvim-coverage", + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + require("coverage").setup({ + lang = { python = { coverage_command = "poetry run coverage json -q -o -" } } , + }) + end, + cmd = { + "Coverage", + "CoverageLoad", + "CoverageLoadLcov", + "CoverageShow", + "CoverageHide", + "CoverageToggle", + "CoverageClear", + "CoverageSummary", + }, + keys = { + { + "tp", + [[Coverage]], + desc = "show coverage report", + silent = true, + }, + { + "tP", + [[CoverageToggle]], + desc = "toggle coverage gutter", + silent = true, + }, + { + "ts", + [[CoverageSummary]], + desc = "show coverage summary", + silent = true, + }, + } + }, } From dfb9d7ff01562b515212a45d1667c65eea14b764 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:43:58 +0200 Subject: [PATCH 07/25] timewarrior: Add hash and plus to taskwarrior tags Add a hash sign in front of 'project' tags received from taskwarrior (i.e. where it is `project:something` it will end up as #something in timewarrior. Similarly, add a plus sign in front of tags: `+mytag`. Only descriptions will be left as-is in translating from taskwarrior to timewarrior. This should make finding tags and projects specifically much easier in timewarrior (e.g. for counting up the total time spent on a single project). --- office/.local/share/task/hooks/on-modify.timewarrior | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/office/.local/share/task/hooks/on-modify.timewarrior b/office/.local/share/task/hooks/on-modify.timewarrior index 46d82a9..61a16e5 100755 --- a/office/.local/share/task/hooks/on-modify.timewarrior +++ b/office/.local/share/task/hooks/on-modify.timewarrior @@ -55,10 +55,10 @@ def extract_tags_from(json_obj): tags = [json_obj['description']] if 'project' in json_obj: - tags.append(json_obj['project']) + tags.append(f"#{json_obj['project']}") if 'tags' in json_obj: - tags.extend(json_obj['tags']) + tags.extend([f"+{tag}" for tag in json_obj['tags']]) return tags From 490232d18a419dbce5b3c5c84a813a525006f49c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:44:11 +0200 Subject: [PATCH 08/25] nvim: Update plugins --- nvim/.config/nvim/lazy-lock.json | 59 ++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index bf409e1..caebf2e 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,13 +1,14 @@ { "Arduino.nvim": { "branch": "main", "commit": "1e986040861e77dd7107abfecc473c60ccd97d3f" }, "BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, - "aerial.nvim": { "branch": "master", "commit": "fb1f08c9f90e8b0c04b2f2c5d95d06288a14c5b2" }, + "aerial.nvim": { "branch": "master", "commit": "ae33427e1aa54bfdd164313716cdc10e7d7b927a" }, "bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" }, "cmp-beancount": { "branch": "main", "commit": "da154ea94d598e6649d6ad01efa0a8611eff460d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" }, + "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" }, @@ -16,57 +17,63 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-rg": { "branch": "master", "commit": "1cad8eb315643d0df13c37401c03d7986f891011" }, - "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, - "cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" }, + "cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" }, + "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, + "cmp-tmux": { "branch": "main", "commit": "97ec06b8030b8bf6d1fd83d49bdd16c98e04c845" }, "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, - "dressing.nvim": { "branch": "master", "commit": "c0b67f3e2950adc07b555d3e73e38275b4a585ce" }, + "dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" }, + "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" }, - "git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" }, + "git-conflict.nvim": { "branch": "main", "commit": "4e0191c9a0ae05d7fbdcdc7f15cd358f56d23bfb" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" }, "headlines.nvim": { "branch": "master", "commit": "74a083a3c32a08be24f7dfcc6f448ecf47857f46" }, "jupyter-kernel.nvim": { "branch": "main", "commit": "5b409598033884a3d819e2a3bcd1fe340bc8d783" }, "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" }, - "lsp-setup.nvim": { "branch": "main", "commit": "64542fb0da06414cdfaa0c5236b743679bb7ba7f" }, + "lsp-setup.nvim": { "branch": "main", "commit": "7276e54faf4af909b6ea171975fd4179ebe65cec" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "magma-nvim-goose": { "branch": "main", "commit": "9a626aab63361d027541d023707f82e28d7f872c" }, "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, - "mason.nvim": { "branch": "main", "commit": "74eac861b013786bf231b204b4ba9a7d380f4bd9" }, - "mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" }, + "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, + "mini.nvim": { "branch": "main", "commit": "707dca4f4152c2d9c9b4c5e02635f78dfd33db50" }, + "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, + "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, + "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-base16": { "branch": "master", "commit": "6247ca9aa9f34644dfa290a6df3f6feefb73eb97" }, - "nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" }, + "nvim-base16": { "branch": "master", "commit": "96e308958625a84940d5e443475465abf99c7bd9" }, + "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-lspconfig": { "branch": "master", "commit": "0d29cad8de3b2c654315203fc1fe12fde722a18a" }, + "nvim-coverage": { "branch": "main", "commit": "4634dfb00961a86948518c7e6f85737c24364308" }, + "nvim-lspconfig": { "branch": "master", "commit": "4266f9bb36b4fb09edd19b67d95043cf7ff88ddf" }, "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, - "nvim-tree.lua": { "branch": "master", "commit": "18c7a3119839adc4599d838726deae662859c8b2" }, + "nvim-tree.lua": { "branch": "master", "commit": "a3aa3b47eac8b6289f028743bef4ce9eb0f6782e" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-treesitter-context": { "branch": "master", "commit": "d8fd71428e02190d8f75ff915b6cca9e3063992c" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b6c763db8cc486215ba96e0a67418848a710ab25" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "df75fcec548014f158cda6498ac38c4622c221e1" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" }, - "nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" }, - "otter.nvim": { "branch": "main", "commit": "dda3359750a2f9c0d6ae073d967296f57fe99d8b" }, - "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, + "nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, + "otter.nvim": { "branch": "main", "commit": "2752dd199d73342f13a1bd599a99822505e2803f" }, + "papis.nvim": { "branch": "main", "commit": "31e7e725ab695632336b76d4ca410736a3b753f7" }, + "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, - "quarto-nvim": { "branch": "main", "commit": "35f86035e7b3846dbf168267ffe0021c3d312259" }, - "smartcolumn.nvim": { "branch": "main", "commit": "c2441d4490b7485844ac9ff2d44d882ff7536979" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, - "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, + "quarto-nvim": { "branch": "main", "commit": "b349b7e54f5f5543b6104bfbad0e7d09d4f7c564" }, + "smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" }, + "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" }, - "undotree": { "branch": "main", "commit": "2685ce282702ab0b79c65916f352db2265b245dd" }, + "undotree": { "branch": "main", "commit": "f07180e2a5a5527decadaa98923a1397287a9dcd" }, "vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" }, "vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" }, "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" }, From bf2e74265ca4aebc779e55338d4d06f3286a84f3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:54:38 +0200 Subject: [PATCH 09/25] nvim: Auto format prose soft with word-linebreaks Automatically set formatting mode to soft for markdown, text and asciidoc files. Also automatically format on startup (no lazy-loading), and thus have nicely word-ending linebreaks (a word will not just be cut off wherever the line is over but will be fully moved to the next line instead). --- nvim/.config/nvim/lua/plugins/prose.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 695a6c1..9654baa 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -12,8 +12,10 @@ return { require("wrapping").setup({ create_keymappings = false, notify_on_switch = false, + softener = { markdown = true, text = true, asciidoc = true } }) end, + lazy = false }, -- displays prettier headlines mimicking the ones in emacs orgmode { From 334f3032e8a37d91ab6a8a17eef539a41685cf7d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 28 Sep 2023 14:41:33 +0200 Subject: [PATCH 10/25] terminal: Exchange fasd for zoxide fasd is unmaintained and slower than zoxide. The transferral was painless. I imported my old database and can continue as before. It does not care about files but that is completely fine for me. Same `z` invocation as before. Has the 'interactive' mode on `zi` which is also completely fine. --- bootstrap/packages_stable.tsv | 2 +- bootstrap/packages_testing.tsv | 16 +++++++++--- sh/.config/sh/alias.d/enable-fasd-hook.sh | 31 ----------------------- terminal/.bashrc | 1 + terminal/.config/zsh/.zshrc | 2 ++ 5 files changed, 17 insertions(+), 35 deletions(-) delete mode 100644 sh/.config/sh/alias.d/enable-fasd-hook.sh diff --git a/bootstrap/packages_stable.tsv b/bootstrap/packages_stable.tsv index 07c8f23..cda548a 100644 --- a/bootstrap/packages_stable.tsv +++ b/bootstrap/packages_stable.tsv @@ -69,7 +69,6 @@ exa ls replacement R exercism-bin Command line client for exercism.io A exfat-utils Utilities for exFAT file system R f3 Simple tool that tests flash cards capacity and performance to see if they live up to claimed specifications A -fasd Command-line productivity booster, offers quick access to files and directories R fd Simple, fast and user-friendly alternative to find R ffmpegthumbnailer Lightweight video thumbnailer that can be used by file managers R firefox Standalone web browser from mozilla.org R @@ -357,6 +356,7 @@ zathura-djvu DjVu support for Zathura R zathura-pdf-mupdf PDF support for Zathura (MuPDF backend) (Supports PDF, ePub, and OpenXPS) R zk A command-line tool helping you to maintain a Zettelkasten or personal wiki R zotero-bin Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. A +zoxide A smarter cd command for your terminal R zq Tooling for super-structured data A zsh-autosuggestions Fish-like autosuggestions for zsh R zsh-fast-syntax-highlighting Optimized and extended zsh-syntax-highlighting A diff --git a/bootstrap/packages_testing.tsv b/bootstrap/packages_testing.tsv index 0b7807b..c391f1a 100644 --- a/bootstrap/packages_testing.tsv +++ b/bootstrap/packages_testing.tsv @@ -1,7 +1,17 @@ Name Description Source Target adbfs-rootless-git fuse filesystem over adb tool for android devices, no device root required A -eslint An AST-based pattern checker for JavaScript R +arch-install-scripts Scripts to aid in installing Arch Linux R +blueberry Bluetooth configuration tool R +dotter-rs-bin A dotfile manager and templater written in Rust A +eza A modern replacement for ls (community fork of exa) R +feishin-appimage A modern self-hosted music player. A +git-delta Syntax-highlighting pager for git and diff output R +khal CLI calendar application built around CalDAV R m4b-tool-bin A command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b A -qutebrowser-qt6-git A keyboard-driven, vim-like browser based on PyQt5 (Qt 6 branch) A +nodejs-markmap-cli Create markmaps (mindmaps from markdown) from CLI A +pv A terminal-based tool for monitoring the progress of data through a pipeline R +qpwgraph PipeWire Graph Qt GUI Interface R texlive-latexextra TeX Live - LaTeX additional packages R -time Utility for monitoring a program's use of system resources R +toilet Free replacement for the FIGlet utility R +vifm A file manager with curses interface, which provides Vi[m]-like environment R +woeusb-ng Simple tool that enable you to create your own usb stick with Windows installer. A diff --git a/sh/.config/sh/alias.d/enable-fasd-hook.sh b/sh/.config/sh/alias.d/enable-fasd-hook.sh deleted file mode 100644 index 28b7e70..0000000 --- a/sh/.config/sh/alias.d/enable-fasd-hook.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# more usage instructions at https://github.com/clvv/fasd -# exist fasd && eval "$(fasd --init posix-hook posix_alias bash-hook zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)" -exist fasd && eval "$(fasd --init auto)" - -# any -alias a='fasd -a' -# show / search / select -alias s='fasd -si' -# alias d='fasd -d' # directory -# alias f='fasd -f' # file -# alias sd='fasd -sid' # interactive directory selection -# alias sf='fasd -sif' # interactive file selection -# cd, same functionality as j in autojump -alias z='fasd_cd -d' -# cd with interactive selection -alias zz='fasd_cd -d -i' - -# from: https://github.com/clvv/fasd/issues/10 -# since I can only load auto configuration and have default fasd_cd AND useless aliases -# or manually load the modules and NOT have fasd_cd -# it's easier to use this function -fasd_cd() { - fasd_ret="$(fasd -d "$@")" - if [ -d "$fasd_ret" ]; then - cd "$fasd_ret" || exit - else - printf "%s\n" "$fasd_ret" - fi - unset fasd_ret -} diff --git a/terminal/.bashrc b/terminal/.bashrc index 230b896..0d9ecd5 100644 --- a/terminal/.bashrc +++ b/terminal/.bashrc @@ -24,5 +24,6 @@ if [ -d "$CONFDIR/bash/alias.d" ]; then unset _alias fi +eval "$(zoxide init bash)" alias ls='ls --color=auto' PS1='[\u@\h \W]\$ ' diff --git a/terminal/.config/zsh/.zshrc b/terminal/.config/zsh/.zshrc index de6a091..180def1 100644 --- a/terminal/.config/zsh/.zshrc +++ b/terminal/.config/zsh/.zshrc @@ -99,6 +99,8 @@ ENABLE_CORRECTION="true" # allow moving through directories without prepending cd setopt autocd +eval "$(zoxide init zsh)" + # Speed up autocomplete, force prefix mapping zstyle ':completion:*' accept-exact '*(N)' zstyle ':completion:*' use-cache on From af410c0b774d6fe8ef3decc8d778ac025b34b3ab Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 13:55:46 +0200 Subject: [PATCH 11/25] writing: Add sioyek configuration --- desktop/.config/flavours/config.toml | 8 +++++ .../templates/sioyek/default.mustache | 20 +++++++++++++ writing/.config/sioyek/keys_user.config | 30 +++++++++++++++++++ writing/.config/sioyek/prefs_user.config | 26 ++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 desktop/.config/flavours/templates/sioyek/default.mustache create mode 100644 writing/.config/sioyek/keys_user.config create mode 100644 writing/.config/sioyek/prefs_user.config diff --git a/desktop/.config/flavours/config.toml b/desktop/.config/flavours/config.toml index c971cc1..14f189d 100644 --- a/desktop/.config/flavours/config.toml +++ b/desktop/.config/flavours/config.toml @@ -82,3 +82,11 @@ rewrite = false start = "# Start flavours" end = "# End flavours" hook = "killall mako" + +[[items]] +# SIOYEK does not support includes afaik +template = "sioyek" +file = "~/.config/sioyek/prefs_user.config" +rewrite = false +start = "# START FLAVOURS" +end = "# END FLAVOURS" diff --git a/desktop/.config/flavours/templates/sioyek/default.mustache b/desktop/.config/flavours/templates/sioyek/default.mustache new file mode 100644 index 0000000..40d0ef4 --- /dev/null +++ b/desktop/.config/flavours/templates/sioyek/default.mustache @@ -0,0 +1,20 @@ +# base16-sioyek (https://github.com/loiccoyle/base16-sioyek) +# by Loic Coyle +# {{scheme-name}} scheme by{{scheme-author}} + +custom_background_color #{{base00-hex}} +custom_text_color #{{base06-hex}} + +page_separator_color #{{base00-hex}} +search_highlight_color #{{base0A-hex}} +status_bar_color #{{base00-hex}} +status_bar_text_color #{{base06-hex}} +ui_text_color #{{base06-hex}} +ui_selected_text_color #{{base06-hex}} +ui_background_color #{{base01-hex}} +ui_selected_background_color #{{base03-hex}} +background_color #{{base00-hex}} +visual_mark_color {{base03-dec-r}} {{base03-dec-g}} {{base03-dec-b}} 0.2 +text_highlight_color #{{base03-hex}} +link_highlight_color #{{base0D-hex}} +synctex_highlight_color #{{base08-hex}} diff --git a/writing/.config/sioyek/keys_user.config b/writing/.config/sioyek/keys_user.config new file mode 100644 index 0000000..a13cfc7 --- /dev/null +++ b/writing/.config/sioyek/keys_user.config @@ -0,0 +1,30 @@ +noop +open_document_embedded o + +toggle_custom_color + +goto_begining gg +goto_end G + +screen_up +screen_down +previous_page +next_page + +next_state L +prev_state H + +fit_to_page_width S +fit_to_page_width_smart s +fit_to_page_height a +fit_to_page_height_smart A + +embed_annotations + +toggle_statusbar + +keyboard_select;add_highlight_with_current_type V + +regex_search / +copy y +rotate_clockwise R diff --git a/writing/.config/sioyek/prefs_user.config b/writing/.config/sioyek/prefs_user.config new file mode 100644 index 0000000..c4ba01a --- /dev/null +++ b/writing/.config/sioyek/prefs_user.config @@ -0,0 +1,26 @@ +# START FLAVOURS +# base16-sioyek (https://github.com/loiccoyle/base16-sioyek) +# by Loic Coyle +# Gruvbox dark, soft scheme byDawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +custom_background_color #32302f +custom_text_color #ebdbb2 + +page_separator_color #32302f +search_highlight_color #fabd2f +status_bar_color #32302f +status_bar_text_color #ebdbb2 +ui_text_color #ebdbb2 +ui_selected_text_color #ebdbb2 +ui_background_color #3c3836 +ui_selected_background_color #665c54 +background_color #32302f +visual_mark_color 0.40 0.36 0.33 0.2 +text_highlight_color #665c54 +link_highlight_color #83a598 +synctex_highlight_color #fb4934 +# END FLAVOURS + +super_fast_search 1 +startup_commands toggle_custom_color + From 102cdbca1c3b481ec01be56cbcda48548c2c934e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 14:08:04 +0200 Subject: [PATCH 12/25] writing: Replace zathura with sioyek Replaced or extended all default references to zathura with sioyek so it will automatically take on any tasks meant for pdf reading. With the current configuration, hardly a change should be noticed. --- bootstrap/packages_stable.tsv | 1 + sh/.config/sh/env | 2 +- terminal/.config/vifm/vifmrc | 6 +++--- writing/.config/papis/config | 4 ++-- writing/README.md | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bootstrap/packages_stable.tsv b/bootstrap/packages_stable.tsv index cda548a..a93823b 100644 --- a/bootstrap/packages_stable.tsv +++ b/bootstrap/packages_stable.tsv @@ -274,6 +274,7 @@ screen Full-screen window manager that multiplexes a physical terminal R sfz A simple static file server A shellcheck-bin Shell script analysis tool (binary release, static) A shfmt Format shell programs R +sioyek PDF viewer for research papers and technical books. A slurp Select a region in a Wayland compositor R smartmontools Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives R snap-pac Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST R diff --git a/sh/.config/sh/env b/sh/.config/sh/env index 5ba2ef8..c835c24 100644 --- a/sh/.config/sh/env +++ b/sh/.config/sh/env @@ -35,7 +35,7 @@ export BROWSER="qutebrowser" export TERMINAL="wezterm" export PAGER="less" -export FILEREADER="zathura" +export FILEREADER="sioyek" export FILEMANAGER="vifm" ## gopath diff --git a/terminal/.config/vifm/vifmrc b/terminal/.config/vifm/vifmrc index 020f129..688480a 100644 --- a/terminal/.config/vifm/vifmrc +++ b/terminal/.config/vifm/vifmrc @@ -358,7 +358,7 @@ set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.pp " Pdf filextype *.pdf \ { view as rich file } - \ zathura %c %i &, apvlv %c, xpdf %c, + \ sioyek %c %i, zathura %c %i &, apvlv %c, xpdf %c, \ { edit text content } \ pdftotext -nopgbrk %c - | nvim fileviewer *.pdf pdftotext -nopgbrk %c - @@ -366,14 +366,14 @@ fileviewer *.pdf pdftotext -nopgbrk %c - " PostScript filextype *.ps,*.eps,*.ps.gz \ {View in zathura} - \ zathura %f, + \ sioyek %f, zathura %f, \ {View in gv} \ gv %c %i &, " Djvu filextype *.djvu,*.epub \ {View in zathura} - \ zathura %f, + \ sioyek %f, zathura %f, \ {View in apvlv} \ apvlv %f, diff --git a/writing/.config/papis/config b/writing/.config/papis/config index 319d124..1797c7e 100644 --- a/writing/.config/papis/config +++ b/writing/.config/papis/config @@ -3,9 +3,9 @@ default-library = main formater = bbt local-config-file = .papis.config -# opentool = zathura +opentool = sioyek picktool = papis-tui -mark-opener = zathura -P {mark[value]} +mark-opener = sioyek --page {mark[value]} file-browser = vifm # edit info.yaml as new papers are added diff --git a/writing/README.md b/writing/README.md index 278e97d..cb13056 100644 --- a/writing/README.md +++ b/writing/README.md @@ -2,6 +2,7 @@ [bibtex](https://en.wikipedia.org/wiki/BibTeX) - plain-text reference management [zathura](git.pwmt.org) - keyboard-driven PDF reading +[sioyek](http://sioyek.info/) - keyboard-driven PDF reading *and annotating* This readme is a little out of date, as are the scripts below. They are old, I used them during my time as a student and they are probably written terribly. From 6bca05f21296f804504e145ee01c444a09258400 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:01:31 +0200 Subject: [PATCH 13/25] river: Make volume and brightness keys repeatable Will rapidly increase/decrease brightness and volume when holding down the corresponding keys. --- desktop/.config/river/init | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index b884b6c..64c907d 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -191,8 +191,8 @@ for mode in normal locked; do # Eject the optical drive riverctl map $mode None XF86Eject spawn 'eject -T' - riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%' - riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%' + riverctl map -repeat $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%' + riverctl map -repeat $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%' riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle' # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) @@ -202,8 +202,8 @@ for mode in normal locked; do riverctl map $mode None XF86AudioNext spawn 'playerctl next' # You can control screen backlight brighness with light (https://github.com/haikarainen/light); but we prefer brightnessctl - riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set 10%+' - riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 10%-' + riverctl map -repeat $mode None XF86MonBrightnessUp spawn 'brightnessctl set 10%+' + riverctl map -repeat $mode None XF86MonBrightnessDown spawn 'brightnessctl set 10%-' done # The scratchpad will live on an unused tag. Which tags are used depends on your From e98d527f5d2547bf6279cd895c66a5269d463f16 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:04:53 +0200 Subject: [PATCH 14/25] river: Add gap toggling key bind Use F10 to enable gaps (default) or Shift+F10 to disable gaps. TODO Would love to make it a toggle on pressing F10 alone, but I am not sure we can get the current gap width from the layout in any way. --- desktop/.config/river/init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index 64c907d..bc27a86 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -124,6 +124,9 @@ riverctl map normal $mod F toggle-fullscreen # Make all connected outputs show the desktop and no windows at all riverctl map normal $mod+Shift M spawn 'for i in $(wlopm | wc -l); do riverctl set-focused-tags $((1 << 10)); riverctl focus-output next; done; riverctl set-focused-tags $((1 << 10)); riverctl focus-output next' +riverctl map normal $mod+Shift F10 spawn 'riverctl send-layout-cmd rivercarro "gaps 0"' +riverctl map normal $mod F10 spawn 'riverctl send-layout-cmd rivercarro "gaps 6"' + # toggle float riverctl map normal $mod+Shift v toggle-float # Mod + Left Mouse Button to move views From bad45b937d7c651e0dd645a694ad5b03f725bc91 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:07:58 +0200 Subject: [PATCH 15/25] river: Do not always restart kanshi with river Kanshi used to be restarted every time river would be reloaded. This is not desired however, as restarting river would also kill the kanshi daemon, and subsequently reload it, reseting any custom kanshi output layouts or options set. With this commit kanshi only gets started if it is not already running through river (i.e. on first boot most of the time). --- desktop/.config/river/init | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/desktop/.config/river/init b/desktop/.config/river/init index bc27a86..ebe5863 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -242,6 +242,9 @@ done setxkbmap -option "compose:menu" +# start dynamic display configuration +[ "$(pidof kanshi)" -eq 0 ] || riverctl spawn kanshi + # set a nice wallpaper if exist swww; then riverctl spawn "swww init" @@ -258,10 +261,6 @@ fi killall waybar riverctl spawn waybar -# start dynamic display configuration -killall kanshi -riverctl spawn kanshi - # start redshift-like sundown warming using current location or standard values killall wlsunset loc=$(curl ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/') From ec74d0ddffc00971c8f7669bc4bd3185143d6d13 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:08:18 +0200 Subject: [PATCH 16/25] xdg: Change default video directory location Changed from ~/videos to ~/media/videos to declutter home somewhat. --- desktop/.config/user-dirs.dirs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/.config/user-dirs.dirs b/desktop/.config/user-dirs.dirs index 1379551..7514136 100644 --- a/desktop/.config/user-dirs.dirs +++ b/desktop/.config/user-dirs.dirs @@ -12,4 +12,4 @@ XDG_MUSIC_DIR="$HOME/media/audio/music" XDG_PICTURES_DIR="$HOME/pictures" XDG_PUBLICSHARE_DIR="$HOME/" XDG_TEMPLATES_DIR="$HOME/" -XDG_VIDEOS_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/media/videos" From 0fcac78b1f4572129f95bb4ace92c8d79e24fadd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:10:27 +0200 Subject: [PATCH 17/25] git: Add date-enabled short log aliases In addition to the existing `glg` and `glga` aliases for showing one-line git logs for current or all branches, this commit adds `glgd` and `glgad` for showing one-line git logs for current or all branches *with date information*. The date info comes from authoring date not committing date. --- git/.config/sh/alias.d/git.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git/.config/sh/alias.d/git.sh b/git/.config/sh/alias.d/git.sh index 7e1b1de..372b1ec 100644 --- a/git/.config/sh/alias.d/git.sh +++ b/git/.config/sh/alias.d/git.sh @@ -40,7 +40,9 @@ alias gi='git ignore' alias gll='git last' # show quick log overview alias glg='git log --oneline --decorate --graph' +alias glgd="git log --graph --pretty=format:'%C(auto)%h%Creset %C(cyan)%ar%Creset%C(auto)%d%Creset %s'" alias glga='git log --oneline --decorate --graph --remotes --all' +alias glgad="git log --graph --remotes --all --pretty=format:'%C(auto)%h%Creset %C(cyan)%ar%Creset%C(auto)%d%Creset %s'" # show detailed log overview alias glog='git log --stat' # show detailed log overview with contents From 093bc811d54fc2693a1a7c93156f0708ea48ef59 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:11:20 +0200 Subject: [PATCH 18/25] multimedia: Add simple imv configuration Added simple configuration for the imv image viewer which is wayland-compatible. Nothing too fancy but some simple vim-like mappings are set, as well as some styling applied. --- multimedia/.config/imv/config | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 multimedia/.config/imv/config diff --git a/multimedia/.config/imv/config b/multimedia/.config/imv/config new file mode 100644 index 0000000..72ea39d --- /dev/null +++ b/multimedia/.config/imv/config @@ -0,0 +1,20 @@ +[options] +background = #080808 +overlay = false +overlay_position_bottom = true +overlay_font = monospace:12 +overlay_text_color = #c6c6c6 +overlay_background_color = #1c1c1c +overlay_background_alpha = ff + +[binds] +n = next +p = prev +o = overlay + = zoom 5 + = zoom -5 + = rotate by 90 +z = flip horizontal + = flip vertical +y = exec wl-copy "$imv_current_file" +Y = exec wl-copy < "$imv_current_file" From 48229fc742d8b15a4695e3160f2c5cb29dac357c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:12:56 +0200 Subject: [PATCH 19/25] qutebrowser: Set tab display length to 2 seconds When not showing tabs (only displaying them on actually switchting between tabs), so far the duration that the tabs would be displayed was just 800ms, way too short to actually provide legible info. This commit changes it to 2000ms, which may still be too short but is at least more digestible. --- qutebrowser/.config/qutebrowser/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 822a68a..d7c7953 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -56,6 +56,7 @@ c.tabs.title.format = "{index} {audio}{perc}{current_title}" c.tabs.position = "right" c.tabs.width = "15%" c.tabs.show = "multiple" +c.tabs.show_switching_delay = 2000 c.statusbar.show = "always" c.colors.webpage.bg = "#555555" From 587a46ccb783ef9be209461cd27e9449b8207c66 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:14:25 +0200 Subject: [PATCH 20/25] qutebrowser: Disable canvas fingerprinting Do not allow html5 canvas reading in qutebrowser. This shuts off one of the main avenues of browser fingerprinting (aside from cookies) still currently undertaken. It will possibly stop some obscure streaming sites from working but I do not care, especially at the cost of fingerprinting information. --- qutebrowser/.config/qutebrowser/content.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/.config/qutebrowser/content.py b/qutebrowser/.config/qutebrowser/content.py index b568f1e..90c84bc 100644 --- a/qutebrowser/.config/qutebrowser/content.py +++ b/qutebrowser/.config/qutebrowser/content.py @@ -1,3 +1,5 @@ +# disable html5 canvas fingerprinting (at the cost of a couple streaming pages) +c.content.canvas_reading = False c.content.blocking.enabled = True c.content.blocking.method = "both" c.content.blocking.adblock.lists = [ From c4809c78f72a3b83ff373d80f1c3371cb67b0f03 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:14:50 +0200 Subject: [PATCH 21/25] vidl: Use new default video location --- scripts/.local/bin/vidl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/.local/bin/vidl b/scripts/.local/bin/vidl index a86ac8f..0349ac7 100755 --- a/scripts/.local/bin/vidl +++ b/scripts/.local/bin/vidl @@ -132,8 +132,8 @@ download() { # 1=url setup() { TEMP_FOLDER="${TEMP_FOLDER:-${HOME}/downloads}" - DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/inbox}" - ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/archive}" + DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/media/videos}/inbox}" + ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/media/videos}/archive}" YT_DL_CMD="${YT_DL_CMD:-yt-dlp}" yt_default_opts=(-f "best[height\<=1080]" --retries 15 --embed-chapters --embed-subs --sub-lang "en,de,es,fr") declare -a YT_DL_OPTS=${YT_DL_OPTS:-( "${yt_default_opts[@]}" )} From 643deaebec7c3d3e62a1fc4164f4b2346442b174 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:16:23 +0200 Subject: [PATCH 22/25] papis: Add ability to show tag counts to papis-tags The `papis tags` command is extended with the functionality to not just display all tags used in current query, sorted alphabetically, but also to display how often they appear. Use `papis tags -c` to show a space-separated count of how often each tag is used next to the tag name, in descending order. --- writing/.config/papis/scripts/papis-tags | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/writing/.config/papis/scripts/papis-tags b/writing/.config/papis/scripts/papis-tags index 4803705..b847591 100755 --- a/writing/.config/papis/scripts/papis-tags +++ b/writing/.config/papis/scripts/papis-tags @@ -14,7 +14,10 @@ from papis.database.base import Database from papis.document import Document parser = argparse.ArgumentParser() -parser.add_argument("query", nargs="*", help="the query to search for") +parser.add_argument( + "--count", "-c", help="the query to search for", action="store_true" +) +parser.add_argument("query", nargs="*", help="the query to search for", default="*") args = parser.parse_args() @@ -22,7 +25,7 @@ def main(db: Database, args) -> None: query = " ".join(args.query) docs: list[Document] = db.query(query) - all_tags: set[str] = set() + all_tags: dict[str, int] = {} for doc in docs: t: list[str] | str = doc.get("tags", "") tags = ( @@ -30,10 +33,25 @@ def main(db: Database, args) -> None: ) for tag in tags: - all_tags.add(tag) + if tag == '': + continue + all_tags[tag] = all_tags.get(tag, 0) + 1 + if args.count: + print_tags_and_counts(all_tags) + else: + print_tags_only(all_tags) + +def print_tags_only(all_tags): for tag in sorted(all_tags): print(tag) +def print_tags_and_counts(all_tags): + for tag, count in sorted(all_tags.items(), key=lambda d: d[1], reverse=True): + if args.count: + print(tag, count) + else: + print(tag) + if __name__ == "__main__": main(database.get(), args) From 8b603b8c665f8b140563ac2f1de349090976062a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:18:29 +0200 Subject: [PATCH 23/25] nvim: Improve lazy-loading of select plugins Aerial (on command), test-runners (on python only) and other plugins are now only loaded when actually required. --- nvim/.config/nvim/lua/core/mappings.lua | 22 +++++------------- nvim/.config/nvim/lua/plugins/core.lua | 7 +++++- .../nvim/lua/plugins/data_analysis.lua | 23 +++++++++++++++++++ nvim/.config/nvim/lua/plugins/editing.lua | 2 +- nvim/.config/nvim/lua/plugins/ide.lua | 23 +++++++++++++++---- nvim/.config/nvim/lua/plugins/ui.lua | 12 +++++++++- nvim/.config/nvim/spell/en.utf-8.add | 4 ++++ 7 files changed, 70 insertions(+), 23 deletions(-) diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index feff72b..0d655b9 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -180,8 +180,6 @@ map("n", "q", "gqap", { silent = true, desc = "Format current parag map("x", "q", "gq", { silent = true, desc = "Format {motion}" }) map("n", "Q", "vapJgqap", { silent = true, desc = "Unformat then format paragraph" }) -map("n", "mp", "MarkdownPreviewToggle", { desc = "Toggle md preview" }) - -- FORMAT code with -- PLUGIN: formatter.nvim map("n", "f", ":FormatLock") @@ -205,6 +203,7 @@ map("n", "ss", ":lua MiniStarter.open()", { desc = "show startpage" -- PLUGIN: symbols-outline.nvim map("n", "so", "AerialToggle", { silent = true, desc = "toggle symbol outline" }) +map("n", "sn", "AerialNavToggle", { silent = true, desc = "toggle symbol navigator" }) -- PLUGIN: nvim-tree map("n", "se", "NvimTreeToggle", { silent = true, desc = "toggle filetree" }) @@ -255,13 +254,11 @@ map("v", "nf", ":ZkMatch", { desc = "find note from selection" -- PLUGIN: toggleterm.nvim -- create a lazygit or python window, set up in toggleterm settings -- TODO create ability to go into python environment when in poetry venv and/or euporie/jupyter notebook -if is_available("nvim-toggleterm.lua") then - map("n", "G", ":Lazygit") - map("n", "tg", ":Lazygit") - map("n", "tG", ":Lazygit!") - map("n", "tp", ":Pythonterm") - map("n", "tP", ":Pythonterm!") -end +prefix({ ["t"] = { name = "+term" } }) +map("n", "tg", ":Lazygit") +map("n", "tG", ":Lazygit!") +map("n", "tp", ":Pythonterm") +map("n", "tP", ":Pythonterm!") prefix({ ["s"] = { name = "+set" } }) -- PLUGIN: wrapping.nvim @@ -281,10 +278,3 @@ map( ) map("n", "sa", "FormatOnSave", { silent = true, desc = "toggle format on save" }) - --- PLUGIN: undotree -if is_available("undotree") then - map("n", "su", function() - require("undotree").toggle() - end, { silent = true, desc = "toggle undotree" }) -end diff --git a/nvim/.config/nvim/lua/plugins/core.lua b/nvim/.config/nvim/lua/plugins/core.lua index 4aed166..fb76d5a 100644 --- a/nvim/.config/nvim/lua/plugins/core.lua +++ b/nvim/.config/nvim/lua/plugins/core.lua @@ -33,7 +33,6 @@ return { config = function() require("plugins.config.toggleterm") end, - lazy = false, cmd = { "ToggleTerm", "TermExec", "Lazygit", "Pythonterm" }, }, -- colorschemes @@ -43,4 +42,10 @@ return { priority = 1000, dependencies = { "rktjmp/fwatch.nvim" }, }, + -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. + { + 'stevearc/stickybuf.nvim', + config = true, + } + } diff --git a/nvim/.config/nvim/lua/plugins/data_analysis.lua b/nvim/.config/nvim/lua/plugins/data_analysis.lua index 5a5f07e..0aac996 100644 --- a/nvim/.config/nvim/lua/plugins/data_analysis.lua +++ b/nvim/.config/nvim/lua/plugins/data_analysis.lua @@ -55,4 +55,27 @@ return { ft = { "quarto", "python" }, lazy = false, }, + + -- MARKDOWN ONLY + -- Evaluate markdown code blocks + { + "jubnzv/mdeval.nvim", + cmd = { + "MdEval", + }, + ft = { "markdown" }, + opts = { + require_confirmation = false, + eval_options = {}, + }, + lazy = false, + }, + { + "AckslD/nvim-FeMaco.lua", + cmd = { + "FeMaco" + }, + ft = { "markdown" }, + config = true + } } diff --git a/nvim/.config/nvim/lua/plugins/editing.lua b/nvim/.config/nvim/lua/plugins/editing.lua index 0a02199..4730382 100644 --- a/nvim/.config/nvim/lua/plugins/editing.lua +++ b/nvim/.config/nvim/lua/plugins/editing.lua @@ -47,6 +47,6 @@ return { }, }) end, - event = "VeryLazy", + event = "InsertEnter", }, } diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index 0af92e3..e80a4a4 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -8,7 +8,20 @@ return { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons", }, - event = "VeryLazy", + cmd = { + "AerialToggle", + "AerialOpen", + "AerialOpenAll", + "AerialClose", + "AerialCloseAll", + "AerialNext", + "AerialPrev", + "AerialGo", + "AerialInfo", + "AerialNavToggle", + "AerialNavOpen", + "AerialNavClose", + }, opts = { backends = { "treesitter", "lsp", "markdown", "man" }, }, @@ -103,7 +116,7 @@ return { require("neotest").setup({ adapters = { require("neotest-python")({ - -- with coverage requires coverage.py and pytest-cov installed + -- with coverage requires coverage.py and pytest-cov installed args = { "--cov" }, }), }, @@ -113,6 +126,7 @@ return { wk.register({ ["t"] = { name = "+test" } }) end end, + ft = { "python" }, keys = { { "st", @@ -179,9 +193,10 @@ return { }, config = function() require("coverage").setup({ - lang = { python = { coverage_command = "poetry run coverage json -q -o -" } } , + lang = { python = { coverage_command = "poetry run coverage json -q -o -" } }, }) end, + ft = { "python" }, cmd = { "Coverage", "CoverageLoad", @@ -211,6 +226,6 @@ return { desc = "show coverage summary", silent = true, }, - } + }, }, } diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index bb0e19e..d408847 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -55,6 +55,16 @@ return { dependencies = { "nvim-lua/plenary.nvim", }, - config = true, event = "VeryLazy", + config = true, + keys = { + { + "su", + function() + require("undotree").toggle() + end, + desc = "toggle undotree", + silent = true, + }, + }, }, } diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index f5605bc..a30a8f1 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -186,3 +186,7 @@ Gitea caramelization Maillard individualities +vaccilation +SSCM +GSCM +multicriteria From bfb62e67831b834acb63aff458011c2f0b21718e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:20:44 +0200 Subject: [PATCH 24/25] nvim: Add markdown code evaluation mappings Can edit (`ce`), jump-to (`]c`, `[c`), insert (`co`, `cO`) and run (`cc`) code cells in markdown files. They will not be evaluated as part of an overall repl but only stand-alone! --- nvim/.config/nvim/after/ftplugin/markdown.lua | 25 +++++++++++++++++++ nvim/.config/nvim/after/ftplugin/quarto.lua | 4 ++- nvim/.config/nvim/lazy-lock.json | 19 +++++++------- 3 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 nvim/.config/nvim/after/ftplugin/markdown.lua diff --git a/nvim/.config/nvim/after/ftplugin/markdown.lua b/nvim/.config/nvim/after/ftplugin/markdown.lua new file mode 100644 index 0000000..b15a268 --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/markdown.lua @@ -0,0 +1,25 @@ +local map = vim.keymap.set +require('which-key').register({ ["c" ] = { name = "+md-code"}}) +require('which-key').register({ ["e" ] = { name = "+criticmarkup"}}) + +-- edit code cells with full lsp access +map("n", "ce", "FeMaco", { silent = true, desc = "edit code block" }) +-- execute code cells +map("n", "cc", "MdEval", { silent = true, desc = "evaluate code block" }) +map("n", "cx", "MdEvalClean", { silent = true, desc = "clear code results" }) + +-- jump to beginning of previous/ next cell code +map("n", "]c", "/^```}:nohl", { desc = "next code cell" }) +map("n", "[c", "?^```n}:nohl", { desc = "previous code cell" }) +-- insert cell header above/below +map("n", "co", "o```python```k", { desc = "Insert quarto cell below" }) +map("n", "cO", "O```python```k", { desc = "Insert quarto cell above" }) + +-- show nice md preview in browser (auto-syncs scrolling) +map("n", "cp", "MarkdownPreviewToggle", { desc = "show md preview" }) + +-- create mindmaps directly from markdown! requires external executable +if (vim.fn.executable("markmap")) then + map("n", "cm", "MarkmapOpen", { desc = "open md mindmap" }) + map("n", "cM", "MarkmapWatch", { desc = "watch for md mindmap" }) +end diff --git a/nvim/.config/nvim/after/ftplugin/quarto.lua b/nvim/.config/nvim/after/ftplugin/quarto.lua index edd5a82..f6cca8e 100644 --- a/nvim/.config/nvim/after/ftplugin/quarto.lua +++ b/nvim/.config/nvim/after/ftplugin/quarto.lua @@ -4,7 +4,9 @@ local startsession = function(file, args) local path = require("util").get_python_venv() vim.g["python3_host_prog"] = path - if vim.fn.executable('jupyter-console') ~= 1 then return end + if vim.fn.executable("jupyter-console") ~= 1 then + return + end if args then file = args[0] diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index caebf2e..94c8955 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -38,42 +38,43 @@ "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "magma-nvim-goose": { "branch": "main", "commit": "9a626aab63361d027541d023707f82e28d7f872c" }, "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, + "markmap.nvim": { "branch": "main", "commit": "3befc2a54c2448a16c30c1c7762aab263f22946a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" }, "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, + "mdeval.nvim": { "branch": "master", "commit": "2654caf8ecaad702b50199d18e39cff23d81e0ba" }, "mini.nvim": { "branch": "main", "commit": "707dca4f4152c2d9c9b4c5e02635f78dfd33db50" }, "neotest": { "branch": "master", "commit": "6fd61fe665381939a6d70eb08ef1959a10af369e" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, - "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, + "nvim-FeMaco.lua": { "branch": "main", "commit": "c4e9c71c9ca595772a360435bdf91bee3f9d32b1" }, "nvim-base16": { "branch": "master", "commit": "96e308958625a84940d5e443475465abf99c7bd9" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-coverage": { "branch": "main", "commit": "4634dfb00961a86948518c7e6f85737c24364308" }, - "nvim-lspconfig": { "branch": "master", "commit": "4266f9bb36b4fb09edd19b67d95043cf7ff88ddf" }, + "nvim-lspconfig": { "branch": "master", "commit": "bfdf2e91e7297a54bcc09d3e092a12bff69a1cf4" }, "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, - "nvim-toggleterm.lua": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, - "nvim-tree.lua": { "branch": "master", "commit": "a3aa3b47eac8b6289f028743bef4ce9eb0f6782e" }, + "nvim-toggleterm.lua": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" }, + "nvim-tree.lua": { "branch": "master", "commit": "ce3495bd4c9a7d8e8a64fac9cc3c252dac19a994" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, - "nvim-treesitter-context": { "branch": "master", "commit": "b6c763db8cc486215ba96e0a67418848a710ab25" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6795de086ef713383e06b53faa534a597436159a" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "df75fcec548014f158cda6498ac38c4622c221e1" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" }, - "nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, + "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, "otter.nvim": { "branch": "main", "commit": "2752dd199d73342f13a1bd599a99822505e2803f" }, - "papis.nvim": { "branch": "main", "commit": "31e7e725ab695632336b76d4ca410736a3b753f7" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "quarto-nvim": { "branch": "main", "commit": "b349b7e54f5f5543b6104bfbad0e7d09d4f7c564" }, "smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" }, - "sqlite.lua": { "branch": "master", "commit": "6c00ab414dc1b69621b145908c582b747f24b46e" }, + "stickybuf.nvim": { "branch": "master", "commit": "e3db41f2c1bb2df3ee6ff964ee74fe991f6f9566" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" }, - "undotree": { "branch": "main", "commit": "f07180e2a5a5527decadaa98923a1397287a9dcd" }, + "undotree": { "branch": "main", "commit": "41f56b30cc774ad26c4945c7e10673453893e7ad" }, "vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" }, "vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" }, "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" }, From 065488e57d0ef3aa2b74446469b97602d3b0c852 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 19:21:29 +0200 Subject: [PATCH 25/25] nvim: Remove debug printing of activated python venv Removed notification on activating a python venv. It should just work, transparent to the user and we do not need a big ol' notification each time we enter a file. --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index d3b6704..93d7b4a 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -131,9 +131,9 @@ local python_path lspconfig.pyright.setup({ on_attach = function(client, bufnr) if python_path == nil then - python_path, _ = require("util").get_python_venv(client.config.root_dir) - end - print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) + python_path, _ = require("util").get_python_venv(client.config.root_dir) + end + -- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) client.config.settings.python.pythonPath = python_path on_attach(client, bufnr) end, @@ -141,9 +141,9 @@ lspconfig.pyright.setup({ lspconfig.ruff_lsp.setup({ on_attach = function(client, bufnr) if python_path == nil then - python_path, _ = require("util").get_python_venv(client.config.root_dir) - end - print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) + python_path, _ = require("util").get_python_venv(client.config.root_dir) + end + -- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) client.config.settings.python.pythonPath = python_path on_attach(client, bufnr) end,