Comments (11)
It also seems that for standard packages signatureHelp isn't working at all.
from bingo.
It also seems that for standard packages signatureHelp isn't working at all.
Do you mean built-in functions(append, println...)?
from bingo.
Just built the project and trying it out with coc.nvim, for this simple code:
package main func foo(a, b int) int { return 42 } func main() { foo( }On
foo(
, I get wrong signatureHelp highlight, it highlights the last parameterfoo(a int, *b int*)
, then when I insert the first integer,foo(4,
, signatureHelp information returns the first parameter as active. I've checked the server communication.
I have fixed this bug.
from bingo.
It also seems that for standard packages signatureHelp isn't working at all.
Do you mean built-in functions(append, println...)?
I meant from standard packages, like fmt
. They're responding now, but see below.
On
foo(
, I get wrong signatureHelp highlight, it highlights the last parameterfoo(a int, *b int*)
, then when I insert the first integer,foo(4,
, signatureHelp information returns the first parameter as active. I've checked the server communication.I have fixed this bug.
It's still not working for me, same behavior. Standard package's signatureHelp is responding but I get the same fuzzy behavior regarding highlight of active parameter, indexing is wrong.
from bingo.
In late protocol you can have labelOffsetSupport
too, but it won't make any difference since you would have to support clients that ignore it too. In any case, that's just additional information, the signatureHelp's active parameter bug could be present in whatever case if indexing is not done correctly.
from bingo.
Relevant log for the original example code.
On opening parentheses (foo(
):
[Trace - 4:12:54 PM] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"version": 5,
"uri": "file:///home/francisco/Projects/samples/go/sample.go"
},
"contentChanges": [
{
"range": {
"start": {
"line": 7,
"character": 4
},
"end": {
"line": 7,
"character": 4
}
},
"rangeLength": 0,
"text": "("
}
]
}
[Trace - 4:12:54 PM] Sending request 'textDocument/signatureHelp - (2)'.
Params: {
"textDocument": {
"uri": "file:///home/francisco/Projects/samples/go/sample.go"
},
"position": {
"line": 7,
"character": 5
}
}
[Trace - 4:12:54 PM] Received response 'textDocument/signatureHelp - (2)' in 68ms.
Result: {
"signatures": [
{
"label": "foo(a int, b int)",
"parameters": [
{
"label": "a int"
},
{
"label": "b int"
}
]
}
],
"activeSignature": 0,
"activeParameter": 1
}
On first comma (foo(1,
):
[Trace - 4:12:57 PM] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"version": 7,
"uri": "file:///home/francisco/Projects/samples/go/sample.go"
},
"contentChanges": [
{
"range": {
"start": {
"line": 7,
"character": 6
},
"end": {
"line": 7,
"character": 6
}
},
"rangeLength": 0,
"text": ","
}
]
}
[Trace - 4:12:57 PM] Sending request 'textDocument/signatureHelp - (4)'.
Params: {
"textDocument": {
"uri": "file:///home/francisco/Projects/samples/go/sample.go"
},
"position": {
"line": 7,
"character": 7
}
}
[Trace - 4:12:57 PM] Received response 'textDocument/signatureHelp - (4)' in 34ms.
Result: {
"signatures": [
{
"label": "foo(a int, b int)",
"parameters": [
{
"label": "a int"
},
{
"label": "b int"
}
]
}
],
"activeSignature": 0,
"activeParameter": 0
}
from bingo.
@oblitum
I'm sorry. I can't reproduce the above problem in vscode. Can you reproduce it in vscode?
from bingo.
Sorry but I don't use vscode. Though, I think this is a bingo issue, since it's the one that's clearly sending wrong activeParameter, maybe it's getting lost the way messages are sent from client. I'm currently using coc.nvim, bingo is the only server that reproduces this behavior.
from bingo.
Notice the above output isn't full, I get interleaved diagnostics reports, I've cut it because the message is too noisy and would probably not be relevant.
from bingo.
I have fixed this bug, please try the latest version bingo
from bingo.
@saibing thanks, it's working now.
from bingo.
Related Issues (20)
- no diagnostic
- Bingo does not update diagnostics after saving HOT 4
- auto completion doesn't work inside Goroutines. HOT 8
- Implement diagnostics range HOT 2
- Bad snippets?
- Imported a new package cannot be completed. HOT 2
- Format structs in quick documentation on hover HOT 4
- Invalid args in completion HOT 1
- can't complete a package which is depend on another package in same project
- some special package will stop the auto complete,e.g. net package HOT 1
- Getting document symbols is very slow HOT 1
- Bingo stops providing any diagnostics HOT 1
- Add possibility to control diagnostics scope HOT 1
- Incorrect import paths in quick documentation HOT 1
- switching to gopls issue? HOT 30
- unknown type name double_t on mac os x10.13.2 HOT 6
- How can I set GOPATH for bingo? HOT 4
- fail get importPath when opening project HOT 6
- saibing/tools 无法创建issue HOT 1
- when i switch to other branch, lsp will remind me some error
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 bingo.