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

fix: replace newlines with spaces in writer #204

Open tbung opened 1 year ago

tbung commented 1 year ago

nvim_buf_set_lines does not allow newline characters in the individual lines. This change replaces all newline characters in each line with a space character. As far as I know, this only affects the TexLab lsp, since it reports the whole caption of figures, tables, etc. including potential newline characters. There is a case to be made to move this to parser.get_lines. This fixes #184.

albertfgu commented 1 year ago

👍 thanks for the fix!