-
-
Notifications
You must be signed in to change notification settings - Fork 17
Lazyman Configuration
The nvim-lazyman Neovim configuration is a synthesis of the best features
from LazyVim, AstroNvim, the Allaman config, and several others combined
with some features from my vim-plug based Vim configuration.
One of the features of the nvim-lazyman Neovim configuration is the
lua/configuration.lua configuration file which allows the user to
enable or disable a variety of features. For example, this file controls
which dashboard is used, whether Noice is enabled, which session manager
is used, which theme is used, and much more.
This document will attempt to describe the features, options, plugin
configurations, and key bindings of the nvim-lazyman Neovim configuration.
The primary feature of the nvim-lazyman Neovim configuration is the inclusion
of the lazyman command to easily install, initialize, manage, and explore
multiple Neovim configurations.
- Package management and plugin configuration via lazy.nvim
- Mnemonic keyboard mappings inspired by Spacemacs via which-key.nvim; no more than three keystrokes for each keybinding
- Replace the UI for messages, cmdline and popupmenu via noice.nvim
- Fully featured status line via lualine and tabline
- Terminal integration via nvim-toggleterm.lua
- Fancy notifications via nvim-notify
- Code diagnostics via LSP
- Dashboard via alpha.nvim with recent files and quick links
- Multiple preconfigured themes: catppuccin, tokyonight, nightfox, tundra, monokai-pro, kanagawa, onedarkpro, and everforest
- Over 90 plugins
- Fast startup < 70 ms 🚀
- Telescope.nvim for all your search needs
- Project management with Project.nvim
- File tree navigation/manipulation via neo-tree
- Better Tmux navigation with your home row via Navigator.nvim
- Convenient jumping through windows with nvim-window-picker
- Auto completion powered by nvim-cmp
- Built-in LSP configured via nvim-lspconfig, mason, and mason-lspconfig
- Debugging for Go and Python via nvim-dap and friends
- Treesitter and Tresitter-textobjects for your syntax needs
- Auto formatting via null-ls.nvim
- Excellent Go support via LSP and go.nvim including sensible keybindings
- Always know where you are in your code via nvim-navic
- Git integration via Neogit and gitsigns
- Outlining symbols with symbols-outline.nvim
- Snippets provided by Luasnip and friendly snippets with autocompletion
- Schema integration via LSPs for Kubernetes, package.json, GitHub workflows, gitlab-ci.yml, kustomization.yaml, and more
Go development

Debugging via DAP

Leader Key Clusters via which-key

See ./lua/plugins/which-key.lua for details.
If you have Docker on your system you can try out this config via the provided Dockerfile
You can build the Docker image locally on your own:
docker build -t nvim .docker run --name nvim --rm -it nvimdocker run --name nvim --rm -it -v ${HOME}/tmp:/home/nvim/mount nvimdocker run --name nvim --rm -it --entrypoint=/bin/bash nvimI created an installation script that sets up all required tools on a fresh machine to work with my Neovim config.
For now, it works on Debian/Ubuntu and Arch. MacOS will be added soon.
USE AT YOUR OWN RISK!!
There are some tools that are required in order to use some features/plugins:
- ripgrep
- fd
- fzf
- make and gcc or clang for telescope-fzf-native.nvim
For neo-tree delete functionality:
For Latex functionality:
The following programs should be installed on your system so that the appropriate tools can be installed:
- Go
- Python
- NodeJs > 12
- Cargo
Go related dependencies are managed by go.nvim and are installed by running :GoInstallBinaries (when a Go file is loaded). They are installed in your $GOPATH.
All other dependencies are managed by Mason. Tools are installed by running :MasonToolsInstall (in vim.fn.std path("data") .. "mason"). [Mason requirements](https://GitHub.com/William beman/mason.nvim#requirements) must be available on your system.
| Mode | key | binding |
|---|---|---|
| n | space | Leader key |
| n | <c-h | j | k | l> | Change window focus (including Tmux panes) |
| n | <leader>Tab | Switch to previously opened buffer |
| n | <Tab> | Switch to next buffer (bnext) |
| n | <S-Tab> | Switch to previous buffer (bprevious) |
| n | st | Visual selection with Treesitter hint textobject |
| v | sa | Add surrounding |
| n | sd | Delete surrounding |
| n | sr | Replace surrounding |
| n | <c-Tab> | Start auto completion (without typing anything) |
| n/v | ga | Start mini.align (align text) |
| n | gcc | Toggle line comment |
| n/v | gc | Toggle line comment (works with movements like gcip) |
| n | ss | Search 2 char (mini.jump2d) |
| i/s | <c-j> | Luasnip expand/forward |
| i/s | <c-k> | Luasnip backward |
| i | <c-h> | Luasnip select choice |
| n | <c-n> | Toggleterm (opens/hides a full terminal in Neovim) |
| i | <c-l> | Move out of closing brackets |
| n | <CR> | Start incremental selection |
| v | <Tab> | Increment selection |
| v | <S-Tab> | Decrement selection |
| n | <c-f> | Search buffer |
| i/v/n/s | <c-s> | Save file |
Hit <leader> to start which-key which gives you more mappings grouped by topic.
tree1 .
.
├── ftplugin # file specific settings
├── init.lua # main entry point
├── lazy-lock.json # Lockfile for Lazy.nvim
├── lazyman.sh # lazyman command shell script
├── lua # lua configuration
├── man # lazyman formatted manual page
├── markdown # lazyman manual page source
├── scripts # convenience bash scripts (install_neovim.sh)
├── snippets # snippets directory (luasnip style)tree1 lua
lua
├── autocmds.lua # autocmds for various things
├── config # configuration folder for plugins
├── configuration.lua # lazyman configuration
├── globals.lua # global functions
├── lazy.lua # Lazy configuration
├── keymaps.lua # key bindings
├── options.lua # vim options
├── plugins # plugins and their configuration
├── themes # themes and their configuration
├── utils # utility functionsEach plugin to be installed is defined in ./lua/plugins/ in a separate file.
The intention of my Neovim configuration was never to be a fully customizable "distribution" like LunarVim, SpaceVim, etc. but from time to time I like to change my color scheme and the idea of making this configurable came to my mind. Based upon this idea I implemented some further lightweight configuration options that might be useful.
All options can be found in ./lua/settings.lua.
You can add LSPs via lsp_servers in settings.lua. The server will be installed by Mason und loaded by nvim-lspconfig. If you want to pass settings for the LSP have a look at ./lua/plugins/lsp/settings/ how to add settings for specific LSPs.
You can remove unwanted plugins by just removing the appropriate file in ./lua/plugins/. Lazy will take care of removing the plugin.
Keep in mind that some plugins are configured to work in conjunction with other plugins. For instance, autopairs is configured in ./lua/vim/config/treesitter.lua. For now there is no logic implemented that cross-checks such dependencies.
If you want to follow my method adding a plugin is straight forward:
Create a file in ./lua/plugins/ following the expected format of Lazy.
Open another instance of Neovim (I always try to keep one running instance of Neovim open in case I messed up my config) and run Lazy sync.