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

spyglassmc: Make root_dir unrequired. #2962

Closed
wants to merge 2 commits into from
Closed

spyglassmc: Make root_dir unrequired. #2962

wants to merge 2 commits into from

Conversation

amqndin
Copy link

@amqndin amqndin commented Jan 11, 2024

by default, root_dir set to pack.mcmeta, and if pack.mcmeta is missing in your directory regardless whether single_file_support is true or false, the spyglass language server will throw an error and wont work. this pr fixes the problem.

this could be a wrong approach tho, ill try to find other ways to fix this later too.

by default, it is set to pack.mcmeta, and if pack.mcmeta is missing in your directory regardless whether single_file_support is true or false, the spyglass language server will throw an error and wont work. this fixes the problem
@amqndin amqndin requested a review from glepnir as a code owner January 11, 2024 21:44
@amqndin
Copy link
Author

amqndin commented Jan 12, 2024

i will try to fix it

@amqndin
Copy link
Author

amqndin commented Jan 12, 2024

to whoever requested to review - this is not done yet, i havent even started

@@ -4,7 +4,7 @@ return {
default_config = {
cmd = { 'spyglassmc-language-server', '--stdio' },
filetypes = { 'mcfunction' },
root_dir = util.root_pattern 'pack.mcmeta',
root_dir = function() return vim.loop.cwd() end,
Copy link
Member

Choose a reason for hiding this comment

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

this is not correct.

Copy link
Author

Choose a reason for hiding this comment

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

it works though.

Choose a reason for hiding this comment

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

it would be better to extend the default patterns to be more inclusive, maybe add a .git .svn or another specific to spyglass root directory marker, cwd() is a bad idea here.

@justinmk justinmk marked this pull request as draft January 29, 2024 00:57
@justinmk justinmk changed the title Make root_dir unrequired. spyglassmc: Make root_dir unrequired. Mar 20, 2024
@amqndin amqndin closed this by deleting the head repository Apr 2, 2024
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