Improve highlight, outline, documentation, and more#64
Conversation
| project-specific config), | ||
|
|
||
| ```json | ||
| To register the LSP and enable certain features (such as compile on save), add the following your `settings.json` (or `.zed/settings.json` in the project root for project-specific config), |
There was a problem hiding this comment.
It is not possible to configure LSP settings in the project setttings, see https://zed.dev/docs/remote-development#zed-settings
There was a problem hiding this comment.
Thanks for spotting my mistake. It should be fixed now.
`jsonc` part of the readme
MrSubidubi
left a comment
There was a problem hiding this comment.
Thanks for this! Have one bigger comment, but overall looks like a good improvement! See https://zed.dev/docs/extensions/languages#fallback-captures on this.
We could probably land these incrementally if you want these in faster, but also happy to just take another look with those captures added.
| "```" @punctuation.delimiter | ||
| "```" @embedded | ||
| (blob) @text.literal) | ||
|
|
||
| (raw_blck | ||
| lang: (ident) @tag) | ||
| lang: (ident) @embedded) |
There was a problem hiding this comment.
I think for the captures where we fundamentally change the highlights, we should look into adding fallback captures. This applies especially to captures that are not too widespred, like the embedded here
There was a problem hiding this comment.
Sure, I can add the previous capture as fallback, though I don't think it would make a lot of changes, since the embedded capture is one of the captures officially supported by the Zed team.
There was a problem hiding this comment.
Added the capture fallback in the latest commit (0de9652). I put the old captures as fallback.
Hello, regarding the way we integrate these changes inside the repo is entirely up to your preferences. I put everything in one PR because these are changes I made for myself over time and decided to bring them upstream. Maybe putting everything in one single PR was a bit too much? |
|
To be honest, I think most of this is an easy approve. If we add fallback highlights for the cases where the highlighting changed and people might otherwise end up with no highlights, I'd be happy to just get this in. |
Co-authored-by: Finn Evers <finn.evers@outlook.de>
MrSubidubi
left a comment
There was a problem hiding this comment.
Looks good to me now, added a few more fallbacks, happy to remove them in the future if we deem them to not be worth it.
Thank you so much for this, awesome contribution!
Closes #33
This PR introduces a few improvements to this extension
Improved preview
The sections are now nested in the Outline panel
Improved highlighting
Made so that the different highlights matched more the ones on the online typst editor.
It would be nice to experiment a bit more with this configuration, and see if any bugs appear.
LSP features: Preview & formatting
Added instructions in the project's README on how to enable formatting.
Added instructions on how to start preview feature in the background (since Zed cannot run LSP commands as of writing, this is the only way to use this feature).
Added a task to open the preview.