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: revise install section #1090

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SylvanFranklin
Copy link
Contributor

I added new instructions that are more up to date with neovim specs. There is still work to do to get all features working, and with the new addition of the typst-nvim preview some things will change in the future. I made a note saying that, but wanted to get this out soon because of the confusion from people in issues and in the discord.

Copy link
Owner

@Myriad-Dreamin Myriad-Dreamin left a comment

Choose a reason for hiding this comment

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

Thank you for taking this work. It looks generally better than the old ancient document. There are some typos but we can fix them later.

docs/tinymist/frontend/neovim.typ Outdated Show resolved Hide resolved
docs/tinymist/frontend/neovim.typ Outdated Show resolved Hide resolved
formatterMode = "typstyle"
```
== Preview
There is work in progress to integrate #link("https://github.com/chomosuke/typst-preview.nvim")[typst-preview.nvim] directly into `tinymist`. In the meantime you can find can find installation and configuration instructions on that repo. This should be a shortterm solution.
Copy link
Owner

Choose a reason for hiding this comment

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

I believe we have introduced an announcement here that we will provide some plugin developed inside of tinymist repository, while we were only providing a sample plugin to integrate tinymist into LazyVim. I have a few questions:

  • What's the position of the new plugin? Does it only replace the typst-preview.nvim?
  • How do the replaced plugin authors think of it? Is it common or supported in (neo)vim community? Will they join or against to build an out-of-box new typst.nvim? We must at least discuss about it with chomosuke.

Copy link
Owner

@Myriad-Dreamin Myriad-Dreamin Dec 30, 2024

Choose a reason for hiding this comment

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

If we could, imo we should push patches or changes to existing plugins to not force people to leave their old settings but still get benefit from our work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I agree that sounds good. I was wondering at the status of all of that, good to know progress is underway. I am not sure on how that integration will work I was assuming you had some deal what that plugin author. To me it makes sense to not have an external preview tool when there is potential for the lsp to have that feature, but I think the whole issue requires discussion.

docs/tinymist/frontend/neovim.typ Outdated Show resolved Hide resolved
docs/tinymist/frontend/neovim.typ Show resolved Hide resolved
@Eric-Song-Nop
Copy link
Collaborator

Eric-Song-Nop commented Jan 1, 2025

btw, don't we need to pin the main file any more for tinymist in neovim? It seems that part is completely removed?

@SylvanFranklin
Copy link
Contributor Author

btw, don't we need to pin the main file any more for tinymist in neovim? It seems that part is completely removed?

I'm honestly not sure since currently the builtin preview does not work for me which is the main conflict when changing files. Using typst-preview.nvim I'm getting no issues because it is being handled under the hood for you. That project has everything we need to make tinymist integrate with neovim, but I'm still confused on the status of merging it. It says in the readme that it is a plugin for tinymist, and it uses tinymist itself under the hood. Bottom line is tinymist has to either copy everything over and merge that plugin, or just direct people to use it with a link.

Most neovim LSP does hot have a preview builtin, LaTeX and markdown both have separate plugins, so it's not a huge deal to have these as different projects, it is a little weird though that the lsp has preview capability and we're bringing in another tool. As long as everything works and the docs are clear on it I don't think it's a huge problem.

@Eric-Song-Nop
Copy link
Collaborator

I am not talking about preview.

- With `lspconfig`:
```lua
require("lspconfig")["tinymist"].setup {
settings = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This part seems to be wrong for me. I think:

settings = {
...
}

is enough, there should not be nested tinymist and settings inside?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right I had it different in my config so didn't notice

```

There is also a plan to support multiple-file projects with a workspace configuration, but I don’t know whether it is Neovim’s way, so it needs further discussion.
== Preview

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure if the pinMain part should be removed, as what I knew was that main file is more useful than just for preview, but I am sure that there won't be a workspace configuration anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm honestly not sure what people mean when they have problems with the pin main and multi files. Tinymist seems to work fine for me across different files no problem. We could ask someone who complained about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New issue regarding this: #1103

== Feature Integration
- *LSP* (completion, definitions, etc.)
- *Folding Ranges* supported with #link("https://github.com/kevinhwang91/nvim-ufo")[ufo.]
- *Code Formatting* with #link("https://github.com/Enter-tainer/typstyle/")[typstyle] or #link("https://github.com/astrale-sharp/typstfmt")[typstfmt (deprecated).]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure, if it is so clear in this way, as folding ranges and code formatting are both parts of the standard lsp protocol. But it's not a real problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I agree.

#note-box[
`tinymist.pinMain` is a stateful command, and tinymist doesn't remember it between sessions (closing and opening the editor).
]
There is work in progress to integrate #link("https://github.com/chomosuke/typst-preview.nvim")[typst-preview.nvim] directly into `tinymist`. In the meantime you can find can find installation and configuration instructions on that repo. This should be a shortterm solution.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have never seen such a work happening in tinymist repo, I think it is safe to just ask people to use typst-preview.nvim. Using tinymist alone for preview within neovim has never been the recommended way.

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