diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 5721979d..8ad15924 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -58,6 +58,21 @@ return { config = function(_, opts) local TS = require("nvim-treesitter") + setmetatable(require("nvim-treesitter.install"), { + __newindex = function(_, k) + if k == "compilers" then + vim.schedule(function() + LazyVim.error({ + "Setting custom compilers for `nvim-treesitter` is no longer supported.", + "", + "For more info, see:", + "- [compilers](https://docs.rs/cc/latest/cc/#compile-time-requirements)", + }) + end) + end + end, + }) + -- some quick sanity checks if not TS.get_installed then return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`")