Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lua/elixir/credo/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
local M = {}

if not vim.uv then
vim.uv = vim.loop
end

function M.setup(opts)
local credo = vim.api.nvim_create_augroup("elixir-tools.credo", { clear = true })

Expand All @@ -8,7 +12,7 @@ function M.setup(opts)
pattern = { "elixir" },
callback = function()
local matches = vim.fs.find({ "mix.lock" }, {
stop = vim.loop.os_homedir(),
stop = vim.uv.os_homedir(),
upward = true,
path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)),
})
Expand Down
6 changes: 5 additions & 1 deletion lua/elixir/mix/exs.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
local git = require("elixir.mix.git")

if not vim.uv then
vim.uv = vim.loop
end

local M = {}

function M.path_mix_exs()
local git_workdir_path = git.workdir_path()
local git_mix_exs_path = git.find_file("mix.exs")
local mix_exs_fullpath = table.concat({ git_workdir_path, git_mix_exs_path }, "/")

local file_exists = not vim.tbl_isempty(vim.loop.fs_stat(mix_exs_fullpath) or {})
local file_exists = not vim.tbl_isempty(vim.uv.fs_stat(mix_exs_fullpath) or {})
return {
mix_file = mix_exs_fullpath,
mix_dir = vim.fn.fnamemodify(mix_exs_fullpath, ":p:h"),
Expand Down