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

lsp: Load config from parent dirs #650

Merged
merged 6 commits into from
Apr 15, 2024
Merged

Conversation

charlieegan3
Copy link
Member

@charlieegan3 charlieegan3 commented Apr 11, 2024

Related #626

Screen.Recording.2024-04-11.at.18.36.52.mov

Fixes #626

Signed-off-by: Charlie Egan <[email protected]>
@charlieegan3
Copy link
Member Author

Huh, there seems to be something wrong with a flake. I'll need to look into that next week 😞

Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

A couple of questions but looks good!

Do I understand correctly that this will scan for a config file in any directory above the workspace, but it's not possible to point out the config file explcitly, like from arbitrary/dir/.regal/config.yaml?

internal/lsp/server.go Show resolved Hide resolved
internal/lsp/config/watcher_test.go Outdated Show resolved Hide resolved
internal/lsp/server.go Show resolved Hide resolved
Copy link
Member

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

Just a nitpick, sorry 🔍 😅

internal/lsp/config/watcher.go Outdated Show resolved Hide resolved
internal/lsp/config/watcher.go Outdated Show resolved Hide resolved
Signed-off-by: Charlie Egan <[email protected]>
Server tests refactored a little to allow messages to be sent in a
different order.

Signed-off-by: Charlie Egan <[email protected]>
@charlieegan3
Copy link
Member Author

I have made some adjustments to the server tests again to make them more robust to the order of messages. Feel free to take another look if you'd like or otherwise I think we can merge.

@anderseknert
Copy link
Member

@charlieegan3 good to merge!

Just this question:

Do I understand correctly that this will scan for a config file in any directory above the workspace, but it's not possible to point out the config file explcitly, like from arbitrary/dir/.regal/config.yaml?

But if this solves the problem as reported, I think that could be a future improvement if requested.

@charlieegan3
Copy link
Member Author

I'll get back to the reporter and see if they can confirm 😊

@charlieegan3 charlieegan3 merged commit c31886e into main Apr 15, 2024
3 checks passed
@charlieegan3 charlieegan3 deleted the load-config-from-parent branch April 15, 2024 12:31
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.

None yet

3 participants