diff options
author | pommicket <pommicket@gmail.com> | 2022-12-28 17:29:26 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-28 17:29:26 -0500 |
commit | dce1a94e3be8dc4b702d02d901d9b38c6f6a41ce (patch) | |
tree | 4ec198f966f34fe0aea5003d4e301bd33e13de03 /signature-help.c | |
parent | dc8d64a02d99368d2a66cff6caf5a18de3f06bd2 (diff) |
signature-help setting
Diffstat (limited to 'signature-help.c')
-rw-r--r-- | signature-help.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/signature-help.c b/signature-help.c index 27f9203..3951c29 100644 --- a/signature-help.c +++ b/signature-help.c @@ -1,6 +1,8 @@ // deals with textDocument/signatureHelp LSP requests void signature_help_send_request(Ted *ted) { + Settings *settings = ted_active_settings(ted); + if (!settings->signature_help) return; TextBuffer *buffer = ted->active_buffer; if (!buffer) return; LSP *lsp = buffer_lsp(buffer); @@ -42,6 +44,9 @@ void signature_help_close(Ted *ted) { } void signature_help_process_lsp_response(Ted *ted, const LSPResponse *response) { + Settings *settings = ted_active_settings(ted); + if (!settings->signature_help) return; + if (response->request.type != LSP_REQUEST_SIGNATURE_HELP) return; SignatureHelp *help = &ted->signature_help; @@ -77,6 +82,10 @@ void signature_help_process_lsp_response(Ted *ted, const LSPResponse *response) } void signature_help_frame(Ted *ted) { + Settings *settings = ted_active_settings(ted); + if (!settings->signature_help) + return; + SignatureHelp *help = &ted->signature_help; if (help->retrigger) signature_help_send_request(ted); @@ -89,7 +98,6 @@ void signature_help_frame(Ted *ted) { if (!buffer) return; - Settings *settings = buffer_settings(buffer); u32 *colors = settings->colors; float border = settings->border_thickness; |