Comments (5)
I can reproduce the issue with gopls v0.3.1
and v0.3.2
. Imports code action is not working because gopls changed the response format to versioned document edits. acme-lsp does not advertise to support versioned document edits, but gopls uses the new format anyway. These kinds of breakage are probably expected until gopls 1.0 is release.
Before (not versioned edit):
[Trace - 10:23:53.697 AM] Received response 'textDocument/codeAction - (2)' in 122ms.
Result: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///tmp/hello/hello.go":[{"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":0}},"newText":"\t\"fmt\"\n"}]}}}]
After (versioned document edit):
[Trace - 10:13:42.788 AM] Received response 'textDocument/codeAction - (2)' in 15ms.
Result: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"documentChanges":[{"textDocument":{"version":0,"uri":"file:///tmp/hello/hello.go"},"edits":[{"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":0}},"newText":"\t\"fmt\"\n"}]}]}}]
from acme-lsp.
Are you sure it has to do with Catalina?
I recently experienced similar problems (and others), but it was after I updated gopls and/or acme-lsp.
I reverted to f9edabb for acme-lsp and 0.2.2 for gopls and everything was fine again. And I am on Catalina as well.
Sorry @fhs , I didn't have time to investigate/report at the time, which is why I reverted straight away.
from acme-lsp.
No I'm not sure. It only occurred to me after I upgrade to Catalina, but it can be that after the upgrade I updated/reinstalled acme-lsp to the latest version.
I just downgraded acme-lsp to v0.9.0 (f9edabb) and gopls to 0.2.2 and now it is working again.
from acme-lsp.
Check if gopls works without acme-lsp by running:
gopls check project.go
There is also gopls imports
sub-command.
from acme-lsp.
With the latest gopls
, without acme-lsp, gopls check
and gopls imports
work as expected.
$ gopls version
golang.org/x/tools/gopls v0.3.1
golang.org/x/tools/[email protected] h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=
With acme-lsp version v0.9.0 and gopls v0.3.1 the check part works but the import part does not.
from acme-lsp.
Related Issues (20)
- L def fails to run due to acme-lsp.rpc: connect: no such file or directory HOT 1
- Config not read HOT 5
- Edit list doesn't apply correctly on elixir-ls
- acmefocused not working HOT 1
- error on startup HOT 1
- Always insert first suggestion in L comp -e HOT 2
- support for dart? HOT 9
- In internal/lsp/text/edit.go, ToPath doesn't percent decode input URI HOT 2
- automatic imports on formatting not working HOT 2
- Automatically launch acme-lsp at acme startup HOT 1
- Trying to get deno lsp to work HOT 1
- Relative file paths in assists / diagnostics HOT 4
- Cant get vue language server to work HOT 8
- Lua language server works great
- L hov panic when used on primitive types with typescript-language-server HOT 1
- Add support for FormattingOptions in config.toml HOT 1
- Cant reload file with typescript lsp HOT 2
- L assist completions in separate window HOT 1
- Diagnostics reload on mouse click
- @ imports crash L hov / L assist in js
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 acme-lsp.