mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +00:00
feat(treesitter): show an error if the user tries to set a custom treesitter compiler
This commit is contained in:
parent
b4606f9df3
commit
89ff1fd600
1 changed files with 15 additions and 0 deletions
|
|
@ -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`")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue