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

feat(tinymist): implement simple workspace commands #3639

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DimitrisDimitropoulos
Copy link
Contributor

This PR implements most of the simple workspace commands for tinymist in a "factory" way. It mainly implements the commands that are responsible for exporting to different formats and those that return info regarding the server and the document. Hope this is helpful.

@DimitrisDimitropoulos DimitrisDimitropoulos force-pushed the tinymist_workspace_commands branch from 9c1993a to 456f775 Compare March 7, 2025 13:12
@DimitrisDimitropoulos
Copy link
Contributor Author

I think all the issues have been addressed

@Myriad-Dreamin
Copy link

I see a minor issue but this might be caused that I'm not oftenly playing with neovim. If I understand it correctly, if a too old binary is used, the related command to call will fail or miss some option hardly. They sometimes have to do that to work on some typst doucments that only get compiled in the old compiler.

Therefore, you should provide the commands available respecting dynamic information of tinymist. From my knowledge about lsp standard, this can be achieved correctly by checking the provided commands in the server capability.

@DimitrisDimitropoulos
Copy link
Contributor Author

If understand you point correctly, this shouldn't really be an issue since exec_cmd checks if the workspace command is supported, see.

},
docs = {
description = [[
https://github.com/Myriad-Dreamin/tinymist
An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese.

Currently some of Tinymist's workspace commands are supported, namely: exportSvg, exportPng, exportPdf, exportMarkdown,
exportText, exportQuery, exportAnsiHighlight, getServerInfo, getDocumentTrace, getWorkspaceLabels and getDocumentMetrics
Copy link
Member

Choose a reason for hiding this comment

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

... what are the command names that the user can use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@DimitrisDimitropoulos DimitrisDimitropoulos force-pushed the tinymist_workspace_commands branch from 456f775 to 3815f2e Compare April 5, 2025 16:28
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.

4 participants