Skip to content

Commit

Permalink
refactor!: deprecate util.root_pattern
Browse files Browse the repository at this point in the history
This will be breaking primarily for language servers that rely on
code dependencies that is archived but still needs to be read. More
context: neovim#1687.

Work on neovim#2079.
  • Loading branch information
dundargoc committed Jan 19, 2025
1 parent 9ee2e7d commit bece7d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/lspconfig/configs/sourcery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ return {
token = nil,
},
root_dir = function(fname)
return util.root_pattern(unpack(root_files))(fname)
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
return vim.fs.dirname(vim.fs.find({'.git', unpack(root_files)}, { path = fname, upward = true })[1])
end,
single_file_support = true,
},
Expand Down

0 comments on commit bece7d2

Please sign in to comment.