Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
icholy committed Feb 24, 2024
1 parent 3f08bff commit 093ade9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This plugin requires an existing lsp server which supports document links.
My testing was done using: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jsonls

### Example Configuration:
### Configuration:

Call `setup` to initialise the plugin:

Expand All @@ -21,13 +21,11 @@ Replace your existing goto-defintion mapping with the following:
``` lua
vim.keymap.set("n", "gd", function()
local lsplinks = require("lsplinks")
if not lsplinks.jump() then
vim.lsp.buf.definition()
end
lsplinks.jump() or vim.lsp.buf.definition()
end)
```

### Example Lazy Configuration:
### Lazy Configuration:

``` lua
{
Expand All @@ -37,9 +35,7 @@ end)
lsplinks.setup()
vim.keymap.set("n", "gd", function()
local lsplinks = require("lsplinks")
if not lsplinks.jump() then
vim.lsp.buf.definition()
end
lsplinks.jump() or vim.lsp.buf.definition()
end)
end
}
Expand Down

0 comments on commit 093ade9

Please sign in to comment.