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

Treat imported header same as table.header #196

Open
Tracked by #214
Andrew15-5 opened this issue Dec 20, 2024 · 5 comments
Open
Tracked by #214

Treat imported header same as table.header #196

Andrew15-5 opened this issue Dec 20, 2024 · 5 comments

Comments

@Andrew15-5
Copy link

Andrew15-5 commented Dec 20, 2024

If I import table: * and use header in table(), then it will group the cells incorrectly, by counting the header as the first cell. With table.header the grouping works as expected. Same goes for grid.

@Enter-tainer
Copy link
Owner

We may simply expand our recognition list by treating header the same as table.header 🤔

@QuadnucYard
Copy link
Collaborator

At present, semantic information has not been utilized to recognize table-related functions.
If we have knowledge of functions marked table-like, cell-like, and header-like, we can handle the table structure more precisely.
It could introduce many false positives if we only recognize them by name.

@Myriad-Dreamin
Copy link
Collaborator

The identifier resolution is actually solved by tinymist-query. The only question here is that whether it is fast enough to be used for formatting API. I guess it is not to expensive, as we have already used them in semantic highlighting (semantic tokens).

@Andrew15-5
Copy link
Author

Related: typst/typst#3640 (comment).

@Enter-tainer
Copy link
Owner

The only question here is that whether it is fast enough to be used for formatting API.

We can limit it's usage for table formatting only for now. I think it would worth it

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

No branches or pull requests

4 participants