Closed madlep closed 2 years ago
if
config.options.wrap=true
, set vimwrap
option to be true. Long text just flows off the right hand side of the windowif
config.options.wrap=false
, set vimwrap
option to be false, and set up sensible wrapping options:
LGTM, but did you mean to swap false and true here?
LGTM, but did you mean to swap false and true here?
@simrat39 oops, yeah. They're mixed up in the PR description. Fixed now.
At the moment, long function names etc get wrapped around to the far left of the tree UI, looking weird.
Change is to add a
wrap
config option, with default set tofalse
(as that seems most usable from playing around with it).In particular, this came up with Elixir function names from https://github.com/elixir-lsp/elixir-ls , which returns the whole function definition, and can get pretty long. (I'm working on a PR for that too to make them a bit more manageable 😄)
config.options.wrap=false
, set vimwrap
option to be false. Long text just flows off the right hand side of the windowconfig.options.wrap=true
, set vimwrap
option to be true, and set up sensible wrapping options:linebreak
- only break on new words etc, not in the middle of thembreakindent
- wrap to position of start of the line - so if we're deep in the tree UI, wrap starting from the position of that symbol indentation.showbreak
- spaces to indent further, so the wrapped line is shown 2 characters indented from the start of the symbol words. Played around with usingui.markers.vertical
so styling of tree is preserved, but colors aren't matched. Only way to style colors is by overridinghl-NonText
globally, which could mess with other things, so left that out.Before
After
wrap=false
(default)wrap-true