diff --git a/HISTORY.rst b/HISTORY.rst index ead20705..f8283452 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,8 +10,9 @@ PlatformIO Core 4.0 ~~~~~~~~~~~~~~~~~~ * Extend project environment configuration in "platformio.ini" with other sections using a new `extends `__ option (`issue #2953 `_) +* Generate ``.ccls`` LSP file for `Emacs `__ cross references, hierarchies, completion and semantic highlighting * Fixed an issue with project generator for `CLion IDE `__ when 2 environments were used (`issue #2824 `_) -* Fixed default PIO Unified Debugger configuration for `J-Link probe `__ +* Fixed default PIO Unified Debugger configuration for `J-Link probe `__ 4.0.3 (2019-08-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/emacs/.ccls.tpl b/platformio/ide/tpls/emacs/.ccls.tpl new file mode 100644 index 00000000..ad22fce7 --- /dev/null +++ b/platformio/ide/tpls/emacs/.ccls.tpl @@ -0,0 +1,22 @@ +% import re +% STD_RE = re.compile(r"\-std=[a-z\+]+(\d+)") +% cc_stds = STD_RE.findall(cc_flags) +% cxx_stds = STD_RE.findall(cxx_flags) +% +% +clang + +% if cc_stds: +{{"%c"}} -std=c{{ cc_stds[-1] }} +% end +% if cxx_stds: +{{"%cpp"}} -std=c++{{ cxx_stds[-1] }} +% end + +% for include in includes: +-I{{ include }} +% end + +% for define in defines: +-D{{ define }} +% end