aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lsp.h
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-08-19 01:53:55 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-10-04 23:07:47 +0200
commite7e539f20c50bd276d63a1c279e2bc8706df8a5c (patch)
tree10496f7efbaf97309e045cf3c639b8d4dab5428e /src/lsp.h
parentbfafc42fc3e6ae33eec68f0eae07739df6ae5c2b (diff)
LSP: auto-complete symbols via the textDocument/completion request
This currently only works in insert commands after enabling the immediate editing modifier via CTRL+G and if the LSP was already launched (e.g. by an explicit `FT$`). File name completions are still performed with an activated ^G modifier only if the LSP is shut down. Just like for file names, the modifier is automatically cancelled after a successful completion - there is little sense in completing several symbols in a row.
Diffstat (limited to 'src/lsp.h')
-rw-r--r--src/lsp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lsp.h b/src/lsp.h
index 325c204..f1fc3fa 100644
--- a/src/lsp.h
+++ b/src/lsp.h
@@ -19,8 +19,11 @@
#include <glib.h>
#include "parser.h"
+#include "string-utils.h"
#include "ring.h"
+gboolean teco_lsp_is_running(void);
+
gboolean teco_lsp_didopen(teco_buffer_t *buffer, GError **error);
gboolean teco_lsp_didchange_insert(teco_buffer_t *buffer, gsize pos, gsize len,
const gchar *text, GError **error);
@@ -31,5 +34,6 @@ gboolean teco_lsp_didclose(teco_buffer_t *buffer, GError **error);
gboolean teco_lsp_sync(teco_buffer_t *buffer, GError **error);
gboolean teco_lsp_symbol_auto_complete(const gchar *symbol, teco_string_t *insert);
+gboolean teco_lsp_buffer_auto_complete(teco_buffer_t *buffer, teco_string_t *insert);
extern teco_state_t teco_state_lsp_lookup;