@@ -65,22 +65,22 @@ use {
6565In your init.lua, call setup()
6666
6767``` lua
68- cfg = {... } -- add you config here
68+ cfg = {… } -- add you config here
6969require " lsp_signature" .setup (cfg )
7070```
7171
72- Alternatively, call on_attach() when the LSP client attaches to a buffer
72+ Alternatively, call on_attach(cfg, bufnr ) when the LSP client attaches to a buffer
7373
7474e.g. gopls:
7575
7676``` lua
7777local golang_setup = {
7878 on_attach = function (client , bufnr )
79- ...
80- require " lsp_signature" .on_attach () -- Note: add in lsp client on-attach
81- ...
79+ …
80+ require " lsp_signature" .on_attach (signature_setup , bufnr ) -- Note: add in lsp client on-attach
81+ …
8282 end ,
83- ...
83+ …
8484}
8585
8686require ' lspconfig' .gopls .setup (golang_setup )
@@ -97,16 +97,16 @@ floating window(Thanks [@Gabriel Sanches](https://github.com/gbrlsnchs) for the
9797``` lua
9898local example_setup = {
9999 on_attach = function (client , bufnr )
100- ...
100+ …
101101 require " lsp_signature" .on_attach ({
102102 bind = true , -- This is mandatory, otherwise border config won't get registered.
103103 handler_opts = {
104104 border = " rounded"
105105 }
106106 }, bufnr )
107- ...
107+ …
108108 end ,
109- ...
109+ …
110110}
111111```
112112
@@ -211,10 +211,10 @@ return a table
211211
212212``` lua
213213{
214- label = ' func fun_name(arg1, arg2... )'
214+ label = ' func fun_name(arg1, arg2… )'
215215 hint = ' arg1' ,
216216 range = {start = 13 , [' end' ] = 17 }
217- doc = ' func_name return arg1 + arg2 ... '
217+ doc = ' func_name return arg1 + arg2 … '
218218}
219219
220220```
0 commit comments