Skip to content

Commit

Permalink
lint fix and readme update for setup() func
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Jul 17, 2021
1 parent 27fa218 commit 29e6859
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ require'lspconfig'.gopls.setup(golang_setup)
```


Alternatively, each time when open a new file
Alternatively, use setup function

```vim
autocmd BufReadPost,FileReadPost lua require "lsp_signature".on_attach()
require "lsp_signature".setup()
```


Expand All @@ -118,6 +118,18 @@ local example_setup = {
}
```

Or:

```lua
require'lspconfig'.gopls.setup()
require "lsp_signature".setup({
bind = true, -- This is mandatory, otherwise border config won't get registered.
handler_opts = {
border = "single"
}
})

```

### Full configuration

Expand Down
2 changes: 1 addition & 1 deletion lua/lsp_signature_helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ helper.match_parameter = function(result, config)
return result, "", 0, 0
end

activeSignature = result.activeSignature or 0
local activeSignature = result.activeSignature or 0
activeSignature = activeSignature + 1
local signature = signatures[activeSignature]

Expand Down

0 comments on commit 29e6859

Please sign in to comment.