Skip to content

Commit

Permalink
feat(pack): add vue (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunlin92 authored Apr 26, 2023
1 parent 9fda1ed commit b983cd0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/astrocommunity/pack/vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Vue Language Pack

This plugin pack does the following:

- Adds `vue` Treesitter parsers
- Adds `vue` language server
- Adds `js-debug-adapter` for debugging
- Adds [nvim-dap-vscode-js](https://github.com/mxsdev/nvim-dap-vscode-js) for debugging
34 changes: 34 additions & 0 deletions lua/astrocommunity/pack/vue/vue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
-- Add the required file types to opts.ensure_installed.
utils.list_insert_unique(opts.ensure_installed, "vue")
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
-- Add tsserver to opts.ensure_installed using vim.list_extend.
utils.list_insert_unique(opts.ensure_installed, "volar")
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table.
if not opts.ensure_installed then opts.ensure_installed = {} end
-- Add to opts.ensure_installed using table.insert.
utils.list_insert_unique(opts.ensure_installed, "js")
end,
},
}

0 comments on commit b983cd0

Please sign in to comment.