aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
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 /doc
parent9b78fc83dbd29b5594431b1c49b7d13865141aaa (diff)
support lookups via language servers (LSP)master-fmsbw-ci
* 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 'doc')
-rw-r--r--doc/sciteco.1.in10
-rw-r--r--doc/sciteco.7.template5
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in
index 9b4b112..858bf6d 100644
--- a/doc/sciteco.1.in
+++ b/doc/sciteco.1.in
@@ -391,6 +391,16 @@ for an example of how to integrate the X11 clipboard via
Integrating with Wayland and the Mac OS clipboards is of course also possible.
.
.LP
+.SCITECO_TOPIC "$SCITECO_LSP" "$SCITECO_LSP_ROOT"
+The \fBSCITECO_LSP\fP environment variable must be set to a language
+server command line if you would like to use the \fBFT\fP command for looking up
+symbols, definitions or references.
+The language server spawning works with UNIX98 shell emulation as well (bit 8
+in \fBED\fP flags), but will otherwise use the shell from \fBSHELL\fP or \fBCOMSPEC\fP.
+\fBSCITECO_LSP_ROOT\fP can be set to the root directory of the language server's
+workspace (defaults to current directory at the time of spawning).
+.
+.LP
.SCITECO_TOPIC "$GTK_CSD"
\# NOTE: Contrary to the GTK documentation, this is _not_ supported
\# natively yet. We have to implement it ourselves.
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index b62a371..14aee77 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -2591,6 +2591,11 @@ Suitable terminal fonts for icon support in Curses (see \fBED\fP flags):
Nerd Fonts
.UE
.TP
+The language server protocol (LSP):
+.UR https://microsoft.github.io/language-server-protocol/
+LSP specification and implementations
+.UE
+.TP
Gtk+ 3 documentation, containg details about its CSS support and syntax:
.UR https://docs.gtk.org/gtk3/css-overview.html
Overview of CSS in GTK