-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lang): add markdown support (#1718)
* feat(lang): add markdown support * feat: use peek.nvim instead of markdown-preview. Disable and show warning when deno is not installed * feat: add markdown-preview back --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
- Loading branch information
1 parent
121df70
commit b3d46bc
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
return { | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
opts = function(_, opts) | ||
if type(opts.ensure_installed) == "table" then | ||
vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" }) | ||
end | ||
end, | ||
}, | ||
{ | ||
"williamboman/mason.nvim", | ||
opts = function(_, opts) | ||
opts.ensure_installed = opts.ensure_installed or {} | ||
vim.list_extend(opts.ensure_installed, { "markdownlint" }) | ||
end, | ||
}, | ||
{ | ||
"nvimtools/none-ls.nvim", | ||
optional = true, | ||
opts = function(_, opts) | ||
local nls = require("null-ls") | ||
opts.sources = vim.list_extend(opts.sources or {}, { | ||
nls.builtins.diagnostics.markdownlint, | ||
}) | ||
end, | ||
}, | ||
{ | ||
"mfussenegger/nvim-lint", | ||
optional = true, | ||
opts = { | ||
linters_by_ft = { | ||
markdown = { "markdownlint" }, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"neovim/nvim-lspconfig", | ||
opts = { | ||
servers = { | ||
marksman = {}, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
}, | ||
}, | ||
}, | ||
|
||
-- Markdown preview | ||
{ | ||
"iamcco/markdown-preview.nvim", | ||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, | ||
build = function() | ||
vim.fn["mkdp#util#install"]() | ||
end, | ||
keys = { | ||
{ | ||
"<leader>cp", | ||
ft = "markdown", | ||
"<cmd>MarkdownPreviewToggle<cr>", | ||
desc = "Peek (Markdown Preview)", | ||
}, | ||
}, | ||
config = function() | ||
vim.cmd([[do FileType]]) | ||
end, | ||
}, | ||
} |
Should
marksman
be installed viamason
or is it being installed in some other fashion?