<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shambhuyadav_ on Medium]]></title>
        <description><![CDATA[Stories by Shambhuyadav_ on Medium]]></description>
        <link>https://medium.com/@shambhu_?source=rss-980039a560e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*v6rlzPocJ199Fy5z</url>
            <title>Stories by Shambhuyadav_ on Medium</title>
            <link>https://medium.com/@shambhu_?source=rss-980039a560e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 19:36:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shambhu_/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Ghost in the Filesystem: How to Read and Write to Deleted Files Using File Descriptors]]></title>
            <link>https://medium.com/@shambhu_/the-ghost-in-the-filesystem-how-to-read-and-write-to-deleted-files-using-file-descriptors-e499b45af0a0?source=rss-980039a560e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e499b45af0a0</guid>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[file-descriptor]]></category>
            <dc:creator><![CDATA[Shambhuyadav_]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 07:31:41 GMT</pubDate>
            <atom:updated>2026-06-10T07:31:41.421Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4l9aysyBUFrIG0O0m63eQ.png" /></figure><h3>Every file you “delete” isn’t actually gone if a process is still holding onto its secret numeric handle. Here is how Unix handles the undead!</h3><p>Picture this: You are running a critical, long-standing background script or database on your server. In a moment of absolute panic or accidental oversight, someone runs an rm command on the massive log file or data layout it&#39;s writing to. The file vanishes from your directory tree. You scan the folder with ls, and it’s completely gone.</p><p>Is the data destroyed? Is the process going to crash instantly?</p><p>In Unix-like systems like macOS and Linux, the answer is a fascinating <strong>no</strong>. Thanks to the architecture of <strong>File Descriptors (FDs)</strong>, that file is technically still alive, humming along in the background as a “ghost file.” You can still read from it, write to it, and even completely rescue its contents from the void.</p><p>Here is the under-the-hood magic of how this works, and how you can manipulate deleted files right from your terminal.</p><h3>The Separation of Name and Data: Inodes vs. Links</h3><p>To understand why a deleted file can still be read, we have to look at how the operating system handles storage. In systems like Linux or macOS, a file is split into two distinct parts:</p><ol><li><strong>The Inode:</strong> This is the actual physical backbone of the file. It lives on your disk storage, holding the raw data blocks, permissions, and file metadata.</li><li><strong>The Directory Entry (The Link):</strong> This is just a human-readable pointer (like app.log) inside a folder that references that specific Inode.</li></ol><p>When you run rm app.log, you aren&#39;t actually erasing data blocks from your drive. You are performing an <strong>unlink</strong> operation. You are simply removing the human-readable name from the directory tree, dropping the file&#39;s &quot;link count&quot; to zero.</p><p>However, the operating system kernel keeps a strict rulebook. It will <strong>refuse to clear the physical Inode data blocks</strong> as long as the file’s process reference count is greater than zero. If a running program opened that file before it was deleted, it still holds an active <strong>File Descriptor</strong> to it — meaning the data blocks remain entirely safe and accessible.</p><h3>Seeing is Believing: A Terminal Experiment</h3><p>You can prove this to yourself on your laptop right now using nothing but a standard terminal.</p><h3>1. Create a “Ghost File” and Hold it Open</h3><p>Open a terminal window and create a quick file. Then, use an exec command to assign an active file descriptor (3) to it. This forces the shell to keep a persistent handle on the file.</p><pre>echo &quot;This data is officially unlinked, but still alive.&quot; &gt; ghost.txt<br>exec 3&lt; ghost.txt</pre><h3>2. Delete the File Entirely</h3><p>Open a second terminal window or tab, and delete the file you just created:</p><pre>rm ghost.txt</pre><p>If you check Finder, file managers, or run ls, ghost.txt is nowhere to be found. To the rest of the computer, it does not exist.</p><h3>3. Read the Data via the File Descriptor</h3><p>Go back to your first terminal window. Even though the filename is erased from the filesystem, your shell process still holds File Descriptor 3 hooked directly into the Inode.</p><p>Run a cat command, redirecting that specific descriptor back into it:</p><pre>cat &lt;&amp;3</pre><p><strong>The Output:</strong></p><pre>This data is officially unlinked, but still alive.</pre><p>The kernel happily fetches the data blocks directly from the disk because your open file descriptor gave it the direct pass code, bypassing the need for a directory name entirely.</p><h3>The Dev Ops Rescue Guide: How to Recover Data from a Deleted File</h3><p>This isn’t just a neat party trick; it’s a lifesaver for system administrators and backend developers. Imagine a production application has been writing critical state data to a file that was accidentally deleted, and you desperately need that data before the application shuts down.</p><p>As long as the application is still running, you can intercept its file descriptors to clone the data.</p><h3>Step 1: Find the “Undead” File Descriptor</h3><p>On macOS or Linux, you can use the lsof (List Open Files) utility to hunt down processes holding onto deleted files. Run:</p><pre>lsof +L1</pre><p><em>(The +L1 flag specifically tells the utility to look for open files that have a hard link count of less than 1 — meaning they have been deleted from the directory structure).</em>+L1</p><p>You will get an output showing the command name, the <strong>Process ID (PID)</strong>, and the specific <strong>FD number</strong>.</p><h3>Step 2: Extract the Data From the Kernel</h3><p>Unix systems expose active file descriptors natively. On a Mac, you can copy the data straight out of the kernel’s process tracking layer back onto your desktop:</p><pre>cp /dev/fd/&lt;FD_NUMBER&gt; ~/Desktop/recovered_data.txt</pre><p>(If you are running on a Linux environment, you would copy from /proc//fd/ instead).</p><p>Boom — your lost production data is safely cloned back into a normal file, and you didn’t have to restart the application or dig into raw disk sectors.</p><h3>When Does the Ghost Finally Vanish?</h3><p>The file will remain in this limbo state indefinitely as long as the process holding the file descriptor remains active.</p><p>The moment that terminal tab is closed, the script finishes executing, or the server daemon is terminated, the application automatically drops its file descriptors. At that exact millisecond, the kernel sees that the file has 0 directory links <em>and</em> 0 active file descriptors.</p><p>The reference count hits absolute zero, the kernel releases the file structure, and those disk blocks are finally marked as free space — permanently erasing the data into thin air.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e499b45af0a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Constitutional Engine: The Technical Evolution of Claude (2021 – 2026)]]></title>
            <link>https://medium.com/@shambhu_/the-constitutional-engine-the-technical-evolution-of-claude-2021-2026-df22e90e8089?source=rss-980039a560e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/df22e90e8089</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Shambhuyadav_]]></dc:creator>
            <pubDate>Sun, 03 May 2026 16:19:32 GMT</pubDate>
            <atom:updated>2026-05-03T16:19:32.209Z</atom:updated>
            <content:encoded><![CDATA[<p>In the hyper-competitive landscape of Generative AI, Anthropic’s Claude has carved out a unique identity. While others raced for raw parameters, the team at Anthropic – founded by former OpenAI leaders with a focus on safety – prioritized alignment and reliability.</p><p>As of May 2026, Claude has evolved from a cautious experiment into a high-reasoning agentic powerhouse. This is the technical story of how we got here.</p><ol><li>The Genesis: Constitutional AI (CAI)</li><li>The most fundamental technical differentiator for Claude is Constitutional AI. Traditional models rely heavily on Reinforcement Learning from Human Feedback (RLHF), which can be inconsistent and expensive.</li><li>Anthropic pioneered a two-stage process:</li><li>• Supervised Learning: The model critiques its own responses based on a provided “Constitution” (a set of ethical and functional principles).</li><li>• Reinforcement Learning: It then trains a second model to favor responses that align with those principles.</li><li>This internalizes “reasoning” about safety rather than just memorizing what human labelers preferred, resulting in a model that is significantly more robust against adversarial attacks.</li><li>2. Winning the “Context War”</li><li>Claude was the first model to make Long Context a core utility rather than a benchmark gimmick.</li><li>• The Leap: In 2023, Claude 1.3 moved to a 100k token window. By early 2026, Claude 4.7 supports a 1 Million token context in beta, allowing users to process entire repositories or month-long Slack histories in a single prompt.</li><li>• Efficiency: To manage the massive compute required for these windows, Anthropic introduced Prompt Caching. By storing frequently used context (like your documentation or system prompts) server-side, they reduced latency and cut costs by up to 90% for subsequent requests.</li><li>3. From Chatbot to Agent: The 3.5 &amp; 4.x Era</li><li>The release of Claude 3.5 Sonnet in late 2024 marked a shift toward “Agentic” capabilities.</li><li>• Computer Use: This allowed Claude to view a screen, move a cursor, and execute commands like a human user.</li><li>• High-Res Vision: Claude 4.7 Opus expanded this by supporting resolutions up to 2576 pixels, allowing for 1:1 pixel mapping. This eliminated the need for complex “scaling math” when the model interacts with GUIs or technical blueprints.</li><li>4. Standardizing Integration: MCP</li><li>Perhaps the most significant contribution to the ecosystem in 2026 is the Model Context Protocol (MCP). Anthropic recognized that AI “silos” were a bottleneck. They released MCP as an open-source standard – the “USB-C for AI” – allowing models to connect universally to data sources like Google Drive, GitHub, and local databases without custom, brittle code for every integration.</li><li>5. The Current Peak: Claude 4.7 Opus</li><li>As of today, the flagship Opus 4.7 introduces two critical technical features:</li><li>1.	Extended Reasoning: Users can now toggle “effort levels.” For complex systems architecture or high-level math, the model spends more time “thinking” through internal chain-of-thought loops before giving an answer.</li><li>2.	Task Budgets: To prevent runaway costs in agentic loops, developers can set a “token budget.” The model sees its remaining “fuel” and self-corrects to finish the task gracefully before hitting the limit.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df22e90e8089" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most developers still clone entire repos — here’s how to avoid it and save hours.]]></title>
            <link>https://medium.com/@shambhu_/master-the-git-no-clone-workflow-pushing-files-to-specific-folders-like-a-pro-39d7262cbb4d?source=rss-980039a560e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/39d7262cbb4d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[large-codebase]]></category>
            <dc:creator><![CDATA[Shambhuyadav_]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 01:45:28 GMT</pubDate>
            <atom:updated>2026-02-24T01:57:39.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8_tku-1A21vWPFQc0Q6GYA.png" /></figure><p>As a college student balancing <strong>Rust</strong> projects and multiple coding assignments, I often find myself wanting to update a single repository without downloading the entire history of every project I’ve ever done. If you’ve ever felt like your local machine is getting cluttered with massive git clone folders, this guide is for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S554t8wGvxU55eFBZFnJZA.png" /></figure><p>Recently, while working on my <strong>Rust-Journey</strong> repository, I needed to push a specific file — buildUser.rs—directly into a folder named <strong>Chapter-4</strong>. I didn&#39;t want the baggage of Chapter 0 through 3. Here is the exact workflow I used to achieve a clean, professional &quot;No-Clone&quot; push.</p><h3>The Problem: The “Clutter” Crisis</h3><p>Normally, we are taught to clone the whole repo, move files, and push. But when your repo grows (like mine with various chapters of Rust learning), cloning becomes overkill. I had my buildUser.rs ready in a local Structs folder and wanted it to land exactly where it belonged on GitHub.</p><h3>The Solution: Sparse Checkout</h3><p>Git has a powerful feature called <strong>Sparse Checkout</strong>. It allows you to tell Git to ignore everything except the specific folders you actually care about.</p><h4>Step 1: Initialize and Connect</h4><p>Start by turning your local project folder into a Git repository and linking it to your remote GitHub URL.</p><pre>git init<br>git remote add origin https://github.com/sambhuyadav/Rust-Journey.git</pre><h4>Step 2: Enable the “Secret Sauce”</h4><p>This is the command that makes the magic happen. We enable the sparse-checkout mode and then create a “shopping list” for Git.</p><pre>git config core.sparseCheckout true<br>echo &quot;Chapter-4/*&quot; &gt;&gt; .git/info/sparse-checkout</pre><p><strong>Explanation:</strong> The first line flips the switch. The second line tells Git, “I only care about what’s inside Chapter-4.</p><h3>The Pitfall: Watch Your Terminal Path!</h3><p>One thing I learned the hard way: <strong>Terminal paths matter.</strong> If your terminal is already inside Chapter-4, Git won&#39;t find the path Chapter-4/buildUser.rs. Always make sure you are at the root of your project folder when running your add commands.</p><p>I also accidentally initialized a second Git repo <em>inside</em> my subfolder. If you see a .git folder inside your chapter folder, delete it immediately with rm -rf .git to avoid a &quot;repo-within-a-repo&quot; headache!</p><h3>Step 3: Pull, Stage, and Push</h3><p>Now that the configuration is set, we sync the remote folder and push our new code.</p><ol><li><strong>Pull existing content:</strong> This brings down any existing files (like my Notes.md) without bringing down the rest of the repo.</li></ol><pre>git pull origin main --allow-unrelated-histories</pre><p><strong>2. Move and Stage:</strong> Move your file into the pulled folder, then stage it</p><pre>git add Chapter-4/buildUser.rs</pre><p>3. Commit and Push:</p><pre>git commit -m &quot;Add buildUser.rs to existing Chapter-4 folder&quot;<br>git push origin main</pre><h3>The Result: A Clean Repository</h3><p>Great!! By using this method, I was able to keep my storage light while keeping my GitHub organized. My buildUser.rs is now safely tucked away in Chapter-4 alongside my notes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DY5lLZg0RZmMiZRZF9KFjg.png" /></figure><h3>Key Takeaways</h3><ul><li><strong>Sparse Checkout</strong> is your best friend for large repositories.</li><li><strong>Pull before you Push</strong> to ensure your local structure matches the remote.</li><li><strong>Keep it Clean:</strong> Use a .gitignore for your Rust target/ folders to avoid uploading unnecessary build files.</li></ul><p>Happy coding, and may your Git history always be clean!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39d7262cbb4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rust and Runtime Safety: Why Indexing Out of Bounds Panics Instead of Breaking Memory]]></title>
            <link>https://medium.com/@shambhu_/rust-and-runtime-safety-why-indexing-out-of-bounds-panics-instead-of-breaking-memory-10eef2da7698?source=rss-980039a560e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/10eef2da7698</guid>
            <category><![CDATA[memory-safety]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <dc:creator><![CDATA[Shambhuyadav_]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 18:07:37 GMT</pubDate>
            <atom:updated>2025-09-11T18:07:37.583Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with Rust, you might have already faced a <strong>runtime panic</strong> when trying to access an array element with an invalid index. At first, this might feel frustrating — why can’t Rust just “let it slide” the way some other low-level languages do?</p><p>The answer lies in <strong>Rust’s core principle: memory safety without sacrificing performance</strong>.</p><p>The Error in Action</p><p>Consider this snippet:</p><pre>fn main() {<br>    let numbers = [10, 20, 30, 40, 50];<br><br>    let index = 10; // deliberately invalid<br>    let element = numbers[index];<br><br>    println!(&quot;The value at index {index} is {element}&quot;);<br>}</pre><p>When you run this, Rust immediately throws a <strong>runtime panic</strong>:</p><pre>thread &#39;main&#39; panicked at &#39;index out of bounds: the len is 5 but the index is 10&#39;, ...</pre><p>The program exits, and the final println! statement never executes.</p><h3>Why Does Rust Panic Instead of Continuing?</h3><p>In Rust, <strong>array indexing is checked at runtime</strong>. This is necessary because the compiler can’t always know what value will be used as an index when the program actually runs.</p><ul><li>If the index is <strong>within bounds</strong>, the program continues safely.</li><li>If the index is <strong>greater than or equal to the length</strong>, Rust <strong>panics immediately</strong>.</li></ul><p>This design ensures that you don’t accidentally access invalid memory.</p><h3>Memory Safety in Action</h3><p>In many low-level languages like C or C++, accessing an out-of-bounds index doesn’t stop the program. Instead, it may silently return garbage values or — worse — overwrite critical parts of memory. These <strong>undefined behaviors</strong> can introduce security vulnerabilities and cause hours of debugging pain.</p><p>Rust takes a different approach. By refusing to continue after an invalid memory access attempt, it ensures:</p><ul><li><strong>No invalid memory reads/writes</strong></li><li><strong>Predictable, controlled failure</strong> instead of undefined behavior</li><li><strong>Stronger guarantees</strong> for developers building reliable systems</li></ul><p>In <strong>conclusion</strong>, Rust’s decision to panic on invalid indexing is a deliberate design choice that reinforces its commitment to memory safety and reliability. Instead of letting programs continue with dangerous, undefined behavior like many low-level languages, Rust forces developers to handle potential errors in a controlled way. This not only prevents security vulnerabilities and hard-to-trace bugs but also encourages writing cleaner, more predictable code. By blending low-level efficiency with high-level safety, Rust gives developers the confidence that their programs won’t silently corrupt memory — a guarantee that’s invaluable in building robust systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10eef2da7698" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Rust Development with Neovim: A Step-by-Step Guide for the Modern Developer]]></title>
            <link>https://medium.com/@shambhu_/mastering-rust-development-with-neovim-a-step-by-step-guide-for-the-modern-developer-c914d672ff41?source=rss-980039a560e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c914d672ff41</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[neovim]]></category>
            <category><![CDATA[ide]]></category>
            <dc:creator><![CDATA[Shambhuyadav_]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 09:38:04 GMT</pubDate>
            <atom:updated>2025-08-31T09:39:20.219Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WhbEbh3B32sloLPpKhtNlg.png" /></figure><p>For many Rustaceans, the quest for the perfect IDE experience is ongoing. While VS Code offers a comprehensive out-of-the-box solution, the power, speed, and customizability of Neovim make it an irresistible choice for those who crave a keyboard-centric, highly efficient workflow.</p><p>This guide will walk you through transforming a fresh Neovim installation into a robust Rust development environment. We’ll leverage the fantastic kickstart.nvim configuration, integrate essential tools like rust-analyzer for intelligent code features, nvim-tree.lua for file navigation, and even tackle common theming pitfalls.</p><p>Let’s dive in!</p><h3>Prerequisites: Laying the Foundation</h3><p>Before we begin, ensure you have the following installed on your system:</p><ol><li><strong>Neovim (0.9+ recommended):</strong> Check with nvim --version</li></ol><p><strong>2. Rust Toolchain:</strong> Installed via rustup. This includes rustc, cargo, and rust-analyzer.</p><p><strong>3. Git:</strong> Essential for managing plugins.</p><p><strong>4. A True Color Terminal:</strong> This is <em>critical</em> for modern themes. On macOS, <strong>iTerm2</strong> is highly recommended. For Linux, Alacritty, Kitty, or a recent GNOME Terminal usually work well. <em>(We’ll demonstrate how to check for this later)</em></p><h3>Step 1: Start Fresh with kickstart.nvim</h3><p>To ensure a clean and predictable setup, we’ll start by removing any existing Neovim configuration and then installing kickstart.nvim. This distribution provides an excellent foundation with a plugin manager, LSP client, autocompletion, and Tree-sitter already configured.</p><pre>rm -rf ~/.config/nvim<br>rm -rf ~/.local/share/nvim<br>rm -rf ~/.local/state/nvim<br>rm -rf ~/.cache/nvim</pre><ol><li><strong>2 Install </strong><strong>kickstart.nvim:</strong> Now, clone the kickstart.nvim repository:</li></ol><pre>git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim</pre><ol><li><strong>3. First Launch:</strong> Open Neovim by simply typing nvim in your terminal. You should see lazy.nvim (the plugin manager) automatically downloading and installing all the default plugins. This may take a minute or two.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRlSzqNgIYkYMyHtg4OwCA.png" /></figure><p><strong>Congratulations!</strong> You now have a fully functional base Neovim setup.</p><h3>Step 2: Integrate rust-analyzer for Smart IDE Features</h3><p>rust-analyzer is the cornerstone of a great Rust development experience. kickstart.nvim uses mason.nvim to manage Language Server Protocols (LSPs) effortlessly.</p><p><strong>2.1. Install </strong><strong>rust-analyzer via Mason:</strong></p><ol><li>Open Neovim.</li></ol><p>2. Run the command: :Mason</p><p>3. In the Mason window, find rust-analyzer (you can search by typing /rust-analyzer).</p><p>4. With your cursor on rust-analyzer, press i to install it.</p><p>5. Once installed, press q to close Mason.</p><h3>Step 3: Ensure Tree-sitter for Superior Syntax Highlighting</h3><p>Tree-sitter provides highly accurate and fast syntax highlighting. kickstart.nvim already includes it, but we&#39;ll verify the Rust parser.</p><p><strong>3.1. Check Rust Tree-sitter Parser:</strong></p><ol><li>In Neovim, run: :TSInstallInfo</li></ol><p>2. Look for rust. It should have a checkmark (✓) indicating it&#39;s installed.</p><p>3. If not, install it with: :TSInstall rust</p><h3>Step 4: Integrate Debugging with codelldb</h3><p>Debugging directly in your editor is crucial. nvim-dap (Debug Adapter Protocol client) and codelldb (the debug adapter for Rust) will provide this.</p><p><strong>4.1. Install </strong><strong>codelldb via Mason:</strong></p><ol><li>Open Mason again: :Mason</li></ol><p>2. Find codelldb and press i to install it.</p><p>3. Press q to close Mason.</p><p>4. kickstart.nvim&#39;s nvim-dap-ui and nvim-dap-virtual-text plugins will automatically pick up codelldb.</p><h3>Step 5: Personalize with a Stunning Theme (Catppuccin)</h3><p>A visually appealing theme enhances your coding experience. We’ll install Catppuccin, a popular and beautiful theme, and troubleshoot common display issues.</p><p><strong>5.1. Edit </strong><strong>init.lua to Add Catppuccin:</strong></p><ol><li>Open your Neovim configuration file: nvim ~/.config/nvim/init.lua</li></ol><p>2. Find the plugins = { ... } section. Replace any existing theme block (e.g., for tokyonight.nvim) with this exact code for Catppuccin:</p><pre>{<br>  &quot;catppuccin/nvim&quot;,<br>  lazy = false, -- IMPORTANT: Ensures the theme loads immediately<br>  name = &quot;catppuccin&quot;,<br>  priority = 1000,<br>  config = function()<br>    -- You can choose from &#39;catppuccin-latte&#39;, &#39;catppuccin-frappe&#39;, &#39;catppuccin-macchiato&#39;, &#39;catppuccin-mocha&#39;<br>    vim.cmd.colorscheme &#39;catppuccin-mocha&#39;<br>  end,<br>},</pre><p>3. Save the file (:w) and restart Neovim.</p><p><strong>5.2. Troubleshooting: If Your Theme Looks Broken (The “True Color” Issue)</strong></p><p>If your theme appears as weird blocks of color (e.g., a solid blue/cyan screen), it’s likely a terminal limitation, not a Neovim issue.</p><p><strong>The Fix: Install a True Color Terminal.</strong> For macOS, <strong>iTerm2</strong> is highly recommended. Install it via Homebrew (brew install --cask iterm2) or download from <a href="https://iterm2.com/">iterm2.com</a>. Once installed, quit your old terminal and open iTerm2, then run nvim. Your theme should now display perfectly.</p><h3>Step 6: Add a File Tree with nvim-tree.lua</h3><p>A file explorer on the left is a staple of any IDE. nvim-tree.lua provides an excellent one.</p><p><strong>6.1. Add </strong><strong>nvim-tree.lua Plugin:</strong></p><ol><li>Open nvim ~/.config/nvim/init.lua</li></ol><p>2. Add this block to your plugins = { ... } list:</p><pre>{<br>  &#39;nvim-tree/nvim-tree.lua&#39;,<br>  version = &#39;*&#39;,<br>  dependencies = {<br>    &#39;nvim-tree/nvim-web-devicons&#39;, -- For icons in the tree<br>  },<br>  config = function()<br>    require(&#39;nvim-tree&#39;).setup {}<br>  end,<br>},</pre><p><strong>6.2. Add a Keymap to Toggle the Tree:</strong></p><ol><li>Scroll to the bottom of init.lua where custom keymaps are defined.</li></ol><p>2. Add this line:</p><pre>-- Keymap for toggling NvimTree (Leader key is &#39;Space&#39; in kickstart.nvim)<br>vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;e&#39;, &#39;:NvimTreeToggle&lt;CR&gt;&#39;, { desc = &#39;Toggle file explorer&#39; })</pre><p>3. Save (:w) and restart Neovim. Now, press &lt;Space&gt;e to toggle your file tree.</p><h3>Step 7: Final Test Drive Your Rust IDE</h3><p>Let’s ensure everything works together seamlessly.</p><ol><li><strong>Create a Test Project:</strong></li></ol><pre>cargo new nvim_rust_ide_test<br>cd nvim_rust_ide_test<br>nvim src/main.rs</pre><p>2. <strong>Test LSP Features:</strong></p><ul><li><strong>Auto-completion:</strong> Inside main, type let s = String:: and observe suggestions.</li><li><strong>Error Highlighting:</strong> Introduce a typo (e.g., println!(&quot;Hello, {}!&quot;, name); without defining name). See the error highlighted.</li><li><strong>Go to Definition:</strong> Place your cursor on println! and press gd.</li></ul><p><strong>Test Debugging:</strong></p><ul><li>Modify src/main.rs:</li></ul><pre>fn main() {<br>    let x = 5;<br>    let y = 10;<br>    let z = x + y; // Cursor on this line<br>    println!(&quot;The value is: {}&quot;, z);<br>}</pre><ul><li>Compile: :!cargo build</li><li>Set Breakpoint: Move cursor to let z = x + y; and press F5.</li><li>Start Debugging: Press F9. Execution should pause at the breakpoint, showing variable values.</li><li>Stop Debugging: Press F10.</li></ul><p>If all these tests pass, you have successfully transformed Neovim into a powerful Rust IDE!</p><h3>Conclusion</h3><p>You’ve now got a highly customized and efficient environment for Rust development. The journey to master Neovim is ongoing, but with kickstart.nvim as your base and these essential Rust tools, you&#39;re off to an incredible start. Explore the init.lua further, discover more plugins, and tailor it truly to your preferences!</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c914d672ff41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>