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. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example I am now trying out
selene
forlua
files, but working on some changes on plenary.nvim, which usesluacheck
, it won't recognize globals likevim
orassert
.Note
This question could be use for projects using
biome
instead ofeslint/prettier
on ajs/ts
type 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
selene
whenselene.toml
is in theroot_dir
and onlyluacheck
when.luacheck
is in theroot_dir
.Working on

plenary
withselene
andluacheck
on the config:Working on

plenary
withluacheck
only on the config:Beta Was this translation helpful? Give feedback.
All reactions