An open API service indexing awesome lists of open source software.

https://github.com/gtwy/lazyjim

personal configs for neovim using the lazy package manager
https://github.com/gtwy/lazyjim

lazyvim nvim vim

Last synced: about 1 month ago
JSON representation

personal configs for neovim using the lazy package manager

Awesome Lists containing this project

README

          

# lazyjim

After 15 years of using a heavily customized Vim setup, my plugins had fallen out of date. Rather than updating them piecemeal, I decided to switch to Neovim.

I initially tried LazyVim, but found that some of its defaults - like aggressive autocompletion and automatic bracket closures - didnโ€™t suit my workflow. So I wiped my config and rebuilt from scratch using just the `lazy.nvim` plugin manager.

This repo documents my personal Neovim configuration. It's tailored to my preferences, but feel free to explore, use, or suggest improvements.

## ๐Ÿงฐ Tech Stack

This Neovim config is built from scratch using [lazy.nvim](https://github.com/folke/lazy.nvim) as the plugin manager. It favors a minimalist, scriptable, and fast editing environment without the heavy abstractions of prebuilt frameworks like LazyVim.

### โš™๏ธ Plugin Manager

- [`folke/lazy.nvim`](https://github.com/folke/lazy.nvim) โ€” minimal, fast, Lua-based plugin manager
- Bootstrapped automatically on first launch
- Plugin modules are declared in `lua/plugins/`

### ๐ŸŽจ UI & UX Plugins

| Plugin | Purpose |
| ------------------------------- | ------------------------------------- |
| `rose-pine/neovim` | Elegant, dark colorscheme _(default)_ |
| `rebelot/kanagawa.nvim` | Soft, slate colorscheme |
| `AlexvZyl/nordic.nvim` | Light blue colorscheme |
| `nvim-lualine/lualine.nvim` | Statusline with icons and theming |
| `akinsho/bufferline.nvim` | Visual buffer tabline |
| `nvim-tree/nvim-web-devicons` | Filetype icons |
| `folke/which-key.nvim` | Popup keybinding hints |
| `echasnovski/mini.icons` | Optional icon enhancements |
| `folke/snacks.nvim` | Scratchpad and Git UI tools |
| `nvim-telescope/telescope.nvim` | File browser, fuzzy file, finder tool |
| `folke/persistence.nvim` | Automated session management |

### ๐Ÿ”ค Syntax & Treesitter

| Plugin | Purpose |
| --------------------------------------------------------- | --------------------------------------------- |
| `nvim-treesitter/nvim-treesitter` | Syntax highlighting via Tree-sitter |
| `folke/ts-comments.nvim` | Smarter `gc` comments (requires Neovim 0.10+) |
| `numToStr/Comment.nvim` + `nvim-ts-context-commentstring` | Context-aware commenting for JSX/HTML/etc. |

### ๐Ÿงผ Code Formatting (`conform.nvim`)

Uses format-on-save and is fully declarative by filetype.

| Filetype | Formatter |
| --------------------------- | --------------- |
| Python | `black` |
| JavaScript/TS | `prettier` |
| Shell | `shfmt` |
| PHP | `php-cs-fixer` |
| Lua | `stylua` |
| SQL | `sql-formatter` |
| HTML/CSS/JSON/YAML/Markdown | `prettier` |

> External tools installed via Mason or system packages

### ๐Ÿšจ Linting (`nvim-lint`)

Runs on `BufWritePost`, manually triggered via `l`

| Filetype | Linter |
| ------------- | -------------- |
| Python | `ruff` |
| JavaScript/TS | `eslint_d` |
| Shell | `shellcheck` |
| PHP | `php` |
| Markdown | `markdownlint` |
| JSON | `jsonlint` |
| Lua | `luacheck` |

### ๐Ÿงฑ Developer Tools

| Tool | Description |
| ------------------------------------ | ----------------------------------------------------- |
| `Mason` | Installs formatters/linters (auto-managed on startup) |
| `Ripgrep` + `fd` | Required by snacks.nvim for fuzzy finding |
| `Git` | Used by snacks' Git integration (`blame_line`) |
| `luacheck`, `ruff`, `eslint_d`, etc. | Installed via system or `Mason` |

### ๐Ÿ”ง General Settings

- Tabs: 2 spaces, soft tabs, auto/smart indenting enabled
- Mouse: Toggleable via `m` (default: off)
- Virtual diagnostics: only show for WARN+ (no inline INFO spam)
- Disable auto-comment continuation
- Lint key: `l`
- File picker: `ff`
- Grep picker: `fg`
- Buffer deletion: `bd`
- Explorer toggle: `e`
- Scratchpad: `ss`

### ๐Ÿ”ง Folder Structure

```text
~/.config/nvim/
โ”œโ”€โ”€ init.lua# Entry point, bootstraps lazy + core config
โ””โ”€โ”€ lua/ โ”œโ”€โ”€ config/ # keymaps.lua, settings.lua
โ””โ”€โ”€ plugins/ # plugin modules (treesitter, formatting, etc.)
```

## ๐Ÿ’พ Installation and Prerequisites

### ๐Ÿ”ง Neovim Installation

Install neovim unstable repo and install from a nightly build. Also includes key packages that will be needed for basic functionality.

```bash
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt update
sudo apt install neovim ripgrep fd-find git curl unzip
```

### ๐Ÿ”— Aliasing

Added this to my `~/.bashrc`

```bash
# I'll never remember to write n before vim
alias vim='nvim'
alias vi='/usr/bin/vim'
```

You may want to run `which vim` first to see if yours is actually in `/usr/bin/`

### ๐Ÿ“ฆ Lazy.nvim Installation

Install `lazy.nvim` plugin manager bare bones.

```bash
git clone https://github.com/folke/lazy.nvim.git ~/.local/share/nvim/lazy/lazy.nvim
rm -rf ~/.local/share/nvim/lazy/lazy.nvim/.git
```

It installs to `~/.local/share/nvim/lazy/lazy.nvim/`

### ๐Ÿงช Prerequisites

The following packages are needed to enable all functionality in my neovim stack, such as linting, formatting, etc.

```bash
sudo apt install \
shellcheck \
php-cli \
php-cs-fixer \
lua-check \
nodejs \
npm \
python3-pip \
luarocks
```

As a user (not sudo or root), install these for linting and formatting python

```bash
pip install black ruff --break-system-packages
```

Install node based formatters and linters

```bash
sudo npm install -g \
prettier \
eslint_d \
jsonlint \
markdownlint-cli \
sql-formatter
```

Install luarocks linter

```bash
sudo luarocks install luacheck
```

### ๐ŸŽจ Nerd Fonts (for Ligatures)

Download fonts:

- Monaspice Nerd Font
- FiraCode Nerd Font

[Get them here](https://www.nerdfonts.com/font-downloads)

Extract, right click, `install for all users`

#### Laptop (14" 1440p)

I'm using `Monaspice Neon Nerd Font Mono` 11-point Regular, with antialiasing enabled.

#### Desktop (27" 1440p)

I'm using `Monaspice Neon Nerd Font Mono` 12-point Light, with antialiasing enabled.

### Other

In close second is my second choice, `FiraCode Nerd Font Mono`, which I ran at 11-point regular on both systems.

## ๐Ÿš€ Install lazyjim

### ๐Ÿ“ฅ Clone Repo

Backup the contents of your existing `.config/nvim` folder if it already exists.

```bash
mkdir -p ~/.config/nvim/
git clone https://github.com/gtwy/lazyjim ~/.config/nvim
```

### โ–ถ๏ธ Start Neovim

On first launch, you'll want to make sure Lazy.nvim installs your plugins, Mason installs required tools, and Treesitter downloads its language parsers.

Run the following commands inside neovim

```vim
:Lazy Sync
:Mason Update
:TSUpdate
```

## ๐Ÿ“ Todo

- Add more functionality to which-key (and keymaps in general)
- Add toggleable columns with git info, line numbers
- Find more enhancements to add that don't cause bloat