fix(configs): remove utils in config with globs as markers#3711
fix(configs): remove utils in config with globs as markers#3711TheRealLorenz wants to merge 26 commits intoneovim:masterfrom
Conversation
|
I'm not entirely sure if this migration is ok. It seems like To make it clearer, I think 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 One example is Here it was explicitly said that the precedence was important, so I called |
lsp/ada_ls.lua
Outdated
| root_dir = function(bufnr, on_dir) | ||
| local fname = vim.api.nvim_buf_get_name(bufnr) | ||
| on_dir(util.root_pattern('Makefile', '.git', 'alire.toml', '*.gpr', '*.adc')(fname)) | ||
| root_markers = function(name, _) |
There was a problem hiding this comment.
I don't think root_markers accepts a function, based on :help vim.lsp.Config.
There was a problem hiding this comment.
It actually does, that's what I was talking about in neovim/neovim#33444 (comment)
lsp/autotools_ls.lua
Outdated
| root_markers = function(name, _) | ||
| for _, pattern in ipairs(root_files) do | ||
| if vim.glob.to_lpeg(pattern):match(name) ~= nil then |
There was a problem hiding this comment.
If this is the pattern that's actually unavoidable in every config, it's a strong hint that we need to resolve neovim/neovim#33444 (by enhancing vim.fs.find(), and/or accepting a function for root_markers, and/or supporting wildcards directly in root_dir / root_markers).
See also #3651 . Deciding on well-defined behavior will require some thought. |
45ae270 to
2fbea40
Compare
|
#3820 removes |
lspconfig.utils from newest configs2fbea40 to
b01d198
Compare
Based on #2079.
The majority of configs which rely on
lspconfig.utiluseutil.root_patternto match against wildcards. I've opened an issue here neovim/neovim#33444 to discuss about this.In the meantime I'll remove
lspconfig.utilwhere it's trivial to do so.