mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 17:28:50 +02:00
add: blade treesitter config
This commit is contained in:
parent
b9949062dc
commit
fbc8a53840
19 changed files with 177 additions and 14 deletions
|
@ -116,6 +116,24 @@ if pcode.active_php_config then
|
|||
require("lint").linters_by_ft = opts.linters_by_ft
|
||||
end,
|
||||
},
|
||||
{
|
||||
"adalessa/laravel.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- "tpope/vim-dotenv",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvimtools/none-ls.nvim",
|
||||
},
|
||||
cmd = { "Sail", "Artisan", "Composer", "Npm", "Yarn", "Laravel" },
|
||||
keys = {
|
||||
{ "<leader>L", "", desc = " Laravel" },
|
||||
{ "<leader>La", ":Laravel artisan<cr>", desc = "Artisan" },
|
||||
{ "<leader>Lr", ":Laravel routes<cr>", desc = "Routes" },
|
||||
{ "<leader>Lm", ":Laravel related<cr>", desc = "Related" },
|
||||
},
|
||||
event = { "VeryLazy" },
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ if pcode.active_javascript_config.active then
|
|||
end
|
||||
-- run if php config true
|
||||
if pcode.active_php_config then
|
||||
local lst_ts = { "php", "phpdoc" }
|
||||
local lst_ts = { "html", "php_only", "php", "bash", "blade" }
|
||||
for _, ts in pairs(lst_ts) do
|
||||
table.insert(pcode.treesitter_ensure_installed, ts)
|
||||
end
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
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",
|
||||
|
@ -73,7 +65,7 @@ return {
|
|||
return {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = ts_list,
|
||||
ensure_installed = {},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
},
|
||||
|
|
36
lua/plugins/treesitter_blade.lua
Normal file
36
lua/plugins/treesitter_blade.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
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 = {
|
||||
ensure_installed = ts_list,
|
||||
},
|
||||
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