fix(configs): remove utils in config with globs as markers
Based on #2079.
The majority of configs which rely on lspconfig.util use util.root_pattern to match against wildcards. I've opened an issue here https://github.com/neovim/neovim/issues/33444 to discuss about this.
In the meantime I'll remove lspconfig.util where it's trivial to do so.
I'm not entirely sure if this migration is ok. It seems like util.root_pattern and vim.fs.root behave differently, the first looks for the first pattern going up to before checking the others, while vim.fs.root I think searches every pattern in every folder before going up.
To make it clearer, I think util.root_pattern({ 'a', 'b' }) behaves like vim.fs.root(0, 'a') or vim.fs.root(0, 'b') instead of vim.fs.root(0, { 'a', 'b' })
This is not just aboute these configs, even for the ones already ported.
I don't know if these is relevant for most of the configs, but if that is the case we would probably need a flag to change the behaviour of vim.fs.root() to specify the precedence of operations.
One example is sourcekit.lua
https://github.com/TheRealLorenz/nvim-lspconfig/blob/deacc03f6480b69c718f70a787e7ccb928c8a64c/lsp/sourcekit.lua#L11-L21
Here it was explicitly said that the precedence was important, so I called vim.fs.root() multiple times.
I'm not entirely sure if this migration is ok. It seems like
util.root_patternandvim.fs.rootbehave differently
See also https://github.com/neovim/nvim-lspconfig/pull/3651 . Deciding on well-defined behavior will require some thought.
needs a rebase after https://github.com/neovim/nvim-lspconfig/pull/3767 and https://github.com/neovim/nvim-lspconfig/pull/3766
https://github.com/neovim/nvim-lspconfig/pull/3820 removes root_pattern for non-glob cases.