Add experimental support for blade treesitter.
This commit is contained in:
parent
6141e5a31f
commit
0404494c8a
5 changed files with 28 additions and 2 deletions
|
|
@ -70,5 +70,6 @@ vim.filetype.add({
|
|||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
[".*%.blade%.php"] = "blade",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return {
|
|||
lua = { "stylua" },
|
||||
python = { "blue" },
|
||||
-- Use a sub-list to run only the first available formatter
|
||||
json = { { "prettierd", "prettier" } },
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
javascriptreact = { { "prettierd", "prettier" } },
|
||||
|
|
@ -24,7 +25,7 @@ return {
|
|||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true }
|
||||
return { timeout_ms = 2000, lsp_fallback = true }
|
||||
end,
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
|
|||
|
|
@ -93,6 +93,18 @@ return {
|
|||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
||||
-- Uncoment this line to disable auto folding on file open
|
||||
-- vim.cmd("set nofoldenable")
|
||||
vim.cmd("set nofoldenable")
|
||||
|
||||
-- TODO: remove this when blade treesitter is added to nvim-treesitter repo
|
||||
-- Also remove the "config/nvim/after/queries/blade" folder.
|
||||
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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue