First draft done for the mini-neovim post. Short and sweet. Just need to proof read and then push it to the server.
This commit is contained in:
85
content/posts/mini_neovim.md
Normal file
85
content/posts/mini_neovim.md
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
title: 'Mini Neovim'
|
||||
date: 2023-10-20T18:38:13-04:00
|
||||
tags: ["neovim", "tools"]
|
||||
author: "Me"
|
||||
showToc: false
|
||||
TocOpen: false
|
||||
draft: true
|
||||
hidemeta: false
|
||||
description: 'Neovim is already super efficient and lightweight, but sometimes I need a barebones config for my servers and
|
||||
remote, miniature development environments.'
|
||||
disableHLJS: true
|
||||
disableShare: false
|
||||
disableHLJS: false
|
||||
hideSummary: false
|
||||
searchHidden: true
|
||||
ShowReadingTime: true
|
||||
ShowBreadCrumbs: true
|
||||
ShowPostNavLinks: true
|
||||
ShowWordCount: true
|
||||
ShowRssButtonInSectionTermList: true
|
||||
UseHugoToc: true
|
||||
cover:
|
||||
image: "neovim-to-neovim-mini.png"
|
||||
alt: "Large Neovim logo, partly out of frame with a chalk arrow pointing to a smaller neovim logo with the word 'mini'."
|
||||
caption: "Creating a Miniature neovim config for even more light weight environments."
|
||||
relative: false
|
||||
hidden: true
|
||||
---
|
||||
|
||||
If I'm being honest, when I started this quick project to reduce my Neovim plugin footprint size, I thought I was going to be
|
||||
able to get rid of _way_ more plugins! Inspired by [this Reddit
|
||||
post](https://www.reddit.com/r/neovim/comments/179zawc/my_new_config_based_entirely_on_mininvim/) that setup a Neovim config
|
||||
using only [echasnovski's](https://github.com/echasnovski) [mini](https://github.com/echasnovski/mini.nvim) library, I was
|
||||
reminded that some of my remote server environments were still using Packer as their plugin manager, where my main machine
|
||||
has upgraded to Lazy. In addition, I have since expanded my main config with more applicable plugins and key maps and the
|
||||
Packer config was in a single neovim repo, as opposed to my more recently implemented [dotfiles](https://github.com/Normanras/dotfiles) setup.
|
||||
|
||||
Right now, I am using a whopping 77 plugins. That's mostly because I'm not great at cleaning out old plugins I don't use as
|
||||
much anymore. Since I am client facing, a lot of them are around making my Markdown notes easier to manage, and Python plugins
|
||||
to help with scripting and file management in the terminal. This poll shows 10-25 plugins being the most common amount.
|
||||
|
||||
<blockquote class="reddit-embed-bq" style="height:240px" data-embed-height="240"><a href="https://www.reddit.com/r/neovim/comments/14jdkbp/how_many_plugins_in_your_config_list_your/">How many plugins in your config. List your favorites!</a><br> by<a href="https://www.reddit.com/user/Bamseg/">u/Bamseg</a> in<a href="https://www.reddit.com/r/neovim/">neovim</a></blockquote><script async="" src="https://embed.reddit.com/widgets.js" charset="UTF-8"></script>
|
||||
<p></p>
|
||||
|
||||
Once I got my dotfiles to my server environment, I got to work and got rid of all the superfluous plugins like additional
|
||||
color schemes, todo-trouble, or others that I considered nice-to-have. After all, across all my VMs I'm mostly editing yaml,
|
||||
json, and python scripts and I'm not in there for a very long time. If I was a real pro, I would just use out-of-the-box Vim,
|
||||
but I really like the speed some key maps and plugins have given me.
|
||||
|
||||
You can check out my git branch [here](https://github.com/Normanras/dotfiles/tree/neovim-only-minimal). If you decide to clone it, make sure you symlink `.config` folder from a `~/.dotfiles/` directory to `~/.config/`. I've been using
|
||||
[stow](https://www.gnu.org/software/stow/manual/stow.html), but any symlink tool will work.
|
||||
|
||||
If you have a neovim config that you'd like to "minimize", see some steps below. For any dotfile config - Neovim, tmux, zsh -
|
||||
I like to make these changes in a clean environment. I want to replicate as closely as possible what a fresh install and
|
||||
setup would be like. Here's how I do it:
|
||||
{{< box info >}}
|
||||
Any curly brackets in the instructions below denote a word where you can insert whatever you'd like. But, most likely you
|
||||
want to use the curly brackets in the final string that you use.
|
||||
{{< /box >}}
|
||||
|
||||
1. Navigate to the machine/vm/server that you want to work on. For me, this VM doesn't have Neovim installed yet.
|
||||
2. [Install Neovim](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
3. Clone your main repository to either your `.config` or your `.dotfiles` directory. And run a few commands:
|
||||
* `git branch {branch-name}`
|
||||
* `git checkout {branch-name}`
|
||||
4. You'll now be in your branch, but everything will look the same. Start removing directories or files you don't need.
|
||||
5. Navigate to your plugins folder or `init.lua` that lists all your plugins and start hacking and slashing.
|
||||
6. Once you've saved all those files and you can open and close neovim without any plugin errors, you're ready to go.
|
||||
7. Navigate back to the root git directory and run a few more commands:
|
||||
* `git add .`
|
||||
* `git commit -m {Insert a detailed commit message of what you changed and updated.}`
|
||||
* `git push {remote-name} {branch-name}`
|
||||
8. And that's it! Go check your Github/Gitlab and check your branches and commits. You should see everything there! Congrats.
|
||||
|
||||
For that last command, you can always check what your remote repo's push name is by running `git remote -v`. Most often, the name will be something like `origin` or `main`. If you saw [my post on having multiple remote repos]({{< ref "posts/multiple_git_remotes" >}}), you may something like "all". Just make sure to check before pushing!
|
||||
|
||||
<style>
|
||||
.box-shortcode {
|
||||
color: #e8e8e8;
|
||||
border: none;
|
||||
}
|
||||
.post-content img {
|
||||
margin: auto
|
||||
}
|
||||
BIN
static/neovim-to-neovim-mini.png
Normal file
BIN
static/neovim-to-neovim-mini.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Reference in New Issue
Block a user