Need help with C/C++ setup for proper highlighting and LSP features

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. hlargs.nvim

    Highlight arguments' definitions and usages, using Treesitter

    Do I need 'hlargs.nvim' plugin?

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. mason-lspconfig.nvim

    Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.

    As I understand for semantic tokens based highlighting I need to configure some lsp server. For C++ there are two options: 'ccls' and 'clangd'. I haven't found 'ccls' support in mason-lspconfig. Does it mean I can't use it?

  4. vim-lsp-cxx-highlight

    Discontinued Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd

    This vim plugin has worked for me for semantic highlighting: https://github.com/jackguo380/vim-lsp-cxx-highlight

  5. nvim-lspconfig

    Quickstart configs for Nvim LSP

    Here is a code snippet to configure ccls in your lspconfig settings. You must install ccls manually and make sure it can be found in your $PATH (or adjust the cmd property with full path information)

  6. nvim

    I‘d recommend clangd over ccla as it is more actively maintained due to its popularity. As others have mentioned mason is optional but I use it because it tends to make the config more portable to other devices. You don‘t need to deactivate the treesitter or any internal highlighting. The only thing you need to be aware of with clangd is you need a compilation database, I usually symlink it to the toplevel directory of my project. Here is my config, most relevant is clangd.lua, cmake.lua (I only use cmake-tools.nvim at this point) and debugging.lua for integration with nvim-dap.

  7. InfluxDB

    InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Need help to set up the pbkit language server

    2 projects | /r/neovim | 21 Sep 2023
  • Option omnifunc is not set

    1 project | /r/neovim | 31 Aug 2023
  • SQL LSP dialect

    2 projects | /r/neovim | 4 Aug 2023
  • LSP tells me to enable auto-fetch in configurations, but I can't find any documentation on that option?

    1 project | /r/neovim | 3 Jul 2023
  • mason.nvim [Languages] WARNINGS

    1 project | /r/neovim | 1 Jul 2023

Did you know that Lua is
the 18th most popular programming language
based on number of references?