Skip to content

Tetris and the fall of the USSR (and Neovim Conjure menu)

Thoughts for the week

Enjoyed watching the Tetris movie and wondered just how much was real and dramatised. Reading the background to the game it does seem the main thread of the movie is accurate, with perhaps some additional dramatic effect. It was a very enjoyable movie regardless.

I do remember the break-up of the USSR when it happened, first with Gorbachev as leader and then Boris Yeltsin. Then the Oligarchs (super rich) moved in and supported a more draconian leader in Putin (assumingly so they could keep hold of all their money).

I also remember Robert Maxwell as a disgraced billionaire that stole from his own company and mysteriously vanished from his luxury yacht.

How much Clojure needs to be knownλ︎

A person is joining my team and it leads to wondering what they should feel comfortable in regards Clojure and how best I can support them.

I'm starting to identifying aspects of Clojure that would be beneficial to know well (not having to look them up), e.g. collections, sequences, map and reduce transformations, etc. The Clojure Cheatsheet provides a simple way to categorise the topics and functions of Clojure core namespace.

Which parts of the Clojure Standard Library would be useful, e.g. clojure.spec.alpha, clojure.data.json, etc.

Neovimλ︎

Conjure may show an "unknown REPL environment" in the REPL log buffer when starting a new REPL session. This is usually a timeout in detecting the REPL due to its startup being a little overloaded.

, s l lists the current REPL sessions in the REPL log buffer.

Conjure FAQ: unknown REPL environment

Conjure does not provide names for the sub-menus the conjure commands are organised into. For example <localleader>e has a group of key bindings related to evaluation, although when shown in which-key the <localleader>e has the default label of prefix and is not very helpful.

It was suggested in ticket # that Conjure add names for these groups. The project maintainer preferred to have these added to a personal Neovim configuration.

Initially group names were added in the lua/plugins/user-practicalli.lua configuration, however, this meant that the names showed up regardless of the filetype of the current buffer. So if viewing a Lua file, the Conjure menu would still show.

The after/ftplugin/ directory is used to add filetype specific configuration, loaded each time a new filetype is switched too.

The Conjure group names were moved to after/ftplugin/clojure.lua and now they only appear when the buffer is a clojure filetype, e.g. a .clj, .cljs, .edn file

Practicalli Astro config - Clojure filetype plugin

after/ftplugin/clojure.lua
-- Load after clojure filetype set

local whichkey = require "which-key"

return {
  {
    "folke/which-key.nvim",
    -- Load Conjure Groups only for Clojure filetypes
    whichkey.add {
      -- Conjure sub-menus
      { "<LocalLeader>c", group = "Connect" },
      { "<LocalLeader>e", group = "Evaluate" },
      { "<LocalLeader>ec", group = "Comment" },
      { "<LocalLeader>g", group = "Go" },
      { "<LocalLeader>l", group = "Log" },
      { "<LocalLeader>r", group = "Refresh" },
      { "<LocalLeader>s", group = "Session" },
      { "<LocalLeader>t", group = "Test" },
      { "<LocalLeader>v", group = "Values" },
    },
  },
}

Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li