jeapostrophe / racket-langserver

Other
262 stars 24 forks source link

fix extra empty lines (#82) in formatting #90

Closed 6cdh closed 1 year ago

6cdh commented 1 year ago

For some reason, end-line is actually the number of lines of the file (0 based).

For example, the file have 3 lines. We finally have this TextEdit object in the response:

{
  "newText": "",
  "range": {
    "start": {
      "character": 0,
      "line": 3
    },
    "end": {
      "character": 0,
      "line": 3
    }
  }
}

According to the protocol, this range is empty. It will depend on how the client process it. I think it's a neovim bug. Anyway, we can avoid this useless response in our server.

dannypsnl commented 1 year ago

fantastic

jeapostrophe commented 1 year ago

Thank you!