Skip to content

Commit

Permalink
Fix bug of get root directory (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitfz810 authored Jul 19, 2024
1 parent 4c6605b commit 2cde745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/null-ls/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ M.get_root = function()
if not root then
local fname = api.nvim_buf_get_name(0)
if fname ~= "" then
local v = assert(require("null-ls.config").get().root_dir(fname), "cannot infer root_dir")
root = v
-- if root is nil, it will be set to cwd
root = require("null-ls.config").get().root_dir(fname)
end
end

Expand Down

0 comments on commit 2cde745

Please sign in to comment.