{"id":13479641,"url":"https://github.com/m-pilia/vim-ccls","last_synced_at":"2025-04-30T07:32:29.192Z","repository":{"id":41901546,"uuid":"177464127","full_name":"m-pilia/vim-ccls","owner":"m-pilia","description":"Vim plugin for the ccls language server","archived":false,"fork":false,"pushed_at":"2024-03-30T09:07:58.000Z","size":151,"stargazers_count":97,"open_issues_count":6,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-30T13:38:01.949Z","etag":null,"topics":["ccls","language-server-protocol","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-pilia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-24T20:14:56.000Z","updated_at":"2024-08-13T04:40:34.000Z","dependencies_parsed_at":"2024-10-30T13:43:09.560Z","dependency_job_id":null,"html_url":"https://github.com/m-pilia/vim-ccls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pilia%2Fvim-ccls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pilia%2Fvim-ccls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pilia%2Fvim-ccls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-pilia%2Fvim-ccls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-pilia","download_url":"https://codeload.github.com/m-pilia/vim-ccls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224202402,"owners_count":17272764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ccls","language-server-protocol","vim"],"created_at":"2024-07-31T16:02:20.680Z","updated_at":"2024-11-12T01:34:49.461Z","avatar_url":"https://github.com/m-pilia.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"vim-ccls: vim plugin for the ccls Language Server\n===============================================================\n[![Checks](https://github.com/m-pilia/vim-ccls/workflows/Checks/badge.svg)](https://github.com/m-pilia/vim-ccls/actions/workflows/checks.yml)\n[![codecov](https://codecov.io/gh/m-pilia/vim-ccls/branch/master/graph/badge.svg)](https://codecov.io/gh/m-pilia/vim-ccls/branch/master)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/m-pilia/vim-ccls/blob/master/LICENSE)\n![Docker hub](https://img.shields.io/docker/cloud/build/martinopilia/vim-ccls)\n\nThis plugin supports some additional methods provided by\n[ccls](https://github.com/MaskRay/ccls), which are not part of the standard\nLanguage Server Protocol (LSP). It does not implement a LSP client, but it\nrelies on an existing LSP plugin, adding on top of it the ccls-specific\nfeatures. Currently supported LSP clients are:\n\n* [ALE](https://github.com/w0rp/ale)\n* [coc.nvim](https://github.com/neoclide/coc.nvim)\n* [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim)\n* [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)\n* [vim-lsc](https://github.com/natebosch/vim-lsc)\n* [vim-lsp](https://github.com/prabirshrestha/vim-lsp)\n\nThe plugin implements a tree viewer to display call, inheritance, and member\nhierarchies. Trees are built lazily, fetching children only when it is needed\nto expand a sub-tree, allowing to handle large trees.\n\nThe call hierarchy allows to visualise a tree of functions calling the function\nunder the cursor (analogous to the Call Hierarchy View in Eclipse). Similarly,\nthe callee tree visualises a hierarchy in the opposite direction, showing\nfunctions being called.\n\nThe base/derived hierarchy allows to visualise inheritance trees for the class\nunder the cursor.\n\nThe member hierarchy allows to visualise a tree of members inside a type under\nthe cursor.\n\n![demo](https://user-images.githubusercontent.com/8300317/56425740-e14c7e00-62b5-11e9-8b83-d1d064fc3033.gif)\n\nInstallation\n============\n\nThis plugin can be installed with any vim plugin manager. One of the supported\nLanguage Server clients listed above needs to be installed and properly\nconfigured with ccls as language server in order for it to work.\n\nIf you have not done it already,\n[build](https://github.com/MaskRay/ccls/wiki/Build) and\n[install](https://github.com/MaskRay/ccls/wiki/Install) ccls, and configure\nyour LSP client to use it (example instructions in the ccls wiki):\n* [ALE](https://github.com/MaskRay/ccls/wiki/ALE)\n* [coc.nvim](https://github.com/MaskRay/ccls/wiki/coc.nvim)\n* [LanguageClient-neovim](https://github.com/MaskRay/ccls/wiki/LanguageClient-neovim)\n* [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig#ccls)\n* [vim-lsc](https://github.com/MaskRay/ccls/wiki/vim-lsc)\n* [vim-lsp](https://github.com/MaskRay/ccls/wiki/vim-lsp)\n\nIn order for ccls to work, make sure to correctly [set up your\nproject](https://github.com/MaskRay/ccls/wiki/Project-Setup), by either\nproviding a compilation database (`compile_commands.json`) or a `.ccls`\nconfiguration file.\n\nCommands\n========\n\nThe plugin provides the following commands. Hierarchy commands will open a\ntree-like buffer, while the other commands will populate the [quickfix\nlist](http://vimdoc.sourceforge.net/htmldoc/quickfix.html).\n\n* **CclsBase**:\n  Get a list of base classes for the symbol under the cursor.\n* **CclsBaseHierarchy**:\n  Get a tree of inheritance ancestors for the symbol under cursor.\n* **CclsDerived**:\n  Get a list of derived classes for the symbol under the cursor.\n* **CclsDerivedHierarchy**:\n  Get a tree of inheritance descendants for the symbol under cursor.\n* **CclsCallers**:\n  Get a list of functions calling the function under the cursor.\n* **CclsCallHierarchy**:\n  Get a hierarchy of functions calling the function under the cursor.\n* **CclsCallees**:\n  Get a list of functions called by the function under the cursor.\n* **CclsCalleeHierahy**:\n  Get a hierarchy of functions called by the function under the cursor.\n* **CclsMembers**/**CclsMemberFunctions**/**CclsMemberTypes**:\n  Get a lists of members for the symbol under cursor.\n* **CclsMemberHierarchy**/**CclsMemberFunctionHierarchy**/**CclsMemberTypeHierarchy**:\n  Get a tree of members for the symbol under cursor.\n* **CclsVars**:\n  Get a list of document variables.\n\nHierarchy commands accept an optional parameter `-float` to open the hierarchy\nin a floating window instead of a split (Neovim only).\n\nSettings\n========\n\nIt is possible to automatically close a tree buffer when jumping to a location:\n```vim\nlet g:ccls_close_on_jump = v:true\n```\n\nTo control how many levels of depth in the sub-tree are fetched for each\nrequest, when building a tree (a large value may make execution slow when\ngenerating large trees):\n```vim\nlet g:ccls_levels = 1\n```\n\nThe size and position of the tree window can be set:\n```vim\nlet g:ccls_size = 50\nlet g:ccls_position = 'botright'\nlet g:ccls_orientation = 'horizontal'\n```\n\nThe size of the floating window (Neovim only) can be controlled:\n```vim\nlet g:ccls_float_width = 50\nlet g:ccls_float_height = 20\n```\n\nThe following `\u003cPlug\u003e` mappings are available to interact with a tree buffer:\n```\n\u003cPlug\u003e(yggdrasil-toggle-node)\n\u003cPlug\u003e(yggdrasil-open-node)\n\u003cPlug\u003e(yggdrasil-close-node)\n\u003cPlug\u003e(yggdrasil-execute-node)\n```\n\nThe default key bindings are:\n```vim\nnmap \u003csilent\u003e \u003cbuffer\u003e o    \u003cPlug\u003e(yggdrasil-toggle-node)\nnmap \u003csilent\u003e \u003cbuffer\u003e \u003ccr\u003e \u003cPlug\u003e(yggdrasil-execute-node)\nnnoremap \u003csilent\u003e \u003cbuffer\u003e q :q\u003ccr\u003e\n```\n\nThey can be disabled and replaced with custom mappings:\n```vim\nlet g:yggdrasil_no_default_maps = 1\nau FileType yggdrasil nmap \u003csilent\u003e \u003cbuffer\u003e o \u003cPlug\u003e(yggdrasil-toggle-node)\n```\n\nDebugging\n=========\n\nIf you encounter any problem, the first step for troubleshooting is to enable\nlogging, by setting the following variable:\n\n```vim\nlet g:ccls_log_file = expand('~/my_log_file.txt')\n```\n\nLicense\n=======\n\nThis software is distributed under the MIT license. The full text of the license\nis available in the [LICENSE\nfile](https://github.com/m-pilia/vim-ccls/blob/master/LICENSE) distributed\nalongside the source code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-pilia%2Fvim-ccls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-pilia%2Fvim-ccls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-pilia%2Fvim-ccls/lists"}