nvim-telescope/telescope.nvim

Twig syntax (.html.twig) highlighting doesn't work in Telescope preview

qgates opened this issue · 4 comments

Description

Treesitter parser/hilite is enabled for .twig files and works in buffers. But in telescope preview, no syntax coloring for twig files.

Neovim version

NVIM v0.10.0-dev-2698+g00e71d3da
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188

Operating system and version

Win10 + Ubuntu 22.04

Telescope version / branch / rev

telescope 0.1.6

checkhealth telescope

health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 14.1.0 (rev e50df40a19)
- OK fd: found fd 9.0.0

===== Installed extensions ===== ~

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `ui-select` ~
- No healthcheck provided

Steps to reproduce

Nvim with kickstart.nvim installed:

  • open xxx.twig.html
  • open Telescope and scan for .twig files

Expected behavior

Twig files show up in left panel and are syntax coloured in the preview panel

Actual behavior

Twig files show up in left panel and are not syntax coloured in the preview panel (plain)

Minimal config

kickstart.nvim

does this work on latest master, rather than 0.1.6 ? because we changed the filetype detect algorithmus on master, but because this was a "breaking" change it was never backported to 0.1.

Confirm everything works as expected on the latest master (commit 1bb28df).

Couple of questions (go easy on me!):

  • can I close this issue?
  • installed via Lazy, is roll back to 0.1.6 via Lazy lua config safe or should I clean install to roll back?
  • is it advisable to stay on master or is it too unstable?

Thanks 🙂

Yeah we can close the issue, but I can help with any follow up questions you might have.

Rolling back by just setting branch = '0.1.x' or 'tag = '0.1.6' should be totally fine.

As for staying on master branch, I would say it's fairly stable on HEAD right now. If you'd like to have twig highlighting, you can try using commit = '1bb28df' in lazy to stay on the current HEAD. If you still run into issues, then you can fallback to 0.1.6 at that point.

@jamestrew Brilliant! Big thanks for your helpful reply 🙂