<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="54672" data-post-id="54672">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JakeBecker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JakeBecker/120/11288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JakeBecker
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>(Cross-posted from my <a href="https://medium.com/@JakeBeckerCode/elixirls-0-2-better-builds-code-formatter-and-incremental-dialyzer-be70999ea3e7" rel="noopener nofollow ugc">blog</a>)</p>
<p>Some months ago, I released <a href="https://medium.com/@JakeBeckerCode/introducing-elixirls-the-elixir-language-server-d449bbbdfc01" rel="noopener nofollow ugc">ElixirLS</a>, an IDE “smartness” server for Elixir that powers a VS Code plugin. Now that Elixir 1.6 is looking fairly close to release, I figured it was time to update ElixirLS with some improvements — a new build system, code formatting, and an experimental, incremental Dialyzer server.</p>
<h3><a name="p-54672-rewritten-build-system-1" class="anchor" href="#p-54672-rewritten-build-system-1" aria-label="Heading link" rel="nofollow"></a>Rewritten build system</h3>
<p>The initial release of ElixirLS included a fork of Elixir 1.4’s compiler with some <a href="https://medium.com/@JakeBeckerCode/compiler-hacks-in-elixirls-6a6f04834f66" rel="noopener nofollow ugc">really nasty hacks</a> to get build warnings and errors to show up in the IDE. It didn’t work reliably at all — umbrella projects failed completely, for example. These hacks were necessary because there was no good way to get warning and error information from Mix.</p>
<p>I contributed some changes to Elixir 1.6 to report build diagnostics from compilers. The built-in compilers now conform to a new behaviour, <a href="https://hexdocs.pm/mix/master/Mix.Task.Compiler.html" rel="noopener nofollow ugc">Mix.Task.Compiler</a>, and return their status and diagnostics in a standardized way. If third-party compilers implement this behaviour, their warnings and errors will show up automatically in ElixirLS too.</p>
<p>This let me completely remove the custom compiler from ElixirLS, and builds are much more reliable now. If you’re using Elixir &gt;= 1.6, build diagnostics will show up automatically in the editor, but if you’re using a previous version, you’ll have to look at the text log from the extension to see build warnings and errors. Builds will run automatically when you save a file. If you want this to happen automatically when you type, turn on “autosave” in your IDE.</p>
<h3><a name="p-54672-code-formatting-2" class="anchor" href="#p-54672-code-formatting-2" aria-label="Heading link" rel="nofollow"></a>Code formatting</h3>
<p>Elixir 1.6 includes a code formatter akin to <code>Prettier</code> for Javascript or <code>gofmt</code> for Go. It uses logic similar to <code>inspect</code> to format your code for a certain target line length (by default 100 characters). I’ve found it a great help, and it’s available in ElixirLS 0.2 if you’re using Elixir &gt;= 1.6. Hit <code>Shift + Alt + F</code> in VS Code to format the current file. You can also set <code>editor.formatOnSave</code> to <code>true</code> if you want it to run every time you manually save a file.</p>
<h3><a name="p-54672-automatic-incremental-dialyzer-3" class="anchor" href="#p-54672-automatic-incremental-dialyzer-3" aria-label="Heading link" rel="nofollow"></a>Automatic, incremental Dialyzer</h3>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/2X/3/31922e3cd876a016365c45269a193059f741c380.png" data-download-href="https://forum.elixirforum.com/uploads/default/31922e3cd876a016365c45269a193059f741c380" title="dialyzer_screenshot.png" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/2X/3/31922e3cd876a016365c45269a193059f741c380_2_690x252.png" width="690" height="252" srcset="https://forum.elixirforum.com/uploads/default/optimized/2X/3/31922e3cd876a016365c45269a193059f741c380_2_690x252.png, https://forum.elixirforum.com/uploads/default/optimized/2X/3/31922e3cd876a016365c45269a193059f741c380_2_1035x378.png 1.5x, https://forum.elixirforum.com/uploads/default/optimized/2X/3/31922e3cd876a016365c45269a193059f741c380_2_1380x504.png 2x" data-dominant-color="333332"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">dialyzer_screenshot.png</span><span class="informations">1658×606 151 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Dialyzer is a static-analysis tool for Erlang and Elixir. It’s very useful for catching errors having to do with type-checking, but it can be a pain to use. The analysis is notoriously slow, so programmers typically use a tool like <a href="https://github.com/jeremyjh/dialyxir" rel="noopener nofollow ugc">Dialyxir</a> to maintain a PLT file (“Persistent Lookup Table”) with the saved analysis of files that change infrequently, such as core Elixir libraries or project dependencies. Once a PLT file is generated, Dialyzer’s analysis can be acceptably fast.</p>
<p>But even with tools like Dialyxir, using Dialyzer isn’t as fast or easy as it could be. For example, you need to determine which core Erlang or Elixir libraries such as <code>:ets</code> or <code>Mix</code> to include when you build your PLT. If you forget to include them, Dialyzer can’t give you useful analysis when you use them in your code. Dialyzer also re-analyzes all the modules in your project every time, even if no modules they reference have changed.</p>
<p>I took a stab at addressing these shortcomings, and ElixirLS 0.2 includes an experimental, incremental Dialyzer server that runs after each successful build. It uses undocumented, internal Dialyzer APIs, and it’s only compatible with Erlang/OTP 20. Future Erlang changes might break it, but so far it seems pretty reliable when used with OTP 20. You can set <code>elixirLS.dialyzerEnabled</code> to <code>false</code> to disable it if it breaks.</p>
<p>The server keeps a manifest similar to a PLT file in <code>.elixir_ls</code>. After each build, it looks for modules that changed and only re-analyzes modules when necessary. It also looks at the abstract code in your compiled beam files to determine which core Erlang or Elixir modules you use. If it sees that you’re referencing a library that isn’t already analyzed, it includes it in the analysis automatically. That way, you never get “unknown module” warnings and you don’t have to manually specify which applications you reference. It just works, and after the initial analysis, it’s quite fast.</p>
<p>You can change the setting <code>elixirLS.dialyzerWarnOpts</code> to control which warnings are shown, though Dialyzer’s defaults are good for most projects. You can also set the module attribute <code>@dialyzer</code> to show or hide warnings at a module or function level.</p>
<p>I’m hoping that fast and easy static analysis can smooth over the problems that come from dynamic typing. Getting immediate feedback when you pass an argument of the wrong type or write an incorrect pattern-match can take a lot of the guesswork out of writing correct code.</p>
<h3><a name="p-54672-installing-elixir-16-erlangotp-20-and-elixirls-4" class="anchor" href="#p-54672-installing-elixir-16-erlangotp-20-and-elixirls-4" aria-label="Heading link" rel="nofollow"></a>Installing Elixir 1.6, Erlang/OTP 20, and ElixirLS</h3>
<p>To take advantage of these new features, you’ll need Elixir 1.6 and Erlang/OTP 20. Since Elixir 1.6 isn’t released yet, you’ll need to install a pre-release version. I highly recommend installing both Elixir and Erlang from source using the tools <a href="https://github.com/taylor/kiex" rel="noopener nofollow ugc">kiex</a> and <a href="https://github.com/kerl/kerl" rel="noopener nofollow ugc">kerl</a>, respectively. That’ll let you use go-to-definition to jump from your code to the source code for core Elixir and Erlang modules. To install the latest pre-release Elixir with kiex, run <code>kiex install master</code>. To install ElixirLS, search “elixirls” in the extensions pane in VS Code. It’ll automatically use whatever Elixir and Erlang installations are the default in your shell.</p>
<p>Feedback is very welcome. Happy coding!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54672" data-batch-url="/posts/batch_likers">
                        10
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-54672" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54672"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #32"></div>
  </section>
</div>
    <div class="postbit" id="54695" data-post-id="54695">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Has <a href="https://github.com/JakeBecker/elixir-ls/issues/8" rel="nofollow">#8 elixir-ls requires elixir sources</a> been tackled by this update, or will there still be restarts of the LS in the console, that do not give any clue to what the problem actually is?</p>
<p>But I’m happy you are back! I feared already that developement staled or was abondoned, since you didn’t answer in the issues for months now…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54695" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-54695" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54695"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #33"></div>
  </section>
</div>
    <div class="postbit" id="54701" data-post-id="54701">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Gazler" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Gazler/120/1168_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Gazler
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Phoenix Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This new release looks really good!</p>
<p>I have been trying to get this working with Spacemacs and have had some moderate success.</p>
<p>These are my steps so far:</p>
<p>Clone elixir-ls and build it with <code>bash release.sh</code> I also had to change <code>apps/language_server/mix.exs</code> to set <code>embed_elixir</code> to true. You want to make sure the <code>language_server</code> binary is available in your $PATH.</p>
<pre><code>git clone https://github.com/emacs-lsp/lsp-mode some_dir/lsp-mode
</code></pre>
<p>Then I created this file in <code>some_dir/lsp-elixir/lsp-elixir.el</code></p>
<pre data-code-wrap="lisp"><code class="lang-lisp">(require 'lsp-mode)
(require 'elixir-mode)

(lsp-define-stdio-client 'elixir-mode "elixir" 'stdio #'(lambda () default-directory)
			 "Elixir Language Server"
			 '("language_server")
			 :ignore-regexps '("^langserver-elixir: reading on stdin, writing on stdout$"))

(provide 'lsp-elixir)
</code></pre>
<p>Add the following to <code>dotspacemacs/user-config</code>:</p>
<pre data-code-wrap="lisp"><code class="lang-lisp">  (add-to-load-path "/path/to/some_dir/lsp-mode")
  (add-to-load-path "/path/to-some_dir/lsp-elixir")
  (with-eval-after-load 'lsp-mode
    (require 'lsp-flycheck))
  (require 'lsp-mode)
  (require 'lsp-elixir)
  (add-hook 'elixir-mode #'lsp-mode)
</code></pre>
<p>When you are in an elixir-mode buffer, you can type <kbd>M+x</kbd> then <code>lsp-mode</code> to enable it for the buffer. This is as far as I have got with it. You can verify it is working with <kbd>M+x</kbd> then <code>lsp-capabilities</code>. If you use flycheck, you can do <kbd>M+x</kbd> then <code>flycheck-verify-setup</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54701" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-54701" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54701"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #34"></div>
  </section>
</div>
    <div class="postbit" id="54736" data-post-id="54736">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JakeBecker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JakeBecker/120/11288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JakeBecker
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s awesome!</p>
<p>Embedding Elixir in the escript does work, but it locks ElixirLS at the Elixir release you built it with. My intention was that it’d use whatever Elixir version the user has installed. When you run <code>release.sh</code>, it should copy a script <code>exscript.sh</code> into the release directory. If you run <code>./exscript.sh language_server</code>, the script looks for your system Elixir installation and sets <code>ERL_LIBS</code> before running the <code>language_server</code> escript. There’s an equivalent <code>exscript.bat</code> for Windows as well.</p>
<p>This approach doesn’t always work, and I’m going to look for a more robust way of doing it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54736" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-54736" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54736"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #35"></div>
  </section>
</div>
    <div class="postbit" id="54737" data-post-id="54737">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JakeBecker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JakeBecker/120/11288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JakeBecker
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Apologies for ignoring your bug report for so long! I took a long break from the project after the initial release, but I’m going to look into your issue now.</p>
<p>You shouldn’t need source code available to run the language server, most likely the launch script is failing to set <code>ERL_LIBS</code> correctly. I’ll reply on the Github issue once I’ve investigated.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54737" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-54737" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54737"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #36"></div>
  </section>
</div>
    <div class="postbit" id="54742" data-post-id="54742">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well, it works if sources are there, it doesn’t if they miss, even when set the correct ERL_LIBS by hand…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="54742" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-54742" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="54742"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #37"></div>
  </section>
</div>
    <div class="postbit" id="57571" data-post-id="57571">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JakeBecker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JakeBecker/120/11288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JakeBecker
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>(Cross posting from my <a href="https://medium.com/@JakeBeckerCode/announcing-ide-elixir-an-elixirls-plugin-for-atom-ide-379fb71f7b7f" rel="noopener nofollow ugc">blog</a>)</p>
<h1><a name="p-57571-announcing-ide-elixir-an-elixirls-plugin-for-atom-ide-1" class="anchor" href="#p-57571-announcing-ide-elixir-an-elixirls-plugin-for-atom-ide-1" aria-label="Heading link" rel="nofollow"></a>Announcing “ide-elixir”, an ElixirLS plugin for Atom IDE</h1>
<p>Some time ago, I released <a href="https://medium.com/@JakeBeckerCode/introducing-elixirls-the-elixir-language-server-d449bbbdfc01" rel="noopener nofollow ugc">ElixirLS</a>, an IDE “smartness” server that powers a VS Code plugin. It runs in a separate process from the IDE and communicates via Microsoft’s frontend-agnostic <a href="https://github.com/Microsoft/language-server-protocol" rel="noopener nofollow ugc">Language Server Protocol</a>.</p>
<p>Up until recently, pretty much only VS Code implemented the Language Server Protocol, but Atom <a href="https://blog.atom.io/2017/09/12/announcing-atom-ide.html" rel="noopener nofollow ugc">announced support for it</a> in September via the <a href="https://ide.atom.io/" rel="noopener nofollow ugc">Atom IDE</a> package. I’ve just released <a href="https://atom.io/packages/ide-elixir" rel="noopener nofollow ugc">ide-elixir</a>, an Atom IDE plugin powered by ElixirLS.</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/2X/2/26c82923a21f2bde5e6a23d2b3a1c15f5753391d.jpg" data-download-href="https://forum.elixirforum.com/uploads/default/26c82923a21f2bde5e6a23d2b3a1c15f5753391d" title="Screenshot" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/2X/2/26c82923a21f2bde5e6a23d2b3a1c15f5753391d_2_690x457.jpg" alt="Screenshot" width="690" height="457" srcset="https://forum.elixirforum.com/uploads/default/optimized/2X/2/26c82923a21f2bde5e6a23d2b3a1c15f5753391d_2_690x457.jpg, https://forum.elixirforum.com/uploads/default/optimized/2X/2/26c82923a21f2bde5e6a23d2b3a1c15f5753391d_2_1035x685.jpg 1.5x, https://forum.elixirforum.com/uploads/default/optimized/2X/2/26c82923a21f2bde5e6a23d2b3a1c15f5753391d_2_1380x914.jpg 2x" data-dominant-color="25282F"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot</span><span class="informations">2240×1486 130 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<h3><a name="p-57571-features-2" class="anchor" href="#p-57571-features-2" aria-label="Heading link" rel="nofollow"></a>Features</h3>
<p>It supports the big features from ElixirLS: Build diagnostics, auto-complete, code formatting, signature help, and automatic Dialyzer integration. Some of these features require Elixir 1.6 (which is still pre-release) or Erlang/OTP 20. I wrote about these features in my <a href="https://medium.com/@JakeBeckerCode/elixirls-0-2-better-builds-code-formatter-and-incremental-dialyzer-be70999ea3e7" rel="noopener nofollow ugc">blog post for ElixirLS 0.2</a>.</p>
<p>Atom IDE isn’t as mature as VS Code, but it’s getting there. Right now, the main features it’s missing are debugger support (which is technically not part of the Language Server Protocol), snippets in auto-complete, and an output log from the server. It seems slightly more prone to errors than VS Code, and the extension’s log messages are silently discarded, which can make it difficult to diagnose problems.</p>
<p>I don’t know whether debugger support is on the roadmap for Atom IDE. It’s not part of the Language Server Protocol, but it’s standardized in the similar <a href="https://code.visualstudio.com/docs/extensions/example-debuggers" rel="noopener nofollow ugc">Debug Adapter Protocol</a>. Atom IDE’s UI is based on <a href="https://nuclide.io/" rel="noopener nofollow ugc">Nuclide</a>, an IDE-like set of Atom extensions created by Facebook. Nuclide includes debugger support for several languages, so it’s possible that its UI could be merged into Atom IDE and integrated with the Debug Adapter Protocol. For the time being, though, you’ll need to stick to <a href="https://medium.com/@JakeBeckerCode/debugging-elixir-in-vs-code-400e21814614" rel="noopener nofollow ugc">using VS Code to debug Elixir</a>.</p>
<h3><a name="p-57571-installation-3" class="anchor" href="#p-57571-installation-3" aria-label="Heading link" rel="nofollow"></a>Installation</h3>
<p>To install ide-elixir, first <code>apm install</code> either <code>atom-ide-ui</code> or <code>nuclide</code>, then install the <code>ide-elixir</code> package. Happy coding!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57571" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-57571" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57571"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #38"></div>
  </section>
</div>
    <div class="postbit" id="58797" data-post-id="58797">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="michalmuskala" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/michalmuskala/120/20288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  michalmuskala
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I switched some time ago to VS Code and started using the extension and I have to say, really good job <a class="mention" href="/u/jakebecker" rel="nofollow">@JakeBecker</a>!</p>
<p>The feature that surprised me the most (since I thought it wouldn’t be useful) is probably the built-in dialyzer support that caught couple bugs for me, before I started running tests. The feature of automatically adding libraries to the analysis is also quite handy, though I wish it added some trace of that, since it means I probably need to add it in <code>mix.exs</code> to <code>extra_applications</code>.</p>
<p>Another very useful thing to have would be some test tasks to call it directly from the editor, it could integrate nicely with <code>mix test --stale</code> or running just a single test. I’m not sure, though, where would be place for this.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="58797" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-58797" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="58797"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #39"></div>
  </section>
</div>
    <div class="postbit" id="59799" data-post-id="59799">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JakeBecker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JakeBecker/120/11288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JakeBecker
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Glad you’re finding it useful!</p>
<p>It adds external libraries by actually walking the Erlang abstract forms and looking for function calls to modules that haven’t been analyzed yet, then doing a <code>:code.which/1</code> to find them, so they’ll be added if they’re in your code path somewhere. Any modules outside of your project folder are assumed not to change unless your Elixir or Erlang version changes. It’s not based on <code>extra_applications</code> or anything in your <code>mix.exs</code>.</p>
<p>I do want to add support for tests, which will likely require some modest changes to the testing Mix task code. The Mix task loads your test <code>.exs</code> files using the new APIs in <code>Kernel.ParallelCompiler</code> which returns warning and error diagnostics, so with some tweaking it should be possible to get diagnostics to show up in your test files. <code>mix test --stale</code> already behaves similarly to a Mix compiler in that it keeps a manifest, so we can save warnings for tests to that manifest as we do for the other compilers. A hotkey to run stale tests would be good but likely requires some client-specific code, so it would probably be easier to have a configuration setting to run stale tests automatically following a successful build.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="59799" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-59799" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="59799"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #40"></div>
  </section>
</div>
    <div class="postbit" id="63942" data-post-id="63942">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="edmz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/edmz/120/992_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  edmz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey, <a class="mention" href="/u/gazler" rel="nofollow">@Gazler</a>, is this still working for you?</p>
<p>It seems like lsp-mode has been update since your post. I’ve been struggling trying to make this work.</p>
<p>Thanks!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63942" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixirls-the-elixir-language-server/5857/42">Post #41</a>
	                </div>
	            </div>
              <div id="likers-container-63942" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63942"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #41"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/5857/load_more?page=5">Load more posts (205 remaining)</a>
</div></template></turbo-stream>