fix: 修复若干问题,添加java lsp

This commit is contained in:
2026-02-15 22:41:24 +08:00
parent eab464060b
commit 00b0d825d8
264 changed files with 1036 additions and 309 deletions

53
backend/Makefile Normal file
View File

@@ -0,0 +1,53 @@
GO ?= go
CMD_DIR := ./cmd/server
ifeq ($(OS),Windows_NT)
EXE := .exe
else
EXE :=
endif
BINARY := lsp-gateway$(EXE)
CONFIG_FILE ?= ./config.json
.PHONY: help tidy fmt vet test build run run-config clean
help:
@echo "Targets:"
@echo " make build Build binary ($(BINARY))"
@echo " make run Run service with current env"
@echo " make run-config Run service with CONFIG_FILE=$(CONFIG_FILE)"
@echo " make test Run all tests"
@echo " make fmt Format Go code"
@echo " make vet Run go vet"
@echo " make tidy Sync go.mod/go.sum"
@echo " make clean Remove built binary"
tidy:
$(GO) mod tidy
fmt:
$(GO) fmt ./...
vet:
$(GO) vet ./...
test:
$(GO) test ./...
build:
$(GO) build -o $(BINARY) $(CMD_DIR)
run:
$(GO) run $(CMD_DIR)
run-config:
CONFIG_FILE=$(CONFIG_FILE) $(GO) run $(CMD_DIR)
clean:
-$(GO) clean
ifeq ($(OS),Windows_NT)
-powershell -NoProfile -Command "if (Test-Path '$(BINARY)') { Remove-Item -Force '$(BINARY)' }"
else
-rm -f $(BINARY)
endif