<?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: Jeremy</title>
    <description>The latest articles on DEV Community by Jeremy (@je12emy).</description>
    <link>https://dev.to/je12emy</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%2F566110%2F6c25cf55-e9ee-4af1-801f-2fb88ad526b8.png</url>
      <title>DEV Community: Jeremy</title>
      <link>https://dev.to/je12emy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/je12emy"/>
    <language>en</language>
    <item>
      <title>Setting Up Dual Boot with Windows and Arch Linux Using systemd-boot</title>
      <dc:creator>Jeremy</dc:creator>
      <pubDate>Mon, 28 Apr 2025 04:48:35 +0000</pubDate>
      <link>https://dev.to/je12emy/setting-up-dual-boot-with-windows-and-arch-linux-using-systemd-boot-2c24</link>
      <guid>https://dev.to/je12emy/setting-up-dual-boot-with-windows-and-arch-linux-using-systemd-boot-2c24</guid>
      <description>&lt;p&gt;Dual-booting Windows and Arch Linux is fairly straightforward when each operating system is installed separately. However, you might need to manually select the boot device through your BIOS settings every time you want to switch. To make this more convenient, you can configure &lt;code&gt;systemd-boot&lt;/code&gt; to present a centralized boot menu, allowing you to choose between Arch and Windows easily at startup.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing and Configuring &lt;code&gt;systemd-boot&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Systemd-boot#Installation" rel="noopener noreferrer"&gt;systemd-boot&lt;/a&gt; comes bundled with systemd, so you don't need to install anything extra. To initialize it, simply use &lt;code&gt;bootctl&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This command will install &lt;code&gt;systemd-boot&lt;/code&gt; into your EFI system partition, set up a new bootloader entry named &lt;strong&gt;Linux Boot Manager&lt;/strong&gt;, and configure it as the first option in your UEFI firmware.&lt;/p&gt;

&lt;p&gt;At this point, if you reboot, you will only see Arch Linux listed as a boot option — we still need to add Windows manually.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding the Windows Boot Entry
&lt;/h1&gt;

&lt;p&gt;The goal is to make Windows available directly from the &lt;code&gt;systemd-boot&lt;/code&gt; menu. To do this, we'll copy Windows' EFI boot files into Linux's EFI partition. &lt;code&gt;systemd-boot&lt;/code&gt; will automatically detect the Windows bootloader once the files are in place — no need to create a manual entry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Identify the Windows EFI Partition
&lt;/h2&gt;

&lt;p&gt;First, list all block devices:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Sample output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS  
sda             8:0    0 223.6G  0 disk   
├─sda1          8:1    0   100M  0 part   
├─sda2          8:2    0    16M  0 part   
├─sda3          8:3    0 222.9G  0 part   
└─sda4          8:4    0   546M  0 part   
zram0         253:0    0     4G  0 disk &lt;span class="o"&gt;[&lt;/span&gt;SWAP]  
nvme0n1       259:0    0 476.9G  0 disk   
├─nvme0n1p1   259:1    0     1G  0 part /boot  
├─nvme0n1p2   259:2    0    47G  0 part /  
└─nvme0n1p3   259:3    0 428.9G  0 part /home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;sda1&lt;/code&gt; is a 100MB partition, which typically indicates Windows' EFI partition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Mount the Windows EFI Partition
&lt;/h2&gt;

&lt;p&gt;Create a mount point and mount the Windows EFI partition:&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 mkdir&lt;/span&gt; /mnt/windows-efi
&lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sda1 /mnt/windows-efi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Copy Windows Boot Files
&lt;/h2&gt;

&lt;p&gt;Copy the Microsoft EFI directory into your Arch system’s EFI folder:&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 cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; /mnt/windows-efi/EFI/Microsoft /boot/EFI/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once copied, &lt;code&gt;systemd-boot&lt;/code&gt; will automatically detect the Windows Boot Manager.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Step: Reboot and Enjoy
&lt;/h1&gt;

&lt;p&gt;After setting everything up, reboot your machine. You should now see both &lt;strong&gt;Arch Linux&lt;/strong&gt; and &lt;strong&gt;Windows&lt;/strong&gt; listed in the &lt;code&gt;systemd-boot&lt;/code&gt; menu — no additional configuration required!&lt;/p&gt;

</description>
      <category>arch</category>
      <category>windows</category>
      <category>dualboot</category>
    </item>
    <item>
      <title>How to configure neovim's Lua LS for Love2D</title>
      <dc:creator>Jeremy</dc:creator>
      <pubDate>Tue, 24 Dec 2024 22:56:00 +0000</pubDate>
      <link>https://dev.to/je12emy/how-to-configure-neovims-lua-ls-for-love2d-1an6</link>
      <guid>https://dev.to/je12emy/how-to-configure-neovims-lua-ls-for-love2d-1an6</guid>
      <description>&lt;p&gt;I've been trying out Love2D by recreating old retro games, I like how simple Love is, and I get to use neovim as my editor of choice. While browsing the Lua LS documentation, I noticed this on the "Add-ons" page.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Addons can be used to add additional content for the Lua Language Server by doing the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providing definitions for a framework/library/API. &lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;This had bothered me for a while, since using Love's API does not provide any sort of competition.&lt;/p&gt;

&lt;p&gt;First, pick a directory to store all your add-ons. Mine will be &lt;code&gt;~/.local/share/LuaAddons&lt;/code&gt;.&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;mkdir&lt;/span&gt; ~/.local/share/LuaAddons
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.local/share/LuaAddons
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we will grab a copy of the Love2D add-on.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Open your neovim configuration and edit Lua LS's set-up snippet.&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="n"&gt;lspconfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lua_ls&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;settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Lua&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;workspace&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;-- Path to your Addons directory&lt;/span&gt;
                &lt;span class="n"&gt;userThirdParty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;os.getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"HOME"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s2"&gt;".local/share/LuaAddons"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
                &lt;span class="n"&gt;checkThirdParty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Apply"&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should be everything you need to get a nice competition menu when using &lt;code&gt;love&lt;/code&gt;.&lt;/p&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%2F14p2k4y1cd29piyv1mgx.png" 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%2F14p2k4y1cd29piyv1mgx.png" alt="Editor screenshot" width="800" height="550"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2026 Update&lt;/strong&gt;: I have now switched to &lt;a href="https://www.lazyvim.org/" rel="noopener noreferrer"&gt;LazyVim&lt;/a&gt;, here is an updated snippet to &lt;a href="https://www.lazyvim.org/configuration/plugins#%EF%B8%8F-customizing-plugin-specs" rel="noopener noreferrer"&gt;extend your server settings&lt;/a&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;--- lua/plugins/love.lua&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"neovim/nvim-lspconfig"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;opts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;lua_ls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="n"&gt;Lua&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;workspace&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
              &lt;span class="n"&gt;library&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;os.getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"HOME"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s2"&gt;"/.local/share/LuaAddons"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
              &lt;span class="n"&gt;checkThirdParty&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="p"&gt;},&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;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;p&gt;You can check the official documentation for reference.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://luals.github.io/wiki/addons/" rel="noopener noreferrer"&gt;https://luals.github.io/wiki/addons/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#lua_ls" rel="noopener noreferrer"&gt;https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#lua_ls&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>love2d</category>
      <category>lua</category>
      <category>nvim</category>
    </item>
    <item>
      <title>Setting up neovim for Laravel development</title>
      <dc:creator>Jeremy</dc:creator>
      <pubDate>Sun, 22 Dec 2024 19:10:02 +0000</pubDate>
      <link>https://dev.to/je12emy/setting-up-neovim-for-laravel-development-4pii</link>
      <guid>https://dev.to/je12emy/setting-up-neovim-for-laravel-development-4pii</guid>
      <description>&lt;p&gt;When I decided to learn Laravel, I assumed configuring Neovim would be as straightforward as setting it up for any other language. However, I quickly discovered a few extra steps were necessary to achieve a smooth development experience with Laravel.&lt;/p&gt;

&lt;h1&gt;
  
  
  Two PHP LSPs? Which One to Choose?
&lt;/h1&gt;

&lt;p&gt;The Neovim LSP Config documentation lists two available LSP servers for PHP: PHP Actor and Intelephense.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://intelephense.com/" rel="noopener noreferrer"&gt;Intelephense&lt;/a&gt; is a "freemium" LSP. While it provides basic functionality for free, features like variable renaming and code actions require a $25 USD lifetime license.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/phpactor/phpactor" rel="noopener noreferrer"&gt;PHP Actor&lt;/a&gt; is a free alternative that includes the core features you'd expect from an LSP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my experience, Intelephense produced fewer diagnostic errors, likely due to Laravel's "magic". That said, PHP Actor is a solid option, and I recommend trying both to see which works best for you. Maybe try PHP Actor while you are learning Laravel to see if you would like to invest on Intelephense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Laravel IDE Helper
&lt;/h2&gt;

&lt;p&gt;Laravel can confuse LSPs, which is where &lt;a href="https://github.com/barryvdh/laravel-ide-helper" rel="noopener noreferrer"&gt;Laravel IDE Helper package&lt;/a&gt; comes in. It is a CLI that generates helper files that improve auto-completion and solves diagnostic errors.&lt;/p&gt;

&lt;p&gt;First, install it as a development dependency in your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; barryvdh/laravel-ide-helper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And generate helper files (you are supposed to add these to your &lt;code&gt;.gitignore&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan ide-helper:generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are many more features offered by this CLI (please check the documentation), if you enjoy using wrappers around these sort of CLI's within neovim you could checkout &lt;a href="https://github.com/Bleksak/laravel-ide-helper.nvim" rel="noopener noreferrer"&gt;Laravel IDE Helper NVIM&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Blade Syntax Highlighting with Tree-Sitter
&lt;/h1&gt;

&lt;p&gt;You can install &lt;code&gt;php_only&lt;/code&gt; if you are only interested on using Laravel as your API &lt;a href="https://github.com/tree-sitter/tree-sitter-php/issues/257#issuecomment-2336738026" rel="noopener noreferrer"&gt;backend&lt;/a&gt;. If you would are interested on front-end development with &lt;code&gt;blade&lt;/code&gt; components, you should install the php and &lt;a href="https://github.com/EmranMR/tree-sitter-blade" rel="noopener noreferrer"&gt;tree-sitter-blade&lt;/a&gt; grammars.&lt;/p&gt;

&lt;p&gt;To set tree-sitter-blade up, copy the following &lt;a href="https://github.com/EmranMR/tree-sitter-blade/discussions/19#discussioncomment-8541804" rel="noopener noreferrer"&gt;code snippet&lt;/a&gt; into your neovim configuration.&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;treesiter&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;"nvim-treesitter.configs"&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;parser_config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"nvim-treesitter.parsers"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_parser_configs&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;parser_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blade&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;install_info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://github.com/EmranMR/tree-sitter-blade"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"src/parser.c"&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="s2"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;filetype&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"blade"&lt;/span&gt;
&lt;span class="p"&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;filetype&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'.*%.blade%.php'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'blade'&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;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;bladeGrp&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_create_augroup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"BladeFiltypeRelated"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;clear&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;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_create_autocmd&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="s2"&gt;"BufNewFile"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"BufRead"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"*.blade.php"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bladeGrp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;callback&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="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;filetype&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"blade"&lt;/span&gt;
    &lt;span class="k"&gt;end&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;Create the following file structure in your neovim configuration directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;after
└── queries
    └── blade
        ├── highlights.scm
        └── injections.scm

3 directories, 2 files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the following content in &lt;code&gt;highlights.scm&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# File: highlights.scm
(directive) @function
(directive_start) @function
(directive_end) @function
(comment) @comment
((parameter) @include (#set! "priority" 110))
((php_only) @include (#set! "priority" 110))
((bracket_start) @function (#set! "priority" 120))
((bracket_end) @function (#set! "priority" 120))
(keyword) @function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the following content in &lt;code&gt;injections.scm&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# File: injections.scm
((text) @injection.content
    (#not-has-ancestor? @injection.content "envoy")
    (#set! injection.combined)
    (#set! injection.language php))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note&lt;/em&gt;: Here is a &lt;a href="https://github.com/Je12emy/dotfiles/commit/e9a678d640f47b15f0117fefae25cc3dfdfbc717" rel="noopener noreferrer"&gt;git commit&lt;/a&gt; if you would like to verify my changes.&lt;/p&gt;

&lt;p&gt;After this is done, you should be able install the blade grammar with &lt;code&gt;TSInstall blade&lt;/code&gt;. I do recommend you also install the &lt;code&gt;html&lt;/code&gt;, &lt;code&gt;css&lt;/code&gt; and &lt;code&gt;javascript&lt;/code&gt; grammars for the next step.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding HTML LSP Support for Blade Templates
&lt;/h1&gt;

&lt;p&gt;This should provide a good enough experience, in my case I also want to write CSS and Javascript inside my blade components. This can be done with the HTML LSP, we simply enable it on &lt;code&gt;blade&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;To do so, you simply add the &lt;code&gt;blade&lt;/code&gt; file type to the configuration.&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;-- $ npm install -g vscode-langservers-extracted&lt;/span&gt;
&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;capabilities&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;lsp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;make_client_capabilities&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textDocument&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completionItem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;snippetSupport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="n"&gt;lspconfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&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;capabilities&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;filetypes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"html"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"blade"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;init_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;configurationSection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"html"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"css"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"javascript"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;embeddedLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;css&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;javascript&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;provideFormatter&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Code Formatting
&lt;/h1&gt;

&lt;p&gt;I use Conform.nvim for formatting code. Here, I picked &lt;a href="https://github.com/laravel/pint" rel="noopener noreferrer"&gt;Pint&lt;/a&gt; since it was developed by the Laravel team.&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;"conform"&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;formatters_by_ft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;-- Laravel's Formatter&lt;/span&gt;
        &lt;span class="c1"&gt;-- See: https://github.com/laravel/pint&lt;/span&gt;
        &lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"pint"&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;p&gt;For blade files it is possible to use prettier, but if you are already set-up with HTML LSP, then it will provide formatting out of the box.&lt;/p&gt;

&lt;h1&gt;
  
  
  More Plugins
&lt;/h1&gt;

&lt;p&gt;I also decided to ask around on Reddit to see if I was missing an essential plugin. You may take a look at the thread filled with recommendations here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.reddit.com/r/neovim/comments/1gjn991/recommended_plugins_for_laravel/" rel="noopener noreferrer"&gt;Recommended plugins for Laravel?&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also looks like an official VS Code plugin is being developed by the Laravel team, I have seen rummors about an LSP being considered. So there is hope that the development experience may improve for Neovim users.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://x.com/laravelnews/status/1828539011486622085" rel="noopener noreferrer"&gt;Tweet by Laravel News&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>nvim</category>
      <category>php</category>
    </item>
  </channel>
</rss>
