Skip to content

icholy/lsplinks.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

LSP textDocument/documentLink support for neovim

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages