iamcco / vim-language-server

VImScript language server, LSP for vim script
502 stars 16 forks source link

Reported error for comment after an indented let=<< #82

Closed Aster89 closed 1 year ago

Aster89 commented 1 year ago

Copied from https://github.com/vim/vim/issues/11642 / https://github.com/ycm-core/lsp-examples/issues/33

Steps to reproduce

  1. Open a vimscript file and fill it with the following content:
    fun SomeFun()
    let text =<< trim END
    Some text
    END
    endf
    " a comment
  2. Observe the syntax coloring of "
  3. Hit EscapeGAEnterEnter.
  4. See the error.

Here's a screencast:

asciicast


Note there's nothing after the closing END and there's as much space before as before let. This is consistent with let {var-name} =<< [trim] [eval] {endmarker}'s documentation, specifically

The last line should end only with the {endmarker} string without any other character.

and

The marker must line up with "let".

Expected behaviour

Correct syntax coloring and no error.

Version of Vim

9.0 patch 1-910

Environment

Operating system: up-to-date Archlinux Terminal: URxvt Value of $TERM: rxvt-unicode-256color Shell: Bash

iamcco commented 1 year ago

vimlparser bug https://github.com/vim-jp/vim-vimlparser/issues/188

iamcco commented 1 year ago

Close https://github.com/iamcco/vim-language-server/commit/f6e1808e441c64f47f6fb86886eb9ad5a4e74156