all repos

init.lua @ bc7559e48e40f9936ce2a960de86ee2f2b3c93f3

my nvim config
2 files changed, 17 insertions(+), 1 deletions(-)
feat(markdown_oxide): add :LspToday for jumping into today's note
Author: Olexandr Smirnov olexsmir@gmail.com
Committed at: 2025-08-05 21:05:23 +0300
Parent: 9066d63
M lsp/markdown_oxide.lua

@@ -4,7 +4,7 @@ ---@return vim.lsp.Config

return { cmd = { "markdown-oxide" }, filetypes = { "markdown" }, - root_markers = { ".moxide.toml" }, + root_markers = { ".moxide.toml", ".obsidian" }, capabilities = u.capabilities { workspace = { didChangeWatchedFiles = {

@@ -12,4 +12,11 @@ dynamicRegistration = true,

}, }, }, + on_attach = function(_, bufnr) + u.command(bufnr, "LspToday", { command = "jump", arguments = { "today" } }) + u.command(bufnr, "LspLastSunday", { + command = "jump", + arguments = { "last sunday" }, + }) + end, }
M lua/core/utils.lua

@@ -24,5 +24,14 @@ ---@param extend? table

capabilities = function(extend) return require("blink.cmp").get_lsp_capabilities(extend or {}) end, + + ---@param bufnr integer + ---@param name string + ---@param command lsp.ExecuteCommandParams + command = function(bufnr, name, command) + vim.api.nvim_buf_create_user_command(bufnr, name, function() + vim.lsp.buf.execute_command(command) + end, {}) + end, }, }