Skip to content

Commit

Permalink
fix(settings): Fixes silent setting and adds note to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Issafalcon committed Oct 16, 2023
1 parent 42d68e9 commit 49c789d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ the built-in `signatureHelper` LSP handler:
focusable = true, -- Make the popup float focusable
focus = false, -- If focusable is also true, and this is set to true, navigating through overloads will focus into the popup window (probably not what you want)
offset_x = 0, -- Horizontal offset of the floating window relative to the cursor position
offset_y = 0 -- Vertical offset of the floating window relative to the cursor position
floating_window_above_cur_line = false -- Attempt to float the popup above the cursor position
offset_y = 0, -- Vertical offset of the floating window relative to the cursor position
floating_window_above_cur_line = false, -- Attempt to float the popup above the cursor position
-- (note, if the height of the float would be greater than the space left above the cursor, it will default
-- to placing the float below the cursor. The max_height option allows for finer tuning of this)
silent = true -- Prevents noisy notifications (make false to help debug why signature isn't working)
},
keymaps = {
next_signature = "<C-j>",
Expand Down Expand Up @@ -140,6 +141,8 @@ The default mappings are used to navigate between various signature overloads an
- Any calls to `vim.lsp.buf.signature_help()` made while the plugin's signature popup is displayed, will behave
in the same way as the built-in signature popup (i.e. When `focusable` set to true Cursor will enter the popup in normal mode, allowing scrolling behaviour)

- If signatures aren't showing up when you expect them to, try setting `silent` to false. If you then see a popup that states `No signature help found`, then at least you know it's probably the LSP that isn't returning the signature help.

## Credits

- [omnisharp-vim](https://github.com/OmniSharp/omnisharp-vim/blob/master/autoload/OmniSharp/actions/signature.vim) - For providing the approach that I used to handle the signature overloads and keymappings
Expand Down
2 changes: 1 addition & 1 deletion lua/lsp-overloads/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ M.open_signature = function(clients, bypass_trigger)
params,
vim.lsp.with(M.signature_handler, {
border = settings.current.ui.border,
silent = settings.current.silent,
silent = settings.current.ui.silent,
height = settings.current.ui.height,
width = settings.current.ui.width,
wrap = settings.current.ui.wrap,
Expand Down
1 change: 1 addition & 0 deletions lua/lsp-overloads/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local DEFAULT_SETTINGS = {
focus = false,
offset_x = 0,
offset_y = 0,
silent = true,
floating_window_above_cur_line = false,
},
keymaps = {
Expand Down

0 comments on commit 49c789d

Please sign in to comment.