James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.55k stars 522 forks source link

Word wrapping that recognizes latex code #4182

Closed dskinnion closed 6 months ago

dskinnion commented 6 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The feature request has not been suggested in this repository.

The Missed*

Is your feature request related to a problem? Please provide a clear and concise description of what the problem is.

  • Sometimes word wrapping will break up latex expressions.

The Solution*

Please provide a solution you would like to have.

  • Is there a way for word wrapping to recognize latex expressions, and instead only break at spaces, not in the middle of a latex expression?

Anything Else?

Add any other context about the feature request below.

  • Thanks!
jlelong commented 6 months ago

Wrapping is directly handled by VS Code and we have no control over it. Well, this is not completely true. Wrapping is based on the value of wordPattern defined by the language. However, this setting is used for many different purposes and in particular for autocompletion. Playing with it will break too many other features.