fix(hyprlang): use lazyvim way to install (#2404)
This commit is contained in:
@ -11,25 +11,26 @@ return {
|
|||||||
-- Add Hyprland Parser
|
-- Add Hyprland Parser
|
||||||
{
|
{
|
||||||
"luckasRanarison/tree-sitter-hyprlang",
|
"luckasRanarison/tree-sitter-hyprlang",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
require("nvim-treesitter.parsers").get_parser_configs().hyprlang = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/luckasRanarison/tree-sitter-hyprlang",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
branch = "master",
|
||||||
|
},
|
||||||
|
filetype = "hyprlang",
|
||||||
|
}
|
||||||
|
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
vim.list_extend(opts.ensure_installed, { "hyprlang" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
enabled = function()
|
enabled = function()
|
||||||
return have("hypr")
|
return have("hypr")
|
||||||
end,
|
end,
|
||||||
event = "BufRead */hypr/*.conf",
|
event = "BufRead */hypr/*.conf",
|
||||||
build = ":TSUpdate hypr",
|
|
||||||
config = function()
|
|
||||||
-- Fix ft detection for hyprland
|
|
||||||
vim.filetype.add({
|
|
||||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
|
||||||
})
|
|
||||||
require("nvim-treesitter.parsers").get_parser_configs().hyprlang = {
|
|
||||||
install_info = {
|
|
||||||
url = "https://github.com/luckasRanarison/tree-sitter-hyprlang",
|
|
||||||
files = { "src/parser.c" },
|
|
||||||
branch = "master",
|
|
||||||
},
|
|
||||||
filetype = "hypr",
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- add some stuff to treesitter
|
-- add some stuff to treesitter
|
||||||
|
Reference in New Issue
Block a user