1
0
forked from alex-eg/sex

serve the index over LSP

sex-lsp answers:
- hover,
- definition,
- completion,
- symbols,
- diagnostics.

--expand-lines and sex/expand return the C for a line
range. clangd is off unless --c-backend=clangd, and it is asked about
names the compiler never parsed.
This commit is contained in:
2026-11-11 07:41:03 +03:00
parent 7bbb8e19ac
commit 0aef571f68
7 changed files with 1032 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ all: sexc
include eggs.mk
# Each program, and the source it is built from
PROGRAMS = sexc=main.scm sextest=tools/sextest/sextest.scm sex-tests=tests/run.scm
PROGRAMS = sexc=main.scm sextest=tools/sextest/sextest.scm sex-tests=tests/run.scm sex-lsp=sex-lsp.scm
PROGRAM_NAMES = $(foreach p,$(PROGRAMS),$(firstword $(subst =, ,$(p))))
PROGRAM_OBJ = $(foreach p,$(PROGRAMS),$(patsubst %.scm,%.o,$(lastword $(subst =, ,$(p)))))
@@ -85,7 +85,7 @@ $(PROGRAM_NAMES):
# they import
SEX_TEST_PROGRAMS = $(wildcard tests/sex-programs/*.sex)
check run-tests: sexc sex-tests sextest
check run-tests: sexc sex-tests sextest sex-lsp
./sex-tests
./sextest --sexc=./sexc $(SEX_TEST_PROGRAMS)
@$(MAKE) --no-print-directory check-modules
@@ -98,6 +98,7 @@ check-modules check-exit-code check-command-line: check-%: sexc
install: all installdirs
$(INSTALL_PROGRAM) sexc $(DESTDIR)$(bindir)/sexc
$(INSTALL_PROGRAM) sex-lsp $(DESTDIR)$(bindir)/sex-lsp
$(INSTALL_DATA) $(SEX_LIB) $(DESTDIR)$(sexlibdir)
install-strip:
@@ -107,7 +108,7 @@ installdirs:
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(sexlibdir)
uninstall:
rm -f $(DESTDIR)$(bindir)/sexc
rm -f $(DESTDIR)$(bindir)/sexc $(DESTDIR)$(bindir)/sex-lsp
rm -f $(SEX_LIB:lib/%=$(DESTDIR)$(sexlibdir)/%)
-rmdir $(DESTDIR)$(sexlibdir)