Skip to content

Commit

Permalink
Generate .ccls LSP file for Emacs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Sep 3, 2019
1 parent 2c24294 commit 7a07a2e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ PlatformIO Core 4.0
~~~~~~~~~~~~~~~~~~

* Extend project environment configuration in "platformio.ini" with other sections using a new `extends <http://docs.platformio.org/page/projectconf/section_env_advanced.html#extends>`__ option (`issue #2953 <https://github.com/platformio/platformio-core/issues/2953>`_)
* Generate ``.ccls`` LSP file for `Emacs <https://docs.platformio.org/page/ide/emacs.html>`__ cross references, hierarchies, completion and semantic highlighting
* Fixed an issue with project generator for `CLion IDE <http://docs.platformio.org/page/ide/clion.html>`__ when 2 environments were used (`issue #2824 <https://github.com/platformio/platformio-core/issues/2824>`_)
* Fixed default PIO Unified Debugger configuration for `J-Link probe <http://docs.platformio.org/en/latest/plus/debug-tools/jlink.html>`__
* Fixed default PIO Unified Debugger configuration for `J-Link probe <http://docs.platformio.org/page/plus/debug-tools/jlink.html>`__

4.0.3 (2019-08-30)
~~~~~~~~~~~~~~~~~~
Expand Down
22 changes: 22 additions & 0 deletions platformio/ide/tpls/emacs/.ccls.tpl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7a07a2e

Please sign in to comment.