From b5d3970e71bd1cd6dd69af60f89cf7ee4c504f78 Mon Sep 17 00:00:00 2001 From: caem Date: Tue, 10 Dec 2024 14:39:49 +0100 Subject: [PATCH] nvim: Switch to clangd and use libcxx to support c++23 headers For some fucking unknown reason the clang-tools package doesn't build with libcxx by default and thus doesn't have the print header from C++23 which I need. I also don't know if they're fucking using the gcc13 c++ stdlib because the gcc14 one FUCKING HAS THE HEADER. I lost hours of life which I am never going to get back to this fucking bullshit. --- dotfiles/nvim/lua/plugins/lsp/c.lua | 2 +- modules/packages/nvim.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dotfiles/nvim/lua/plugins/lsp/c.lua b/dotfiles/nvim/lua/plugins/lsp/c.lua index d22f0a6..d7e8bed 100644 --- a/dotfiles/nvim/lua/plugins/lsp/c.lua +++ b/dotfiles/nvim/lua/plugins/lsp/c.lua @@ -1,5 +1,5 @@ return function () - require"lspconfig".ccls.setup { + require"lspconfig".clangd.setup { capabilities = require"cmp_nvim_lsp".default_capabilities() } end diff --git a/modules/packages/nvim.nix b/modules/packages/nvim.nix index 392bf53..8ec4338 100644 --- a/modules/packages/nvim.nix +++ b/modules/packages/nvim.nix @@ -18,10 +18,12 @@ lua-language-server nodePackages.intelephense nodePackages.typescript-language-server - ccls + (llvmPackages_19.clang-tools.override { + enableLibcxx = true; + }) ripgrep nil - gcc + gcc14 basedpyright rust-analyzer zathura