You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

  1. return {
  2. {
  3. "nvim-treesitter/nvim-treesitter",
  4. event = { "BufReadPre", "BufNewFile" },
  5. build = ":TSUpdate",
  6. config = function()
  7. -- import nvim-treesitter plugin
  8. local treesitter = require("nvim-treesitter.configs")
  9. -- configure treesitter
  10. treesitter.setup({
  11. -- ensure these language parsers are installed
  12. ensure_installed = {
  13. "json",
  14. "javascript",
  15. "typescript",
  16. "tsx",
  17. "yaml",
  18. "html",
  19. "css",
  20. "prisma",
  21. "markdown",
  22. "markdown_inline",
  23. "svelte",
  24. "graphql",
  25. "bash",
  26. "lua",
  27. "vim",
  28. "dockerfile",
  29. "gitignore",
  30. "php",
  31. "latex",
  32. },
  33. -- auto install above language parsers
  34. auto_install = true,
  35. -- enable syntax highlighting
  36. highlight = {
  37. enable = true,
  38. disable = { "latex" }
  39. },
  40. -- enable indentation
  41. indent = { enable = true },
  42. -- enable autotagging
  43. autotag = { enable = true },
  44. })
  45. local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
  46. parser_config.blade = {
  47. install_info = {
  48. url = "https://github.com/EmranMR/tree-sitter-blade",
  49. files = { "src/parser.c" },
  50. branch = "main",
  51. },
  52. filetype = "blade",
  53. }
  54. vim.filetype.add({
  55. pattern = {
  56. [".*%.blade%.php"] = "blade",
  57. },
  58. })
  59. end,
  60. },
  61. }