Skip to content
/ ctags_ls Public

A language server leveraging ctags as the backend.

License

Notifications You must be signed in to change notification settings

yowu/ctags_ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ctags_ls

ctags_ls is a simple language server implementation to use ctags in the editors that do not natively support it.

Note

This is not a full-featured language server and only supports basic functionalities such as goto definition, declaration, and implementation so far. It has been tested with Helix Editor and Zed Editor for C++ projects only.

Prerequisites

ctags_ls relies on readtags to read the tags file, so Universal Ctags is required.

Generating the Tags File

You need to generate tags file for your project before using the ctags_ls. By default, the tags file should be named tags and placed in the root of the workspace. However, you can specify your tags files from the initialization_options configuration.

Editor Configuration

Helix Editor

To configure ctags_ls with Helix for C++, add the following to your languages.toml:

[language-server.ctags_ls]
command = "path/to/ctags_ls"
config = { tags = ["tags", ".tags", "other tags file name"] }

[[language]]
name = "cpp"
language-servers = ["ctags_ls"]

Zed Editor

To configure ctags_ls with Zed for C++, add the following to your settings.json to hijack the clangd configuration:

{
  "lsp": {
    "clangd": {
      "binary": {
        "path": "path/to/ctags_ls",
        "arguments": []
      },
      "initialization_options": {
        "tags": [
          "tags",
          ".tags",
          "other tags file name"
        ]
      }
    }
  }
}

About

A language server leveraging ctags as the backend.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages