Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No syntax highlighting for Gleam in telescope preview #3387

Open
zbyju opened this issue Dec 15, 2024 · 1 comment
Open

No syntax highlighting for Gleam in telescope preview #3387

zbyju opened this issue Dec 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zbyju
Copy link

zbyju commented Dec 15, 2024

Description

Although my syntax highlighting works when writing gleam (through treesitter), it doesn't work in telescope's preview.

image

I'm using lunarvim with some small tweaks (but I don't think they should break this)

Here is a small gleam code if you wanna quickly test it:

import gleam/io

pub fn main() {
  io.println("hello, friend!")
}

Neovim version

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1731485912

Operating system and version

macOS 15.1.1 (24B2091)

Telescope version / branch / rev

    version 0.1.6         tag     0.1.6         branch  0.1.x         commit  6312868

checkhealth telescope

==============================================================================
telescope: require("telescope.health").check()

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

Checking external dependencies ~
- OK rg: found ripgrep 14.1.1
- OK fd: found fd 10.2.0

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

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

Telescope Extension: `projects` ~
- No healthcheck provided

Steps to reproduce

(0. Install lunarvim)

  1. Install telescope
  2. Look for old files (or anything where you have access to preview the file)
  3. Look for a gleam file

Expected behavior

No response

Actual behavior

I don't get any syntax highlighting for gleam files

Minimal config

lunarvim
@zbyju zbyju added the bug Something isn't working label Dec 15, 2024
@miEsMar
Copy link

miEsMar commented Dec 28, 2024

I think this issue is closely related.
I think the root cause is that built-in Telescope previewer does not apply the same filetype rules as it is normally done for normal buffers.
I don't know (I just asked on the last ocmment in the linked issue) if there is a way to set ft for telescope previewer based on file extension etc., maybe through an autocmd.
I hope this gets solved one day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants