Merge work

This commit is contained in:
Martin
2026-01-10 19:21:22 +01:00
parent d522dcd5ab
commit 34d0245c56
8 changed files with 106 additions and 75 deletions

View File

@ -138,10 +138,6 @@ cmp.setup.cmdline(':', {
})
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
-- lspconfig.svelte.setup({ capabilities = capabilities })
-- lspconfig.flow.setup({ capabilities = capabilities })
-- lspconfig.nil_ls.setup({ capabilities = capabilities })
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
@ -150,10 +146,12 @@ capabilities.textDocument.foldingRange = {
local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
for _, ls in ipairs(language_servers) do
require('lspconfig')[ls].setup({
capabilities = capabilities
-- you can add other fields for setting up lsp server in this table
if ls ~= nil then
vim.lsp.config(ls).setup({
capabilities = capabilities
-- you can add other fields for setting up lsp server in this table
})
end
end
require('ufo').setup()
@ -423,38 +421,34 @@ require("obsidian").setup({
date_format = "%Y-%m-%d %a",
time_format = "%H:%M",
},
ui = {
checkboxes = {
[" "] = { char = "󰄱", hl_group = "ObsidianTodo" },
[">"] = { char = "", hl_group = "ObsidianRightArrow" },
["x"] = { char = "", hl_group = "ObsidianDone" },
["~"] = { char = "󰰱", hl_group = "ObsidianTilde" },
["!"] = { char = "", hl_group = "ObsidianImportant" },
["?"] = { char = "?", hl_group = "ObsidianImportant" }
},
checkbox = {
order = { " ", ">", "x", "!", "~" },
},
disable_frontmatter = false,
note_frontmatter_func = function(note)
-- Add the title of the note as an alias.
if note.title then
note:add_alias(note.title)
end
local out = { id = note.id, tags = note.tags }
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
for k, v in pairs(note.metadata) do
out[k] = v
frontmatter = {
enabled = true,
func = function(note)
-- Add the title of the note as an alias.
if note.title then
note:add_alias(note.title)
end
end
return out
end,
local out = { id = note.id, tags = note.tags }
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
for k, v in pairs(note.metadata) do
out[k] = v
end
end
return out
end,
},
note_path_func = function(spec)
local path = spec.dir / spec.title
return path:with_suffix(".md")
end,
daily_notes = daily_notes,
legacy_commands = false,
})
require('render-markdown').setup({
@ -462,4 +456,25 @@ require('render-markdown').setup({
file_types = { 'markdown'},
completions = { lsp = { enabled = true } },
render_modes = { 'n', 'c', 't' },
checkbox = {
enabled = true,
render_modes = false,
bullet = false,
right_pad = 1,
unchecked = {
icon = '󰄱 ',
highlight = 'RenderMarkdownUnchecked',
scope_highlight = nil,
},
checked = {
icon = '󰱒 ',
highlight = 'RenderMarkdownChecked',
scope_highlight = nil,
},
custom = {
next = { raw = '[!]', rendered = '', highlight = 'RenderMarkdownNext', scope_highlight = nil },
ongoing = { raw = '[>]', rendered = '', highlight = 'RenderMarkdownOngoing', scope_highlight = nil },
waiting = { raw = '[~]', rendered = '󰥔 ', highlight = 'RenderMarkdownWaiting', scope_highlight = nil },
},
},
})