aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-08-02 15:24:45 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-08-11 00:38:31 +0200
commit44f5bf677282308b959411c416da2b5b08db2062 (patch)
treef350d7a16c3c3c431e2744ae321d781b27641413 /src/Makefile.am
parent9b78fc83dbd29b5594431b1c49b7d13865141aaa (diff)
support lookups via language servers (LSP)HEADmaster-fmsbw-cimaster
* The main interface is the `FT` command. `FT` was an undocumented Video TECO command for etags/ctags lookups. I don't want to exactly copy its interface, though. * `FT` allows looking up symbol names, definitions and references. * ctags will be supported via ctags-lsp. LSP support is more powerful though and works without regenerating TAGS files all the time. The LSP will also allow you to customize auto-completions using SciTECO itself (i.e. by writing a language server in SciTECO). * For multiple results, `FT$` can be used to cycle through results - this should mimic repeated `S$` or `N$`. * `:FT...$` does a fuzzy search. IMHO it's not important to return a status integer instead. `FT` will only really be used in interactive mode. * Document synchronization is supported via hooks from ring.c and via Scintilla notifications. * Currently, the LSP communication is based on blocking GIOChannels. This means that a misbehaving hanging server could "lock up" the entire editor (FIXME). Only on ncurses you can always kill the subprocess by pressing CTRL+C. We need helper functions in spawn.c to read and write with interruptions. * The textDocument/didChange notification transmits not only all edits, but all files' contents as well during initial synchronization. Therefore it is optimized to write and JSON-escape data without copying them around in memory and without destroying the buffer gap. * Use $SCITECO_LSP to configure the language server. You can also use `tee` to capture stdin and stdout. Perhaps $SCITECO_LSP should be saved in .teco_session, so you can change it between projects? * $SCITECO_LSP_ROOT is used to point to the project's root directory. session.tes will set it up automatically.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ac58c7..fa6c0e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,8 @@ include $(top_srcdir)/contrib/scintilla.am
# FIXME: Common flags should be in configure.ac
AM_CFLAGS = -std=gnu11 -Wall -Wno-initializer-overrides -Wno-unused-value
-AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr -I$(top_srcdir)/contrib/terex
+AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr -I$(top_srcdir)/contrib/terex \
+ -I$(top_srcdir)/contrib/sj.h
AM_LDFLAGS =
if STATIC_EXECUTABLES
@@ -54,6 +55,7 @@ libsciteco_base_la_SOURCES = main.c sciteco.h list.h \
help.c help.h \
rb3str.c rb3str.h \
symbols.c symbols.h \
+ lsp.c lsp.h \
lexer.c lexer.h \
view.c view.h \
interface.c interface.h