diff --git a/HISTORY.rst b/HISTORY.rst index 6bb762e5..e3257bf1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ PlatformIO Core 5 ~~~~~~~~~~~~~~~~~~ - Added "Core" suffix when showing PlatformIO Core version using ``pio --version`` command +- Improved ``.ccls`` configuration file for Emacs, Vim, and Sublime Text integrations - Do not provide "intelliSenseMode" option when generating configuration for VSCode C/C++ extension 5.0.3 (2020-11-12) diff --git a/docs b/docs index 8d9e8ef0..abff14fb 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8d9e8ef02b730c01c39a6e9355ede0111b3eee81 +Subproject commit abff14fbf18a642653aa167cd1c69807a40ada5d diff --git a/platformio/ide/tpls/emacs/.ccls.tpl b/platformio/ide/tpls/emacs/.ccls.tpl index 232d2f8d..53c4afeb 100644 --- a/platformio/ide/tpls/emacs/.ccls.tpl +++ b/platformio/ide/tpls/emacs/.ccls.tpl @@ -1,22 +1,12 @@ -% import re -% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") -% cc_stds = STD_RE.findall(cc_flags) -% cxx_stds = STD_RE.findall(cxx_flags) -% -% {{ cxx_path }} -% if cc_stds: -{{"%c"}} -std=c{{ cc_stds[-1] }} -% end -% if cxx_stds: -{{"%cpp"}} -std=c++{{ cxx_stds[-1] }} -% end +{{"%c"}} {{ !cc_flags }} +{{"%cpp"}} {{ !cxx_flags }} % for include in filter_includes(includes): --I{{ include }} +-I{{ !include }} % end % for define in defines: --D{{ define }} +-D{{ !define }} % end diff --git a/platformio/ide/tpls/emacs/.clang_complete.tpl b/platformio/ide/tpls/emacs/.clang_complete.tpl deleted file mode 100644 index 6d8e70ed..00000000 --- a/platformio/ide/tpls/emacs/.clang_complete.tpl +++ /dev/null @@ -1,6 +0,0 @@ -% for include in filter_includes(includes): --I{{include}} -% end -% for define in defines: --D{{!define}} -% end diff --git a/platformio/ide/tpls/sublimetext/.ccls.tpl b/platformio/ide/tpls/sublimetext/.ccls.tpl index 232d2f8d..53c4afeb 100644 --- a/platformio/ide/tpls/sublimetext/.ccls.tpl +++ b/platformio/ide/tpls/sublimetext/.ccls.tpl @@ -1,22 +1,12 @@ -% import re -% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") -% cc_stds = STD_RE.findall(cc_flags) -% cxx_stds = STD_RE.findall(cxx_flags) -% -% {{ cxx_path }} -% if cc_stds: -{{"%c"}} -std=c{{ cc_stds[-1] }} -% end -% if cxx_stds: -{{"%cpp"}} -std=c++{{ cxx_stds[-1] }} -% end +{{"%c"}} {{ !cc_flags }} +{{"%cpp"}} {{ !cxx_flags }} % for include in filter_includes(includes): --I{{ include }} +-I{{ !include }} % end % for define in defines: --D{{ define }} +-D{{ !define }} % end diff --git a/platformio/ide/tpls/vim/.ccls.tpl b/platformio/ide/tpls/vim/.ccls.tpl index 39e29f87..53c4afeb 100644 --- a/platformio/ide/tpls/vim/.ccls.tpl +++ b/platformio/ide/tpls/vim/.ccls.tpl @@ -1,20 +1,10 @@ -% import re -% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") -% cc_stds = STD_RE.findall(cc_flags) -% cxx_stds = STD_RE.findall(cxx_flags) -% -% -clang +{{ cxx_path }} -% if cc_stds: -{{"%c"}} -std=c{{ cc_stds[-1] }} -% end -% if cxx_stds: -{{"%cpp"}} -std=c++{{ cxx_stds[-1] }} -% end +{{"%c"}} {{ !cc_flags }} +{{"%cpp"}} {{ !cxx_flags }} % for include in filter_includes(includes): --I{{ include }} +-I{{ !include }} % end % for define in defines: diff --git a/platformio/ide/tpls/vim/.clang_complete.tpl b/platformio/ide/tpls/vim/.clang_complete.tpl deleted file mode 100644 index 5db01b75..00000000 --- a/platformio/ide/tpls/vim/.clang_complete.tpl +++ /dev/null @@ -1,6 +0,0 @@ -% for include in filter_includes(includes): --I"{{include}}" -% end -% for define in defines: --D{{!define}} -% end diff --git a/platformio/ide/tpls/vim/.gcc-flags.json.tpl b/platformio/ide/tpls/vim/.gcc-flags.json.tpl deleted file mode 100644 index 153396fe..00000000 --- a/platformio/ide/tpls/vim/.gcc-flags.json.tpl +++ /dev/null @@ -1,9 +0,0 @@ -% _defines = " ".join(["-D%s" % d.replace(" ", "\\\\ ") for d in defines]) -{ - "execPath": "{{ cxx_path }}", - "gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }} {{ !_defines.replace('"', '\\"') }}", - "gccDefaultCppFlags": "-fsyntax-only {{! cxx_flags.replace(' -MMD ', ' ').replace('"', '\\"') }} {{ !_defines.replace('"', '\\"') }}", - "gccErrorLimit": 15, - "gccIncludePaths": "{{ ','.join(filter_includes(includes)) }}", - "gccSuppressWarnings": false -}