Closed ievgenii-shepeliuk closed 1 year ago
The preview buffer has autocmds disabled and the treesitter highlighting is performed manually, this has many reasons one of which to disable LSP analysis on the preview buffer as well as other potential collisions with other plug-in autocmds - this means your autocmd doesn’t do anything in the context of the preview buffer.
The filetype is determined by a call to vim.filetype.match
which doesn’t know about your override:
The only solution I can offer is a manual config override within Fzf-lua, something like:
ext_override = { ['ksql'] = 'sql', … }
If this is something you can live with I can implement if pretty quickly.
https://github.com/ibhagwan/fzf-lua/commit/4553b0aa5bd6265117ad063045ba04e55fb42761
@ievgenii-shepeliuk, update to the latest commit and add the below to your setup
:
require("fzf-lua").setup({
previewers = {
builtin = {
ext_ft_override = {
["ksql"] = "sql",
-- other filetype overrides
}
}
}
})
Hello @ibhagwan
It's working now, thank you.
Info
nvim --version
: NVIM v0.9.1fzf --version
: 0.42.0 (brew)mini.sh
Description
I am using following auto command to want to enable SQL syntax highlighting for files with extension
*.ksql
When I open such files - syntax highlighting works, but when I execute
:FzfLua files
- the preview window doesn't highlight the syntax for*.ksql
files.Can you please help ?