simrat39 / symbols-outline.nvim

A tree like view for symbols in Neovim using the Language Server Protocol. Supports all your favourite languages.
MIT License
1.85k stars 100 forks source link

Add `wrap` config option #162

Closed madlep closed 2 years ago

madlep commented 2 years ago

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 to false (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 😄)

Before

image

After

wrap=false (default)

image

wrap-true

image
simrat39 commented 2 years ago
  • if config.options.wrap=true, set vim wrap option to be true. Long text just flows off the right hand side of the window

  • if config.options.wrap=false, set vim wrap option to be false, and set up sensible wrapping options:

LGTM, but did you mean to swap false and true here?

madlep commented 2 years ago

LGTM, but did you mean to swap false and true here?

@simrat39 oops, yeah. They're mixed up in the PR description. Fixed now.