Comments (8)
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.
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.
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.
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.
Hopefully fixed in 3941003
from purescript-language-server.
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.
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.
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)
- Support configuring spago file/target
- Neovim configuration HOT 6
- BUG: Deleting/renaming modules does NOT purge them from the cache HOT 3
- Support completion for qualified do imports
- Docs: Update formatter section HOT 1
- Organizeing imports deletes comments HOT 1
- Hover (show documentation) does not work with recent coc.nvim HOT 8
- Suggestion: Extend diagnostics on type to buffer switches HOT 1
- Support multiple spans per diagnostic
- Incorrect "Go to definition" behavior for the `Bind` data type.
- E715: Dictionary required when trying to apply sourse.sortImports code action HOT 2
- Breakpoints?
- Use with spaghetto (spago@next)
- amazing stuff; just wondering if it supports eval? like in -- >> HOT 1
- Warning/Error reporting not working? HOT 5
- Action to export HOT 1
- Find references returns no references HOT 1
- Should optional field return null? HOT 1
- Stale errors/warnings stick around after a full build
- Presence of VTA prevents LSP functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-language-server.