chore: ignore vim.loop.fs_stat undefined (from libuv)
This commit is contained in:
parent
c631eab667
commit
993371fd20
1 changed files with 1 additions and 5 deletions
6
init.lua
6
init.lua
|
@ -33,11 +33,6 @@ vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||||
|
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
if os.getenv("TERM") == "xterm-kitty" then
|
|
||||||
require("scripts.chameleon").setup()
|
|
||||||
require("scripts.kitty-padding").setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd.colorscheme("oxocarbon")
|
vim.cmd.colorscheme("oxocarbon")
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
|
@ -49,6 +44,7 @@ require("nvim-treesitter.configs").setup({
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
disable = function(_, buf)
|
disable = function(_, buf)
|
||||||
local max_filesize = 100 * 1024 -- 100 KB
|
local max_filesize = 100 * 1024 -- 100 KB
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
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
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue