I'm using neovim and tree-sitter for syntac highlighting in files. But on *.hbs (handelbars) file. Syntax highlighting not working. HTML & HBS Shares same syntax. How can i get syntax highlighting on hbs files?
I tried to enable syntax highlighting via ChatGPT. These are the commands i have tried
require('nvim-treesitter.configs).setup({
-- Other Configurations
languages = {
html = { "html", "hbs" }
}
})
Then i tred this in init.vim file
" For HTML
au BufRead,BufNewFile *.html setlocal filetype=html
" For Handlebars
au BufRead,BufNewFile *.hbs setlocal filetype=handlebars
But nothing works. On hbs file
init.vim:
Or init.lua: