diff --git a/lua/codeium/api.lua b/lua/codeium/api.lua index db0b5cd..b4e719f 100644 --- a/lua/codeium/api.lua +++ b/lua/codeium/api.lua @@ -442,8 +442,8 @@ function Server:new() cursor_offset = 0, text = text, line_ending = line_ending, - absolute_path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":p"), - relative_path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":"), + absolute_uri = util.get_uri(vim.api.nvim_buf_get_name(bufnr)), + relative_path_migrate_me_to_workspace_uri = util.get_relative_path(bufnr), } request("RefreshContextForIdeAction", { @@ -453,8 +453,7 @@ function Server:new() notify.error("failed refresh context: " .. err.out) return end - end - ) + end) end function m.add_workspace() diff --git a/lua/codeium/util.lua b/lua/codeium/util.lua index 2fc6db2..fc7969e 100644 --- a/lua/codeium/util.lua +++ b/lua/codeium/util.lua @@ -36,7 +36,7 @@ function M.get_newline(bufnr) end function M.get_relative_path(bufnr) - return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":") + return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(bufnr), ":.") end function M.get_uri(path)