diff options
| author | fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> | 2021-11-04 07:32:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-04 07:32:02 +0100 |
| commit | 2097f11305598bd88f799a76f5549da57f852a58 (patch) | |
| tree | 5e17df8fb957e5ce5a24b31c13874870ca045ae7 /lua/telescope/config.lua | |
| parent | 6652d4d55571db0ebd6cb636c523cb8a87785c27 (diff) | |
fix: deactivate binary ft detection for Win32 (#1413)
* Make `file` mime type detection for Windows users opt-in, as it caused issues when they had it
Diffstat (limited to 'lua/telescope/config.lua')
| -rw-r--r-- | lua/telescope/config.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
