-
Beta Was this translation helpful? Give feedback.
Answered by
maxguuse
Aug 24, 2024
Replies: 1 comment
-
Well yes turns out my function is just wrong, refactored it like this: local function get_relative_path()
local workspace = vim.lsp.buf.list_workspace_folders()[1]
if workspace and workspace ~= "" then
return workspace
end
local buffer_path = vim.fn.getcwd()
return buffer_path
end Would happy to know if there's better way to do this though |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maxguuse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well yes turns out my function is just wrong, refactored it like this:
Would happy to know if there's better way to do this though