Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add C3 library support #3309

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

id3nom
Copy link

@id3nom id3nom commented Sep 19, 2024

fix(c3_lsp): update root directory to be able to handle project in the following order - a C3 project 'project.json', a library '.c3l' dir, and ancestor 'git' repo.

fix(c3_lsp): update root directory to be able to handle project in the
following order - a C3 project 'project.json', a library '.c3l' dir,
and ancestor 'git' repo.
Comment on lines +7 to +14
--look for a project directory
local path = util.root_pattern { 'project.json', 'manifest.json' }(fname)
if path ~= nil then
return path
end

--look for .git directory
return util.find_git_ancestors(fname)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--look for a project directory
local path = util.root_pattern { 'project.json', 'manifest.json' }(fname)
if path ~= nil then
return path
end
--look for .git directory
return util.find_git_ancestors(fname)
return util.root_patttern { 'project.json', 'manifest.json', '.git' }(fname)

Copy link
Author

@id3nom id3nom Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glepnir will this also work if we are editing the branch inside the '.git' directory instead of the working directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants