emacs/var/elfeed/db/data/8d/8deffc712e0b5697673b71d6dea23c0ad811bf52
2022-01-03 12:49:32 -06:00

38 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>I have been pretty busy since my last update here, but that does not mean I
havent had the time to explore a couple of things for my everyday Emacs usage.</p>
<p>Lately I had to deal with some Java and some JavaScript. No fancy libraries on
top of them, no languages built upon them, just plain, old Java and JavaScript.
I took that as a chance to familiarize myself with
<a href="https://microsoft.github.io/language-server-protocol/">LSP</a> and especially with
<a href="https://github.com/joaotavora/eglot">Eglot</a>, one of the two (to my knowledge)
packages that add LSP support to Emacs. Why Eglot and not
<a href="https://github.com/emacs-lsp/lsp-mode">lsp-mode</a>? Simple: I like how Eglot
leverages <code class="language-plaintext highlighter-rouge">project.el</code> and Flymake, tools I heavily rely on, and I also like how
quickly it enabled me to type Java and JavaScript code.</p>
<div class="language-emacs-lisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nv">add-hook</span> <span class="ss">'java-mode-hook</span> <span class="nf">#'</span><span class="nv">eglot-ensure</span><span class="p">)</span>
<span class="p">(</span><span class="nv">add-hook</span> <span class="ss">'js-mode-hook</span> <span class="nf">#'</span><span class="nv">eglot-ensure</span><span class="p">)</span>
</code></pre></div></div>
<p>Neat, huh?</p>
<p>Eglot works well with Company, Xref, and ElDoc, so coding in Java finally makes
sense in Emacs. Granted, I havent used it on a big project and I am sure the
likes of IntelliJ IDEA and Eclipse do wonders, but none of them has the editing
capabilities or the openness to infinite customization that Emacs offers.</p>
<p>Another tool that entered my day-to-day computing is the built-in
version-control system, or VC for short. My love for
<a href="https://www.manueluberti.eu/emacs/2017/11/09/magit/">Magit</a> is well-known, but
on my way to a vanilla Emacs appreciation I thought I could give VC a try. It
turns out most of the things I need to do with my Git-versioned projects can be
done from <code class="language-plaintext highlighter-rouge">vc-dir</code>. This means that instead of <kbd>C-x g</kbd> for
<code class="language-plaintext highlighter-rouge">magit-status</code> I have been using <kbd>C-x p v</kbd> for <code class="language-plaintext highlighter-rouge">project-vc-dir</code>. When
its time to get my hands dirty with some advanced Git-fu, Magit is always next
to me.</p>
<p>One thing should be obvious here: Magit is more powerful and feature rich than
the built-in VC, so I do not intend to drop Magit as quickly I dropped
Projectile and Flycheck. Why dont I just use Magit, then, you ask. For the same
reason I tried Eglot instead of installing Eclipse, Id reply. Curiosity will
not kill any cat in my house.</p>