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

Inlay hints: display outside of label argument? #890

Closed
clason opened this issue May 24, 2023 · 2 comments · Fixed by #891
Closed

Inlay hints: display outside of label argument? #890

clason opened this issue May 24, 2023 · 2 comments · Fixed by #891
Labels
enhancement New feature or request

Comments

@clason
Copy link
Contributor

clason commented May 24, 2023

Now that Neovim supports inlay hints, I suddenly have opinions on it :)

Specifically, it looks a bit weird to me that the inlay hint is part of the label argument, like

\label{eq:fancy Equation (27.23)}

instead of outside, like

\label{eq:fancy}  Equation (27.23)

(note the separation by two spaces, which I think is visually a little bit nicer than just one space).

Is there a specific reason for that?

@pfoerster
Copy link
Member

Is there a specific reason for that?

No, not really. It was a tiny bit easier to implement. It only really matters if you have multiple references in one command (like \cref{...}) but we currently do not show inlay hints for references.

(note the separation by two spaces, which I think is visually a little bit nicer than just one space).

The visuals probably depend a lot on the client, here is how it looks on VSCode:

2 leading spaces:
image

No spaces:
image

1 leading and trailing space:
image

2 leading and trailing spaces:
image

@pfoerster pfoerster added the enhancement New feature or request label May 25, 2023
@clason
Copy link
Contributor Author

clason commented May 25, 2023

Ah, I see; if the label has background color, you'd want the spaces to be symmetrical. Either one or two spaces is fine with me.

pfoerster added a commit that referenced this issue May 25, 2023
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jun 28, 2023
## [5.7.0] - 2023-06-07

### Added

- Add symbol support for `thmtools` package ([#894](latex-lsp/texlab#894))
- Add `texlab.findEnvironments` command to return the list of environments containing a position ([#892](latex-lsp/texlab#892))

### Changed

- Show inlay hints for labels after the command instead of inside the argument ([#890](latex-lsp/texlab#890))

### Fixed

- Prevent adding trailing newline after formatting with `latexmk` ([#895](latex-lsp/texlab#895))
- Improving `\paragraph` parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants