<?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: Async hronous</title>
    <description>The latest articles on DEV Community by Async hronous (@asyncedd).</description>
    <link>https://dev.to/asyncedd</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%2F1029022%2Fa070b9e5-871a-43ed-b331-3924beaad912.png</url>
      <title>DEV Community: Async hronous</title>
      <link>https://dev.to/asyncedd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asyncedd"/>
    <language>en</language>
    <item>
      <title>What's nvim-treesitter?</title>
      <dc:creator>Async hronous</dc:creator>
      <pubDate>Sat, 25 Feb 2023 01:10:15 +0000</pubDate>
      <link>https://dev.to/asyncedd/whats-nvim-treesitter-1d7p</link>
      <guid>https://dev.to/asyncedd/whats-nvim-treesitter-1d7p</guid>
      <description>&lt;p&gt;&lt;em&gt;(Don't mind the cover image, I'm testing out stuff :P)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  👋 Introduction
&lt;/h2&gt;

&lt;p&gt;Do you don't like these default Neovim's Treesitter syntax?&lt;/p&gt;

&lt;p&gt;Do you want it to look like:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fasyncedd%2Fimages%2Fblob%2Fmain%2FezBndqI.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fasyncedd%2Fimages%2Fblob%2Fmain%2FezBndqI.png%3Fraw%3Dtrue" alt="why are you reading this" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fasyncedd%2Fimages%2Fblob%2Fmain%2FZx7DXVR.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fasyncedd%2Fimages%2Fblob%2Fmain%2FZx7DXVR.png%3Fraw%3Dtrue" alt="Why are you reading this :(" width="800" height="400"&gt;&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;I'm not explaining why it's better. Mainly because it's smarter. (wow, that didn't make sense)&lt;/p&gt;

&lt;p&gt;alright' nuf' talkin' and let's start 👷‍♀️ configuring!&lt;/p&gt;
&lt;h2&gt;
  
  
  🤨 Installing nvim-treesitter
&lt;/h2&gt;

&lt;p&gt;If you've been following along your file structure should look like...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/nvim/
├── init.lua
└── lua/
    ├── core/
    │   ├── init.lua
    │   └── options.lua
    └── keymaps/
        └── movement.lua
        └── ...
    └── plugins/
        └── colorscheme.lua
        └── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we're going to create a new &lt;code&gt;configs&lt;/code&gt; directory. (in the &lt;code&gt;lua&lt;/code&gt; directory) and in the configs directory, we're going to create sub directories for each "category" of a plugin's configuration. (e.g: UI related configurations in the &lt;code&gt;configs.ui&lt;/code&gt; directory, editor related configurations in the &lt;code&gt;configs.editor&lt;/code&gt; directory.)&lt;/p&gt;

&lt;p&gt;So now our file structure should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/nvim/
├── init.lua
└── lua/
    ├── core/
    │   ├── init.lua
    │   └── options.lua
    └── keymaps/
        └── movement.lua
        └── ...
    └── plugins/
        └── colorscheme.lua
        └── treesitter.lua
        └── ...
    └── configs/ &amp;lt;- This!
        └── ui/
        └── editor/
        └── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alright. Now just create a new module in out &lt;code&gt;plugins/&lt;/code&gt; directory named &lt;code&gt;treesitter.lua&lt;/code&gt; (it could be anything)&lt;br&gt;
And in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"nvim-treesitter/nvim-treesitter.lua"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"configs.editor.treesitter"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"BufReadPost"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  👷‍♀️ Configuring
&lt;/h2&gt;

&lt;p&gt;And in our &lt;code&gt;configs/editor&lt;/code&gt; directory create a new &lt;code&gt;treesitter.lua&lt;/code&gt; module (again)&lt;br&gt;
In it SLAM this in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;treesitter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;pcall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"nvim-treesitter.configs"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="n"&gt;treesitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="n"&gt;auto_install&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- Auto-install missing parsers. (once you open a file that requires it.)&lt;/span&gt;
    &lt;span class="n"&gt;highlight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Enable beautiful syntax highlighting!!!&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break this down. It &lt;code&gt;pcalls&lt;/code&gt; a &lt;code&gt;require&lt;/code&gt; statement that, wants a module called &lt;code&gt;nvim-treesitter&lt;/code&gt; more specifically, &lt;code&gt;nvim-treesitter.configs&lt;/code&gt;. It assigns it a local variable called &lt;code&gt;treesitter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then it setups &lt;code&gt;nvim-treesitter&lt;/code&gt; with some configuration.&lt;/p&gt;

&lt;p&gt;Now quit Neovim (if you can) using &lt;code&gt;:wqa&lt;/code&gt; (Of course, if you can.)&lt;br&gt;
And BAM, SUPER smart, beautiful syntax highlighting with the catppuccin colorscheme! Wait... Did you say "catppuccin"?&lt;br&gt;
Alright kthxbye, imma get some &lt;code&gt;catppuccin-mocha&lt;/code&gt;. &lt;code&gt;:wqa&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/asyncedd/nvim" rel="noopener noreferrer"&gt;Quick Plug&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Using lazy.nvim 💤 in our Neovim configuration</title>
      <dc:creator>Async hronous</dc:creator>
      <pubDate>Fri, 24 Feb 2023 13:38:57 +0000</pubDate>
      <link>https://dev.to/asyncedd/using-lazynvim-in-our-neovim-configuration-glg</link>
      <guid>https://dev.to/asyncedd/using-lazynvim-in-our-neovim-configuration-glg</guid>
      <description>&lt;h2&gt;
  
  
  👋 Introduction
&lt;/h2&gt;

&lt;p&gt;Alright! If you've been following along, we've configured some options and keymaps.&lt;br&gt;
Next, we're going to use &lt;a href="https://github.com/folke/lazy.nvim" rel="noopener noreferrer"&gt;lazy.nvim&lt;/a&gt;! &lt;br&gt;
It has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💤 Auto-magic lazy loading&lt;/li&gt;
&lt;li&gt;🔒 Lock files to keep track of plugin versions&lt;/li&gt;
&lt;li&gt;💪 Modular plugin structure&lt;/li&gt;
&lt;li&gt;😮 ... and more!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🏗 HOWTO: Bootstrap.
&lt;/h2&gt;

&lt;p&gt;It's quite easy to bootstrap &lt;a href="https://github.com/folke/lazy.nvim" rel="noopener noreferrer"&gt;lazy.nvim&lt;/a&gt;&lt;br&gt;
Create a new module named &lt;code&gt;lazy.lua&lt;/code&gt; and SLAM this code in it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;lazypath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s2"&gt;"/lazy/lazy.nvim"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fs_stat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lazypath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="s2"&gt;"git"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"clone"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--filter=blob:none"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"https://github.com/folke/lazy.nvim.git"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"--branch=stable"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- latest stable release&lt;/span&gt;
    &lt;span class="n"&gt;lazypath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rtp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;prepend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lazypath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just that!&lt;br&gt;
Now quit Neovim (if you can) and, start it back again. It should automatically install lazy.nvim.&lt;/p&gt;
&lt;h2&gt;
  
  
  ⁉ Question of the day!
&lt;/h2&gt;

&lt;p&gt;Q. 🤨 How do I install plugins?&lt;br&gt;
A. Just follow this crash course!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lazy"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;opts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;plugins&lt;/code&gt; would be an table of plugins and, &lt;code&gt;opts&lt;/code&gt; would be a table of options.&lt;br&gt;
ok kthxbye/&lt;/p&gt;

&lt;p&gt;I meant...&lt;/p&gt;
&lt;h2&gt;
  
  
  Crash course vII: Install the catppuccin colorscheme.
&lt;/h2&gt;

&lt;p&gt;I love &lt;a href="https://gtihub.com/catppuccin/nvim" rel="noopener noreferrer"&gt;catppuccin&lt;/a&gt;. So let's get some mocha!&lt;/p&gt;

&lt;p&gt;Create a new directory in &lt;code&gt;lua&lt;/code&gt; named &lt;code&gt;plugins&lt;/code&gt;. And in &lt;code&gt;/plugins/&lt;/code&gt; make a new module named &lt;code&gt;colorscheme.lua&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, our file thing should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/nvim/
├── init.lua
└── lua/
    ├── core/
    │   ├── init.lua
    │   └── options.lua
    └── keymaps/
        └── movement.lua
        └── ...
    └── plugins/
        └── colorscheme.lua
        └── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;colorscheme.lua&lt;/code&gt; it should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"catppuccin/nvim"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code should be self-explanatory but, I'll give you a "high level overview" of it.&lt;br&gt;
It returns a table.&lt;/p&gt;

&lt;p&gt;Whoo! Now in &lt;code&gt;lazy.lua&lt;/code&gt; replace whatever I gave you (&lt;code&gt;replace("lazy").setup(...)&lt;/code&gt;) with...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lazy"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"plugins"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we're all done! Now let's go get a cup of mocha.&lt;br&gt;
In our &lt;code&gt;setup/init.lua&lt;/code&gt;...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Some code here...&lt;/span&gt;
&lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;colorscheme&lt;/span&gt; &lt;span class="s2"&gt;"catppuccin"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it should show the beautiful catppuccin theme! Let's actually get a cup of mocha now!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Quick plug: &lt;a href="https://github.com/asyncedd/nvim" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;kthxbye :wq&lt;/p&gt;

</description>
      <category>translation</category>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A basic configuration of Neovim</title>
      <dc:creator>Async hronous</dc:creator>
      <pubDate>Fri, 24 Feb 2023 09:48:33 +0000</pubDate>
      <link>https://dev.to/asyncedd/a-basic-configuration-of-neovim-ohb</link>
      <guid>https://dev.to/asyncedd/a-basic-configuration-of-neovim-ohb</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hello, I felt as my Neovim configuration was bloated. So, today I'll be teaching you on how to configure your Neovim config, from scratch!&lt;/p&gt;

&lt;h2&gt;
  
  
  The layout of the configuration.
&lt;/h2&gt;

&lt;p&gt;(If you don't like something, feel free to change up some stuff!)&lt;br&gt;
First, if you haven't already go get Neovim from your favorite package manager(s) or &lt;a href="https://dev.to/asyncedd/building-neovim-from-source-1794"&gt;build Neovim from scratch (!)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, first we're going to set some basic Neovim options, keymaps and then we can go add some plugins!&lt;/p&gt;
&lt;h2&gt;
  
  
  Initalize your Neovim config.
&lt;/h2&gt;

&lt;p&gt;Go ahead and make a &lt;code&gt;nvim&lt;/code&gt; folder in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;*Nix systems: ~/.config/nvim (or your: &lt;code&gt;$XDG_CONFIG_HOME/nvim&lt;/code&gt;, if you set that up.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows: ~/AppData/Local/nvim&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've done that, go create an &lt;code&gt;init.lua&lt;/code&gt; in your &lt;code&gt;nvim&lt;/code&gt; configuration directory.&lt;/p&gt;

&lt;p&gt;Neovim 5.0+ provides users to write their Neovim configurations in Lua which is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast.&lt;/li&gt;
&lt;li&gt;Easy.&lt;/li&gt;
&lt;li&gt;And fun!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, nuf' talkin' and let's go write our Neovim configuration.&lt;/p&gt;

&lt;p&gt;We can write all our configuration in one big file. That'll work, but it'll be less easier to maintain. So, we can go break our Neovim configuration in multiple files.&lt;br&gt;
We can have a file structure like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.config/nvim/
├── init.lua
└── lua/
    ├── core/
    │   ├── init.lua
    │   └── options.lua
    └── keymaps/
        └── movement.lua
        └── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alright. In out &lt;code&gt;core/init.lua&lt;/code&gt; we're going to require the &lt;code&gt;core.options&lt;/code&gt; and &lt;code&gt;keymaps&lt;/code&gt; modules.&lt;br&gt;
using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"core.options"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"keymaps.movement"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code, it provided a &lt;code&gt;.setup()&lt;/code&gt; function. Because it looks cool.&lt;/p&gt;

&lt;p&gt;So, now...&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting options
&lt;/h2&gt;

&lt;p&gt;Let's set some options in our &lt;code&gt;core/options.lua&lt;/code&gt;!&lt;br&gt;
Here's how it could look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;opt&lt;/span&gt;

&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;undofile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Persistent undo's across all sessions&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="c1"&gt;-- Don't write backups. (For better performance and, unneeded non-sense&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;writebackup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="c1"&gt;-- Don't write backups.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shiftwidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="c1"&gt;-- Insert two shifts per indent.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;autoindent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Copy indent from the current line when starting a new line&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;breakindent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Indent wrapped lines too.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;copyindent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Copy the structure of the existing lines' indents.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;expandtab&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Convert tabs to spaces.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;smartindent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Non-strict cindent.&lt;/span&gt;
&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="c1"&gt;-- Enable line numbers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'm not going into much detail on what these options do, but the comments should be self-explanatory&lt;/p&gt;

&lt;h2&gt;
  
  
  Keymaps.
&lt;/h2&gt;

&lt;p&gt;Neovim provides an interface for it's user to create new key mappings. I'll give you an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nvim_set_keymap&lt;/span&gt;

&lt;span class="c1"&gt;-- Move up/down on VISUAL line instead of a ACTUAL line&lt;/span&gt;
&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"n"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"j"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"v:count == 0 ? 'gj' : 'j'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;expr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;silent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"n"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"k"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"v:count == 0 ? 'gk' : 'k'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;expr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;silent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  That's it!
&lt;/h2&gt;

&lt;p&gt;That's it x2! In the next post, I'll show you how to install &lt;a href="https://github.com/folke/lazy.nvim" rel="noopener noreferrer"&gt;lazy.nvim&lt;/a&gt;. So be tuned! &lt;em&gt;(P.S this is the final result: &lt;a href="https://github.com/asyncedd/nvim" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>ai</category>
      <category>career</category>
    </item>
    <item>
      <title>Building Neovim from source</title>
      <dc:creator>Async hronous</dc:creator>
      <pubDate>Sat, 18 Feb 2023 01:40:02 +0000</pubDate>
      <link>https://dev.to/asyncedd/building-neovim-from-source-1794</link>
      <guid>https://dev.to/asyncedd/building-neovim-from-source-1794</guid>
      <description>&lt;h2&gt;
  
  
  Building neovim: A Comprehensive Guide
&lt;/h2&gt;

&lt;p&gt;neovim is a highly customizable and a lightweight text editor (it can be configured to something much more!)&lt;br&gt;
While it maybe installed to your system by using your favorite package manager, it is best used if you build it from source!&lt;br&gt;
So enough talking and let's start building 🧱!&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before you start building Neovim, you need some build dependencies installed on your system (psst you might need to update your package list by&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on Ubuntu/Debian!):&lt;/p&gt;

&lt;h3&gt;
  
  
  Ubuntu/Debian
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CentOS/RHEL/Fedora
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="nb"&gt;install &lt;/span&gt;ninja-build libtool autoconf automake cmake gcc gcc-c++ make pkgconfig unzip patch gettext curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  openSUSE
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;zypper &lt;span class="nb"&gt;install &lt;/span&gt;ninja libtool autoconf automake cmake gcc-c++ gettext-tools curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arch Linux
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; base-devel cmake unzip ninja tree-sitter curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Alpine Linux
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apk add build-base cmake automake autoconf libtool pkgconf coreutils curl unzip gettext-tiny-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Void Linux
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xbps-install base-devel cmake curl git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  FreeBSD
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pkg &lt;span class="nb"&gt;install &lt;/span&gt;cmake gmake libtool sha automake pkgconf unzip wget gettext curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  OpenBSD
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;doas pkg_add gmake cmake libtool unzip autoconf-2.69p2 automake-1.15p0 curl
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AUTOCONF_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2.69
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AUTOMAKE_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1.15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  OpenBSD
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;doas pkg_add gmake cmake libtool unzip autoconf-2.69p2 automake-1.15p0 curl
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AUTOCONF_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2.69
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AUTOMAKE_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1.15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MacOS/Homebrew
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;ninja libtool automake cmake pkg-config gettext curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Building neovim
&lt;/h2&gt;

&lt;p&gt;Once you have installed the dependencies, you can start building neovim. The following steps will guide you through the process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the neovim repository
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/neovim/neovim.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Navigate to the cloned repository
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;neovim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Build neovim
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   make &lt;span class="nv"&gt;CMAKE_BUILD_TYPE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;RelWithDebInfo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This might take some time, so you while you wait, you can go get a cup of Mocha ☕&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Neovim system wide
Great! You've build neovim. But now, you need to install it to your system
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Now if that's done finishing you should be able to start neovim by typing &lt;code&gt;neovim&lt;/code&gt; in your terminal of choice.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If Neovim is successfully installed, this command should start the editor.&lt;/p&gt;

&lt;p&gt;That's it! You've successfully built neovim from source!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run neovim
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   nvim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If Neovim is successfully installed, this command should start the editor.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Congratulations, you have successfully built Neovim from source! &lt;/p&gt;

</description>
      <category>neovim</category>
    </item>
  </channel>
</rss>
