neovim: Add ccls

This commit is contained in:
Simon Bruder 2023-04-21 09:10:08 +02:00
parent 9875b7cfbf
commit c3847367f7
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 14 additions and 1 deletions

View file

@ -45,6 +45,7 @@ in
extraPackages = with pkgs; [ extraPackages = with pkgs; [
unzip # zip.vim unzip # zip.vim
] ++ (lib.optionals nixosConfig.sbruder.full [ ] ++ (lib.optionals nixosConfig.sbruder.full [
ccls
gopls gopls
haskell-language-server haskell-language-server
jdt-language-server jdt-language-server

View file

@ -79,7 +79,7 @@ associate_filetype('*.vpy', 'python') -- vapoursynth scripts
setup_filetype('bib', 1) setup_filetype('bib', 1)
setup_filetype('c', 4) setup_filetype('c', 4)
setup_filetype('cpp', 4) setup_filetype('cpp', 2)
setup_filetype('dockerfile', 4) setup_filetype('dockerfile', 4)
setup_filetype('gitcommit', nil, 'colorcolumn=72') setup_filetype('gitcommit', nil, 'colorcolumn=72')
setup_filetype('go', 4, 'noexpandtab') setup_filetype('go', 4, 'noexpandtab')
@ -279,6 +279,18 @@ local on_attach = function(client, bufnr)
vim.keymap.set('n', '<a-p>', function() require("illuminate").next_reference{reverse=true,wrap=true} end, opts) vim.keymap.set('n', '<a-p>', function() require("illuminate").next_reference{reverse=true,wrap=true} end, opts)
end end
lsp.ccls.setup {
on_attach = on_attach,
init_options = {
compilationDatabaseDirectory = 'build';
index = {
threads = 0;
};
clang = {
excludeArgs = {'-frounding-math'};
};
}
}
lsp.gopls.setup { lsp.gopls.setup {
on_attach = on_attach, on_attach = on_attach,
} }