Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Do I need 'hlargs.nvim' plugin?
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?
This vim plugin has worked for me for semantic highlighting: https://github.com/jackguo380/vim-lsp-cxx-highlight
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)
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.