Mutable Variables

Making a variable mutable is simple with the mut keyword. Mutability means that the value of a variable can be overwritten. See the example below:

fn main() {
  // the `mut` keyword means that 'x' is now able to be overwritten
  let mut x = 1;
  println!("The value of x is {x}");  // prints 1 as the value of x
  x = 2;
  println!("The value of x is {x}");  // prints 2 as the value of x
}

Neovim Plugins

It’s been another hot minute since I have posted, but in that time, I have begun dabbling in the realm of Lua and Neovim plugins. Neovim is an upgraded version of the classic Linux Vim text editor, which is itself an upgrade of Vi. Neovim has tons of support for plugins and color schemes alike, and using Lua, I have created a few of my own. Links to those repositories will be published in the “Projects” tab of the website. Let me briefly describe what each of these plugins are and what they do.

Autocommit

Autocommit is a plugin that started out as a joke with a simple concept: every time a user saves a file that is in a local git repository, those changes will be automatically committed and pushed. This is certainly not ever going to be useful at its current state, nor was it intended to have a real application; however, in future versions, this plugin will be cleaned up to perhaps have a better functionality. Right now, it has a few quirks and bugs to be ironed out, but for a spur-of-the-moment joke plugin, it works surprisingly well.

Color-Roulette

This is another joke plugin that I may refactor to be actually useful in the future. The idea for this was also pretty straightforward: the user is allowed to configure up to five favorite color schemes, and a color scheme is chosen at random on startup. The catch is that a hardcoded light-mode plugin is also in the mix to be chosen, meaning that there is a 1/6 chance that light-mode may be enabled at any given startup. This will eventually be phased out to perhaps be an Easter egg configuration parameter in favor of a more useful color scheme randomizer.

I plan to work on other plugins in the future, and I’ve learned a lot of fun things about Neovim and writing plugins with Lua. I’ll continue to post updates here as they occur.

Welcome!

This is my first post on this website. This site will serve as a hub for all projects moving forward. All source code from said projects will be available on my GitHub page. Each time I cut a release for a game, mod, or other project, I will post the changelog on this site. Each project will also have its own wiki available on this site, as well as a carbon copy available on its corresponding GitHub repo. Soon, I’ll post my first project here on the website. For now, have a great day, and make sure to subscribe for email notifications about new posts!