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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well, I don’t know the reason, but when I have opened it today, jump to definition has started working.</p>
<p>My problem right now is that my CPU is some times over 95%, and Spacemacs gets unresponsive a few seconds. I do believe that it can be related to Dyalizer.  How can I disable it to test if the problem is there?</p>
<p>Regards.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134635" 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/emacs-elixir-setup-configuration-wiki/19196/103">Post #102</a>
	                </div>
	            </div>
              <div id="likers-container-134635" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134635"
                     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 #102"></div>
  </section>
</div>
    <div class="postbit" id="134783" data-post-id="134783">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Your CPU will spike for up to 10-15min (can be even higher if it’s a big project) as dyalixer installs project dependencies and creates it’s cache the first time.</p>
<p>Is the CPU spike from initial project load or are you seeing it will into working on a project?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134783" 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/emacs-elixir-setup-configuration-wiki/19196/104">Post #103</a>
	                </div>
	            </div>
              <div id="likers-container-134783" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134783"
                     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 #103"></div>
  </section>
</div>
    <div class="postbit" id="134785" data-post-id="134785">
  <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>Not dialyzer, the language server will pull deps, compile them and build the initial PLT for dialyzer. The latter can be disabled, but I’m not quite sure how this is done in emacs, and also depends on the LS-client used…</p>
<p>But this will disable the dialyzer feature completely…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134785" 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/emacs-elixir-setup-configuration-wiki/19196/105">Post #104</a>
	                </div>
	            </div>
              <div id="likers-container-134785" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134785"
                     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 #104"></div>
  </section>
</div>
    <div class="postbit" id="134798" data-post-id="134798">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I wasn’t using Dialyzer with my prior configuration, so it’s not a big deal if I could disable it.</p>
<p>I think the problem is in Dialyzer because sometimes an error is shown on minibufer saying something like <code>ElixirLS Dialyzer had an error. If this happens repeatedly, set "elixirLS.dialyzerEnabled" to false in settings.json to disable it.</code></p>
<p>After that, CPU comes back to normal levels, but when I try coding again, CPU rocket out until 98 or 99 %. Then the error appears again.</p>
<p>Regards.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134798" 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/emacs-elixir-setup-configuration-wiki/19196/106">Post #105</a>
	                </div>
	            </div>
              <div id="likers-container-134798" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134798"
                     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 #105"></div>
  </section>
</div>
    <div class="postbit" id="137456" data-post-id="137456">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I added a section on how to disable Dialyzer.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="137456" data-batch-url="/posts/batch_likers">
                        3
                      </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/emacs-elixir-setup-configuration-wiki/19196/107">Post #106</a>
	                </div>
	            </div>
              <div id="likers-container-137456" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="137456"
                     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 #106"></div>
  </section>
</div>
    <div class="postbit" id="137497" data-post-id="137497">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Does anyone have Credo and lsp-mode working properly together with Flycheck? I have them sort of both working, but it seems like Credo only gets called when there is a state change with the lsp-ui checker. Once I get a credo warning, it won’t be dismissed until I get a compilation error and then clear that. Also I may not get a credo warning I should get if there is no compile error.</p>
<p>Relevant configs: (I’m using Spacemacs, 26.2, latest everything):</p>
<pre data-code-wrap="lisp"><code class="lang-lisp">  (add-hook 'elixir-mode-hook
    (lambda ()
      (flycheck-credo-setup)))

  (add-hook 'lsp-after-initialize-hook
            (lambda ()
              (flycheck-add-next-checker 'lsp-ui
                                         'elixir-credo)))
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="137497" 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/emacs-elixir-setup-configuration-wiki/19196/108">Post #107</a>
	                </div>
	            </div>
              <div id="likers-container-137497" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="137497"
                     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 #107"></div>
  </section>
</div>
    <div class="postbit" id="138037" data-post-id="138037">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t really understand elisp or the internals of Spacemacs, but this is the simplest way I managed to disable dialyzer globally, I think it’s working:</p>
<p>In .spacemacs, in <code>dotspacemacs/user-config</code>:</p>
<pre data-code-wrap="elisp"><code class="lang-elisp">  (add-hook 'lsp-after-initialize-hook
            (lambda ()
              (lsp--set-configuration `(:elixirLS (:dialyzerEnabled :json-false)))))
</code></pre>
<p>edit: No, I don’t think it actually works in the end, I can see <code>[ElixirLS Dialyzer]</code> lines in <code>*lsp-log*</code> anyways, I’d like to see some simple, foolproof solution.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="138037" 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/emacs-elixir-setup-configuration-wiki/19196/109">Post #108</a>
	                </div>
	            </div>
              <div id="likers-container-138037" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="138037"
                     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 #108"></div>
  </section>
</div>
    <div class="postbit" id="139741" data-post-id="139741">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hello everyone.<br>
Thanks for the great guide!</p>
<p>I’ve got an issue though. While with simple projects where <code>mix.exs</code> is in git root everything works fine.<br>
But when the project folder is in subfolder (for example, I use docker and prefer to have all of my docker files at top level, while project files in subfolder) autocompletion and dializer doesn’t work. It will properly autocomplete kernel and built-in functions but it does not autocomplete my <code>def</code> and <code>defp</code> functions at all.</p>
<p>As far as i know from working with python-language-server you can pass it the location of the project root folder. Is there such a thing in elixir-ls?</p>
<p>I use <code>lsp-mode</code> with <code>spacemacs</code> and lsp-elixir fork of <code>elixir-ls</code>.</p>
<p>Thanks in advance!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="139741" 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/emacs-elixir-setup-configuration-wiki/19196/110">Post #109</a>
	                </div>
	            </div>
              <div id="likers-container-139741" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="139741"
                     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 #109"></div>
  </section>
</div>
    <div class="postbit" id="139823" data-post-id="139823">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="axelson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/axelson/120/26351_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  axelson
                    <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 class="user-title">
									<span>Scenic Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/mpanarin" rel="nofollow">@Mpanarin</a> <img src="https://forum.elixirforum.com/images/emoji/apple/wave.png?v=15" title=":wave:" class="emoji" alt=":wave:" loading="lazy" width="20" height="20">, I’m glad that the guide was helpful for you!</p>
<p>I’ve created a small repo that should replicate the important bits of your setup.<br>
<code>/tmp/mix-example</code> is the git root and <code>/tmp/mix-example/elixir_app</code> is the elixir application.</p>
<p>When you first open a new Elixir file in the elixir application you should see a prompt to choose the root folder:<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/f/e/fe677a721e403a72ae9de013f1344b5aef573ef2.png" data-download-href="https://forum.elixirforum.com/uploads/default/fe677a721e403a72ae9de013f1344b5aef573ef2" title="lsp-mode-initial-root-selection" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/f/e/fe677a721e403a72ae9de013f1344b5aef573ef2.png" alt="lsp-mode-initial-root-selection" data-base62-sha1="AiyYGgxXmuAnjisjzHlbbtpqLo6" width="690" height="279" data-dominant-color="464646"><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">lsp-mode-initial-root-selection</span><span class="informations">870×353 19 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>Since your elixir project is not directly in your git root (<code>/tmp/mix-example</code>) you should select the “Import project by selecting root directory interactively” option. Then you choose the elixir project root:<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/d/6/d6b716110e05f11fd4bff2363b47f63b611591dc.png" data-download-href="https://forum.elixirforum.com/uploads/default/d6b716110e05f11fd4bff2363b47f63b611591dc" title="lsp-mode-choose-project-root" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/d/6/d6b716110e05f11fd4bff2363b47f63b611591dc.png" alt="lsp-mode-choose-project-root" data-base62-sha1="uDsrdGSbBdXg4rHbf6VviVI8EMY" width="690" height="267" data-dominant-color="444443"><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">lsp-mode-choose-project-root</span><span class="informations">872×338 13.9 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>If you’ve already made the selection for your project you can remove the matching path from the your <code>~/.emacs.d/.lsp-session-v1</code> file (there may be a way to edit it nicely from within Emacs but I’m not aware of 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="139823" 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/emacs-elixir-setup-configuration-wiki/19196/111">Post #110</a>
	                </div>
	            </div>
              <div id="likers-container-139823" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="139823"
                     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 #110"></div>
  </section>
</div>
    <div class="postbit" id="139871" data-post-id="139871">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>One thing though I think missing in alchemist. I’ve implemented it with custom function</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">(defun my-put-iex ()
  (interactive)
  (insert "require IEx; IEx.pry"))
(global-set-key (kbd "C-c a p i") 'my-put-iex)
</code></pre>
<p>It pastes <code>require IEx; IEx.pry</code> when you press <code>C-c a p i</code>.</p>
<p><code>C-c a</code> is for user-space functions.<br>
<code>p i</code> is for “paste IEx” <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="139871" 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/emacs-elixir-setup-configuration-wiki/19196/112">Post #111</a>
	                </div>
	            </div>
              <div id="likers-container-139871" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="139871"
                     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 #111"></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/19196/load_more?page=12">Load more posts (116 remaining)</a>
</div></template></turbo-stream>