You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When previewing a file, which does not have a treesitter parser, on nvim v0.11 an error is thrown. This change always uses pcall to try to add the treesitter parser for the detected filetype. Hence, the success and a message is returned and the previewer can gracefully just display the file's contents without highlighting.
==============================================================================
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.0 (rev e50df40a19)
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
===== Installed extensions ===== ~
Telescope Extension: `dap` ~
- No healthcheck provided
Telescope Extension: `refactoring` ~
- No healthcheck provided
Steps to reproduce
echo ' .file "test.cpp"' > test.s
nvim -nu init.lua
:lua require"telescope.builtin".find_files()
Type test.s
search for an existing file with a filetype for which no treesitter parser exists, in this case test.s which requires the asm parser
Expected behavior
The preview window shows the contents without any highlighting.
Actual behavior
Error executing vim.schedule lua callback: ...eovim/share/nvim/runtime/lua/vim/treesitter/language.lua:107: no parser for 'asm' language, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
...eovim/share/nvim/runtime/lua/vim/treesitter/language.lua:107: in function 'has_ts_parser'
...lugins/telescope.nvim/lua/telescope/previewers/utils.lua:173: in function 'ts_highlighter'
...lugins/telescope.nvim/lua/telescope/previewers/utils.lua:154: in function 'highlighter'
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:233: in function 'fn'
vim/_editor.lua:351: in function <vim/_editor.lua:350>
Minimal config
localroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs { "config", "data", "state", "cache" } dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.uv.fs_stat(lazypath) thenvim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
{
"nvim-telescope/telescope.nvim",
dependencies= {
"nvim-lua/plenary.nvim",
},
config=function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUErequire("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
The text was updated successfully, but these errors were encountered:
Description
When previewing a file, which does not have a treesitter parser, on nvim v0.11 an error is thrown. This change always uses pcall to try to add the treesitter parser for the detected filetype. Hence, the success and a message is returned and the previewer can gracefully just display the file's contents without highlighting.
Neovim version
Operating system and version
Windows 11 Enterprise
Telescope version / branch / rev
main
checkhealth telescope
Steps to reproduce
echo ' .file "test.cpp"' > test.s
nvim -nu init.lua
:lua require"telescope.builtin".find_files()
test.s
test.s
which requires theasm
parserExpected behavior
The preview window shows the contents without any highlighting.
Actual behavior
Minimal config
The text was updated successfully, but these errors were encountered: