mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-10 13:29:49 +01:00
Compare commits
No commits in common. "56a8476bc16b0aa8fba0ce5d2d8969d9ae1857db" and "57b55853727a2aa3902de57152d1dd7505fdc42b" have entirely different histories.
56a8476bc1
...
57b5585372
2 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.lists) optional optionals;
|
inherit (lib.lists) optional optionals;
|
||||||
|
inherit (lib.trivial) boolToString;
|
||||||
inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings;
|
inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
inherit (lib.nvim.dag) entryBefore entryAfter;
|
inherit (lib.nvim.dag) entryBefore entryAfter;
|
||||||
|
|
|
@ -97,7 +97,7 @@ in {
|
||||||
example = literalMD ''
|
example = literalMD ''
|
||||||
```lua
|
```lua
|
||||||
-- Disable slow treesitter highlight for large files
|
-- Disable slow treesitter highlight for large files
|
||||||
function(lang, buf)
|
disable = function(lang, buf)
|
||||||
local max_filesize = 1000 * 1024 -- 1MB
|
local max_filesize = 1000 * 1024 -- 1MB
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
if ok and stats and stats.size > max_filesize then
|
if ok and stats and stats.size > max_filesize then
|
||||||
|
|
Loading…
Reference in a new issue