Skip to content

Problem with escaped underscores in vim.lsp.buf.hover floating window #91

@jakubbortlik

Description

@jakubbortlik

Thanks for the excellent plugin!

I've run into a problem when inspecting documentation for a Go function. The original docstring contains this text (shortened):

// ...
// Please refer to https://golang-jwt.github.io/jwt/usage/signing_methods/#signing-methods-and-key-types
// ...
func (t *Token) SignedString(key interface{}) (string, error) {

When I run vim.lsp.buf.hover() twice on the function and focus the floating window, the link is transformed to this markdown format: [https://golang-jwt.github.io/jwt/usage/signing\_methods/#signing-methods-and-key-types](https://golang-jwt.github.io/jwt/usage/signing_methods/#signing-methods-and-key-types) - notice the escaped underscore in signing\_methods

The default implementation of gx is able to navigate to the site correctly, while gx.nvim interprets the \ as a normal slash a tries to navigate to a non-existing site with signing/_methods.

It's no big deal, I don't often follow links from documentation floating windows, but do you think @chrishrb that this could be fixed? Thanks in advance!

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