Lsplinks.nvim Save

LSP textDocument/documentLink support for neovim

Project README

LSPLINKS

Support for document links for neovim 0.9+.

Usage

The default behaviour of gx is described in the neovim help as:

Opens the current filepath or URL (decided by <cfile>, 'isfname') at cursor using the system default handler, by calling vim.ui.open().

This plugin extends this behaviour to support LSP document links.

Prerequisites:

An LSP server which supports textDocument/documentLink.

Configuration:

Call setup to initialise the plugin:

local lsplinks = require("lsplinks")
lsplinks.setup()
vim.keymap.set("n", "gx", lsplinks.gx)

Lazy Configuration:

{
    "icholy/lsplinks.nvim",
    config = function()
        local lsplinks = require("lsplinks")
        lsplinks.setup()
        vim.keymap.set("n", "gx", lsplinks.gx)
    end
}

Default Configuration:

lsplinks.setup({
    highlight = true,
    hl_group = "Underlined",
})

Demo 1:

Jump to $ref links in swagger/openapi files.

Demo 2:

Open https://pkg.go.dev from your go.mod or import statements.

Open Source Agenda is not affiliated with "Lsplinks.nvim" Project. README Source: icholy/lsplinks.nvim
Stars
60
Open Issues
0
Last Commit
1 month ago

Open Source Agenda Badge

Open Source Agenda Rating