Skip to content

Commit

Permalink
feat(pack): add Templ language pack (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Mar 1, 2024
1 parent 30e8aae commit bbd7f7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/astrocommunity/pack/templ/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Templ Language Pack

This plugin pack does the following:

- Adds `templ` treesitter parser
- Adds `templ` language server
18 changes: 18 additions & 0 deletions lua/astrocommunity/pack/templ/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
vim.filetype.add { extension = { templ = "templ" } }
local utils = require "astronvim.utils"

return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table or string "all".
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "templ")
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "templ") end,
},
}

0 comments on commit bbd7f7f

Please sign in to comment.