mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
add: custom mason ensure installed
This commit is contained in:
parent
fc32c1b69c
commit
6da9ec51d8
9 changed files with 100 additions and 17 deletions
37
lua/plugins/_treesitter_blade.lua
Normal file
37
lua/plugins/_treesitter_blade.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
local ts_list = {
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
}
|
||||
for _, ts in pairs(pcode.treesitter_ensure_installed or {}) do
|
||||
table.insert(ts_list, ts)
|
||||
end
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ts_list)
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
|
||||
parser_config.blade = {
|
||||
install_info = {
|
||||
url = "https://github.com/EmranMR/tree-sitter-blade",
|
||||
files = { "src/parser.c" },
|
||||
branch = "main",
|
||||
},
|
||||
filetype = "blade",
|
||||
}
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".*%.blade%.php"] = "blade",
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue