diff --git a/doc/telescope.txt b/doc/telescope.txt index 3e1c0c4..980168a 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -310,7 +310,7 @@ telescope.setup({opts}) *telescope.setup()* Windows users get `file` from: https://github.com/julian-r/file-windows Set to false to attempt to preview any mime type. - Default: true + Default: true for all OS excl. Windows - filesize_limit: The maximum file size in MB attempted to be previewed. Set to false to attempt to preview any file size. Default: 25 diff --git a/lua/telescope/config.lua b/lua/telescope/config.lua index dc01d3b..8c90bbb 100644 --- a/lua/telescope/config.lua +++ b/lua/telescope/config.lua @@ -3,6 +3,7 @@ local deprecated = require "telescope.deprecated" local sorters = require "telescope.sorters" local if_nil = vim.F.if_nil local os_sep = require("plenary.path").path.sep +local has_win = vim.fn.has "win32" == 1 -- Keep the values around between reloads _TelescopeConfigurationValues = _TelescopeConfigurationValues or {} @@ -411,7 +412,7 @@ append( append( "preview", { - check_mime_type = true, + check_mime_type = not has_win, filesize_limit = 25, timeout = 250, treesitter = true, @@ -432,7 +433,7 @@ append( Windows users get `file` from: https://github.com/julian-r/file-windows Set to false to attempt to preview any mime type. - Default: true + Default: true for all OS excl. Windows - filesize_limit: The maximum file size in MB attempted to be previewed. Set to false to attempt to preview any file size. Default: 25