<?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: kensyo</title>
    <description>The latest articles on DEV Community by kensyo (@kensyo).</description>
    <link>https://dev.to/kensyo</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%2F890974%2F0f4d5f3a-d165-466f-a032-25aea6d70ceb.png</url>
      <title>DEV Community: kensyo</title>
      <link>https://dev.to/kensyo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kensyo"/>
    <language>en</language>
    <item>
      <title>Update nvim-scrlbkun v1.1.0</title>
      <dc:creator>kensyo</dc:creator>
      <pubDate>Fri, 15 Jul 2022 10:51:05 +0000</pubDate>
      <link>https://dev.to/kensyo/update-nvim-scrlbkun-v110-4510</link>
      <guid>https://dev.to/kensyo/update-nvim-scrlbkun-v110-4510</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I recently posted &lt;a href="https://dev.to/kensyo/created-a-scrollbar-plugin-for-neovim-nvim-scrlbkun-1263"&gt;an article&lt;/a&gt; about the creation of a scrollbar plugin for neovim.&lt;/p&gt;

&lt;p&gt;The repositry is &lt;a href="https://github.com/kensyo/nvim-scrlbkun"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multicolumn feature
&lt;/h2&gt;

&lt;p&gt;Until now, only one line was reserved for display area at the right edge of windows, where components such as scrollbars, search, diagnostics, etc. were displayed together.&lt;/p&gt;

&lt;p&gt;However, when components overlap, only the components with the highest priority (A priority can be set for each component) is displayed, which sometimes makes the display difficult to see.&lt;/p&gt;

&lt;p&gt;This time, we added options to allow multiple lines to be reserved as the display area(the &lt;code&gt;width&lt;/code&gt; option), and to determine on which line of the reserved lines to display the component(the &lt;code&gt;draw_columns&lt;/code&gt; option for each component).&lt;/p&gt;

&lt;p&gt;Specify an integer for the &lt;code&gt;width&lt;/code&gt; option and an array for the &lt;code&gt;draw_columns&lt;/code&gt; options.&lt;/p&gt;

&lt;p&gt;It looks like the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sZVo9pmO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/9912146/179189284-ec10603e-a863-49c2-88db-2b2171f30d56.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sZVo9pmO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/9912146/179189284-ec10603e-a863-49c2-88db-2b2171f30d56.png" alt="multiplecolumn preview" width="880" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, the first column from the left is set to search, the second to git hunks, the third to diagnostics, and the scroll bar and cursor position are set to display in all columns.&lt;/p&gt;

&lt;p&gt;I hope this feature is useful for you.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>neovim</category>
    </item>
    <item>
      <title>Created a scrollbar plugin for neovim: nvim-scrlbkun</title>
      <dc:creator>kensyo</dc:creator>
      <pubDate>Tue, 12 Jul 2022 19:22:18 +0000</pubDate>
      <link>https://dev.to/kensyo/created-a-scrollbar-plugin-for-neovim-nvim-scrlbkun-1263</link>
      <guid>https://dev.to/kensyo/created-a-scrollbar-plugin-for-neovim-nvim-scrlbkun-1263</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JGMXgudA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/9912146/177551550-b4f8c112-1dc5-4fa5-b9eb-1b6fcfd8bf51.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JGMXgudA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/9912146/177551550-b4f8c112-1dc5-4fa5-b9eb-1b6fcfd8bf51.gif" alt="scrlbkun_preview1" width="880" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;I am using Neovim for programming.&lt;br&gt;
I was initially already using a certain scrollbar plugin, but it was very simple and could not display git, diagnostic or search results.&lt;br&gt;
I had never made a Neovim plugin before, but when I read the source of the plugin, I decided to make my first neovim plugin &lt;a href="https://github.com/kensyo/nvim-scrlbkun"&gt;nvim-scrlbkun&lt;/a&gt;, because it was not too big and I thought I could implement my own plugin based on it.&lt;/p&gt;

&lt;p&gt;nvim-scrlbkun displays the cursor position, the results of git, search, diagnostics in addition to a scrollbar itself, with the auto-hiding feature.&lt;/p&gt;

&lt;p&gt;I would be happy if you used it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;nvim-scrlbkun is written in lua.&lt;/p&gt;

&lt;p&gt;I had very little experience with lua, but it was very easy to use and I had no trouble understanding the functional aspects of the language. I was used to a language with classes, so the lack of class functionality was a bit painful for me.&lt;br&gt;
Personally, I find it very similar to JavaScript.&lt;/p&gt;

&lt;p&gt;nvim-scrilbkun displays a floating window at the right edge of each window, and draws elements such as search, git, diagnostics, on the floating window as virtual text.&lt;/p&gt;

&lt;p&gt;I thought about using only virtual text without floating windows, but gave up because the display collapses if there are long lines that are wrapped.&lt;/p&gt;

&lt;p&gt;I had a bit of trouble implementing the display of the search results, since the &lt;code&gt;v:hlsearch&lt;/code&gt;, an internal variable of Neovim, does not change at the moment of search, so I decided to delay rendering the results. It is a simple idea now, but it seemed like a very good idea when I first came up with it(I had to remove some resulting bugs, though).&lt;/p&gt;

&lt;h2&gt;
  
  
  Impressions after implementation
&lt;/h2&gt;

&lt;p&gt;Through this experience, I realized again that the best way to improve coding skills is to read codes excellent people write.&lt;br&gt;
I think it is a waste of time if you are struggling on your own, so there is no way you can avoid using github, where you can immediately see codes written by excellent people.&lt;/p&gt;

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