Hello dear all this is my first time posting something in this forum.
Look, i ve been using VSCODE for a while doing some C++ coding. However, i decided to get rid of IDE’s and this stick to text editor.
let me clarify I DONT WANT TO USE SUBLIME TEXT AS IDE. what i want, is to make my C++ code and after compile it in my terminal (ubuntu 20.04).
well, according to this i was searching a way to get completion of C++ code, many people claims to use EASYCLANGCOMPLETE. However, when i started, the plugin does not provides the options to complete my code.
But let me tell you first that i have a large folder (software called OpenFoam) with thousands of headers files and CPP files. This software is for CFD (computational fluid dynamics).
Well, the software allows you to make your own C++ BUT USING THE HEADERS THAT HE ALREADY OWNS IT.
Here is where my problem arises. Because i am working in a forlder called “my_solver” located in “/home/OpenFoam/run” and the headers and cpp files that such mentioned software offers are in “/opt/openfoam8/<<<<-------- from here appears some other folders (more than hundred) with many headers and cpp files (more than thousand)”.
With that being said, i want to make my CPP file in the folder called my_solver. However, when i start typing, lets say an object FROM A CLASS that BELONGS to the SOFTWARE (folders), EASYCLANGCOMPLETE DOES NOT SHOW THE SUGGESTIONS.
And of course the SublimeLINTER-GCC detects almost everything that i wrote as mistakes. Because almost everything is called from the libraries from the folders of the software.
Let me mention that also i installed clang
Any suggestions?
What can i do about it? how to solve it?
i am moving to sublime text 3 because of its flexibility and lightweight compared to an IDE
Let me just clarify i am quite new using Sublime.
my settings for the EASYCLANGCOMPLETE are:
{
"common_flags" : [
// some example includes
"-I/usr/include",
"-I$project_base_path/src",
// this is needed to include the correct headers for clang
"-I/usr/lib/clang/$clang_version/include",
// For simple projects, you can add a folder where your current file is
"-I$file_path",
"-I/opt/openfoam8/src/finiteVolume/lnInclude",
],
"autocomplete_all" : true,
"header_to_source_mapping": [
// Look for related files in the header's directory:
"./",
// And in the "src" directory:
"../src/",
// And in the "source" directory:
"../source/",
"/opt/openfoam8/src/finiteVolume/lnInclude",
// Example: Use flags but only from the source file
// belonging to the header in question:
// "{stamp}.cpp",
// Example: Use flags from a file with an
// "exotic" file name suffix:
// "{stamp}.mycustomext
],
}
and the settings for the sbulime Linter, sublimeLinter-gcc are:
// SublimeLinter Settings - User
{
"linters":
{
"gcc": {
"disable": false,
"executable": ["gcc"],
"args": ["-fsyntax-only", "-std=c90"],
"I": [
"${file_path}/include",
"${folder}/include",
"/usr/local/include",
"/opt/openfoam8/src/finiteVolume/lnInclude",
],
"excludes": [],
},
"g++": {
"disable": false,
"executable": ["g++"],
"args": ["-fsyntax-only", "-std=c++17"],
"I": [
"${file_path}/include",
"${folder}/include",
"/usr/local/include",
"/opt/openfoam8/src/finiteVolume/lnInclude",
],
"excludes": [],
},
},
}
Thanks in advance