Repository navigation
How can I use different sources for same filetype depending on project settings? #117
AlejandroSuero
started this conversation in
General
Replies: 1 comment
|
I was checking out BUILTIN_CONFIG when I arrived to a solution that seems to be working out. sources = {
-- ...
diagnostics.selene.with({
condition = function(utils)
return utils.root_has_file { "selene.toml" }
end,
}),
require("none-ls-luacheck.diagnostics.luacheck").with({
condition = function(utils)
return utils.root_has_file { ".luacheck" }
end,
}),
-- ...
}I will leave this open in case it ends up not working fine or someone has a better solution. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
For example I am now trying out
seleneforluafiles, but working on some changes on plenary.nvim, which usesluacheck, it won't recognize globals likevimorassert.Note
This question could be use for projects using
biomeinstead ofeslint/prettieron ajs/tstype of project. Or any other conflict between different format and diagnostic tools.Now my config has something like this:
But I want to know if is possible to do something like this:
So it will choose only
selenewhenselene.tomlis in theroot_dirand onlyluacheckwhen.luacheckis in theroot_dir.Working on

plenarywithseleneandluacheckon the config:Working on

plenarywithluacheckonly on the config:All reactions