From 2418466658f3604572e58f603b8272dde0af5932 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 1 Sep 2025 18:40:49 +0200 Subject: [PATCH] fix(lsp/neovim): now clangd rules in the Makefile - The clangd file not needed to be on the repository so deleted it - The clangd rules in the Makefile allows u to create the files with ur current directory --- .clangd | 4 ---- Makefile | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) delete mode 100644 .clangd diff --git a/.clangd b/.clangd deleted file mode 100644 index 5f65c4b..0000000 --- a/.clangd +++ /dev/null @@ -1,4 +0,0 @@ -CompilerFlags: - Add: - - "-xc" - - "-I/Users/raphael/Documents/42_cursus/circle0/libft/includes" diff --git a/Makefile b/Makefile index a97fdcf..41730f7 100644 --- a/Makefile +++ b/Makefile @@ -164,7 +164,21 @@ footer: @printf "$(GOLD) '\"' '\"'$(END)\n" @printf ' $(GREY)The compilation is$(END) $(GOLD)finish$(END)\n $(GREY)Have a good $(END)$(GOLD)correction !$(END)\n' +clangd: + @printf "CompileFlags:\n" > ./.clangd + @printf " Add:\n" >> ./.clangd + @printf " - \"-xc\"\n" >> ./.clangd + @for FLAG in $(CXXFLAGS); do \ + printf " - \"$$FLAG\"\n" >> ./.clangd; \ + done + @printf " - \"-I"$(shell pwd)"/\"\n" >> .clangd; + @for file in $(INC_DIR); do \ + printf " - \"-I"$(shell pwd)"/"$$file"\"\n" >> .clangd; \ + done + @printf "\n" >> ./.clangd + @printf '$(GREY) Now parsing settings is set in $(END)$(GREEN)./.clangd$(END)\n' + # Phony -.PHONY: all bonus clean fclean re +.PHONY: all bonus clean fclean re footer header clangd -include ${OBJ:.o=.d}