mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-03-10 09:27:25 +00:00
feat(treesitter): show an error if the user tries to set a custom treesitter compiler
This commit is contained in:
@@ -58,6 +58,21 @@ return {
|
|||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local TS = require("nvim-treesitter")
|
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
|
-- some quick sanity checks
|
||||||
if not TS.get_installed then
|
if not TS.get_installed then
|
||||||
return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`")
|
return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`")
|
||||||
|
|||||||
Reference in New Issue
Block a user