Compare commits

..

No commits in common. "8748b66344f9b71bc2423192e5d7451727e76196" and "7eeeb9e85d482ea3fe16f3644d8d5784521d12c5" have entirely different histories.

15 changed files with 180 additions and 177 deletions

View file

@ -1,9 +1,6 @@
local map = vim.keymap.set local map = vim.keymap.set
require("which-key").register({ ["<localleader>c"] = { name = "+md-code" } })
if require("core.util").is_available("which-key") then require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } })
require("which-key").register({ ["<localleader>c"] = { name = "+codecells" } })
require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } })
end
if require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then if require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then
map("n", "<CR>", "<cmd>lua vim.lsp.buf.definition()<cr>", { silent = true }) map("n", "<CR>", "<cmd>lua vim.lsp.buf.definition()<cr>", { silent = true })

View file

@ -13,7 +13,7 @@ end
-- Start quarto session -- Start quarto session
local startsession = function(file, args) local startsession = function(file, args)
file = file or default_buffer_session() file = file or default_buffer_session()
local path = require("core.util").get_python_venv() local path = require("util").get_python_venv()
vim.g["python3_host_prog"] = path vim.g["python3_host_prog"] = path
if vim.fn.executable("jupyter-console") ~= 1 then if vim.fn.executable("jupyter-console") ~= 1 then

View file

@ -1,92 +1,87 @@
{ {
"Arduino.nvim": { "branch": "main", "commit": "7fd0f58c6f7a460ef180ef3bc9715baa37e9dd36" }, "Arduino.nvim": { "branch": "main", "commit": "fad71572bf7a79b88da38167a756259b03d0c3ef" },
"BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" }, "BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"aerial.nvim": { "branch": "master", "commit": "4d10acbcb760802ea74381ac3ed98cbb6e5f7805" }, "aerial.nvim": { "branch": "master", "commit": "3748e87a316a68754341cdffcef44fee61dee51c" },
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" }, "bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
"cmp-beancount": { "branch": "main", "commit": "c8a2533828b84546ae279d60137aec92bd52dc72" }, "cmp-beancount": { "branch": "main", "commit": "da154ea94d598e6649d6ad01efa0a8611eff460d" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" }, "cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" },
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" }, "cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" }, "cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" },
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" },
"cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" }, "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" },
"cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
"conform.nvim": { "branch": "master", "commit": "9b26e81c4292106e68dda3e7b64473434fd5b3e0" }, "conform.nvim": { "branch": "master", "commit": "3d59cbd01a4b74124c5a6fb23b8cc63e5c2db3d5" },
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
"dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" },
"flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" },
"friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" },
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" }, "git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" },
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" }, "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, "glance.nvim": { "branch": "master", "commit": "8ed5cf3b3b1231ea696d88c9efd977027429d869" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, "headlines.nvim": { "branch": "master", "commit": "d39c4e6ed8963717bc9b2dc39fada8fe1039e9bf" },
"image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" }, "image.nvim": { "branch": "master", "commit": "9b6248bd8b58b505559e31eb581b7c4638369ec3" },
"lazy.nvim": { "branch": "main", "commit": "b0ba3f9399bf48c86abaa4db1a40bd0b681d5018" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"lsp-setup.nvim": { "branch": "main", "commit": "6e4e977512ce426d8b52c27f3b6e6aefc73e1452" }, "lightspeed.nvim": { "branch": "main", "commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lsp-setup.nvim": { "branch": "main", "commit": "22ba14fb5c4208fd93f616d7b99bb47656e6e144" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" },
"markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" }, "markmap.nvim": { "branch": "main", "commit": "3befc2a54c2448a16c30c1c7762aab263f22946a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "bf0f4f8062d3acbe0afcc61db01a4d19d96310e4" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mdeval.nvim": { "branch": "master", "commit": "2c32e2f3e7d8f222e7a4724989f218d036e1081d" }, "mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
"mini.nvim": { "branch": "main", "commit": "f24747266a047617d06605a2316aa6c071662fa2" }, "molten-nvim": { "branch": "main", "commit": "21d766c2d60e5f6e03f507e7f3e382a2a927ad41" },
"molten-nvim": { "branch": "main", "commit": "df5ccef3b6fda3582f7746e45327ee031f668826" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, "neotest": { "branch": "master", "commit": "b47c99265253f0a31a428b698c59ec0bc956e78d" },
"neotest": { "branch": "master", "commit": "6f35d797882c6ce0ab7c87dc86561512dc3d7aba" },
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" }, "nvim-coverage": { "branch": "main", "commit": "cf4b5c61dfac977026a51a2bcad9173c272986ce" },
"nvim-lint": { "branch": "master", "commit": "1a3a8d047bc01f1760ae4a0f5e80f111ea222e67" }, "nvim-lint": { "branch": "master", "commit": "966ab3dc37eee3e413692264b44a3011b05a6060" },
"nvim-lspconfig": { "branch": "master", "commit": "d1ab6b6051976b04948e127b0f302a465b1394d6" }, "nvim-lspconfig": { "branch": "master", "commit": "41f40dc4b86f3e166cf08115f621001972565a20" },
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
"nvim-surround": { "branch": "main", "commit": "f1f0699a1d49f28e607ffa4361f1bbe757ac5ebc" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, "nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
"nvim-treesitter-context": { "branch": "master", "commit": "5efba33af0f39942e426340da7bc15d7dec16474" }, "nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "1428108f18ce9d8cc4481dcedebeeb490eabf395" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "55d11124c45e9bb506703f73e5775652ed5357e9" },
"nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
"otter.nvim": { "branch": "main", "commit": "5cd161f28835fada50d99c89dc05041565a27bdb" }, "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
"otter.nvim": { "branch": "main", "commit": "cf29fc255bce78fd03565b40722438c0ab3ce05d" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"quarto-nvim": { "branch": "main", "commit": "67e09027b5d8bd948907734fc6fb15028ffdcd28" }, "quarto-nvim": { "branch": "main", "commit": "0a35b3890e9d723b730506d7d8b3ba3d0d6aae2e" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" }, "smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" }, "stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"trouble.nvim": { "branch": "main", "commit": "46a19388d3507f4c4bebb9994bf821a79b3bc342" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" }, "undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
"vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" }, "vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" },
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" }, "vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
"vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" }, "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" },
"vim-exchange": { "branch": "master", "commit": "d6c1e9790bcb8df27c483a37167459bbebe0112e" },
"vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" }, "vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
"vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" }, "vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" },
"vim-scimark": { "branch": "master", "commit": "9b66a88fa4bb87b8baab3c4aecc43b985b32e7fd" },
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" }, "vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
"which-key.nvim": { "branch": "main", "commit": "4b7167f8fb2dba3d01980735e3509e172c024c29" }, "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
"wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" }, "wrapping.nvim": { "branch": "master", "commit": "5e87f1424c86c50d3bc205830aa56ed1cad45467" },
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }, "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" },
"zk-nvim": { "branch": "main", "commit": "66b9b490e930fb77f93a2a0c64e0da9a5144fd0a" } "zk-nvim": { "branch": "main", "commit": "fb0962b75a680561f94cae0588b8da92ea8d2fae" }
} }

View file

@ -1,5 +1,5 @@
local map = vim.keymap.set local map = vim.keymap.set
local is_available = require("core.util").is_available local is_available = require("util").is_available
if is_available("which-key") then if is_available("which-key") then
local prefix = require("which-key").register local prefix = require("which-key").register

View file

@ -42,6 +42,11 @@ cmp.setup({
end, end,
}, },
sources = { sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "otter" },
{ name = "luasnip", keyword_length = 2 },
{ name = "pandoc_references" },
{ name = "nvim_lua" }, { name = "nvim_lua" },
{ {
name = "beancount", name = "beancount",
@ -49,11 +54,6 @@ cmp.setup({
account = vim.env["HOME"] .. "/documents/records/budget/main.beancount", -- TODO implement dynamically account = vim.env["HOME"] .. "/documents/records/budget/main.beancount", -- TODO implement dynamically
}, },
}, },
{ name = "otter" },
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip", keyword_length = 2 },
{ name = "pandoc_references" },
{ name = "calc" }, { name = "calc" },
{ name = "path" }, { name = "path" },
{ name = "buffer", keyword_length = 3 }, { name = "buffer", keyword_length = 3 },
@ -61,7 +61,7 @@ cmp.setup({
{ name = "spell", keyword_length = 3 }, { name = "spell", keyword_length = 3 },
{ name = "tmux" }, -- { name = 'rg', keyword_length = 5 }, { name = "tmux" }, -- { name = 'rg', keyword_length = 5 },
{ name = "vCard" }, { name = "vCard" },
{ name = "digraphs", keyword_length = 2 }, { name = "digraphs" },
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
@ -117,10 +117,10 @@ cmp.setup({
vim_item.menu = ({ vim_item.menu = ({
buffer = "", buffer = "",
calc = "󰃬", calc = "󰃬",
digraphs = "", digraphs = "",
latex_symbols = "𝓧", latex_symbols = "󰊄",
luasnip = "", luasnip = "",
nvim_lsp = "", nvim_lsp = "",
nvim_lua = "󰢱", nvim_lua = "󰢱",
pandoc_references = "", pandoc_references = "",
spell = "󰓆", spell = "󰓆",

View file

@ -33,7 +33,7 @@ local servers = {
marksman = { marksman = {
filetypes = { "markdown", "quarto" }, filetypes = { "markdown", "quarto" },
}, },
basedpyright = {}, pyright = {},
ruff_lsp = {}, ruff_lsp = {},
serve_d = {}, serve_d = {},
tailwindcss = {}, tailwindcss = {},
@ -77,9 +77,6 @@ local function on_attach(client, bufnr)
"<cmd>lua vim.diagnostic.open_float()<cr>", "<cmd>lua vim.diagnostic.open_float()<cr>",
{ buffer = bufnr, desc = "Line diagnostics" } { buffer = bufnr, desc = "Line diagnostics" }
) )
map("n", "<localleader>li", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, { buffer = bufnr, desc = "Inlay hints" })
map("n", "<localleader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = bufnr, desc = "Codeactions" }) 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>ln", "<cmd>lua vim.lsp.buf.rename()<cr>", { buffer = bufnr, desc = "Rename element" })
if vim.fn.exists(":Glance") then if vim.fn.exists(":Glance") then
@ -162,13 +159,12 @@ lspconfig.nushell.setup({})
local python_path local python_path
-- ensure python virtualenv is determined automatically on lsp start -- ensure python virtualenv is determined automatically on lsp start
lspconfig.basedpyright.setup({ lspconfig.pyright.setup({
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
if python_path == nil then if python_path == nil then
python_path, _ = require("core.util").get_python_venv(client.config.root_dir) python_path, _ = require("util").get_python_venv(client.config.root_dir)
end end
-- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path))) -- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path)))
client.config.settings.python = {} or client.config.settings.python
client.config.settings.python.pythonPath = python_path client.config.settings.python.pythonPath = python_path
on_attach(client, bufnr) on_attach(client, bufnr)
end, end,
@ -177,15 +173,14 @@ lspconfig.ruff_lsp.setup({
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
on_attach(client, bufnr) on_attach(client, bufnr)
if python_path == nil then if python_path == nil then
python_path, _ = require("core.util").get_python_venv(client.config.root_dir) python_path, _ = require("util").get_python_venv(client.config.root_dir)
end end
client.config.settings.python = {} or client.config.settings.python
client.config.settings.python.pythonPath = python_path client.config.settings.python.pythonPath = python_path
end, end,
}) })
-- set up arduino with the help of arduino.nvim plugin -- set up arduino with the help of arduino.nvim plugin
if require("core.util").is_available("arduino") then if require("util").is_available("arduino") then
lspconfig.arduino_language_server.setup({ lspconfig.arduino_language_server.setup({
on_new_config = require("arduino").on_new_config, on_new_config = require("arduino").on_new_config,
}) })

View file

@ -51,7 +51,7 @@ return {
keys = { keys = {
{ {
"s", "s",
mode = { "n", "x" }, mode = { "n", "x", "o" },
function() function()
require("flash").jump() require("flash").jump()
end, end,
@ -73,6 +73,22 @@ return {
end, end,
desc = "Remote Flash", desc = "Remote Flash",
}, },
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
}, },
}, },
@ -111,7 +127,7 @@ return {
hooks = { hooks = {
pre = function() pre = function()
-- use treesitter commentstring functionality if it's installed -- use treesitter commentstring functionality if it's installed
if require("core.util").is_available("ts_context_commentstring") then if require("util").is_available("ts_context_commentstring") then
require("ts_context_commentstring.internal").update_commentstring() require("ts_context_commentstring.internal").update_commentstring()
end end
end, end,

View file

@ -81,18 +81,6 @@ return {
{ "<leader>vn", ":MoltenInfo<cr>" }, { "<leader>vn", ":MoltenInfo<cr>" },
}, },
}, },
-- Edit code blocks in md/quarto using whatever language is
{
"AckslD/nvim-FeMaco.lua",
cmd = {
"FeMaco",
},
ft = { "markdown", "quarto" },
opts = {},
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
},
-- MARKDOWN ONLY -- MARKDOWN ONLY
-- Evaluate markdown code blocks -- Evaluate markdown code blocks
@ -108,4 +96,12 @@ return {
}, },
lazy = false, lazy = false,
}, },
{
"AckslD/nvim-FeMaco.lua",
cmd = {
"FeMaco",
},
ft = { "markdown" },
config = true,
},
} }

View file

@ -22,9 +22,7 @@ local formatters = {
javascript = { { "prettierd", "prettier" } }, javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } }, javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" }, json = { "jq" },
liquid = { { "prettierd", "prettier" } },
lua = { "stylua" }, lua = { "stylua" },
markdown = { { "prettierd", "prettier" } },
python = { "ruff_fix", "ruff_format" }, python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" }, sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } }, svelte = { { "prettierd", "prettier" } },
@ -125,7 +123,7 @@ return {
end, end,
}) })
end, end,
event = { "BufWritePre", "InsertEnter" }, event = { "BufWritePost", "InsertLeave" },
}, },
-- formatting setup -- formatting setup
@ -250,7 +248,6 @@ return {
"nvim-neotest/neotest", "nvim-neotest/neotest",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-neotest/nvim-nio",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim", "antoinemadec/FixCursorHold.nvim",
@ -265,7 +262,7 @@ return {
}), }),
}, },
}) })
if require("core.util").is_available("which-key") then if require("util").is_available("which-key") then
require("which-key").register({ ["<localleader>t"] = { name = "+test" } }) require("which-key").register({ ["<localleader>t"] = { name = "+test" } })
end end
end, end,

View file

@ -60,7 +60,7 @@ local prose_plugs = {
{ {
"mickael-menu/zk-nvim", "mickael-menu/zk-nvim",
config = function() config = function()
if require("core.util").is_available("which-key") then if require("util").is_available("which-key") then
local prefix = require("which-key").register local prefix = require("which-key").register
prefix({ ["<leader>n"] = { name = "+notes" } }) prefix({ ["<leader>n"] = { name = "+notes" } })
prefix({ ["<localleader>n"] = { name = "+note" } }) prefix({ ["<localleader>n"] = { name = "+note" } })
@ -71,15 +71,7 @@ local prose_plugs = {
require("zk").edit(opts, { title = "Zk Orphans" }) require("zk").edit(opts, { title = "Zk Orphans" })
end) end)
end end
require("zk").setup({ require("zk").setup({ picker = "telescope" })
picker = "telescope",
lsp = {
auto_attach = {
enabled = true,
filteypes = { "markdown", "quarto" },
},
},
})
end, end,
ft = writing_ft, ft = writing_ft,
cmd = { cmd = {

View file

@ -9,7 +9,7 @@ return {
}, },
cmd = "Telescope", cmd = "Telescope",
config = function() config = function()
if require("core.util").is_available("which-key") then if require("util").is_available("which-key") then
require("which-key").register({ ["<leader>f"] = { name = "+find" } }) require("which-key").register({ ["<leader>f"] = { name = "+find" } })
end end
-- Setup up telescope fuzzy finding settings -- Setup up telescope fuzzy finding settings

View file

@ -3,46 +3,34 @@ return {
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
requires = { "nvim-tree/nvim-web-devicons", config = true }, requires = { "nvim-tree/nvim-web-devicons", config = true },
config = function() opts = {
-- FIXME: Errors out on no pynvim installed options = {
-- local function molten() icons_enabled = true,
-- if theme = "auto",
-- require("core.util").is_available("molten.status") component_separators = { left = "", right = "" },
-- and require("molten.status").initialized() ~= "" section_separators = { left = "", right = "" },
-- then disabled_filetypes = {},
-- return "󱪄" always_divide_middle = true,
-- end },
-- return "" sections = {
-- end lualine_a = { "mode" },
require("lualine").setup({ lualine_b = { "branch", "diff", "diagnostics" },
options = { lualine_c = { "filename" },
icons_enabled = true, lualine_x = { "encoding", "fileformat", "filetype" },
theme = "auto", lualine_y = { "progress" },
component_separators = { left = "", right = "" }, lualine_z = { "location" },
section_separators = { left = "", right = "" }, },
disabled_filetypes = {}, inactive_sections = {
always_divide_middle = true, lualine_a = {},
}, lualine_b = { "branch", "diff" },
sections = { lualine_c = { "filename" },
lualine_a = { "mode" }, lualine_x = {},
lualine_b = { "branch", "diff", "diagnostics" }, lualine_y = { "location" },
lualine_c = { "filename" }, lualine_z = {},
lualine_x = { "encoding", "fileformat", "filetype", "molten" }, },
lualine_y = { "progress" }, tabline = {},
lualine_z = { "location" }, extensions = { "quickfix", "toggleterm" },
}, },
inactive_sections = {
lualine_a = {},
lualine_b = { "branch", "diff" },
lualine_c = { "filename" },
lualine_x = {},
lualine_y = { "location" },
lualine_z = {},
},
tabline = {},
extensions = { "quickfix", "toggleterm" },
})
end,
event = { "BufNewFile", "BufAdd", "BufWinEnter" }, event = { "BufNewFile", "BufAdd", "BufWinEnter" },
}, },
-- create pretty unobtrusive notifications -- create pretty unobtrusive notifications
@ -136,7 +124,7 @@ return {
local Terminal = require("toggleterm.terminal").Terminal local Terminal = require("toggleterm.terminal").Terminal
-- need to disable indentlines since they obscure first line of terminal -- need to disable indentlines since they obscure first line of terminal
if require("core.util").is_available("mini.nvim") then if require("util").is_available("mini.nvim") then
vim.api.nvim_create_autocmd({ "TermOpen" }, { vim.api.nvim_create_autocmd({ "TermOpen" }, {
pattern = "*", pattern = "*",
callback = function() callback = function()

View file

@ -0,0 +1,17 @@
-- helper for easily defining highlight groups
--
-- usage example - italicize comments:
-- set_hl("Comment", { gui = "italic" })
return function(group, options)
local bg = options.bg == nil and "" or "guibg=" .. options.bg
local fg = options.fg == nil and "" or "guifg=" .. options.fg
local gui = options.gui == nil and "" or "gui=" .. options.gui
local link = options.link or false
local target = options.target
if not link then
vim.cmd(string.format("hi %s %s %s %s", group, bg, fg, gui))
else
vim.cmd(string.format("hi! link", group, target))
end
end

View file

@ -0,0 +1,24 @@
local T = {}
-- from astronvim util function
--- Check if a plugin is defined in lazy. Useful with lazy loading when a plugin is not necessarily loaded yet
---@param plugin string The plugin to search for
---@return boolean available # Whether the plugin is available
function T.is_available(plugin)
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
return T

View file

@ -1,37 +1,22 @@
local T = {} local T = {}
local exepath = vim.fn.exepath
-- from astronvim util function local function path_join(...)
--- Check if a plugin is defined in lazy. Useful with lazy loading when a plugin is not necessarily loaded yet return table.concat(vim.tbl_flatten { ... }, '/')
---@param plugin string The plugin to search for
---@return boolean available # Whether the plugin is available
function T.is_available(plugin)
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 end
-- from https://github.com/ray-x/navigator.lua/issues/247#issue-1465308677 -- from https://github.com/ray-x/navigator.lua/issues/247#issue-1465308677
local function path_join(...) T.get_path = function(workspace)
return table.concat(vim.tbl_flatten({ ... }), "/")
end
-- return the current python environment path
function T.get_python_venv(workspace)
-- Use activated virtualenv. -- Use activated virtualenv.
if vim.env.VIRTUAL_ENV then if vim.env.VIRTUAL_ENV then
return path_join(vim.env.VIRTUAL_ENV, "bin", "python") return path_join(vim.env.VIRTUAL_ENV, "bin", "python")
end end
-- Find and use virtualenv in workspace directory. -- Find and use virtualenv in workspace directory.
for _, pattern in ipairs({ "*", ".*" }) do for _, pattern in ipairs({ "*", ".*" }) do
local match = vim.fn.glob(path_join(workspace, pattern, "pyvenv.cfg")) local match = vim.fn.glob(path_join(workspace, pattern, "pyvenv.cfg"))
if match ~= "" then if match ~= "" then
local py = path_join("bin", "python") local py = path_join("bin", "python")
match = string.gsub(match, "pyvenv.cfg", py) match = string.gsub(match, "pyvenv.cfg", py)
return match return match
end end
@ -41,8 +26,9 @@ function T.get_python_venv(workspace)
return path_join(venv_base_folder, "bin", "python") return path_join(venv_base_folder, "bin", "python")
end end
end end
-- Fallback to system Python. -- Fallback to system Python.
return vim.fn.exepath("python3") or vim.fn.exepath("python") or "python" return exepath("python3") or exepath("python") or "python"
end end
return T return T