{"id":13897429,"url":"https://github.com/tweekmonster/deoplete-clang2","last_synced_at":"2025-04-15T05:57:59.902Z","repository":{"id":77044882,"uuid":"76525303","full_name":"tweekmonster/deoplete-clang2","owner":"tweekmonster","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-02T08:04:10.000Z","size":39,"stargazers_count":89,"open_issues_count":21,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-15T05:57:53.592Z","etag":null,"topics":["c","clang","cpp","deoplete","neovim","objc","objective-c","vim-plugins"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tweekmonster.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}},"created_at":"2016-12-15T04:57:30.000Z","updated_at":"2024-11-27T04:23:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"3997dded-2e10-4834-8dc3-a887a0633d58","html_url":"https://github.com/tweekmonster/deoplete-clang2","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/tweekmonster%2Fdeoplete-clang2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Fdeoplete-clang2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Fdeoplete-clang2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Fdeoplete-clang2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tweekmonster","download_url":"https://codeload.github.com/tweekmonster/deoplete-clang2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016325,"owners_count":21198832,"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":["c","clang","cpp","deoplete","neovim","objc","objective-c","vim-plugins"],"created_at":"2024-08-06T18:03:35.055Z","updated_at":"2025-04-15T05:57:59.885Z","avatar_url":"https://github.com/tweekmonster.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003ch1\u003edeoplete-clang2\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003csup\u003e\u003cem\u003e\u003ccode\u003eElectric Boogaloo\u003c/code\u003e\u003c/em\u003e\u003c/sup\u003e\u003c/h1\u003e\n\nThis is a `clang` completer for [deoplete.nvim][] that's faster than\n[deoplete-clang][].  Instead of using `libclang`, it just uses `clang -cc1`\nlike most other `clang` plugins.  Unlike other plugins, Objective-C was given a\nlittle more attention.\n\n![](https://cloud.githubusercontent.com/assets/111942/21212064/1851c006-c257-11e6-83a4-a3a96482ceaf.gif)\n\nIf you are like me, you:\n\n- want completions to be relatively easy to setup\n- are not entirely sure how to use `clang -cc1`\n- just want the damned completions\n  - for Objective-C\n    - with the ability to fill in method arguments without having an aneurysm\n    - and type `]` to wrap method calls (within reason)\n      - (you also think Xcode's method of doing this sucks)\n    - also, magically get completions for the MacOSX SDKs\n      - without Xcode\n        - on Linux\n\nThis was developed mainly to scratch an old itch.  I'm currently not committed\nto continuing development beyond fixing obvious bugs.  Pull requests to add\nuseful features are welcome, though.\n\nWith that said, you may want to keep an eye on [clang-server][] that @zchee is\nworking on.\n\n## Requirements\n\n- [Neovim][] or vim8  with if_python3\n- [deoplete.nvim][]\n- `clang`\n\nI'm using `clang 3.8.0`.  Lower versions may work, but are untested.\n\n**Vim8 support:**\n\n- install [nvim-yarp](https://github.com/roxma/nvim-yarp) plugin for Vim8. \n- install neovim python client: `pip install neovim`\n- install [vim-hug-neovim-rpc](https://github.com/roxma/vim-hug-neovim-rpc) plugin for Vim8. \n\n\n## Install\n\nFollow your package manager's instructions.\n\n\n## Usage\n\nCompletions will insert functions with argument placeholders in the form of\n`\u003c#Type var#\u003e`.  While the cursor is on a line with one of these placeholders,\npressing `\u003ctab\u003e` will enter select mode with the next placeholder selected.\nPressing `\u003ctab\u003e` again will move to the next placeholder and pressing `\u003cs-tab\u003e`\nwill cycle backwards.\n\nIn Objective-C sources, pressing `]` will try to place a `[` in the appropriate\nplace.  While it isn't perfect, it's a whole lot better than how Xcode works.\nYou will have the best results by avoiding nested multi-argument method calls.\n\n\n## Config\n\n**Note:** For simple projects, you probably don't need to configure anything.  You\ndefinitely shouldn't need to configure anything if your project uses a\n[compilation database][].\n\nCreate a `.clang` file at your project root.  You should be able to just paste\nmost of your compile flags in there (the parts that make sense at least).\nMainly, it should have the relevant `-I`, `-D`, `-F` flags.  The plugin will\ntry to fill in the blanks for system include paths and discard the flags that\nare causing completions to not work.\n\nYou can also use `let g:deoplete#sources#clang#flags = ['-Iwhatever', ...]` in\nyour nvim configs.\n\n`g:deoplete#sources#clang#executable` sets the path to the `clang` executable.\n\n`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this plugin\nto fill in the `g:neomake_\u003cfiletype\u003e_clang_maker` variable with the `clang`\nexecutable path and flags.  You will still need to enable it with\n`g:neomake_\u003cfiletype\u003e_enabled_makers = [\"clang\"]`.\n\n`g:deoplete#sources#clang#std` is a dict containing the standards you want to\nuse.  It's not used if you already have `-std=whatever` in your flags.  The\ndefaults are:\n\n```\n{\n    'c': 'c11',\n    'cpp': 'c++1z',\n    'objc': 'c11',\n    'objcpp': 'c++1z',\n}\n```\n\n`g:deoplete#sources#clang#preproc_max_lines` sets the maximum number of lines to\nsearch for a `#ifdef` or `#endif` line.  `#ifdef` lines are discarded to get\ncompletions within conditional preprocessor blocks.  The default is `50`,\nsetting it to `0` disables this feature.\n\n### MacOSX10.`_` SDK completions\n\n(You may find it funny that I haven't tested this on macOS)\n\nJust add `-darwin=10.XX` to your flags (where `XX` is the release, e.g.\n`10.8`).  It will be turned into the following flags:\n\n```\n-D__MACH__\n-D__MAC_OS_X_VERSION_MAX_ALLOWED=10XX\n-D__APPLE_CPP__\n-DTARGET_CPU_X86_64\n-fblocks\n-fasm-blocks\n-fno-builtin\n-isysroot\u003csdk_path\u003e\n-iframework\u003csdk_path\u003e/System/Library/Frameworks\n-isystem\u003csdk_path\u003e/usr/include\n```\n\nThe above is the minimum flags to get SDK completions without clang spewing a\nlitany of errors.  If you're working on a simple project, `-darwin=10.XX`\nshould be the only flag you need.\n\nOn macOS, the following directories are searched for the SDK:\n\n- `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs`\n- `/Developer/SDKs`\n- `~/Library/Developer/Frameworks` (download destination)\n\nOn non-macOS:\n\n- `$XDG_DATA_HOME/SDKs` or `~/.local/share/SDKs` (download destination)\n\nIf the SDK is not found on the system or SDK paths, it will be downloaded from\n[phracker/MacOSX-SDKs][] in the background.\n\n\n[deoplete.nvim]: https://github.com/Shougo/deoplete.nvim\n[deoplete-clang]: https://github.com/zchee/deoplete-clang\n[clang-server]: https://github.com/zchee/clang-server\n[Neovim]: https://github.com/neovim/neovim\n[compilation database]: http://clang.llvm.org/docs/JSONCompilationDatabase.html\n[phracker/MacOSX-SDKs]: https://github.com/phracker/MacOSX-SDKs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweekmonster%2Fdeoplete-clang2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftweekmonster%2Fdeoplete-clang2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweekmonster%2Fdeoplete-clang2/lists"}