Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2026 20:22:05 +0000
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c461fd03b598 - main - devel/ctags-lsp: Add port
Message-ID:  <69f3b9ed.4210e.66c2c647@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c461fd03b5981e9bbe15ad73dd161f232bab1723

commit c461fd03b5981e9bbe15ad73dd161f232bab1723
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2026-04-30 20:15:55 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2026-04-30 20:22:01 +0000

    devel/ctags-lsp: Add port
    
    This is an LSP that uses universal-ctags, making it both
    language-agnostic and compatible with the vast array of languages
    that uctags can parse.
    
    However, that also means that it's limited to the data in a tags file,
    meaning things like tracking references is off the table. But, it is,
    as the author notes, "better than nothing."
    
    Instructions for enabling the LSP in Neovim and Helix can be found
    at the WWW: https://github.com/netmute/ctags-lsp
---
 devel/Makefile                      |  1 +
 devel/ctags-lsp/Makefile            | 20 ++++++++++++++++++++
 devel/ctags-lsp/distinfo            |  5 +++++
 devel/ctags-lsp/files/patch-main.go | 11 +++++++++++
 devel/ctags-lsp/pkg-descr           |  9 +++++++++
 devel/ctags-lsp/pkg-message         |  8 ++++++++
 6 files changed, 54 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 46771a4003df..1b3717183446 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -537,6 +537,7 @@
     SUBDIR += csoap
     SUBDIR += cssc
     SUBDIR += ctags
+    SUBDIR += ctags-lsp
     SUBDIR += ctre
     SUBDIR += ctypes.sh
     SUBDIR += cunit
diff --git a/devel/ctags-lsp/Makefile b/devel/ctags-lsp/Makefile
new file mode 100644
index 000000000000..f4bde86b3660
--- /dev/null
+++ b/devel/ctags-lsp/Makefile
@@ -0,0 +1,20 @@
+PORTNAME=	ctags-lsp
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.11.0
+CATEGORIES=	devel
+
+MAINTAINER=	adamw@FreeBSD.org
+COMMENT=	LSP using universal-ctags as a backend
+WWW=		https://github.com/netmute/ctags-lsp
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	uctags:devel/universal-ctags
+
+USES=		go:modules
+GO_MODULE=	github.com/netmute/ctags-lsp
+
+PLIST_FILES=	bin/ctags-lsp
+
+.include <bsd.port.mk>
diff --git a/devel/ctags-lsp/distinfo b/devel/ctags-lsp/distinfo
new file mode 100644
index 000000000000..9a00426689c6
--- /dev/null
+++ b/devel/ctags-lsp/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1777579032
+SHA256 (go/devel_ctags-lsp/ctags-lsp-v0.11.0/v0.11.0.mod) = c9cbe1540ddf67f40b4264d6c0e71841ae8ab37f52e8136215f82dcc4a09348a
+SIZE (go/devel_ctags-lsp/ctags-lsp-v0.11.0/v0.11.0.mod) = 47
+SHA256 (go/devel_ctags-lsp/ctags-lsp-v0.11.0/v0.11.0.zip) = 74258f0fe09be02831fd64633eb6dec3891a8110e580bfed70224f4410af66de
+SIZE (go/devel_ctags-lsp/ctags-lsp-v0.11.0/v0.11.0.zip) = 23637
diff --git a/devel/ctags-lsp/files/patch-main.go b/devel/ctags-lsp/files/patch-main.go
new file mode 100644
index 000000000000..4682ed65eb8e
--- /dev/null
+++ b/devel/ctags-lsp/files/patch-main.go
@@ -0,0 +1,11 @@
+--- main.go.orig	2026-04-30 20:08:48 UTC
++++ main.go
+@@ -83,7 +83,7 @@ func parseFlags(args []string, output io.Writer) (*Con
+ 	}
+ 	flagset.BoolVar(&config.showVersion, "version", false, "")
+ 	flagset.BoolVar(&config.benchmark, "benchmark", false, "")
+-	flagset.StringVar(&config.ctagsBin, "ctags-bin", "ctags", "")
++	flagset.StringVar(&config.ctagsBin, "ctags-bin", "uctags", "")
+ 	flagset.StringVar(&config.tagfilePath, "tagfile", "", "")
+ 	flagset.StringVar(&config.languages, "languages", "", "")
+ 
diff --git a/devel/ctags-lsp/pkg-descr b/devel/ctags-lsp/pkg-descr
new file mode 100644
index 000000000000..47900b1f8df6
--- /dev/null
+++ b/devel/ctags-lsp/pkg-descr
@@ -0,0 +1,9 @@
+A Language Server Protocol (LSP) implementation using universal-ctags
+as backend, supporting 100+ languages.
+
+This won't replace your dedicated language server, and it doesn't try
+to. The goal is to have a "better than nothing" language server that's
+trivial to setup for any language.
+
+NOTE: This requires universal-ctags to be built with the JSON option
+enabled (which it is by default).
diff --git a/devel/ctags-lsp/pkg-message b/devel/ctags-lsp/pkg-message
new file mode 100644
index 000000000000..bab618cb2b65
--- /dev/null
+++ b/devel/ctags-lsp/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+message: <<EOM
+ctags-lsp requires universal-ctags built with the JSON option enabled.
+That option is enabled by default, and is enabled in the pkg from FreeBSD.
+EOM
+}
+]


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f3b9ed.4210e.66c2c647>