Skip to content

Instruct clojure-lsp about how coc.nvim conveys URLs #8

@mainej

Description

@mainej

coc.nvim is a bit different from other editors in terms of how it conveys URLs.

  1. It uses what clojure-lsp calls a "zipfile" scheme for JAR files: "zipfile://some.jar::xxx.clj". Other editors tend to follow a "jar" scheme: "jar:file:///some.jar!/xxx.clj"
  2. It escapes URI strings, even though the URIs are in JSON which doesn't need to be escaped. So when communicating about the aforementioned file, it will actually describe it as "zipfile://some.jar%3a%3axxx.clj" (I think. It may also encode the ://. Needs to be verified).

clojure-lsp needs to know how each client handles URIs, to make sure that it stores data internally in a way that the client can access.

So, this is a proposal to add a few options to the client config, to inform clojure-lsp about how coc.nvim likes to handle URIs.

First, to address 1) above, it'd be useful if coc-clojure set :dependency-scheme "zipfile". @ericdallo, clojure-lsp uses "zipfile" internally, but mentions "zip" and :zip in the docs. Can we settle on "zipfile"?

Second, to address 2) above, it'd be useful if coc-clojure set :uri-scheme "escaped-path", or something like that. This would have to be coordinated with @ericdallo, because clojure-lsp doesn't understand this setting yet. See clojure-lsp/clojure-lsp#1287 and clojure-lsp/clojure-lsp#1327 for more discussion.

:uri-scheme "escaped-path" is just a proposal. Other keys or values may be more appropriate depending on which components of the URI are escaped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions