feat: ctags_lsp #4399

This commit is contained in:
JINNOUCHI Yasushi 2026-04-23 23:25:23 +09:00 committed by GitHub
parent e146efacba
commit 766ebf8406
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

28
lsp/ctags_lsp.lua Normal file
View File

@ -0,0 +1,28 @@
---@brief
---
--- https://github.com/netmute/ctags-lsp
---
--- A simple LSP server wrapping universal-ctags. Provides completion,
--- go-to-definition, and document/workspace symbols. Useful as a generic
--- symbol provider for languages without a dedicated language server, or
--- as a fallback alongside other LSPs.
---
--- Requires `universal-ctags` to be installed and available in `$PATH`.
--- Pre-built binaries are at https://github.com/netmute/ctags-lsp/releases
--- (Homebrew: `brew install netmute/tap/ctags-lsp`).
---
--- The server is generic and does not declare default `filetypes`. Configure
--- the languages you want it to attach to:
---
--- ```lua
--- vim.lsp.config('ctags_lsp', {
--- filetypes = { 'lua', 'ruby', 'go' },
--- })
--- vim.lsp.enable('ctags_lsp')
--- ```
---@type vim.lsp.Config
return {
cmd = { 'ctags-lsp' },
root_markers = { 'tags', '.tags', '.git' },
}