From c3847367f715ae41768f9f5aa32b050fe30172b9 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 21 Apr 2023 09:10:08 +0200 Subject: [PATCH] neovim: Add ccls --- users/simon/modules/neovim/default.nix | 1 + users/simon/modules/neovim/init.lua | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/users/simon/modules/neovim/default.nix b/users/simon/modules/neovim/default.nix index 4ae7117..51ec559 100644 --- a/users/simon/modules/neovim/default.nix +++ b/users/simon/modules/neovim/default.nix @@ -45,6 +45,7 @@ in extraPackages = with pkgs; [ unzip # zip.vim ] ++ (lib.optionals nixosConfig.sbruder.full [ + ccls gopls haskell-language-server jdt-language-server diff --git a/users/simon/modules/neovim/init.lua b/users/simon/modules/neovim/init.lua index ac25cd1..1a212f4 100644 --- a/users/simon/modules/neovim/init.lua +++ b/users/simon/modules/neovim/init.lua @@ -79,7 +79,7 @@ associate_filetype('*.vpy', 'python') -- vapoursynth scripts setup_filetype('bib', 1) setup_filetype('c', 4) -setup_filetype('cpp', 4) +setup_filetype('cpp', 2) setup_filetype('dockerfile', 4) setup_filetype('gitcommit', nil, 'colorcolumn=72') setup_filetype('go', 4, 'noexpandtab') @@ -279,6 +279,18 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', '', function() require("illuminate").next_reference{reverse=true,wrap=true} end, opts) end +lsp.ccls.setup { + on_attach = on_attach, + init_options = { + compilationDatabaseDirectory = 'build'; + index = { + threads = 0; + }; + clang = { + excludeArgs = {'-frounding-math'}; + }; + } +} lsp.gopls.setup { on_attach = on_attach, }