Why is vim.loop.fs_stat(buf) nil?

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • LunarVim

    🌙 LunarVim is an IDE layer for Neovim. Completely free and community driven.

    highlight = { -- `false` will disable the whole extension enable = true, -- source: https://github.com/LunarVim/LunarVim/blob/master/lua/lvim/core/treesitter.lua disable = function(lang, buf) local max_filesize = 1024 * 10 -- 10 kb local stats = vim.loop.fs_stat(buf) if stats.size > max_filesize then -- here is also a good place to inactivate plugins vim.schedule(function() vim.api.nvim_buf_call(buf, function() vim.cmd "setlocal noswapfile noundofile nocursorline nolist bufhidden=unload" vim.cmd "NoMatchParen" vim.cmd "syntax off" vim.cmd "syntax clear" vim.api.nvim_create_autocmd({ "BufDelete" }, { callback = function() vim.cmd "DoMatchParen" vim.cmd "syntax on" end, buffer = buf, }) end) end) print("File larger than 10 kb, turned off treesitter for this buffer") return true end end,

  • bigfile.nvim

    Make editing big files faster 🚀

    https://github.com/LunarVim/bigfile.nvim does what you want. Disclaimer: I'm one of the authors

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts