feat!(previewer): replace plenary.filetype with vim.filetype.match (#2529)

This commit is contained in:
Simon Hauser
2023-06-09 11:24:52 +02:00
committed by GitHub
parent 42267407ae
commit 66b03e7740
6 changed files with 144 additions and 91 deletions

View File

@@ -442,8 +442,8 @@ telescope.setup({opts}) *telescope.setup()*
Fields:
- check_mime_type: Use `file` if available to try to infer whether the
file to preview is a binary if plenary's
filetype detection fails.
file to preview is a binary if filetype
detection fails.
Windows users get `file` from:
https://github.com/julian-r/file-windows
Set to false to attempt to preview any mime type.
@@ -496,11 +496,10 @@ telescope.setup({opts}) *telescope.setup()*
end,
}
The configuration recipes for relevant examples.
Note: if plenary does not recognize your filetype yet --
1) Please consider contributing to:
$PLENARY_REPO/data/plenary/filetypes/builtin.lua
2) Register your filetype locally as per link
https://github.com/nvim-lua/plenary.nvim#plenaryfiletype
Note: we use vim.filetype filetype detection,
so if you have troubles with files not
highlighting correctly, please read
|vim.filetype|
Default: nil
- treesitter: Determines whether the previewer performs treesitter
highlighting, which falls back to regex-based highlighting.

View File

@@ -268,4 +268,15 @@ branch 0.1.x (or version, currently 0.1.1) which will not receive this version
bump and will continue to offer support for older Neovim versions.
*telescope.changelog-2529*
Date: June 09, 2023
PR: https://github.com/nvim-telescope/telescope.nvim/pull/2529
We finally removed usage of `plenary.filetype` to determine filetypes for
previewing and replaced it with `vim.filetype`. So if you have highlighting
issues you no longer have to configure `plenary`, but rather read
|vim.filetype|.
vim:tw=78:ts=8:ft=help:norl: