<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: George C. G. Barbosa</title>
    <description>The latest articles on DEV Community by George C. G. Barbosa (@gcgbarbosa).</description>
    <link>https://dev.to/gcgbarbosa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F398217%2F0a304753-acdf-45f2-8064-0b2afe042eab.jpeg</url>
      <title>DEV Community: George C. G. Barbosa</title>
      <link>https://dev.to/gcgbarbosa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gcgbarbosa"/>
    <language>en</language>
    <item>
      <title>How to enable syntax highlighting and auto-completion for NS-3 in Doom Emacs?</title>
      <dc:creator>George C. G. Barbosa</dc:creator>
      <pubDate>Mon, 15 Aug 2022 01:41:03 +0000</pubDate>
      <link>https://dev.to/gcgbarbosa/how-to-enable-syntax-highlighting-and-auto-completion-for-ns-3-in-doom-emacs-54g1</link>
      <guid>https://dev.to/gcgbarbosa/how-to-enable-syntax-highlighting-and-auto-completion-for-ns-3-in-doom-emacs-54g1</guid>
      <description>&lt;p&gt;If doom is your favorite editor and you want to work on ns-3 with doom then follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Have doom emacs and ns-3 installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure your &lt;code&gt;init.el&lt;/code&gt; file has cc with lsp enabled:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(cc +lsp)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You will need to generate a file called &lt;code&gt;compile_commands.json&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Depending on your version of ns-3 you might use waf or cmake for that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;on cmake, add the following to your cmake compilation command:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ...

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;on waf, the document is automatically generated inside the &lt;code&gt;build&lt;/code&gt; folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Move the &lt;code&gt;compile_commands.json&lt;/code&gt; file to the root of your &lt;code&gt;ns3&lt;/code&gt; folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enjoy your autocompletion:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ATevmDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1660527250695/Tcd-TeaFQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ATevmDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1660527250695/Tcd-TeaFQ.png" alt="2022-08-14-18:33:27.png" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can use &lt;code&gt;g d&lt;/code&gt; to jump to the definition of an identifier.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
