From 2058691eeb5a4cf66cc074d82ae72cc53608f2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 25 Jun 2022 16:41:43 +0200 Subject: [PATCH] Enable clang_format only for cpp and c --- symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua b/symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua index bf2a8b9..165cb47 100644 --- a/symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua +++ b/symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua @@ -18,7 +18,9 @@ null_ls.setup({ null_ls.builtins.diagnostics.ktlint, -- C++ and C - null_ls.builtins.formatting.clang_format, + null_ls.builtins.formatting.clang_format.with({ + filetypes = { "cpp", "c" }, + }), -- Cmake null_ls.builtins.formatting.cmake_format,