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 setup #91

Merged
merged 19 commits into from
Oct 14, 2024
Merged

LSP setup #91

merged 19 commits into from
Oct 14, 2024

Conversation

oscarlevin
Copy link
Owner

This will build off of the work of @siefkenj from #22, which has been integrated into the updated main. Draft for now while I learn how this LSP thing works.

@oscarlevin oscarlevin mentioned this pull request Sep 5, 2024
@angelozerr
Copy link
Contributor

I wonder why you need an LSP support for pretext.

Do you want to skip vscode-xml? Which features will provide the lsp server?

@oscarlevin
Copy link
Owner Author

I have already implemented a few language features that really should be part of an LSP rather than the "old way" directly in the extension: formatting, context aware completions, xref suggestions. All of these are particular to how PreTeXt works and there don't seem to be options to customize the vscode-xml lsp to make them work.

Additionally, some users have been having trouble getting the vscode-xml extension to validate consistently; likely an issue with using the binary or not, but I haven't been able to figure out what the cause is. My hope is that since we don't need all the features of the vscode-xml lsp we can implement the lsp for our features just in node.

Also, I like learning new things :)

@angelozerr
Copy link
Contributor

I have already implemented a few language features that really should be part of an LSP rather than the "old way" directly in the extension: formatting, context aware completions, xref suggestions. All of these are particular to how PreTeXt works and there don't seem to be options to customize the vscode-xml lsp to make them work.

Additionally, some users have been having trouble getting the vscode-xml extension to validate consistently; likely an issue with using the binary or not, but I haven't been able to figure out what the cause is. My hope is that since we don't need all the features of the vscode-xml lsp we can implement the lsp for our features just in node.

Also, I like learning new things :)

I see, thanks for your feedback and enjoy with your lsp stuff, it so interesting!

@oscarlevin oscarlevin marked this pull request as ready for review October 14, 2024 15:06
@oscarlevin
Copy link
Owner Author

This PR, in addition to getting the general LSP set up, implements completions through it, using imported rng schemas to handle the completions. Merging now even though there are additional features to port to the LSP.

@oscarlevin oscarlevin merged commit 018a07f into main Oct 14, 2024
1 check passed
@oscarlevin oscarlevin deleted the newLSP branch October 14, 2024 15:08
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