Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto completion does not work in clojure-lsp only mode (no repl connection). #996

Closed
fonghou opened this issue Jan 30, 2021 · 34 comments
Closed
Labels
bug Something isn't working lsp

Comments

@fonghou
Copy link

fonghou commented Jan 30, 2021

Latest Calva version and latest clojure-lsp release 2021.01.28-03.03.16.

image

request and response from above screenshot. response looks strange same {"label": "log", "kind": 9} shows up multiple times.

[Trace - 11:45:03 PM] Sending request 'textDocument/completion - (43)'.
Params: {
    "textDocument": {
        "uri": "file:///home/haskeller/github/clojure-lsp/src/clojure_lsp/db.clj"
    },
    "position": {
        "line": 9,
        "character": 2
    },
    "context": {
        "triggerKind": 1
    }
}

[Trace - 11:44:23 PM] Received response 'textDocument/completion - (15)' in 649ms.
Result: [
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "lsp-db",
        "kind": 12
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "log",
        "kind": 9
    },
    {
        "label": "last",
        "detail": "clojure.core"
    },
    {
        "label": "lazy-cat",
        "detail": "clojure.core"
    },
    {
        "label": "lazy-seq",
        "detail": "clojure.core"
    },
    {
        "label": "let",
        "detail": "clojure.core"
    },
    {
        "label": "letfn",
        "detail": "clojure.core"
    },
    {
        "label": "line-seq",
        "detail": "clojure.core"
    },
    {
        "label": "list",
        "detail": "clojure.core"
    },
    {
        "label": "list*",
        "detail": "clojure.core"
    },
    {
        "label": "list?",
        "detail": "clojure.core"
    },
    {
        "label": "load",
        "detail": "clojure.core"
    },
    {
        "label": "load-file",
        "detail": "clojure.core"
    },
    {
        "label": "load-reader",
        "detail": "clojure.core"
    },
    {
        "label": "load-string",
        "detail": "clojure.core"
    },
    {
        "label": "loaded-libs",
        "detail": "clojure.core"
    },
    {
        "label": "locking",
        "detail": "clojure.core"
    },
    {
        "label": "long",
        "detail": "clojure.core"
    },
    {
        "label": "long-array",
        "detail": "clojure.core"
    },
    {
        "label": "longs",
        "detail": "clojure.core"
    },
    {
        "label": "loop",
        "detail": "clojure.core"
    }
]


[Trace - 11:44:23 PM] Sending request 'completionItem/resolve - (19)'.
Params: {
    "label": "log",
    "insertTextFormat": 1,
    "kind": 9
}

image

request and response at the point of above screenshot. Response does contain useful info, but nothing displays in GUI completion menu. Not sure {"_hasheq": 0} in all data items could be the issue.

[Trace - 11:47:05 PM] Sending request 'textDocument/completion - (56)'.
Params: {
    "textDocument": {
        "uri": "file:///home/haskeller/github/clojure-lsp/src/clojure_lsp/db.clj"
    },
    "position": {
        "line": 9,
        "character": 6
    },
    "context": {
        "triggerKind": 1
    }
}

[Trace - 11:47:08 PM] Received response 'textDocument/completion - (62)' in 302ms.
Result: [
    {
        "label": "debug",
        "kind": 6,
        "detail": "[& args]",
        "data": {
            "ns": {
                "name": "clojure.tools.logging",
                "_hasheq": 0
            },
            "name": {
                "name": "debug",
                "_hasheq": 0
            },
            "doc": "Debug level logging using print-style args.\n  Use the 'logging.readable' namespace to avoid wrapping args in pr-str.",
            "filename": "/home/haskeller/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:clojure/tools/logging.clj",
            "arglist-strs": [
                "[& args]"
            ]
        }
    },
    {
        "label": "debug",
        "kind": 6,
        "detail": "[& args]",
        "data": {
            "ns": {
                "name": "clojure.tools.logging",
                "_hasheq": 0
            },
            "name": {
                "name": "debug",
                "_hasheq": 0
            },
            "doc": "Debug level logging using print-style args.\n  Use the 'logging.readable' namespace to avoid wrapping args in pr-str.",
            "filename": "/home/haskeller/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:clojure/tools/logging.clj",
            "arglist-strs": [
                "[& args]"
            ]
        }
    },
    {
        "label": "debugf",
        "kind": 6,
        "detail": "[& args]",
        "data": {
            "ns": {
                "name": "clojure.tools.logging",
                "_hasheq": 0
            },
            "name": {
                "name": "debugf",
                "_hasheq": 0
            },
            "doc": "Debug level logging using format.\n  Use the 'logging.readable' namespace to avoid wrapping args in pr-str.",
            "filename": "/home/haskeller/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:clojure/tools/logging.clj",
            "arglist-strs": [
                "[& args]"
            ]
        }
    },
    {
        "label": "debugf",
        "kind": 6,
        "detail": "[& args]",
        "data": {
            "ns": {
                "name": "clojure.tools.logging",
                "_hasheq": 0
            },
            "name": {
                "name": "debugf",
                "_hasheq": 0
            },
            "doc": "Debug level logging using format.\n  Use the 'logging.readable' namespace to avoid wrapping args in pr-str.",
            "filename": "/home/haskeller/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:clojure/tools/logging.clj",
            "arglist-strs": [
                "[& args]"
            ]
        }
    }
]
@bpringe
Copy link
Member

bpringe commented Jan 30, 2021

Thanks for the detailed report! @ericdallo see anything odd here? I see that the data field can be anything, and the rest of the CompletionItems seem to follow the spec. 🤔

@bpringe
Copy link
Member

bpringe commented Jan 30, 2021

In that first response that is a lot of duplicates which I'm guessing is something to be fixed.

@bpringe bpringe added bug Something isn't working lsp labels Jan 30, 2021
@ericdallo
Copy link
Contributor

Yep, it's a bug on clojure-lsp, probably a missing distinct or a better na filter, I can check that soon

@bpringe
Copy link
Member

bpringe commented Jan 30, 2021

I'm not sure if that would fix the issue of completions not showing up in the editor, but maybe we can reassess that after the duplicate fix.

@ericdallo
Copy link
Contributor

Oh sorry, I missed the second example.
So, the server response looks correct right? it's odd vscode not displaying that...
At least for emacs, lsp-mode has a cache to do not query server again if in the same line/same token, I don't know how vscode handles that, but checking by the server response, seems right

@bpringe
Copy link
Member

bpringe commented Jan 30, 2021

We'll have to dig into it.

@fonghou
Copy link
Author

fonghou commented Feb 2, 2021

According lsp spec, "data" field in completionItem

	/**
	 * A data entry field that is preserved on a completion item between
	 * a completion and a completion resolve request.
	 */
	data?: any

I can see two problems from coc.nvim lsp trace, same as from vscode calve.

  1. If completionItem is in a ns alias form (log/deb), there is no completionItem/resolve request/response follows. Since lsp client is not supposed to parse ns/arglist-str/doc from "data" field (they are clojure specific metadata), none of these can be displayed in client completion GUI. I think the "data" field should be formated in response as
	/**
	 * A human-readable string that represents a doc-comment.
	 */
	documentation?: string | MarkupContent;
  1. For unqualified symbols sucn as defonce from clojure.core, completionItem/resolve reponded "No result returned".
Trace - 8:22:03 PM] Sending request 'completionItem/resolve - (14)'.
   Params: {                                                                                                                                                              
       "label": "defonce",                                                                                                                                                 
       "detail": "clojure.core",
       "data": {}                                                                                                                                                          
   }
  
[Trace - 8:22:03 PM] Received response 'completionItem/resolve - (14)' in 3ms.
No result returned.                                                                                             

@ericdallo
Copy link
Contributor

The data field could be anything and we pass some data that we can use on resolveItem to resolve item documentation field, I don't find anything wrong here, we could improve data field content though

@fonghou
Copy link
Author

fonghou commented Feb 2, 2021

@ericdallo, do you agree if the "data" field could be anything, which means it'd be opaque to lsp client. My reading of spec is that should be only used as some kind of lookup key on lsp server for "lazily loading expensive completionItem".

@ericdallo
Copy link
Contributor

Actually, the client just get the data from the server on the textDocument/completion request and send it on the completion/resolveItem request, so client should not do anything on data field, is just something to server know what item client is selecting

@fonghou
Copy link
Author

fonghou commented Feb 2, 2021

Then the problem is that I don't see completeItem/resolve call after completion response.

Also, why another roundtrip to server when "data" field had everything?

https://microsoft.github.io/language-server-protocol/specification#textDocument_completion

If computing full completion items is expensive, servers can additionally provide a handler for the completion item resolve request (‘completionItem/resolve’). This request is sent when a completion item is selected in the user interface. A typical use case is for example: the ‘textDocument/completion’ request doesn’t fill in the documentation property for returned completion items since it is expensive to compute. When the item is selected in the user interface then a ‘completionItem/resolve’ request is sent with the selected completion item as a parameter. The returned completion item should have the documentation property filled in. 

@ericdallo
Copy link
Contributor

Then the problem is that I don't see completeItem/resolve call after completion response.

It's not a must call completion/itemResolve, the completion should work only with textDocument/completion, the resolve request is just to get the extra fields (documentation in clojure-lsp case) for the selected item.

Also, why another roundtrip to server when "data" field had everything?

It doesn't have the documentation field, which could be a huge field increasing the json size.

@fonghou
Copy link
Author

fonghou commented Feb 2, 2021

It doesn't have the documentation field, which could be a huge field increasing the json size.

textDocument/completion response does have "doc" field in "data" json as shown in trace log. Here is cut and paste one of them

    {
        "label": "debugf",
        "kind": 6,
        "detail": "[& args]",
        "data": {
            "ns": {
                "name": "clojure.tools.logging",
                "_hasheq": 0
            },
            "name": {
                "name": "debugf",
                "_hasheq": 0
            },
            "doc": "Debug level logging using format.\n  Use the 'logging.readable' namespace to avoid wrapping args in pr-str.",
            "filename": "/home/haskeller/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:clojure/tools/logging.clj",
            "arglist-strs": [
                "[& args]"
            ]
        }
    }

@ericdallo
Copy link
Contributor

I see, yet it's the raw data not pretty/ready to display on client (missing markdown), but maybe we could probably parse on textDocument/completion and don't use completion/itemResolve anymore, not sure it'd impact performance since we would calculate the markdown content for every item, but it worth the shot, would you mind open a clojure-lsp issue regarding that?

@fonghou
Copy link
Author

fonghou commented Feb 2, 2021

Yes, that's what I meant. If lsp client wants to keep a lightweight completionItemList cache (you seems saying emacs one does) as that may be refreshed on every keystroke, it makes sense not loading the document/detail of the whole completeItem[]. Maybe putting a hash lookup key in data field only (do you know where "_hasheq": 0 coming from, is it a clojure-lsp thing?), then completeItem/resovle lazily request "huge" markdown document field on completionItem selection.

This is what LSP spec 3.16 says. By default the request can only delay the computation of the detail and documentation properties.

Basically, textDocument/complete response can looks like this (so that the completionItemList cache can be lightweight on lsp client).

[
  {
        "label": "debugf",
        "kind": 6,
        "detail": "clojure.tools.logging",
        "data": "hash of symbol's metadata"
    },
    ... hundreds of items.
]

completeItem/resolve request/response should look like these (only when a complete item is selected from UI dropdown menu).

Trace - 8:22:03 PM] Sending request 'completionItem/resolve - (14)'.
   Params: {                                                                                                                                                              
        "label": "debugf",
        "kind": 6,
        "detail": "clojure.tools.logging",
        "data": "hash of symbol's metadata"                                                                                                                                                      
   }
  
[Trace - 8:22:03 PM] Received response 'completionItem/resolve - (14)' in 3ms.
  Result: {
        "label": "debugf",
        "kind": 6,
        "detail": "clojure.tools.logging",
        "document": "markdown format of arglist-strs list and huge doc string"
  }

@fonghou
Copy link
Author

fonghou commented Feb 6, 2021

@ericdallo, completion still doesn't work.

image

Response looks alright. I'm not sure textDocument/documnetHighlight in the middle interfere the completion or not.

[Trace - 10:05:27 PM] Sending request 'textDocument/completion - (390)'.
Params: {
    "textDocument": {
        "uri": "file:///home/haskeller/dev/cljdata/src/cljdata/core.clj"
    },
    "position": {
        "line": 4,
        "character": 8
    },
    "context": {
        "triggerKind": 1
    }
}


[Trace - 10:05:27 PM] Sending request 'textDocument/documentHighlight - (391)'.
Params: {
    "textDocument": {
        "uri": "file:///home/haskeller/dev/cljdata/src/cljdata/core.clj"
    },
    "position": {
        "line": 4,
        "character": 8
    }
}


[Trace - 10:05:27 PM] Received response 'textDocument/documentHighlight - (391)' in 2ms.
Result: [
    {
        "range": {
            "start": {
                "line": 4,
                "character": 3
            },
            "end": {
                "line": 4,
                "character": 8
            }
        }
    }
]


[Trace - 10:05:27 PM] Received response 'textDocument/completion - (390)' in 21ms.
Result: [
    {
        "label": "split",
        "kind": 3,
        "detail": "[s re] [s re limit]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split [s re]\n[s re limit]\n```\n\n----\n```clojure\nSplits string on a regular expression.  Optional argument limit is\nthe maximum number of splits. Not lazy. Returns vector of the splits.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    },
    {
        "label": "split-lines",
        "kind": 3,
        "detail": "[s]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split-lines [s]\n```\n\n----\n```clojure\nSplits s on \\\\n or \\\\r\\\\n.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    },
    {
        "label": "starts-with?",
        "kind": 3,
        "detail": "[s substr]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/starts-with? [s substr]\n```\n\n----\n```clojure\nTrue if s starts with substr.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    }
]


[Trace - 10:05:27 PM] Sending request 'textDocument/codeAction - (392)'.
Params: {
    "textDocument": {
        "uri": "file:///home/haskeller/dev/cljdata/src/cljdata/core.clj"
    },
    "range": {
        "start": {
            "line": 4,
            "character": 8
        },
        "end": {
            "line": 4,
            "character": 8
        }

@ericdallo
Copy link
Contributor

@fonghou the fix was made on clojure-lsp master, we still need to release a version ( probably tomorrow) and calva needs to bump to use that version of clojure-lsp

@ericdallo
Copy link
Contributor

Oh, just saw you are using the master fix, sorry.
The response looks perfect, probably a calva issue, WDYT @bpringe ?

@bpringe
Copy link
Member

bpringe commented Feb 6, 2021

I'm not sure why it's not working. I'll look into this soon.

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

I've been looking into this and found something, though still don't know the real issue. I downgraded to Calva version 2.0.139 which used an older version of clojure-lsp, and with that the completions work (show up in the editor). The response of that version looks like this:

[Trace - 4:06:26 PM] Received response 'textDocument/completion - (13)' in 75ms.
Result: [
    {
        "label": "str/blank?",
        "detail": "clojure.string",
        "data": "clojure.string/blank?"
    },
    {
        "label": "str/capitalize",
        "detail": "clojure.string",
        "data": "clojure.string/capitalize"
    },
    {
        "label": "str/ends-with?",
        "detail": "clojure.string",
        "data": "clojure.string/ends-with?"
    },
    ...truncated for this example
]

The response of the latest clojure-lsp, that doesn't work (show in the editor) looks like this:

[Trace - 4:35:01 PM] Received response 'textDocument/completion - (24)' in 42ms.
Result: [
    {
        "label": "split",
        "kind": 3,
        "detail": "[s re] [s re limit]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split\n```\n```clojure\n[s re]\n[s re limit]\n```\n\n----\n```clojure\nSplits string on a regular expression.  Optional argument limit is\nthe maximum number of splits. Not lazy. Returns vector of the splits.\n```\n----\n*/home/brandon/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar:clojure/string.clj*"
        }
    },
    {
        "label": "split",
        "kind": 3,
        "detail": "[s re] [s re limit]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split\n```\n```clojure\n[s re]\n[s re limit]\n```\n\n----\n```clojure\nSplits string on a regular expression. Optional argument limit is\nthe maximum number of splits. Not lazy. Returns vector of the splits.\n```\n----\n*/home/brandon/.m2/repository/org/clojure/clojurescript/1.10.520/clojurescript-1.10.520.jar:clojure/string.cljs*"
        }
    },
    ...truncated for this example
]

I'm not sure yet what's causing it to not show in the editor.

@ericdallo
Copy link
Contributor

Yeah, we have a more complete completion response now, showing documentation, args, and completion item kind still conforming the LSP spec, the response of both looks correct to me :/

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

I think this may be a bug in the vscode-langaugeclient. When I add middleware for the completion request/response and log the response, I see this in the debug console:

image

kind is "Function", which is the const name of the CompletionItemKind in the protocol. Somehow the number is being converted to that, but the protocol states it must be a number. I'll keep investigating.

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

@ericdallo It appears that VS Code wants the alias to be included in the completion item labels. I hardcoded completion items returned to be the following:

[
    {
        "label": "str/test-fn",
        "detail": "test detail",
        "data": "clojure.string/blank?"
    },
    {
        "label": "str/capitalize",
        "detail": "clojure.string",
        "data": "clojure.string/capitalize"
    },
    {
        "label": "str/ends-with?",
        "detail": "clojure.string",
        "data": "clojure.string/ends-with?"
    }
]

You can see this gives me completions in the editor now:

image

I think if the alias (like str/) isn't included in the label, VS Code sees what is at the cursor as not matching the completions returned from the server. What was the reason for changing them to not include the namespace alias? It appears that was returned in the past.

If it works as it currently is with other clients, as I suspect it does, and you have a reason not to go back to including the alias in the label, then I wonder if there's something in our language definition / parsing stuff that we need to modify so that VS Code is looking only to match the text after / with the returned completions.

@ericdallo
Copy link
Contributor

ericdallo commented Feb 9, 2021

Oh, good catch!
We changed the whole feature after kondo integration, but not realized this behavior change, for other clients it work ATM, but I think we can check if it works adding the alias for the other clients, if it works, I don't see any problems changing it to make VSCode work too :)

I can take a look at this tomorrow

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

Pinging @PEZ. Do you know of what might make VS Code match on the completions that don't include the namespace, like other editors seem to do? Is there something we can change in Calva that might do that? Seems like it sees ns/symbol as one "thing," but if we could make it match on the text after the / maybe the current way would work.

I don't know which solution is better anyway, though. 🤷‍♂️

@ericdallo
Copy link
Contributor

@bpringe we have completion on root too, to complete function/var/alias names, those don't have an alias on completion items, could you confirm that does work on Calva?

@ericdallo
Copy link
Contributor

@bpringe I made the change and it worked on emacs too, could you test it if fix it for Calva?
clojure-lsp/clojure-lsp#307

@PEZ
Copy link
Collaborator

PEZ commented Feb 9, 2021

@bpringe I notice that we don't get completions from unrepl either. We probably should deal with that the same way as we do with documentation and navigation lookup.

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

unrepl

Guessing you mean nrepl? But in any case, I'm not following. 🤔

I'll test that out @ericdallo.

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

That works @ericdallo! 🎉 I also verified that nrepl returns completions with the alias as well, though I'm not sure if this is just because of how we're calling the complete op. Anyway, please merge when you can, and thanks!

I think this is good to leave as-is for now (with the merge for re-including aliases), but maybe later we can try to make Calva not require the alias in completions. I wonder if this is something to do with the wordPattern we have set, or something like that (so it wants to match on alias/fn as a whole word instead of seeing it as <word>/<word>). Just wild guessing. I have a feeling if other clients don't require the alias in the completion then it's something particular about Calva, and not necessarily VS Code.

@ericdallo
Copy link
Contributor

Nice, I'll release soon

@ericdallo
Copy link
Contributor

Released @bpringe !

@fonghou
Copy link
Author

fonghou commented Feb 9, 2021

@bpringe, @ericdallo Thank you for working on this. The fix also works for coc-nvim. Since it's a fork of vscode-languageclient, but no using calva code, I think this issue being fixed is not calva specific.

Fyi, one inconsistency I noticed. "detail" field from unaliased items shows namespace not signature, but aliased ones contain signatures instead.

[Trace - 1:33:58 PM] Received response 'textDocument/completion - (145)' in 107ms.
Result: [
    {
        "label": "max",
        "kind": 12
    },
    {
        "label": "min",
        "kind": 12
    },
    {
        "label": "macroexpand",
        "detail": "clojure.core"
    },
    {
        "label": "macroexpand-1",
        "detail": "clojure.core"
    }
]
[Trace - 1:36:40 PM] Received response 'textDocument/completion - (181)' in 41ms.
Result: [
    {
        "label": "str/split",
        "kind": 3,
        "detail": "[s re] [s re limit]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split [s re]\n[s re limit]\n```\n\n----\n```clojure\nSplits string on a regular expression.  Optional argument limit is\nthe maximum number of splits. Not lazy. Returns vector of the splits.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    },
    {
        "label": "str/split-lines",
        "kind": 3,
        "detail": "[s]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/split-lines [s]\n```\n\n----\n```clojure\nSplits s on \\\\n or \\\\r\\\\n.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    },
    {
        "label": "str/starts-with?",
        "kind": 3,
        "detail": "[s substr]",
        "documentation": {
            "kind": "markdown",
            "value": "```clojure\nclojure.string/starts-with? [s substr]\n```\n\n----\n```clojure\nTrue if s starts with substr.\n```\n----\n*/home/haskeller/.m2/repository/org/clojure/clojure/1.10.2/clojure-1.10.2.jar:clojure/string.clj*"
        }
    }
]

@ericdallo
Copy link
Contributor

Nice @fonghou, will take a look, but I think we only include the arglists if its present on clj-kondo analysis, otherwise fallback to namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp
Projects
None yet
Development

No branches or pull requests

4 participants