diff --git a/after/syntax/markdown.lua b/after/syntax/markdown.lua deleted file mode 100644 index 73dac27..0000000 --- a/after/syntax/markdown.lua +++ /dev/null @@ -1 +0,0 @@ -vim.opt_local.conceallevel = 2 diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim deleted file mode 100644 index 7cf39cf..0000000 --- a/after/syntax/markdown.vim +++ /dev/null @@ -1,6 +0,0 @@ -" markdownWikiLink is a new region -syn region markdownWikiLink matchgroup=markdownLinkDelimiter start="\[\[" end="\]\]" contains=markdownUrl keepend oneline concealends -" markdownLinkText is copied from runtime files with 'concealends' appended -syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends -" markdownLink is copied from runtime files with 'conceal' appended -syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua index c13ca46..4a91dd7 100644 --- a/ftplugin/markdown.lua +++ b/ftplugin/markdown.lua @@ -1,29 +1,4 @@ --- Add the key mappings only for Markdown files in a zk notebook. --- if require('zk.util').notebook_root(vim.fn.expand('%:p')) ~= nil then - local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end - local opts = { noremap = true, silent = false } +local opts = { noremap = true, silent = false } +vim.keymap.set('n', '', vim.lsp.buf.definition, opts) - map("n", "", "lua vim.lsp.buf.definition()", opts) - -- Create a new note after asking for its title. - -- This overrides the global `zn` mapping to create the note in the same directory as the current buffer. - vim.keymap.set('n', 'zn', "ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", - { noremap = true, silent = false, desc = 'Create a new note' }) - -- Create a new note in the same directory as the current buffer, using the current selection for title. - vim.keymap.set('v', 'znt', ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }", - { noremap = true, silent = false, desc = 'Create a new note' }) - -- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title. - map('v', 'znc', - ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", opts) - - -- Open notes linking to the current buffer. - map('n', 'zb', 'ZkBacklinks', opts) - -- Alternative for backlinks using pure LSP and showing the source context. - --map('n', 'zb', 'lua vim.lsp.buf.references()', opts) - -- Open notes linked by the current buffer. - map('n', 'zl', 'ZkLinks', opts) - - -- Preview a linked note. - map('n', 'K', 'lua vim.lsp.buf.hover()', opts) - -- Open the code actions for a visual selection. - map('v', 'za', ":'<,'>lua vim.lsp.buf.range_code_action()", opts) --- end +vim.opt_local.conceallevel = 0 diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 2eaa620..fec4db6 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -296,11 +296,6 @@ return { on_attach = on_attach, } - lspconfig['zk'].setup { - capabilities = capabilities, - on_attach = on_attach, - } - lspconfig['markdown_oxide'].setup { capabilities = capabilities, on_attach = on_attach,