feat: Nvim | add laravel blade plugins
This commit is contained in:
@@ -271,6 +271,43 @@ local plugins = {
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
-- Add a Treesitter parser for Laravel Blade to provide Blade syntax highlighting.
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"blade",
|
||||
"php_only",
|
||||
})
|
||||
end,
|
||||
config = function(_, opts)
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".*%.blade%.php"] = "blade",
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-treesitter.configs").setup(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",
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
-- Add the blade-nav.nvim plugin which provides Goto File capabilities
|
||||
-- for Blade files.
|
||||
"ricardoramirezr/blade-nav.nvim",
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
ft = { "blade", "php" },
|
||||
},
|
||||
}
|
||||
|
||||
return plugins
|
||||
|
||||
Reference in New Issue
Block a user