Giter VIP home page Giter VIP logo

Comments (8)

triallax avatar triallax commented on July 21, 2024

I'm quite tired right now, but after I get enough rest I'll investigate this issue more and then comment what I discover.

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

I'll take a look at what happens for similar in vscode, if that shows the same issue then the answer is clear. We should be able to find out what messages are sent to/from the LSP and find out what's at fault in that way

from purescript-language-server.

triallax avatar triallax commented on July 21, 2024

Here's a log file that shows the communication between coc.nvim and purescript-language-server.
The file is really large and hard to read, so I recommend putting the log file in this website.

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

Looking at that log, we supply a single edit which seems to have 2 things going on:

{
  "edit": {
    "documentChanges": [
      {
        "textDocument": {
          "uri": "file:///Users/mhmdanas/Desktop/projecteuler-solutions/Some.purs",
          "version": 98
        },
        "edits": [
          {
            "range": {
              "start": {
                "line": 9,
                "character": 55
              },
              "end": {
                "line": 9,
                "character": 44
              }
            },
            "newText": "shouldEqual"
          }
        ]
      }
    ],
    "changes": {
      "file:///Users/mhmdanas/Desktop/projecteuler-solutions/Some.purs": [
        {
          "range": {
            "start": {
              "line": 9,
              "character": 55
            },
            "end": {
              "line": 9,
              "character": 44
            }
          },
          "newText": "shouldEqual"
        }
      ]
    }
  }
}

Firstly, the range start/end seem to be reversed, which may be why the text is not replaced but appended. Secondly, the edit is supplied in the "old" and "new" forms. I was of the belief that documentChanges would take precedence over changes, but I think the spec is a bit unclear - we should only provide 1, but documentChanges "are preferred":

The edit should either provide changes or documentChanges. If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

Hopefully fixed in 3941003

from purescript-language-server.

triallax avatar triallax commented on July 21, 2024

I tried to check if this bug was fixed, but even before I updated to 0.13.6 from 0.12.9, quickfix didn't work anymore. Same in 0.13.6. I get this text at the bottom in red:

[coc.nvim] No quickfix action available

I'll try to check later, as it seems that it's a problem from my side.

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

Quickfix was borken in vscode for a long time, not sure what the status is post-update - I assume I fixed it... but that may have broken others.

from purescript-language-server.

triallax avatar triallax commented on July 21, 2024

I tested this in coc.nvim. I might install VSCode to check if it works there or not.

from purescript-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.