diff options
| author | Adam Weinberger <adamw@FreeBSD.org> | 2026-04-30 20:15:55 +0000 |
|---|---|---|
| committer | Adam Weinberger <adamw@FreeBSD.org> | 2026-04-30 20:22:01 +0000 |
| commit | c461fd03b5981e9bbe15ad73dd161f232bab1723 (patch) | |
| tree | 2c97082fd47bbc8194a62db6c6aaa093fd0916fe | |
| parent | df921199a5af49bcbbf46a70dd25d323099b9dbc (diff) | |
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
| -rw-r--r-- | devel/Makefile | 1 | ||||
| -rw-r--r-- | devel/ctags-lsp/Makefile | 20 | ||||
| -rw-r--r-- | devel/ctags-lsp/distinfo | 5 | ||||
| -rw-r--r-- | devel/ctags-lsp/files/patch-main.go | 11 | ||||
| -rw-r--r-- | devel/ctags-lsp/pkg-descr | 9 | ||||
| -rw-r--r-- | devel/ctags-lsp/pkg-message | 8 |
6 files changed, 54 insertions, 0 deletions
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 +} +] |
