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

Docs: specify that language-server table must be before language and grammar array #7153

Closed
wants to merge 2 commits into from

Conversation

gabydd
Copy link
Member

@gabydd gabydd commented May 27, 2023

Due to a limitation in toml, when specifying the new config for language servers from #2507 because they are just tables they must be put before the arrays of tables (language and grammar). I have seen a couple issues and matrix questions pop up where people didn't know this and put the language server configuration after the language config and then nothing happens, #7149 and #7101 (comment). If we think there is going to be more arrays of tables in the future we could make the message more general but I think this way is more clear. I couldn't find any official documentation about this behaviour of toml but I am pretty sure it is the case.

@gabydd
Copy link
Member Author

gabydd commented May 28, 2023

Similarly people have started updating https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers with the new language server config but specificying it below the language table which should probably be fixed as well. It's late here so I will do that in the morning though.

@the-mikedavis the-mikedavis added the A-documentation Area: Documentation improvements label May 28, 2023
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
@gabydd
Copy link
Member Author

gabydd commented May 28, 2023

this might not be the best place to ask this but I wonder if we should put a note on the installing language servers wiki page that we are moving to a new configuration format for language servers and then start changing the wiki to the new format. Or wait till the next release to move the wiki over to the new format. We could still have a note but just saying something like: "The configuration on this page is only for the current release here is how to use it with the current master."

@gabydd
Copy link
Member Author

gabydd commented May 29, 2023

been looking at this again and it seems like you don't actually need to put the language-server table above any arrays of tables, I am guessing something else was happening in those issues and I incorrectly assumed that the moving the [[language]] table fixed it. I am going to close this pr unless someone can reproduce this problem.

@gabydd gabydd closed this May 29, 2023
@gabydd
Copy link
Member Author

gabydd commented May 29, 2023

ah this was a problem when adding the new language server when running. then reloading config, and then restarting the server. If it seems possible to fix I'll make an issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants