Compare commits

..

No commits in common. "6d82162f16b5f4a3607ba758b5d58f4029aad67e" and "f8dfe7d8568030c43c3b4e35063a4d3cebbea9d3" have entirely different histories.

10 changed files with 50 additions and 99 deletions

View file

@ -5,7 +5,7 @@ if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>e"] = { name = "+criticmarkup" } })
end
if require("core.util").is_available("zk") and 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 })
end
@ -22,26 +22,11 @@ map("n", "[c", "?^```<cr>n}:nohl<cr>", { desc = "previous code cell" })
map("n", "<localleader>co", "o```python<cr><cr>```<esc>k", { desc = "Insert quarto cell below" })
map("n", "<localleader>cO", "O```python<cr><cr>```<esc>k", { desc = "Insert quarto cell above" })
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>p"] = { name = "+prose" } })
end
-- show nice md preview in browser (auto-syncs scrolling)
if require("core.util").is_available("peek") then
local peek = require("peek")
local function togglePeek()
if peek.is_open() then
peek.close()
else
peek.open()
end
end
map("n", "<leader>pp", togglePeek, { desc = "show md preview" })
else
map("n", "<leader>pp", "<Plug>MarkdownPreviewToggle", { desc = "show md preview" })
end
map("n", "<localleader>cp", "<Plug>MarkdownPreviewToggle", { desc = "show md preview" })
-- create mindmaps directly from markdown! requires external executable
if vim.fn.executable("markmap") then
map("n", "<leader>pm", "<cmd>MarkmapOpen<cr>", { desc = "open md mindmap" })
map("n", "<leader>pM", "<cmd>MarkmapWatch<cr>", { desc = "watch for md mindmap" })
map("n", "<localleader>cm", "<cmd>MarkmapOpen<cr>", { desc = "open md mindmap" })
map("n", "<localleader>cM", "<cmd>MarkmapWatch<cr>", { desc = "watch for md mindmap" })
end

View file

@ -35,9 +35,10 @@
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
"image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" },
"lazy.nvim": { "branch": "main", "commit": "70f2c090d3ffb14f8702d468e05beb240b768881" },
"lazy.nvim": { "branch": "main", "commit": "b0ba3f9399bf48c86abaa4db1a40bd0b681d5018" },
"lsp-setup.nvim": { "branch": "main", "commit": "6e4e977512ce426d8b52c27f3b6e6aefc73e1452" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" },
"markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
@ -53,7 +54,7 @@
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" },
"nvim-lint": { "branch": "master", "commit": "1a3a8d047bc01f1760ae4a0f5e80f111ea222e67" },
"nvim-lspconfig": { "branch": "master", "commit": "92166b89ab4b3d60f24e58170cac53b7141fd032" },
"nvim-lspconfig": { "branch": "master", "commit": "d1ab6b6051976b04948e127b0f302a465b1394d6" },
"nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
"nvim-surround": { "branch": "main", "commit": "f1f0699a1d49f28e607ffa4361f1bbe757ac5ebc" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" },
@ -66,7 +67,6 @@
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"otter.nvim": { "branch": "main", "commit": "5cd161f28835fada50d99c89dc05041565a27bdb" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"quarto-nvim": { "branch": "main", "commit": "67e09027b5d8bd948907734fc6fb15028ffdcd28" },
@ -75,7 +75,7 @@
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"trouble.nvim": { "branch": "main", "commit": "7a9c235806d4d9e2e74889f7e359f183a6d0e20d" },
"trouble.nvim": { "branch": "main", "commit": "46a19388d3507f4c4bebb9994bf821a79b3bc342" },
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
"vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" },
@ -85,7 +85,7 @@
"vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" },
"vim-scimark": { "branch": "master", "commit": "9b66a88fa4bb87b8baab3c4aecc43b985b32e7fd" },
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
"which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" },
"which-key.nvim": { "branch": "main", "commit": "4b7167f8fb2dba3d01980735e3509e172c024c29" },
"wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" },
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" },
"zk-nvim": { "branch": "main", "commit": "66b9b490e930fb77f93a2a0c64e0da9a5144fd0a" }

View file

@ -70,9 +70,7 @@ local function on_attach(client, bufnr)
{ buffer = bufnr, desc = "Next error" }
)
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>l"] = { name = "+language" } })
end
map(
"n",
"<localleader>ld",

View file

@ -107,27 +107,6 @@ return {
})
require("mini.ai").setup()
-- Align tables and other alignable things
require("mini.align").setup({})
require("mini.bracketed").setup({
{
buffer = { suffix = "b", options = {} },
comment = { suffix = "c", options = {} },
conflict = { suffix = "", options = {} },
diagnostic = { suffix = "d", options = {} },
file = { suffix = "f", options = {} },
indent = { suffix = "", options = {} }, -- disable since we use indentscope above
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} },
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "", options = {} }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
},
})
require("mini.comment").setup({
hooks = {
pre = function()
@ -138,19 +117,9 @@ return {
end,
},
})
require("mini.cursorword").setup({ delay = 500 })
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true, underline = false })
vim.api.nvim_set_hl(0, "MiniCursorwordCurrent", { bold = true, underline = false })
require("mini.files").setup()
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesWindowUpdate",
callback = function(args)
vim.wo[args.data.win_id].number = true
end,
})
require("mini.fuzzy").setup()
require("mini.indentscope").setup({
symbol = "",
@ -179,6 +148,24 @@ return {
starter.gen_hook.aligning("center", "center"),
},
})
require("mini.bracketed").setup({
{
buffer = { suffix = "b", options = {} },
comment = { suffix = "c", options = {} },
conflict = { suffix = "", options = {} },
diagnostic = { suffix = "d", options = {} },
file = { suffix = "f", options = {} },
indent = { suffix = "", options = {} }, -- disable since we use indentscope above
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} },
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "", options = {} }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
},
})
end,
event = "VimEnter", -- need to load pretty soon for Starter screen
keys = {
@ -187,16 +174,14 @@ return {
function()
require("mini.map").toggle()
end,
silent = true,
desc = "minimap",
silent = true, desc = "minimap" ,
},
{
"<leader>ss",
function()
require("mini.starter").open()
end,
silent = true,
desc = "startpage",
silent = true, desc = "startpage" ,
},
{
"<localleader>w",
@ -205,16 +190,6 @@ return {
end,
desc = "Trim trailing whitespace",
},
{
"<leader>e",
function()
local mf = require("mini.files")
if not mf.close() then
mf.open()
end
end,
desc = "floating file browser",
},
},
},
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..

View file

@ -1,6 +1,15 @@
return {
-- Align tables and other alignable things
{
"junegunn/vim-easy-align",
event = "InsertEnter",
keys = {
{ "ga", "<Plug>(EasyAlign)", mode = "n" },
{ "ga", "<Plug>(EasyAlign)", mode = "x" },
},
},
-- surround things with other things using ys/cs/ds
{ "kylechui/nvim-surround", config = true, event = "VeryLazy" },
{ "kylechui/nvim-surround", config = true, event = "InsertEnter" },
-- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
{

View file

@ -9,8 +9,9 @@ return {
end,
cmd = "Vifm",
keys = {
{ "<leader>E", "<cmd>Vifm<cr>", desc = "buffer file browser" },
{ "<leader>vc", ":Vifm " .. vim.fn.stdpath("config") .. "<cr>", desc = "open config" },
{ "<leader>e", "<cmd>Vifm<cr>", desc = "browse files" },
{ "<leader>E", ":Vifm getcwd()<cr>", desc = "browse project" },
{ "<leader>vc", ":Vifm " .. vim.fn.stdpath("config") .. "/lua<cr>", desc = "open config" },
},
event = { "BufEnter" },
}, -- integrate file manager

View file

@ -55,9 +55,7 @@ return {
end, { expr = true, desc = "Previous git hunk" })
-- Actions
if require("core.util").is_available("which-key") then
require("which-key").register({ ["<localleader>h"] = { name = "+git" } })
end
map({ "n", "v" }, "<localleader>hs", ":Gitsigns stage_hunk<CR>", { desc = "stage hunk" })
map({ "n", "v" }, "<localleader>hr", ":Gitsigns reset_hunk<CR>", { desc = "reset hunk" })
map("n", "<localleader>hS", gs.stage_buffer, { desc = "stage buffer" })

View file

@ -235,10 +235,13 @@ return {
opts = {},
cmd = {
"Trouble",
"TroubleRefresh",
"TroubleToggle",
"TroubleClose",
},
keys = {
{ "<leader>sd", "<cmd>Trouble diagnostics toggle<cr>", silent = true, desc = "diagnostics workspace" },
{ "<leader>sD", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", silent = true, desc = "diagnostics document" },
{ "<leader>sd", "<cmd>Trouble workspace_diagnostics<cr>", silent = true, desc = "diagnostics workspace" },
{ "<leader>sD", "<cmd>Trouble document_diagnostics<cr>", silent = true, desc = "diagnostics document" },
},
},

View file

@ -8,7 +8,7 @@ local prose_plugs = {
config = true,
cmd = { "ZenMode" },
dependencies = { "folke/twilight.nvim" },
keys = { { "<leader>sz", ":ZenMode<cr>", silent = true, desc = "toggle zen mode" } },
keys = { { "<leader>sz", ":ZenMode<cr>", { silent = true } } },
},
{
"andrewferrier/wrapping.nvim",
@ -48,21 +48,8 @@ local prose_plugs = {
ft = writing_ft,
},
-- generate an auto-updating html preview for md files
-- uses the very nice peek if deno is available, otherwise falls back to markdown-preview
{
"toppair/peek.nvim",
event = { "VeryLazy" },
cond = vim.fn.executable("deno") == 1,
build = "deno task --quiet build:fast",
config = function()
require("peek").setup()
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
},
{
"iamcco/markdown-preview.nvim",
cond = vim.fn.executable("deno") == 0,
build = function()
vim.fn["mkdp#util#install"]()
end,

View file

@ -36,11 +36,6 @@ return {
prompt_prefix = "󰍉 ",
selection_caret = "󰳟 ",
color_devicons = true,
mappings = {
-- FIXME Find way to only invoke this *IF* trouble plugin is found
i = { ["<c-t>"] = require("trouble.sources.telescope").open },
n = { ["<c-t>"] = require("trouble.sources.telescope").open },
}
},
pickers = {
buffers = { theme = "ivy" },