tagls is a language server based on gtags.
Almost all modern editors have great support to LSP, but language servers based on semantic are not always reliable (for example, in dynamic languages like Python).
On the other hand, the good old gtags has more comprehensive (sometimes verbose, though) result, but it is not the first class citizen of modern editors and is usually poorly supported.
A language server based on gtags can give you the best of both worlds.
Install tagls by pip3 install tagls
and register it in your code editor. For example, in coc.nvim:
"languageserver": {
"tagls": {
"command": "python3",
"args": ["-m", "tagls"],
"filetypes": [
"c",
"cpp",
"python"
],
"initializationOptions": {},
"settings": {}
}
}
- initialize (Auto create/update gtags tag files when opening a project in the editor)
- textDocument/didSave (auto update gtags tag files when a file is updated)
- textDocument/definition
- textDocument/references
- textDocument.documentSymbol
- workspace/symbol
- Per-feature configuration (e.g. disable every feature but 'textDocument/references')