<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>neovim &amp;mdash; Build stuff; Break stuff; Have fun!</title>
    <link>https://barfooz.xyz/tag:neovim</link>
    <description>barfooz.xyz</description>
    <pubDate>Mon, 01 Jun 2026 11:04:15 +0000</pubDate>
    <image>
      <url>https://i.snap.as/btoNrLSF.png</url>
      <title>neovim &amp;mdash; Build stuff; Break stuff; Have fun!</title>
      <link>https://barfooz.xyz/tag:neovim</link>
    </image>
    <item>
      <title>My Neovim Plugins #13 — YankCode</title>
      <link>https://barfooz.xyz/my-neovim-plugins-13-yankcode?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[When you share code with a colleage, it is always nice to have the line-numbers and filename + path added. With this little helper, it is just a keystroke away: YankCode.&#xA;&#xA;!--more--&#xA;&#xA;Config&#xA;&#xA;return {&#xA;&#x9;&#34;AaronLasseigne/yank-code&#34;,&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;yC&#34;, &#34;:YankCodecr&#34; },&#xA;&#x9;},&#xA;}&#xA;&#xA;---&#xA;&#xA;89 of #100DaysToOffload  &#xA;#log #neovim  &#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-13-yankcode&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p>When you share code with a colleage, it is always nice to have the line-numbers and filename + path added. With this little helper, it is just a keystroke away: <a href="https://github.com/AaronLasseigne/yank-code">YankCode</a>.</p>



<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;AaronLasseigne/yank-code&#34;,
	keys = {
		{ &#34;yC&#34;, &#34;:YankCode&lt;cr&gt;&#34; },
	},
}
</code></pre>

<hr/>

<p><strong>89</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a><br/>
<a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a><br/>
<em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-13-yankcode">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-13-yankcode</guid>
      <pubDate>Wed, 15 Jan 2025 19:29:39 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #12 — TreeSJ</title>
      <link>https://barfooz.xyz/my-neovim-plugins-12-treesj?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[A helper I don&#39;t want to miss is, treesj. Simply split or join blocks in Neovim. For example, if-conditions to shorthand ifs or objects. Sometime is it is annoying when you have one-liner code which you will extend, and have to split first by hand. Usually, the Formatter solves this on file save. But every so often you want it to do it by yourself.&#xA;&#xA;!--more--&#xA;&#xA;Config&#xA;&#xA;return {&#xA;&#x9;&#34;Wansmer/treesj&#34;,&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;leaderj&#34;, &#34;:TSJTogglecr&#34;, desc = &#34;TreeSJ&#34; },&#xA;&#x9;},&#xA;&#x9;dependencies = { &#34;nvim-treesitter/nvim-treesitter&#34; },&#xA;&#x9;opts = {&#xA;&#x9;&#x9;usedefaultkeymaps = false,&#xA;&#x9;},&#xA;}&#xA;&#xA;---&#xA;&#xA;86 of #100DaysToOffload  &#xA;#log #neovim  &#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-12-treesj&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p>A helper I don&#39;t want to miss is, <a href="https://github.com/Wansmer/treesj">treesj</a>. Simply split or join blocks in Neovim. For example, if-conditions to shorthand ifs or objects. Sometime is it is annoying when you have one-liner code which you will extend, and have to split first by hand. Usually, the <a href="https://barfooz.xyz/my-neovim-plugins-4-conform-nvim">Formatter</a> solves this on file save. But every so often you want it to do it by yourself.</p>



<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;Wansmer/treesj&#34;,
	keys = {
		{ &#34;&lt;leader&gt;j&#34;, &#34;:TSJToggle&lt;cr&gt;&#34;, desc = &#34;TreeSJ&#34; },
	},
	dependencies = { &#34;nvim-treesitter/nvim-treesitter&#34; },
	opts = {
		use_default_keymaps = false,
	},
}
</code></pre>

<hr/>

<p><strong>86</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a><br/>
<a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a><br/>
<em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-12-treesj">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-12-treesj</guid>
      <pubDate>Tue, 14 Jan 2025 10:45:36 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #11 — tfm.nvim</title>
      <link>https://barfooz.xyz/my-neovim-plugins-11-tfm-nvim?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I was a long-term ranger user. And I still love this file-manager for the terminal. But sadly, with my move to macOS, something was not working right, and I had no time to invest, to see what the problem. (Mostly graphical issues). So I was on a search for a new terminal file manager which also works inside Neovim. With tfm.nvim, found something nice because it supported multiple terminal file managers. And because yazi was here the default, and it worked well for me, I settled with yazi. Simpler than I initially thought. 😅&#xA;&#xA;!--more--&#xA;&#xA;Config&#xA;&#xA;return {&#xA;&#x9;&#34;rolv-apneseth/tfm.nvim&#34;,&#xA;&#x9;lazy = false,&#xA;&#x9;opts = {&#xA;&#x9;&#x9;replacenetrw = true,&#xA;&#x9;&#x9;ui = {&#xA;&#x9;&#x9;&#x9;height = 0.8,&#xA;&#x9;&#x9;&#x9;width = 0.9,&#xA;&#x9;&#x9;&#x9;y = 0.3,&#xA;&#x9;&#x9;},&#xA;&#x9;},&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;leadere&#34;, &#39;:lua require(&#34;tfm&#34;).open()CR&#39;, desc = &#34;TFM&#34; },&#xA;&#x9;},&#xA;}&#xA;&#xA;With leadere, I open yazi wrapped with tfm. I use it mostly to explore the project. If I look for a file, I&#39;ll use file name search or grep.&#xA;&#xA;---&#xA;&#xA;85 of #100DaysToOffload  &#xA;#log #neovim  &#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-11-tfm-nvim&#34;Discuss.../a_]]&gt;</description>
      <content:encoded><![CDATA[<p>I was a long-term <a href="https://github.com/ranger/ranger">ranger</a> user. And I still love this file-manager for the terminal. But sadly, with my move to macOS, something was not working right, and I had no time to invest, to see what the problem. (Mostly graphical issues). So I was on a search for a new terminal file manager which also works inside Neovim. With <a href="https://github.com/rolv-apneseth/tfm.nvim">tfm.nvim</a>, found something nice because it supported multiple terminal file managers. And because <a href="https://github.com/sxyazi/yazi">yazi</a> was here the default, and it worked well for me, I settled with yazi. Simpler than I initially thought. 😅</p>



<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;rolv-apneseth/tfm.nvim&#34;,
	lazy = false,
	opts = {
		replace_netrw = true,
		ui = {
			height = 0.8,
			width = 0.9,
			y = 0.3,
		},
	},
	keys = {
		{ &#34;&lt;leader&gt;e&#34;, &#39;:lua require(&#34;tfm&#34;).open()&lt;CR&gt;&#39;, desc = &#34;TFM&#34; },
	},
}
</code></pre>

<p>With <code>&lt;leader&gt;e</code>, I open yazi wrapped with tfm. I use it mostly to explore the project. If I look for a file, I&#39;ll use file name search or grep.</p>

<hr/>

<p><strong>85</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a><br/>
<a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a><br/>
<em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-11-tfm-nvim">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-11-tfm-nvim</guid>
      <pubDate>Mon, 13 Jan 2025 18:27:33 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #10 — nvim-treesitter</title>
      <link>https://barfooz.xyz/my-neovim-plugins-10-nvim-treesitter?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[With nvim-treesitter, I have a lot going on in my config. Let&#39;s split it up a bit. &#xA;&#xA;The basic treesitter config is mostly the default from their GitHub page but trimmed down. Because I will not have &#34;javascript&#34; to be ignored on install and also don&#39;t need to disable highlights. The other thing I use, which was before the playground, to show the treesitter objects under my cursor. Which is helpful for developing colorschemes.&#xA;!--more--&#xA;&#xA;Config: treesitter&#xA;&#xA;return {&#xA;&#x9;&#34;nvim-treesitter/nvim-treesitter&#34;,&#xA;&#x9;build = &#34;:TSUpdate&#34;,&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;leaderT&#34;, &#34;:Inspectcr&#34; },&#xA;&#x9;},&#xA;&#x9;config = function()&#xA;&#x9;&#x9;require(&#34;nvim-treesitter.configs&#34;).setup({&#xA;&#x9;&#x9;&#x9;ensureinstalled = &#34;all&#34;,&#xA;&#x9;&#x9;&#x9;syncinstall = false,&#xA;&#x9;&#x9;&#x9;autoinstall = true,&#xA;&#x9;&#x9;&#x9;ignoreinstall = {},&#xA;&#x9;&#x9;&#x9;highlight = { enable = true },&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;Config: treesitter-refactor&#xA;&#xA;To extend treesitter, you can add dependencies to the return object. For example refactor. Which I use mainly to rename things or highlight all definitions of a variable under my cursor.&#xA;return {&#xA;&#x9;-- ...&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-refactor&#34;,&#xA;&#x9;},&#xA;&#x9;-- ...&#xA;&#x9;config = function()&#xA;&#x9;&#x9;require(&#34;nvim-treesitter.configs&#34;).setup({&#xA;&#x9;&#x9;&#x9;-- ...&#xA;&#x9;&#x9;&#x9;refactor = {&#xA;&#x9;&#x9;&#x9;&#x9;highlightdefinitions = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;clearoncursormove = true,&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;smartrename = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keymaps = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;smartrename = &#34;grr&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;Config: treesitter-textobject&#xA;&#xA;The next dependency I use is textobjects. I installed it, just to change/delete text inner or outer of a template literal.&#xA;return {&#xA;&#x9;-- ...&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-textobjects&#34;,&#xA;&#x9;},&#xA;&#x9;-- ...&#xA;&#x9;config = function()&#xA;&#x9;&#x9;require(&#34;nvim-treesitter.configs&#34;).setup({&#xA;&#x9;&#x9;&#x9;-- ...&#xA;&#x9;&#x9;&#x9;textobjects = {&#xA;&#x9;&#x9;&#x9;&#x9;select = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;lookahead = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keymaps = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;af&#34;] = &#34;@function.outer&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;if&#34;] = &#34;@function.inner&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;ak&#34;] = &#34;@block.outer&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;ik&#34;] = &#34;@block.inner&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;-- Add this for template literals&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;a`&#34;] = { query = &#34;@templateliteral.outer&#34;, desc = &#34;Select outer part of a template literal&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;i`&#34;] = { query = &#34;@templateliteral.inner&#34;, desc = &#34;Select inner part of a template literal&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;To archive this, I also need to add query files:&#xA;;; ./nvim/queries/javascript/textobjects.scm&#xA;;; Capture the entire template literal block (outer)&#xA;((templatestring) @templateliteral.outer)&#xA;&#xA;;; Capture the inner text content only (inner)&#xA;((templatesubstitution) @templateliteral.inner)&#xA;&#xA;Config: treesitter-context&#xA;&#xA;A small little dependency I live is context. It will show you the context of an object or function you are in. Which is a nice helper on smaller screens.&#xA;&#xA;return {&#xA;&#x9;-- ...&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-context&#34;,&#xA;&#x9;},&#xA;&#x9;-- ...&#xA;&#x9;config = function()&#xA;&#x9;&#x9;-- ...&#xA;&#x9;&#x9;require(&#34;treesitter-context&#34;).setup({&#xA;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;maxlines = 5,&#xA;&#x9;&#x9;&#x9;multilinethreshold = 1,&#xA;&#x9;&#x9;&#x9;trimscope = &#34;inner&#34;,&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;Config: colorizer&#xA;&#xA;Nothing related to treesitter, but it has something to do with the code, so I thought the initialization fits good for colorizer. It simply highlights colors inside neovim.&#xA;&#xA;return {&#xA;&#x9;-- ...&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;norcalli/nvim-colorizer.lua&#34;,&#xA;&#x9;},&#xA;&#x9;-- ...&#xA;&#x9;config = function()&#xA;&#x9;&#x9;-- ...&#xA;&#x9;&#x9;require(&#34;colorizer&#34;).setup({&#xA;&#x9;&#x9;&#x9;&#34;lua&#34;,&#xA;&#x9;&#x9;&#x9;&#34;css&#34;,&#xA;&#x9;&#x9;&#x9;&#34;javascript&#34;,&#xA;&#x9;&#x9;&#x9;&#34;javascriptreact&#34;,&#xA;&#x9;&#x9;&#x9;&#34;scss&#34;,&#xA;&#x9;&#x9;&#x9;&#34;typescript&#34;,&#xA;&#x9;&#x9;&#x9;&#34;typescriptreact&#34;,&#xA;&#x9;&#x9;&#x9;&#34;yaml&#34;,&#xA;&#x9;&#x9;}, {&#xA;&#x9;&#x9;&#x9;css = true,&#xA;&#x9;&#x9;&#x9;cssfn = true,&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;Config: all together&#xA;&#xA;return {&#xA;&#x9;&#34;nvim-treesitter/nvim-treesitter&#34;,&#xA;&#x9;build = &#34;:TSUpdate&#34;,&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-textobjects&#34;,&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-context&#34;,&#xA;&#x9;&#x9;&#34;nvim-treesitter/nvim-treesitter-refactor&#34;,&#xA;&#x9;&#x9;&#34;norcalli/nvim-colorizer.lua&#34;,&#xA;&#x9;},&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;leaderT&#34;, &#34;:Inspectcr&#34; },&#xA;&#x9;},&#xA;&#x9;config = function()&#xA;&#x9;&#x9;require(&#34;nvim-treesitter.configs&#34;).setup({&#xA;&#x9;&#x9;&#x9;ensureinstalled = &#34;all&#34;,&#xA;&#x9;&#x9;&#x9;syncinstall = false,&#xA;&#x9;&#x9;&#x9;autoinstall = true,&#xA;&#x9;&#x9;&#x9;ignoreinstall = {},&#xA;&#x9;&#x9;&#x9;highlight = { enable = true },&#xA;&#x9;&#x9;&#x9;refactor = {&#xA;&#x9;&#x9;&#x9;&#x9;highlightdefinitions = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;clearoncursormove = true,&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;smartrename = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keymaps = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;smartrename = &#34;grr&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;textobjects = {&#xA;&#x9;&#x9;&#x9;&#x9;select = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;lookahead = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keymaps = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;af&#34;] = &#34;@function.outer&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;if&#34;] = &#34;@function.inner&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;ak&#34;] = &#34;@block.outer&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;ik&#34;] = &#34;@block.inner&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;-- Add this for template literals&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;a`&#34;] = { query = &#34;@templateliteral.outer&#34;, desc = &#34;Select outer part of a template literal&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;[&#34;i`&#34;] = { query = &#34;@templateliteral.inner&#34;, desc = &#34;Select inner part of a template literal&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;})&#xA;&#xA;&#x9;&#x9;require(&#34;colorizer&#34;).setup({&#xA;&#x9;&#x9;&#x9;&#34;lua&#34;,&#xA;&#x9;&#x9;&#x9;&#34;css&#34;,&#xA;&#x9;&#x9;&#x9;&#34;javascript&#34;,&#xA;&#x9;&#x9;&#x9;&#34;javascriptreact&#34;,&#xA;&#x9;&#x9;&#x9;&#34;scss&#34;,&#xA;&#x9;&#x9;&#x9;&#34;typescript&#34;,&#xA;&#x9;&#x9;&#x9;&#34;typescriptreact&#34;,&#xA;&#x9;&#x9;&#x9;&#34;yaml&#34;,&#xA;&#x9;&#x9;}, {&#xA;&#x9;&#x9;&#x9;css = true,&#xA;&#x9;&#x9;&#x9;cssfn = true,&#xA;&#x9;&#x9;})&#xA;&#xA;&#x9;&#x9;require(&#34;treesitter-context&#34;).setup({&#xA;&#x9;&#x9;&#x9;enable = true,&#xA;&#x9;&#x9;&#x9;maxlines = 5,&#xA;&#x9;&#x9;&#x9;multilinethreshold = 1,&#xA;&#x9;&#x9;&#x9;trimscope = &#34;inner&#34;,&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;---&#xA;&#xA;80 of #100DaysToOffload  &#xA;#log #neovim  &#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-10-nvim-treesitter&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p>With <a href="https://github.com/nvim-treesitter/nvim-treesitter">nvim-treesitter</a>, I have a lot going on in my config. Let&#39;s split it up a bit.</p>

<p>The basic treesitter config is mostly the default from their GitHub page but trimmed down. Because I will not have “javascript” to be ignored on install and also don&#39;t need to disable highlights. The other thing I use, which was before the playground, to show the treesitter objects under my cursor. Which is helpful for developing colorschemes.
</p>

<h2 id="config-treesitter" id="config-treesitter">Config: treesitter</h2>

<pre><code class="language-lua">return {
	&#34;nvim-treesitter/nvim-treesitter&#34;,
	build = &#34;:TSUpdate&#34;,
	keys = {
		{ &#34;&lt;leader&gt;T&#34;, &#34;:Inspect&lt;cr&gt;&#34; },
	},
	config = function()
		require(&#34;nvim-treesitter.configs&#34;).setup({
			ensure_installed = &#34;all&#34;,
			sync_install = false,
			auto_install = true,
			ignore_install = {},
			highlight = { enable = true },
		})
	end,
}
</code></pre>

<h2 id="config-treesitter-refactor" id="config-treesitter-refactor">Config: treesitter-refactor</h2>

<p>To extend treesitter, you can add dependencies to the return object. For example <a href="https://github.com/nvim-treesitter/nvim-treesitter-refactor">refactor</a>. Which I use mainly to rename things or highlight all definitions of a variable under my cursor.</p>

<pre><code class="language-lua">return {
	-- ...
	dependencies = {
		&#34;nvim-treesitter/nvim-treesitter-refactor&#34;,
	},
	-- ...
	config = function()
		require(&#34;nvim-treesitter.configs&#34;).setup({
			-- ...
			refactor = {
				highlight_definitions = {
					enable = true,
					clear_on_cursor_move = true,
				},
				smart_rename = {
					enable = true,
					keymaps = {
						smart_rename = &#34;grr&#34;,
					},
				},
			},
		})
	end,
}
</code></pre>

<h2 id="config-treesitter-textobject" id="config-treesitter-textobject">Config: treesitter-textobject</h2>

<p>The next dependency I use is <a href="https://github.com/nvim-treesitter/nvim-treesitter-textobjects">textobjects</a>. I installed it, just to change/delete text inner or outer of a template literal.</p>

<pre><code class="language-lua">return {
	-- ...
	dependencies = {
		&#34;nvim-treesitter/nvim-treesitter-textobjects&#34;,
	},
	-- ...
	config = function()
		require(&#34;nvim-treesitter.configs&#34;).setup({
			-- ...
			textobjects = {
				select = {
					enable = true,
					lookahead = true,
					keymaps = {
						[&#34;af&#34;] = &#34;@function.outer&#34;,
						[&#34;if&#34;] = &#34;@function.inner&#34;,
						[&#34;ak&#34;] = &#34;@block.outer&#34;,
						[&#34;ik&#34;] = &#34;@block.inner&#34;,
						-- Add this for template literals
						[&#34;a`&#34;] = { query = &#34;@template_literal.outer&#34;, desc = &#34;Select outer part of a template literal&#34; },
						[&#34;i`&#34;] = { query = &#34;@template_literal.inner&#34;, desc = &#34;Select inner part of a template literal&#34; },
					},
				},
			},
		})
	end,
}
</code></pre>

<p>To archive this, I also need to add query files:</p>

<pre><code class="language-scm">;; ./nvim/queries/javascript/textobjects.scm
;; Capture the entire template literal block (outer)
((template_string) @template_literal.outer)

;; Capture the inner text content only (inner)
((template_substitution) @template_literal.inner)
</code></pre>

<h2 id="config-treesitter-context" id="config-treesitter-context">Config: treesitter-context</h2>

<p>A small little dependency I live is <a href="https://github.com/nvim-treesitter/nvim-treesitter-context">context</a>. It will show you the context of an object or function you are in. Which is a nice helper on smaller screens.</p>

<pre><code class="language-lua">return {
	-- ...
	dependencies = {
		&#34;nvim-treesitter/nvim-treesitter-context&#34;,
	},
	-- ...
	config = function()
		-- ...
		require(&#34;treesitter-context&#34;).setup({
			enable = true,
			max_lines = 5,
			multiline_threshold = 1,
			trim_scope = &#34;inner&#34;,
		})
	end,
}
</code></pre>

<h2 id="config-colorizer" id="config-colorizer">Config: colorizer</h2>

<p>Nothing related to treesitter, but it has something to do with the code, so I thought the initialization fits good for <a href="https://github.com/norcalli/nvim-colorizer.lua">colorizer</a>. It simply highlights colors inside neovim.</p>

<pre><code class="language-lua">return {
	-- ...
	dependencies = {
		&#34;norcalli/nvim-colorizer.lua&#34;,
	},
	-- ...
	config = function()
		-- ...
		require(&#34;colorizer&#34;).setup({
			&#34;lua&#34;,
			&#34;css&#34;,
			&#34;javascript&#34;,
			&#34;javascriptreact&#34;,
			&#34;scss&#34;,
			&#34;typescript&#34;,
			&#34;typescriptreact&#34;,
			&#34;yaml&#34;,
		}, {
			css = true,
			css_fn = true,
		})
	end,
}
</code></pre>

<h2 id="config-all-together" id="config-all-together">Config: all together</h2>

<pre><code class="language-lua">return {
	&#34;nvim-treesitter/nvim-treesitter&#34;,
	build = &#34;:TSUpdate&#34;,
	dependencies = {
		&#34;nvim-treesitter/nvim-treesitter-textobjects&#34;,
		&#34;nvim-treesitter/nvim-treesitter-context&#34;,
		&#34;nvim-treesitter/nvim-treesitter-refactor&#34;,
		&#34;norcalli/nvim-colorizer.lua&#34;,
	},
	keys = {
		{ &#34;&lt;leader&gt;T&#34;, &#34;:Inspect&lt;cr&gt;&#34; },
	},
	config = function()
		require(&#34;nvim-treesitter.configs&#34;).setup({
			ensure_installed = &#34;all&#34;,
			sync_install = false,
			auto_install = true,
			ignore_install = {},
			highlight = { enable = true },
			refactor = {
				highlight_definitions = {
					enable = true,
					clear_on_cursor_move = true,
				},
				smart_rename = {
					enable = true,
					keymaps = {
						smart_rename = &#34;grr&#34;,
					},
				},
			},
			textobjects = {
				select = {
					enable = true,
					lookahead = true,
					keymaps = {
						[&#34;af&#34;] = &#34;@function.outer&#34;,
						[&#34;if&#34;] = &#34;@function.inner&#34;,
						[&#34;ak&#34;] = &#34;@block.outer&#34;,
						[&#34;ik&#34;] = &#34;@block.inner&#34;,
						-- Add this for template literals
						[&#34;a`&#34;] = { query = &#34;@template_literal.outer&#34;, desc = &#34;Select outer part of a template literal&#34; },
						[&#34;i`&#34;] = { query = &#34;@template_literal.inner&#34;, desc = &#34;Select inner part of a template literal&#34; },
					},
				},
			},
		})

		require(&#34;colorizer&#34;).setup({
			&#34;lua&#34;,
			&#34;css&#34;,
			&#34;javascript&#34;,
			&#34;javascriptreact&#34;,
			&#34;scss&#34;,
			&#34;typescript&#34;,
			&#34;typescriptreact&#34;,
			&#34;yaml&#34;,
		}, {
			css = true,
			css_fn = true,
		})

		require(&#34;treesitter-context&#34;).setup({
			enable = true,
			max_lines = 5,
			multiline_threshold = 1,
			trim_scope = &#34;inner&#34;,
		})
	end,
}
</code></pre>

<hr/>

<p><strong>80</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a><br/>
<a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a><br/>
<em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-10-nvim-treesitter">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-10-nvim-treesitter</guid>
      <pubDate>Sun, 05 Jan 2025 15:38:51 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #9 — lualine.nvim</title>
      <link>https://barfooz.xyz/my-neovim-plugins-9-lualine-nvim?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[lualine.nvim is one of the plugins, where I did a lot of configuration and like how it works. It is there and doesn&#39;t stand in my way.&#xA;&#xA;I use 5 sections. On the left, the current mode I&#39;m in. (Normal|Insert|Visual|Replace) followed by the file type icon provided by web-devicons. In the center is the filename with the relative path. On the right are diagnostics, to see quickly if there are warnings or errors in the file. The file format is following the diagnostics and I can&#39;t remember, why I have them there. Maybe a legacy. 😅 As last, some information, where my cursor in the file is.&#xA;&#xA;On top, I&#39;ve also added my custom colorscheme to lualine.&#xA;&#xA;It&#39;s simple and enough for me. 😎&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;nvim-lualine/lualine.nvim&#34;,&#xA;&#x9;dependencies = {&#xA;&#x9;&#x9;&#34;kyazdani42/nvim-web-devicons&#34;,&#xA;&#x9;&#x9;{ dir = &#34;~/workspace/kong&#34; },&#xA;&#x9;},&#xA;&#x9;config = function()&#xA;&#x9;&#x9;local theme = require(&#34;kong.colors&#34;)&#xA;&#x9;&#x9;local customfname = require(&#34;lualine.components.filename&#34;):extend()&#xA;&#x9;&#x9;local highlight = require(&#34;lualine.highlight&#34;)&#xA;&#x9;&#x9;local defaultstatuscolors = { saved = theme.g50, modified = theme.special }&#xA;&#xA;&#x9;&#x9;function customfname:init(options)&#xA;&#x9;&#x9;&#x9;customfname.super.init(self, options)&#xA;&#x9;&#x9;&#x9;self.statuscolors = {&#xA;&#x9;&#x9;&#x9;&#x9;saved = highlight.createcomponenthighlightgroup(&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{ fg = defaultstatuscolors.saved },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#34;filenamestatussaved&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;self.options&#xA;&#x9;&#x9;&#x9;&#x9;),&#xA;&#x9;&#x9;&#x9;&#x9;modified = highlight.createcomponenthighlightgroup(&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{ fg = defaultstatuscolors.modified },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#34;filenamestatusmodified&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;self.options&#xA;&#x9;&#x9;&#x9;&#x9;),&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;if self.options.color == nil then&#xA;&#x9;&#x9;&#x9;&#x9;self.options.color = &#34;&#34;&#xA;&#x9;&#x9;&#x9;end&#xA;&#x9;&#x9;end&#xA;&#xA;&#x9;&#x9;function customfname:updatestatus()&#xA;&#x9;&#x9;&#x9;local data = customfname.super.updatestatus(self)&#xA;&#x9;&#x9;&#x9;data = highlight.componentformathighlight(&#xA;&#x9;&#x9;&#x9;&#x9;vim.bo.modified and self.statuscolors.modified or self.statuscolors.saved&#xA;&#x9;&#x9;&#x9;) .. data&#xA;&#x9;&#x9;&#x9;return data&#xA;&#x9;&#x9;end&#xA;&#xA;&#x9;&#x9;require(&#34;lualine&#34;).setup({&#xA;&#x9;&#x9;&#x9;options = {&#xA;&#x9;&#x9;&#x9;&#x9;theme = &#34;kong&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;sectionseparators = &#34;&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;componentseparators = &#34;&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;globalstatus = true,&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;sections = {&#xA;&#x9;&#x9;&#x9;&#x9;lualinea = { &#34;mode&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;lualineb = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#34;filetype&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;colored = false,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;icononly = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;padding = { left = 2, right = 2 },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;lualinec = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#34;%=&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;customfname,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;filestatus = true,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;path = 1,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;lualinex = { &#34;diff&#34;, &#34;diagnostics&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;lualiney = {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#34;fileformat&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;padding = { left = 2, right = 2 },&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;&#x9;lualinez = { &#34;progress&#34;, &#34;location&#34; },&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;---&#xA;&#xA;78 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-9-lualine-nvim&#34;Discuss.../a_]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://github.com/nvim-lualine/lualine.nvim">lualine.nvim</a> is one of the plugins, where I did a lot of configuration and like how it works. It is there and doesn&#39;t stand in my way.</p>

<p><img src="https://i.snap.as/1rhqloCk.jpg" alt=""/></p>

<p>I use 5 sections. On the left, the current mode I&#39;m in. (Normal|Insert|Visual|Replace) followed by the file type icon provided by <a href="https://github.com/kyazdani42/nvim-web-devicons">web-devicons</a>. In the center is the filename with the relative path. On the right are diagnostics, to see quickly if there are warnings or errors in the file. The file format is following the diagnostics and I can&#39;t remember, why I have them there. Maybe a legacy. 😅 As last, some information, where my cursor in the file is.</p>

<p>On top, I&#39;ve also added my custom colorscheme to lualine.</p>

<p>It&#39;s simple and enough for me. 😎</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;nvim-lualine/lualine.nvim&#34;,
	dependencies = {
		&#34;kyazdani42/nvim-web-devicons&#34;,
		{ dir = &#34;~/workspace/kong&#34; },
	},
	config = function()
		local theme = require(&#34;kong.colors&#34;)
		local custom_fname = require(&#34;lualine.components.filename&#34;):extend()
		local highlight = require(&#34;lualine.highlight&#34;)
		local default_status_colors = { saved = theme.g50, modified = theme.special }

		function custom_fname:init(options)
			custom_fname.super.init(self, options)
			self.status_colors = {
				saved = highlight.create_component_highlight_group(
					{ fg = default_status_colors.saved },
					&#34;filename_status_saved&#34;,
					self.options
				),
				modified = highlight.create_component_highlight_group(
					{ fg = default_status_colors.modified },
					&#34;filename_status_modified&#34;,
					self.options
				),
			}
			if self.options.color == nil then
				self.options.color = &#34;&#34;
			end
		end

		function custom_fname:update_status()
			local data = custom_fname.super.update_status(self)
			data = highlight.component_format_highlight(
				vim.bo.modified and self.status_colors.modified or self.status_colors.saved
			) .. data
			return data
		end

		require(&#34;lualine&#34;).setup({
			options = {
				theme = &#34;kong&#34;,
				section_separators = &#34;&#34;,
				component_separators = &#34;&#34;,
				globalstatus = true,
			},
			sections = {
				lualine_a = { &#34;mode&#34; },
				lualine_b = {
					{
						&#34;filetype&#34;,
						colored = false,
						icon_only = true,
						padding = { left = 2, right = 2 },
					},
				},
				lualine_c = {
					&#34;%=&#34;,
					{
						custom_fname,
						file_status = true,
						path = 1,
					},
				},
				lualine_x = { &#34;diff&#34;, &#34;diagnostics&#34; },
				lualine_y = {
					{
						&#34;fileformat&#34;,
						padding = { left = 2, right = 2 },
					},
				},
				lualine_z = { &#34;progress&#34;, &#34;location&#34; },
			},
		})
	end,
}
</code></pre>

<hr/>

<p><strong>78</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-9-lualine-nvim">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-9-lualine-nvim</guid>
      <pubDate>Sat, 04 Jan 2025 21:56:14 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #8 — vim-startify</title>
      <link>https://barfooz.xyz/my-neovim-plugins-8-vim-startify?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[My #8 is one of the oldest plugins I&#39;ve used. vim-startify is hard to replace. I&#39;ve tested some replacements written in Lua, but was not satisfied with the results. One of the problems was, that you have to configure a lot or read into the configuration to get the status-quo of vim-startify. And in the end, I was fine to continue use of vim-startify, despite it was not written in Lua. 👌&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;mhinz/vim-startify&#34;,&#xA;&#x9;config = function()&#xA;&#x9;&#x9;vim.g.startifyrelativepath = 1&#xA;&#x9;&#x9;vim.g.startifychangetodir = 0&#xA;&#x9;&#x9;vim.g.startifyfortuneuseunicode = 1&#xA;&#x9;&#x9;vim.g.startifyupdateoldfiles = 1&#xA;&#x9;&#x9;vim.g.startifyuseenv = 1&#xA;&#x9;end,&#xA;}&#xA;&#xA;---&#xA;&#xA;77 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-8-vim-startify&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p>My #8 is one of the oldest plugins I&#39;ve used. <a href="https://github.com/mhinz/vim-startify">vim-startify</a> is hard to replace. I&#39;ve tested some replacements written in Lua, but was not satisfied with the results. One of the problems was, that you have to configure a lot or read into the configuration to get the status-quo of vim-startify. And in the end, I was fine to continue use of vim-startify, despite it was not written in Lua. 👌</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;mhinz/vim-startify&#34;,
	config = function()
		vim.g.startify_relative_path = 1
		vim.g.startify_change_to_dir = 0
		vim.g.startify_fortune_use_unicode = 1
		vim.g.startify_update_oldfiles = 1
		vim.g.startify_use_env = 1
	end,
}
</code></pre>

<hr/>

<p><strong>77</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-8-vim-startify">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-8-vim-startify</guid>
      <pubDate>Fri, 03 Jan 2025 12:58:24 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #7 — nvim-lint</title>
      <link>https://barfooz.xyz/my-neovim-plugins-7-nvim-lint?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[nvim-lint is another null-ls replacement. It helps me by running eslintd if I enter a file or create a new one. That&#39;s it. 😎&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;mfussenegger/nvim-lint&#34;,&#xA;&#x9;event = {&#xA;&#x9;&#x9;&#34;BufReadPre&#34;,&#xA;&#x9;&#x9;&#34;BufNewFile&#34;,&#xA;&#x9;},&#xA;&#x9;config = function()&#xA;&#x9;&#x9;local lint = require(&#34;lint&#34;)&#xA;&#xA;&#x9;&#x9;lint.lintersbyft = {&#xA;&#x9;&#x9;&#x9;javascript = { &#34;eslintd&#34; },&#xA;&#x9;&#x9;&#x9;typescript = { &#34;eslintd&#34; },&#xA;&#x9;&#x9;&#x9;javascriptreact = { &#34;eslintd&#34; },&#xA;&#x9;&#x9;&#x9;typescriptreact = { &#34;eslintd&#34; },&#xA;&#x9;&#x9;}&#xA;&#xA;&#x9;&#x9;lint.linters.eslintd.args = {&#xA;&#x9;&#x9;&#x9;&#34;--no-warn-ignored&#34;, -- https://github.com/mfussenegger/nvim-lint/issues/462&#xA;&#x9;&#x9;&#x9;&#34;--format&#34;,&#xA;&#x9;&#x9;&#x9;&#34;json&#34;,&#xA;&#x9;&#x9;&#x9;&#34;--stdin&#34;,&#xA;&#x9;&#x9;&#x9;&#34;--stdin-filename&#34;,&#xA;&#x9;&#x9;&#x9;function()&#xA;&#x9;&#x9;&#x9;&#x9;return vim.api.nvimbufgetname(0)&#xA;&#x9;&#x9;&#x9;end,&#xA;&#x9;&#x9;}&#xA;&#xA;&#x9;&#x9;local lintaugroup = vim.api.nvimcreateaugroup(&#34;lint&#34;, { clear = true })&#xA;&#xA;&#x9;&#x9;vim.api.nvimcreateautocmd({ &#34;BufEnter&#34;, &#34;BufWritePost&#34;, &#34;InsertLeave&#34; }, {&#xA;&#x9;&#x9;&#x9;group = lintaugroup,&#xA;&#x9;&#x9;&#x9;callback = function()&#xA;&#x9;&#x9;&#x9;&#x9;lint.trylint()&#xA;&#x9;&#x9;&#x9;end,&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;---&#xA;&#xA;76 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-7-nvim-lint&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://github.com/mfussenegger/nvim-lint">nvim-lint</a> is another <a href="https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main">null-ls</a> replacement. It helps me by running <code>eslint_d</code> if I enter a file or create a new one. That&#39;s it. 😎</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;mfussenegger/nvim-lint&#34;,
	event = {
		&#34;BufReadPre&#34;,
		&#34;BufNewFile&#34;,
	},
	config = function()
		local lint = require(&#34;lint&#34;)

		lint.linters_by_ft = {
			javascript = { &#34;eslint_d&#34; },
			typescript = { &#34;eslint_d&#34; },
			javascriptreact = { &#34;eslint_d&#34; },
			typescriptreact = { &#34;eslint_d&#34; },
		}

		lint.linters.eslint_d.args = {
			&#34;--no-warn-ignored&#34;, -- https://github.com/mfussenegger/nvim-lint/issues/462
			&#34;--format&#34;,
			&#34;json&#34;,
			&#34;--stdin&#34;,
			&#34;--stdin-filename&#34;,
			function()
				return vim.api.nvim_buf_get_name(0)
			end,
		}

		local lint_augroup = vim.api.nvim_create_augroup(&#34;lint&#34;, { clear = true })

		vim.api.nvim_create_autocmd({ &#34;BufEnter&#34;, &#34;BufWritePost&#34;, &#34;InsertLeave&#34; }, {
			group = lint_augroup,
			callback = function()
				lint.try_lint()
			end,
		})
	end,
}
</code></pre>

<hr/>

<p><strong>76</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-7-nvim-lint">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-7-nvim-lint</guid>
      <pubDate>Thu, 02 Jan 2025 12:48:43 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #6 — glow.nvim</title>
      <link>https://barfooz.xyz/my-neovim-plugins-6-glow-nvim?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[glow.nvim is a neat little helper if you write a lot of Markdown. For example, CHANGELOG.md, README.md files inside your project or a static blog. You can just render a preview in your Neovim instance. :)&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;ellisonleao/glow.nvim&#34;,&#xA;&#x9;keys = {&#xA;&#x9;&#x9;{ &#34;leaderp&#34;, &#34;:Glowcr&#34; },&#xA;&#x9;},&#xA;&#x9;config = function()&#xA;&#x9;&#x9;require(&#34;glow&#34;).setup({&#xA;&#x9;&#x9;&#x9;installpath = &#34;/opt/homebrew/bin/glow&#34;,&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;---&#xA;&#xA;74 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-6-glow-nvim&#34;Discuss.../a_]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://github.com/ellisonleao/glow.nvim">glow.nvim</a> is a neat little helper if you write a lot of Markdown. For example, <code>CHANGELOG.md</code>, <code>README.md</code> files inside your project or a static blog. You can just render a preview in your Neovim instance. :)</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;ellisonleao/glow.nvim&#34;,
	keys = {
		{ &#34;&lt;leader&gt;p&#34;, &#34;:Glow&lt;cr&gt;&#34; },
	},
	config = function()
		require(&#34;glow&#34;).setup({
			install_path = &#34;/opt/homebrew/bin/glow&#34;,
		})
	end,
}
</code></pre>

<hr/>

<p><strong>74</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-6-glow-nvim">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-6-glow-nvim</guid>
      <pubDate>Tue, 31 Dec 2024 17:00:12 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #5 — gitsigns.nvim</title>
      <link>https://barfooz.xyz/my-neovim-plugins-5-gitsigns-nvim?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[gitsigns.nvim is one of those little plugins, which has a clean, minimal UI and is there when you need it. I&#39;m using it to see where in the file I made changes. If I don&#39;t want them anymore, I can simply remove them. Or I&#39;m fine with them, I can stage them. No bloated UI required. There is also a small feature, like in VScode, you can show a blame as ghost text on the current line.&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;lewis6991/gitsigns.nvim&#34;,&#xA;&#x9;dependencies = { &#34;nvim-lua/plenary.nvim&#34; },&#xA;&#x9;opts = {&#xA;&#x9;&#x9;currentlineblame = false, -- Toggle with :Gitsigns togglecurrentlineblame&#xA;&#x9;&#x9;currentlineblameopts = {&#xA;&#x9;&#x9;&#x9;delay = 200,&#xA;&#x9;&#x9;},&#xA;&#x9;&#x9;onattach = function(bufnr)&#xA;&#x9;&#x9;&#x9;local gitsigns = require(&#34;gitsigns&#34;)&#xA;&#xA;&#x9;&#x9;&#x9;local function map(mode, l, r, opts)&#xA;&#x9;&#x9;&#x9;&#x9;opts = opts or {}&#xA;&#x9;&#x9;&#x9;&#x9;opts.buffer = bufnr&#xA;&#x9;&#x9;&#x9;&#x9;vim.keymap.set(mode, l, r, opts)&#xA;&#x9;&#x9;&#x9;end&#xA;&#xA;&#x9;&#x9;&#x9;-- Navigation&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;gj&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;if vim.wo.diff then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;vim.cmd.normal({ &#34;gj&#34;, bang = true })&#xA;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;gitsigns.navhunk(&#34;next&#34;)&#xA;&#x9;&#x9;&#x9;&#x9;end&#xA;&#x9;&#x9;&#x9;end)&#xA;&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;gk&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;if vim.wo.diff then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;vim.cmd.normal({ &#34;gk&#34;, bang = true })&#xA;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;gitsigns.navhunk(&#34;prev&#34;)&#xA;&#x9;&#x9;&#x9;&#x9;end&#xA;&#x9;&#x9;&#x9;end)&#xA;&#xA;&#x9;&#x9;&#x9;-- Actions&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhs&#34;, gitsigns.stagehunk)&#xA;&#x9;&#x9;&#x9;map(&#34;v&#34;, &#34;leaderhs&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;gitsigns.stagehunk({ vim.fn.line(&#34;.&#34;), vim.fn.line(&#34;v&#34;) })&#xA;&#x9;&#x9;&#x9;end)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhr&#34;, gitsigns.resethunk)&#xA;&#x9;&#x9;&#x9;map(&#34;v&#34;, &#34;leaderhr&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;gitsigns.resethunk({ vim.fn.line(&#34;.&#34;), vim.fn.line(&#34;v&#34;) })&#xA;&#x9;&#x9;&#x9;end)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhS&#34;, gitsigns.stagebuffer)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhu&#34;, gitsigns.undostagehunk)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhR&#34;, gitsigns.resetbuffer)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhp&#34;, gitsigns.previewhunk)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhb&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;gitsigns.blameline({ full = true })&#xA;&#x9;&#x9;&#x9;end)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leadertb&#34;, gitsigns.togglecurrentlineblame)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhd&#34;, gitsigns.diffthis)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leaderhD&#34;, function()&#xA;&#x9;&#x9;&#x9;&#x9;gitsigns.diffthis(&#34;~&#34;)&#xA;&#x9;&#x9;&#x9;end)&#xA;&#x9;&#x9;&#x9;map(&#34;n&#34;, &#34;leadertd&#34;, gitsigns.toggledeleted)&#xA;&#xA;&#x9;&#x9;&#x9;-- Text object&#xA;&#x9;&#x9;&#x9;map({ &#34;o&#34;, &#34;x&#34; }, &#34;ih&#34;, &#34;:C-UGitsigns selecthunkCR&#34;)&#xA;&#x9;&#x9;end,&#xA;&#x9;},&#xA;}&#xA;&#xA;---&#xA;&#xA;73 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-5-gitsigns-nvim&#34;Discuss.../a]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://github.com/lewis6991/gitsigns.nvim">gitsigns.nvim</a> is one of those little plugins, which has a clean, minimal UI and is there when you need it. I&#39;m using it to see where in the file I made changes. If I don&#39;t want them anymore, I can simply remove them. Or I&#39;m fine with them, I can stage them. No bloated UI required. There is also a small feature, like in VScode, you can show a blame as ghost text on the current line.</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;lewis6991/gitsigns.nvim&#34;,
	dependencies = { &#34;nvim-lua/plenary.nvim&#34; },
	opts = {
		current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
		current_line_blame_opts = {
			delay = 200,
		},
		on_attach = function(bufnr)
			local gitsigns = require(&#34;gitsigns&#34;)

			local function map(mode, l, r, opts)
				opts = opts or {}
				opts.buffer = bufnr
				vim.keymap.set(mode, l, r, opts)
			end

			-- Navigation
			map(&#34;n&#34;, &#34;gj&#34;, function()
				if vim.wo.diff then
					vim.cmd.normal({ &#34;gj&#34;, bang = true })
				else
					gitsigns.nav_hunk(&#34;next&#34;)
				end
			end)

			map(&#34;n&#34;, &#34;gk&#34;, function()
				if vim.wo.diff then
					vim.cmd.normal({ &#34;gk&#34;, bang = true })
				else
					gitsigns.nav_hunk(&#34;prev&#34;)
				end
			end)

			-- Actions
			map(&#34;n&#34;, &#34;&lt;leader&gt;hs&#34;, gitsigns.stage_hunk)
			map(&#34;v&#34;, &#34;&lt;leader&gt;hs&#34;, function()
				gitsigns.stage_hunk({ vim.fn.line(&#34;.&#34;), vim.fn.line(&#34;v&#34;) })
			end)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hr&#34;, gitsigns.reset_hunk)
			map(&#34;v&#34;, &#34;&lt;leader&gt;hr&#34;, function()
				gitsigns.reset_hunk({ vim.fn.line(&#34;.&#34;), vim.fn.line(&#34;v&#34;) })
			end)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hS&#34;, gitsigns.stage_buffer)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hu&#34;, gitsigns.undo_stage_hunk)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hR&#34;, gitsigns.reset_buffer)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hp&#34;, gitsigns.preview_hunk)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hb&#34;, function()
				gitsigns.blame_line({ full = true })
			end)
			map(&#34;n&#34;, &#34;&lt;leader&gt;tb&#34;, gitsigns.toggle_current_line_blame)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hd&#34;, gitsigns.diffthis)
			map(&#34;n&#34;, &#34;&lt;leader&gt;hD&#34;, function()
				gitsigns.diffthis(&#34;~&#34;)
			end)
			map(&#34;n&#34;, &#34;&lt;leader&gt;td&#34;, gitsigns.toggle_deleted)

			-- Text object
			map({ &#34;o&#34;, &#34;x&#34; }, &#34;ih&#34;, &#34;:&lt;C-U&gt;Gitsigns select_hunk&lt;CR&gt;&#34;)
		end,
	},
}
</code></pre>

<hr/>

<p><strong>73</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-5-gitsigns-nvim">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-5-gitsigns-nvim</guid>
      <pubDate>Mon, 30 Dec 2024 20:56:52 +0000</pubDate>
    </item>
    <item>
      <title>My Neovim Plugins #4 — conform.nvim</title>
      <link>https://barfooz.xyz/my-neovim-plugins-4-conform-nvim?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I love prettier, therefore, I need a plugin which runs prettier on file save for me. For this job, I&#39;m using conform.nvim. This runs formatter like prettier, prettierd or stylua on my files.&#xA;&#xA;Config&#xA;return {&#xA;&#x9;&#34;stevearc/conform.nvim&#34;,&#xA;&#x9;event = { &#34;BufReadPre&#34;, &#34;BufNewFile&#34; },&#xA;&#x9;config = function()&#xA;&#x9;&#x9;local conform = require(&#34;conform&#34;)&#xA;&#xA;&#x9;&#x9;conform.setup({&#xA;&#x9;&#x9;&#x9;formattersbyft = {&#xA;&#x9;&#x9;&#x9;&#x9;javascript = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;typescript = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;javascriptreact = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;typescriptreact = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;css = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;html = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;json = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;yaml = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;markdown = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;graphql = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;pug = { &#34;prettier&#34; },&#xA;&#x9;&#x9;&#x9;&#x9;lua = { &#34;stylua&#34; },&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;&#x9;formatonsave = {&#xA;&#x9;&#x9;&#x9;&#x9;lspformat = &#34;fallback&#34;,&#xA;&#x9;&#x9;&#x9;&#x9;async = false,&#xA;&#x9;&#x9;&#x9;},&#xA;&#x9;&#x9;})&#xA;&#x9;end,&#xA;}&#xA;&#xA;Before, I was using null-ls, which is not maintained anymore. And with conform.nvim I&#39;ve found a good replacement. :)&#xA;&#xA;---&#xA;&#xA;72 of #100DaysToOffload&#xA;&#xA;#log #neovim&#xA;&#xA;Thoughts? a href=&#34;https://remark.as/p/barfooz.xyz/my-neovim-plugins-4-conform-nvim&#34;Discuss.../a_]]&gt;</description>
      <content:encoded><![CDATA[<p>I love <a href="https://prettier.io/">prettier</a>, therefore, I need a plugin which runs prettier on file save for me. For this job, I&#39;m using <a href="https://github.com/stevearc/conform.nvim">conform.nvim</a>. This runs formatter like prettier, prettierd or stylua on my files.</p>

<h2 id="config" id="config">Config</h2>

<pre><code class="language-lua">return {
	&#34;stevearc/conform.nvim&#34;,
	event = { &#34;BufReadPre&#34;, &#34;BufNewFile&#34; },
	config = function()
		local conform = require(&#34;conform&#34;)

		conform.setup({
			formatters_by_ft = {
				javascript = { &#34;prettier&#34; },
				typescript = { &#34;prettier&#34; },
				javascriptreact = { &#34;prettier&#34; },
				typescriptreact = { &#34;prettier&#34; },
				css = { &#34;prettier&#34; },
				html = { &#34;prettier&#34; },
				json = { &#34;prettier&#34; },
				yaml = { &#34;prettier&#34; },
				markdown = { &#34;prettier&#34; },
				graphql = { &#34;prettier&#34; },
				pug = { &#34;prettier&#34; },
				lua = { &#34;stylua&#34; },
			},
			format_on_save = {
				lsp_format = &#34;fallback&#34;,
				async = false,
			},
		})
	end,
}
</code></pre>

<p>Before, I was using <a href="https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main">null-ls</a>, which is not maintained anymore. And with conform.nvim I&#39;ve found a good replacement. :)</p>

<hr/>

<p><strong>72</strong> of <a href="https://barfooz.xyz/tag:100DaysToOffload" class="hashtag"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p><a href="https://barfooz.xyz/tag:log" class="hashtag"><span>#</span><span class="p-category">log</span></a> <a href="https://barfooz.xyz/tag:neovim" class="hashtag"><span>#</span><span class="p-category">neovim</span></a></p>

<p><em>Thoughts? <a href="https://remark.as/p/barfooz.xyz/my-neovim-plugins-4-conform-nvim">Discuss...</a></em></p>
]]></content:encoded>
      <guid>https://barfooz.xyz/my-neovim-plugins-4-conform-nvim</guid>
      <pubDate>Sun, 29 Dec 2024 17:59:21 +0000</pubDate>
    </item>
  </channel>
</rss>