Forked and fixed an array of issues with the popular LazyGit plugin for NeoVim (NOT VibeCoded)
▲ 69 r/neovim

Forked and fixed an array of issues with the popular LazyGit plugin for NeoVim (NOT VibeCoded)

Hey all,

I recently re-wrote the popular LazyGit plugin that is often recommended here for integrating LazyGit into NeoVim. I was using it for some time but since I only started using NeoVim, I was not very experienced in configuring it but overtime I noticed many issues the plugin has

I raised an MR with a fix for one of the issues but while fixing it, I realized the codebase is very bloated and was suffering from the burden of legacy support, so, I have forked and overhauled the codebase and added a few meaningful QoL improvements, namely:

  1. Instead of using vim.g.* for configuration, it now uses the conventional setup({}) function
  2. Plenary-based windows no longer spawn new lazygit processes, while leaking older ones (this was the issue my MR focused on).
  3. You can now use * wildcards to specify custom lazygit configurations (in case you divide them into multiple files or whatever).
  4. Plenary based buffers, as with regular buffers, now get custom buffer and window properties. This was not done in the older code for some reason.
  5. Replaced legacy VimScript FFI calls (such as through vim.fn.* methods) with vim.api.* wherever possible.

The only major trade offs are:

  1. No more Vim support (I removed all VimScript code)
  2. Needs NeoVim 0.10 >=

Link to my fork: https://github.com/103sbavert/lazygit.nvim

Also, AI was used, but for adding LuaCATS doc comments for type hints and completions, to re-arrange already finished code into different files (without changing its internals or logic), and to understand the previous code structure but every line of code is hand crafted and well understood by me. If you find any issues, please report them. This was a major re-write so some things may have fucked up, let me know if that's the case.

Also, I hate vibe coding, so rest assured, this is not one of those shitty AI-slop plugins.

u/114sbavert — 4 days ago
▲ 1 r/neovim

Configuring noice.nvim: How do I make sure previous contents of cmdline message are hidden?

Hey everyone, I recently started using NeoVim and quite like it. I am not very experienced, I only started using it the last week of June. I am tinkering around with my config which is forked off the kickstart NeoVim config by TJ. I have configured notify.nvim in my nvim config like so:

require("noice").setup({
  routes = {
    {
      view = "shell_display",
      filter = {
        event = "msg_show",
        kind = {
          "shell_out",
          "shell_err",
        },
      },
    },
  },
  views = {
    shell_display = {
      view = "split",
      size = "auto",
      enter = true,
      focusable = false,
      close = {
        keys = { "q", "<Esc>" },
      },
      buf_options = {
        filetype = "noice_shell_display",
      },
      format = {
        "{cmdline}",
        "{message}",
        "\n",
      },
    },
  },
})

(Find more at https://github.com/103sbavert/nvim-config/)

And the result looks like this: https://freeimage.host/i/C1oFrRj

This keeps appending to the original scratch buffer downwards (instead of replacing its contents) and appends the hint text that follows the cursor in the cmdline as well.

But I want to change the configuration a bit to always re-write the history buffer when a new command is triggered and only the actual shell command that was run is shown. Is that something possible with noice/nvim at this moment?

u/114sbavert — 1 month ago

Chezmoi - Symlink to a file that is also a template?

For my vicinae config, I assign the alias `browser` to Firefox on my personal PC and Chrome on my work PC. I also set chrome to be hidden on my personal PC. This is done using a chezmoi template for the vicinate.config file. The problem is that, when I change a setting within vicinae itself, the settings are changed to the target file but if I don't notice, I may end up overriding it. I want to track the config file as a symlink in the target state pointing to the actual vicinae.config.tmpl file which would then be in .chezmoiignore.

Is there a way a symlink can point to a file's state after its template has been resolved?

reddit.com
u/114sbavert — 2 months ago

Tired of AI push and with garbage code. Devs, please suggest companies without AI psychosis

TL;DR: Manager is okay, work-life-balance and pay is good for a fresher with 1 YoE but I hate the pressure to use AI no matter what even when I can do better by hand. Please suggest companies where I can switch to escape the psychosis.

​

To preface, my team manager and upper management are nice people in general. I get a good work life balance as a fresher with only 1 YoE and I've got quite a few appraisals. My manager appreciates my work a lot and has been consistently giving me appraisals - I have no complaints with regards to how my managers treat me.

​

My biggest problem is AI and garbage code. I don't hate AI, there are plenty of cool things you can learn from it but the keyword is "learn". In the end, I wanna be the one to do it and make informed decisions instead of a chatbot. I don't like handing off coding to LLMs and then press a few buttons and call it a finished feature. LLMs make learning much easier and I quite enjoy that. What I hate is the pressure to use AI and ensure I show up on the AI usage reports of the org. My colleagues keep pushing the garbage code and having to work with that code and update it/add features infuriates me a lot.

​

Please help me by suggesting companies, preferably not Indian and certainly not SBCs that I can go to to escape the psychosis. I don't mind if they use AI or something but I don't want people to be obsessed with it.

reddit.com
u/114sbavert — 2 months ago

Learning Golang by doing because I don't like watching tutorials

Greetings all,

TLDR: Created a dummy video generation CLI tool in Python because not many good ones exist. Realized Golang is better suited for the job and I really wanted to learn the language and needed an excuse to learn it anyway.


I am primarily a .NET and C# backend developer with some grasp on DevOps due to my close involvement with the actual DevOps team at my company which is busy implementing AI in everything that exists and because I daily Linux. I have been really liking what I've heard about Golang in the community so I really wanted to start learning it. I felt like it was the right balance between frictionless development and good runtime performance,

Yesterday I needed something that I realized isn't as abundant on the internet as I thought. I wanted something to retrieve random (real) videos for testing a thumbnail generation tool I am building at work. I was hesitant to use random videos on YouTube out of fear of "corporate-unfriendly" content in the video as well as legal issues with using the video for commercial use unless I've fully watched it. I wanted something like picsum.photos (you're welcome) but for videos. Before this need, I have always used sparse files using commands like truncate but they obviously only contain garbage data that cannot be transcoded. The idea was to be able to retrieve random, copyright free, completely PG13, REAL videos with a video stream but no meaningful content and on demand.

The goal of the thumbnail generation tool focuses somewhat on low-memory overhead and speed because that was one of the bottlenecks of the existing tool we used at the company. I quickly realized finding dummy sample videos of 200 - 500 MiBs is rather easy but finding videos 2 - 3 GiB large is not unless you use commercial content which invoked my aforementioned concerns. Hence the inspiration for the below tool:

GitHub https://github.com/103sbavert/vidgen

While the above text explains the intention of making the project at all, I am actually re-wrting the one-day worth of Python work I did in Golang (check the dev/golang-rewrite branch) because I really wanted a reason to learn the language without feeling I'm performing household chores by watching YT tutorials at the ripe age of 23.

Anyways, go ahead and give your best critique. Also do read the README.md (it's in the name).

u/114sbavert — 3 months ago