• HiPhish
  • Grid Framework
    • Overview
    • Features
    • Examples
    • Gallery
    • Showcase
    • FAQ
    • News
    • Support

    • Buy Now 35$
  • Open Source
    • NTFS-Clone
    • IPS-Tools
    • roll
    • Newton's Method in C
    • Xeen Tools
    • Wolf3D Extract
    • Game Source Documentation
  • Vim/Nvim plugins
    • Info.vim
    • REPL.nvim
    • Quicklisp.nvim
    • jinja.vim
    • Guix channel
  • Blog
  • About
  1. blog
  2. tags
  3. lua
  • Making LuaRocks (partially) compliant with the XDG Base Directory specification

    Published: 2020-12-29

    LuaRocks is a community-driven package manager for the Lua programming language. LuaRocks packages can be installed globally or in the user’s home directory, but sadly LuaRocks does not follow the XDG Base Directory specification. However, with a few lines of Lua code we can fix this shortcoming partially at least.

    Continue reading…

  • Spreading tables in Lua

    Published: 2020-12-31

    Javascript has a spreading operator which lets us splice the contents of an object or array into another object or array. This makes it very easy to create an object based on another object and override or add entries. Since Lua and Javascript are quite similar, wouldn’t it be nice to have this operator in Lua as well? Lua is a minimal language, so adding a new operator seems unlikely, but Lua is also very flexible, and we can add a spreading function instead.

    Continue reading…

  • A pipe operator for Lua

    Published: 2021-02-15

    I have recently been getting into Elixir, and one nice feature it has is the pipe operator. It allows us to express a pipeline of function through which an object will be dragged. This got me thinking: with how flexible Lua is, would it be possible to add something similar to Lua as well?

    Continue reading…

  • Testing Neovim plugins with Busted

    Published: 2024-01-29

    The most annoying part about writing plugins for Neovim has been the lack of a good test framework. There are a couple of frameworks, and Vader has been my favourite so far, but they all have their downsides. This made me wonder: why limit myself to Vim/Neovim test frameworks? We have a full Lua runtime, and other people already have solved the testing problem for Lua. Busted does 90% of what we need, so let’s fill in the remaining 10%. The following is based on my experience with adding tests to rainbow-delimiters.nvim.

    Continue reading…

  • Introducing Yo-Dawg.nvim

    Published: 2024-02-01

    Yo dawg, I heard you like Neovim, so I put a Neovim inside your Neovim, so you can edit while you edit! Ahem… anyway, in my previous post I proposed a plugin which would make it easier to control an embedded Neovim from within Neovim. So I went ahead and wrote yo-dawg.nvim (GitHub mirror), named after the “Yo dawg” internet meme.

    Continue reading…

  • Debugging Lua scripts running in Neovim

    Published: 2024-02-20

    In a previous blog post I wrote about testing Lua scripts in Neovim using the busted test framework. Today I want to look at how to debug Lua scripts in Neovim using the Debug Adapter Protocol (DAP). Just as before with busted, our problem is that we need to use Neovim as our Lua interpreter because we want to use Neovim’s Lua API. At the same time, the debug adapter expects the Lua interpreter to conform to Lua’s command-line interface. That’s right: we need another command-line interface adapter.

    Continue reading…

  • Testing Fennel in busted with Lua

    Published: 2024-08-15

    Fennel is a Lisp-like language which compiles down to Lua, so it should be possible to test Fennel scripts in busted. Indeed, we can, but there are a few points to note about testing Fennel code in Lua.

    Continue reading…

  • Introducing nvim-busted-shims

    Published: 2024-09-22

    I have written in the past about testing Neovim plugins with busted. In that post I outlined how to use a thin command-line wrapper shell script around Neovim to use Neovim as a Lua interpreter and how to configure busted to use it as the Lua interpreter to run tests in. In order to avoid having to copy-paste that snippet over and over again I have created a standalone repository for the shim: nvim-busted-shims (GitHub mirror).

    Continue reading…

  • Beware of 'require' at startup in Neovim plugins

    Published: 2025-03-24

    Recently I tagged version 0.9.1 of rainbow-delimiters.nvim. This update got rid of one really nasty mistake I had been dragging along from the very beginning until just recently: every time you started up Neovim a number of require calls would run even if you never called require a single time yourself. In this post I would like to go over how this happened, why it is bad and how I got rid of it. Even though I am using rainbow-delimiters as an example here, everything I am about to say applies to other plugins as well.

    Continue reading…

  • « First
  • ‹ Previous
  • 1 of 1
  • Next ›
  • Last »
Subscribe: RSS

Archive

  • 2026 (3)
  • 2025 (2)
  • 2024 (8)
  • 2023 (11)
  • 2022 (13)
  • 2021 (5)
  • 2020 (15)
  • 2019 (17)
  • 2018 (1)
  • 2017 (4)
  • 2016 (6)
  • 2015 (2)

Categories

  • organisation (15)
  • vim (24)
  • open-source (25)
  • misc (12)

Tags

  • html (11)
  • vim (21)
  • cocoa (1)
  • info (1)
  • rant (15)
  • lisp (21)
  • msgpack (3)
  • awk (1)
  • math (1)
  • unix (8)
  • guix (2)
  • linux (5)
  • lua (9)
  • elixir (1)
  • neovim (4)
  • web (6)
  • network (2)
  • markdown (2)
  • wine (1)
  • games (4)
  • git (2)
  • terminal (1)
  • unity3d (1)
  • python (2)
  • testing (3)
  • functional programming (1)
  • javascript (1)
  • css (1)

© 2015-2026, licensed under CC BA-SA 4.0

GitHubGitLab