<?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: LmanTW</title>
    <description>The latest articles on DEV Community by LmanTW (@lman_tw).</description>
    <link>https://dev.to/lman_tw</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%2F1833900%2F1395108b-c4c4-460c-ab0c-0ee3943350da.jpeg</url>
      <title>DEV Community: LmanTW</title>
      <link>https://dev.to/lman_tw</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lman_tw"/>
    <language>en</language>
    <item>
      <title>So... I created yet another Neovim plugin</title>
      <dc:creator>LmanTW</dc:creator>
      <pubDate>Sat, 14 Sep 2024 07:06:09 +0000</pubDate>
      <link>https://dev.to/lman_tw/so-i-created-yet-another-neovim-plugin-29ho</link>
      <guid>https://dev.to/lman_tw/so-i-created-yet-another-neovim-plugin-29ho</guid>
      <description>&lt;p&gt;This year I switched to Neovim after watching too many &lt;a href="https://www.youtube.com/@ThePrimeagen" rel="noopener noreferrer"&gt;Primagen&lt;/a&gt;'s videos, and to be honest I think everyone should try it! The experience is quite different from your average IDEs, and you might find out that you enjoy the feeling of coding without the need for a mouse!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is the first time I'm writing something like this, I'm not native and am still learning English. Apology for all the spilling and grammar mistakes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why Neovim
&lt;/h2&gt;

&lt;p&gt;Apart from watching too many videos about people using Neovim to code blazingly fast, I was using a &lt;a href="https://support.apple.com/en-us/111958" rel="noopener noreferrer"&gt;Macbook Pro from 2012&lt;/a&gt; and just imagine running a Electron app (VS Code) on it.&lt;/p&gt;

&lt;p&gt;You can do so many things with Neovim, like playing &lt;a href="https://github.com/alec-gibson/nvim-tetris" rel="noopener noreferrer"&gt;Tetris&lt;/a&gt; and applying &lt;a href="https://github.com/Eandrju/cellular-automaton.nvim" rel="noopener noreferrer"&gt;Cellular Automata&lt;/a&gt; to your code. These are mostly useless but it really shows the freedom Neovim offers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lua is Cool
&lt;/h2&gt;

&lt;p&gt;When I first tried Lua I don't really like the language, mainly because how the syntax looks and it missing a lot of built-in APIs I'm used to having in JavaScript. Like the fact that you need to make your own &lt;a href="https://stackoverflow.com/questions/9168058/how-to-dump-a-table-to-console" rel="noopener noreferrer"&gt;table logging function&lt;/a&gt; is just crazy to me.&lt;/p&gt;

&lt;p&gt;But after I made my own plugin, I must emit that the language is actually pretty fun to work with, using it with the type annotations is even better! The built-in APIs Lua provides are just enough to accomplish everything you need without being bloated.&lt;/p&gt;

&lt;p&gt;This means you need to write more utility functions base on your needs, which I think is a good thing. Those functions shouldn't take you too long to implement, and doing so gives you more control over your program.&lt;/p&gt;

&lt;h2&gt;
  
  
  I made a Plugin
&lt;/h2&gt;

&lt;p&gt;When I was trying to find a way to switch between colorschemes, I discovered &lt;a href="https://github.com/zaldih/themery.nvim" rel="noopener noreferrer"&gt;Themery.nvim&lt;/a&gt; a colorscheme switcher with a live preview. It's an amazing plugin at its job, but I found it a bit annoying that I need to add my colorscheme to my plugin manager and then add it to a colorscheme switcher. So I made my own plugin to solve this problem!&lt;/p&gt;

&lt;h1&gt;
  
  
  Themify.nvim
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filruqrck80blet6u2dxk.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filruqrck80blet6u2dxk.jpg" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A colorscheme manager and switcher designed for Neovim. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The plugin is inspired by &lt;a href="https://github.com/zaldih/themery.nvim" rel="noopener noreferrer"&gt;Themery.nvim&lt;/a&gt; and &lt;a href="https://github.com/folke/lazy.nvim" rel="noopener noreferrer"&gt;Lazy.nvim&lt;/a&gt;, and it offers a simple way of managing and switching your colorschemes. Check out the &lt;a href="https://github.com/LmanTW/themify.nvim" rel="noopener noreferrer"&gt;Github Repository&lt;/a&gt; to learn more about Themify.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎨 Easily install and manage your colorschemes.&lt;/li&gt;
&lt;li&gt;🔍 Explore and preview colorschemes directly in Neovim..&lt;/li&gt;
&lt;li&gt;⚡️ Optimized startup time with lazy-loaded colorschemes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;Using &lt;a href="https://github.com/folke/lazy.nvim" rel="noopener noreferrer"&gt;Lazy.nvim&lt;/a&gt; as an example. You just need to add Themify as a plugin and specify the colorschemes you want!&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="p"&gt;{&lt;/span&gt;
  &lt;span class="s1"&gt;'lmantw/themify.nvim'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="n"&gt;lazy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;priority&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;999&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="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'folke/tokyonight.nvim'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Yazeed1s/minimal.nvim'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s1"&gt;'sho-87/kanagawa-paper.nvim'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

      &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'master'&lt;/span&gt;
    &lt;span class="p"&gt;}&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;h2&gt;
  
  
  The downsides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Colorschemes with dependencies are not supported, this decision was made to maintain the simplicity of the codebase.&lt;/li&gt;
&lt;li&gt;Might start slowly when handling a lot of colorschemes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;I really enjoy the process of making this plugin, knowing that someone will benefit from it is just truly amazing. If you have a cool idea of a plugin, I encourage you to make it a reality!&lt;/p&gt;

&lt;p&gt;Thank you for reading this! As I mentioned earlier, this is my first time writing something like this, so please let me know if there's anything I could improve!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This post is in fact written with the help of ChatGPT, though none of the content was generated by it. I'm just using it as a tool to fix my weird zoomer writing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;The Themify Repository&lt;/li&gt;
&lt;li&gt;My Github Profile&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Updates
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;2024/9/24&lt;/code&gt; | Added the colorscheme database and the explore page.&lt;/p&gt;

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