Skip to content

Commit

Permalink
feat(pack): add markdown language pack
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored and luxus committed Mar 9, 2023
1 parent 5306679 commit 5429b80
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/astrocommunity/pack/markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Markdown Language Pack

This plugin pack does the following:

- Adds `markdown` and `markdown_inline` Treesitter parsers
- Adds `marksman` language server
- Adds `prettier` formatter
31 changes: 31 additions & 0 deletions lua/astrocommunity/pack/markdown/markdown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local utils = require "astrocommunity.utils"
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table or string "all".
if not opts.ensure_installed then
opts.ensure_installed = {}
elseif opts.ensure_installed == "all" then
return
end
utils.list_insert_unique(opts.ensure_installed, { "markdown", "markdown_inline" })
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
utils.list_insert_unique(opts.ensure_installed, "marksman")
end,
},
{
"jay-babu/mason-null-ls.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
utils.list_insert_unique(opts.ensure_installed, "prettier")
end,
},
}

0 comments on commit 5429b80

Please sign in to comment.