2 files changed,
17 insertions(+),
1 deletions(-)
jump to
| M | lsp/markdown_oxide.lua |
| M | lua/core/utils.lua |
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, }, }