Skip to content

Neovim configuration manager and Lazy/Lua/Mason based Neovim config. Manage multiple Neovim configurations with the lazyman command. ☕

License

Notifications You must be signed in to change notification settings

doctorfree/nvim-lazyman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazyman Neovim Configuration Manager

# Install lazyman with the following two commands:
git clone https://github.com/doctorfree/nvim-lazyman $HOME/.config/nvim-Lazyman
$HOME/.config/nvim-Lazyman/lazyman.sh

Neovim Last commit Github commit activity Github issues CI Status License

NEWS! Lazyman is now available as a Kasm Workspace by adding https://doctorfree.github.io/kasm-registry/ as a Kasm 3rd party registry and installing the Neovim or Deluxe workspace in your Kasm instance.

The Lazyman Neovim configuration management menu:

The nvims Neovim configuration fuzzy selector:

The Lazyman project can be used to install, initialize, and manage multiple Neovim configurations. Over 100 popular Neovim configurations are supported.

See what's new

Follow the Installation instructions to bootstrap Lazyman. Once Lazyman is installed, execute the lazyman command to manage Neovim configurations. The lazyman command is located in ~/.local/bin/lazyman.

The two primary features of the Lazyman project are the lazyman command and the nvims shell function. The lazyman command provides a menu interface and command line options to install, initialize, and manage multiple Neovim configurations. The nvims shell function dynamically generates a fuzzy searchable menu of Neovim configurations from which to select. The selected configurations can be opened in Neovim, removed, or a configuration information document can be viewed.

More info on the nvims and neovides shell functions can be found below in the nvims fuzzy selector section, in the nvims man page with man nvims, with the command nvims -U, or in Neovim using the nvim-Lazyman configuration with :h Nvims.

The lazyman command separates Neovim configurations into 5 categories: Base, Language, Personal, Starter, and Custom. The Base category consists of well tested Neovim configurations and distributions, all of which provide significant value. The Language category includes Neovim configurations tailored for a specific programming or document format language. The Personal category includes personal Neovim configurations that provide significant value or demonstrate some cool features. Configurations in the Personal category are not necessarily intended for public use, these repositories are maintained for the personal use of the authors but are included here for their value. The Starter category includes Neovim configurations tailored to serve as a starting point for developing your own Neovim configuration. These include the popular Neovim Kickstart configuration, a Modern Neovim config, the PDE personal development environment config, and the Neovim configurations provided by the nvim-starter project. The Custom category includes any additional Neovim configurations installed and initialized with lazyman by the end-user using the -C url and -N nvimdir options.

In addition, Lazyman installs and initializes the Lazyman Neovim configuration, a richly configured Neovim environment using Lua, Lazy, and Mason to support highlighting, completion, diagnostics, and more for many programming languages.

The installation and initialization of Neovim configurations are placed in separate directories and managed using the NVIM_APPNAME environment variable.

Note that a full installation and initialization of all supported Neovim configurations, plugins, language servers, formatters, linters, and tools will consume over 20GB of disk space.

The lazyman command is installed as ~/.local/bin/lazyman and can be used to install, initialize, remove, and manage multiple Neovim configurations.

Table of Contents

Requirements

The lazyman Neovim configuration manager requires Neovim 0.9. The lazyman installation and initialization process checks for Neovim 0.9 and, if not found, installs it and required dependencies and tools.

Lazyman requires Linux or macOS, git, and the Bash shell version 4 or later.

  • Unix/Linux/macOS
  • Neovim 0.9 (automatically installed if not found)
  • Bash version 4 or later (automatically installed if not found)
  • Git version 2 or later

Note: CentOS 7 users should upgrade git and macOS users upgrade bash.

To enable installation of language servers and treesitter syntax highlighting gcc, node, and npm are required. For example, to install these requirements on Ubuntu Linux:

sudo apt install build-essential
sudo apt install nodejs
sudo apt install npm

Github API rate limiting

If you are in a corporate network or large shared network you may encounter rate limiting issues when attempting to access the Github API. To increase your rate limit, create and export a Github personal access token:

export GITHUB_TOKEN=<your-github-token>

macOS users

Even the latest versions of macOS ship with Bash 3.2 which dates from 2007. The Lazyman initialization process will update your system with a modern Bash using Homebrew:

brew install bash

The initialization process also makes sure it is found first in your PATH. For example, export PATH="/usr/local/bin:${PATH}" or export PATH="/opt/homebrew/bin:${PATH}".

Installation

The Lazyman installation process consists of two steps.

Step 1, clone the Lazyman repository:

git clone https://github.com/doctorfree/nvim-lazyman $HOME/.config/nvim-Lazyman

Step 2, initialize the Lazyman Neovim configuration:

$HOME/.config/nvim-Lazyman/lazyman.sh

These 2 steps perform the following:

  1. Download the Lazyman Neovim configuration
  2. Initialize the Lazyman Neovim configuration which:
    1. Installs language servers and tools for coding diagnostics
    2. Installs the latest version of Neovim if not already installed
    3. Installs and initializes configured Neovim plugins

After the download and initialization are complete, execute the lazyman command found in ~/.local/bin/lazyman.

By default, Lazyman uses the native package manager to install Neovim dependencies and tools. Supported native package managers include:

  • apt or apt-get on Debian based platforms (e.g. Ubuntu)
  • dnf or yum on RPM based platforms (Fedora, CentOS, Red Hat)
  • pacman on Arch Linux and Arch-Like platforms
  • apk on Alpine Linux
  • xbps-install on Void Linux
  • zypper on SUSE Linux

Further details on Lazyman installation including command line options to direct lazyman to install Neovim, dependencies and tools using Homebrew or to skip the Neovim installation altogether can be found on the Install tab of the Lazyman website

Supported configurations

View details of each supported configuration at the Lazyman website.

Over 100 popular Neovim configurations are supported in the following configuration categories:

Base Configs
Abstract AstroNvimPlus Basic IDE
Ecovim LazyVim LunarVim
MagicVim NvChad SpaceVim
Language Configs
AlanVim Allaman CatNvim Cpp Go Go2one Insis
Knvim LaTeX LazyIde LunarIde LvimIde Magidc Nv
NV-IDE Orange Python Rust SaleVim Shuvro Webdev
Personal Configs
Adib Ahsan Artur Beethoven Brain
Charles Chokerman Craftzdog Dillon Elianiva
Elijah Enrique Heiker J4de Jdhao
Josean JustinNvim Kodo Kristijan LamarVim
Maddison Metis Mini OnMyWay ONNO
Optixal Orhun Primeagen Rafi RNvim
Roiz SeniorMars Simple Slydragonn Spider
Traap Vimacs Wuelner xero Xiao
Starter Configs
AstroNvimStart Barebones Basic CodeArt CosmicNvim
Ember Fennel HardHacker JustinOhMy Kickstart
KickstartPython Kabin Micah Modern Normal
nvim2k NvPak PDE Rohit Scratch
SingleFile
VonHeikemen Starter Configs
BasicLsp BasicMason Extralight LspCmp Minimal
Modular Opinionated StartBase StartLsp StartMason

Base configurations

The Lazyman "Base" Neovim configurations are well tested, full featured Neovim configurations that provide an excellent base starting point for exploring the features of lazyman and the wealth of Neovim configuration possibilities.

All "Base" Neovim configurations can be installed and initialized with lazyman -B.

View descriptions of the Lazyman "Base" Neovim configurations

Language configurations

In addition to the base Neovim configurations listed above, lazyman can install and initialize several "Language" Neovim configurations. These can be used as programming or document format specific Neovim configurations. The Language category configurations either employ a specific language or target specific language(s).

[Note:] The Language category does not include all supported Lazyman Neovim configurations with programming language support. In fact, most Neovim configurations support several programming languages. The Language category simply serves as a convenience to get started exploring language support.

All of the "Language" configurations can be installed and initialized with the command lazyman -L all. Individual "Language" configurations can be installed with the -L lang option.

View descriptions of the Lazyman "Language" Neovim configurations

Personal configurations

In addition to the base and language Neovim configurations listed above, lazyman can install and initialize several "Personal" Neovim configurations. These are used as personal Neovim configurations, so there are no guarantees made about stability or compatibility. Each supported personal configuration uses some interesting approach and provides significant value making them worthy of study, exploration, and possible use in tailoring your own configuration.

All of the 'Personal' configurations can be installed and initialized with the command lazyman -W. Individual 'Personal' configurations can be installed with the -w conf option.

View descriptions of the Lazyman "Personal" Neovim configurations

Starter configurations

The "Starter" Neovim configurations include Basic, Kickstart, NvPak, Modern, PDE, and those provided by VonHeikemen, the author of LSP Zero.

All of the "Starter" configurations can be installed and initialized with the command lazyman -X. Individual "Starter" configurations can be installed with the -x conf option.

View descriptions of the Lazyman "Starter" Neovim configurations

Custom configurations

Lazyman includes support for Custom Neovim configurations. To install and initialize a Neovim configuration not supported out-of-the-box by Lazyman, use the -C url and -N nvimdir options to lazyman.

View details and examples of installing and initializing Lazyman "Custom" Neovim configurations.

Features

Lazyman Command Features

View the features of the lazyman command.

See the Usage section for details on lazyman command usage.

Lazyman Neovim Configuration Features

View the features of the Lazyman Neovim configuration.

What's New

Shiny New Lazyman Websites
Lazyman
lazyman.dev
AstroNvim
astronvim.lazyman.dev
LazyVim
lazyvim.lazyman.dev
LunarVim
lunarvim.lazyman.dev
NvChad
nvchad.lazyman.dev
CandyVim
candyvim.lazyman.dev
LazyIde
ide.lazyman.dev
Webdev
webdev.lazyman.dev

A convenience script has been introduced to invoke Neovim with the Lazyman Neovim configuration regardless of NVIM_APPNAME environment setting. The lman command can be used to edit a file using the Lazyman Neovim config:

lman /path/to/file.ext

Thanks to Github user wxguy for this convenience script.

View the latest Lazyman news on the News tab of the Lazyman website.

Usage

View Lazyman command line usage on the Usage tab of the Lazyman website.

Supported plugin managers

Lazyman currently supports the following Neovim plugin managers:

The SpaceVim bundled plugin manager, dein, is supported only for the SpaceVim install and initialization but Neovim configurations preconfigured to use the dein plugin manager may install and initialize successfully.

Neovim configurations using other plugin managers will likely fail to cleanly install and initialize using lazyman. Support for additional plugin managers is not currently planned but if you have a need for this feature open an issue.

To install and initialize a Neovim configuration that uses the Packer plugin manager invoke lazyman with the -P flag. See the Packer section below.

To install and initialize a Neovim configuration that uses the Plug plugin manager invoke lazyman with the -p flag. See the Plug section below.

Updates

To update a previously installed Lazyman Neovim configuration execute lazyman -U -N <nvimdir> to update the Neovim configuration in ~/.config/<nvimdir>, lazyman -U -A to update all configurations, or lazyman -U to update the nvim-Lazyman configuration. Updates retrieve any newly modified files from the respective Github repository while preserving local modifications. Note, if a file has been modified both locally and in the repository then it will not be updated and retain only local modifications.

Lazyman manual

The lazyman bootstrap process installs a lazyman manual page in ~/.local/share/man/man1/lazyman.1. This man page includes a synopsis of the lazyman command line options, a brief description of its use, a description of each command line option, and several example invocations.

The lazyman manual page can be viewed with man lazyman.

Lazyman Neovim help can be viewed inside Neovim with :h Lazyman.

Lazyman configuration

The nvim-Lazyman Neovim configuration includes a top-level configuration file, ~/.config/nvim-Lazyman/lua/configuration.lua. This file can be use to enable, disable, and configure nvim-Lazyman components. For example, here is where you would configure whether neo-tree or nvim-tree is enabled as a file explorer. Or, disable the tabline, disable the statusline, set the colorscheme, theme, and theme style. The configuration.lua file is intended to serve as a quick and easy way to re-configure the nvim-Lazyman Neovim configuration but you can still dig down into the options.lua, keymaps.lua, autocmds.lua and more.

Configuration sections

The lua/configuration.lua configuration file contains the following sections with settings briefly described here:

Namespace selection

The Lazyman Neovim configuration contains three separate and distinct configurations. The setting conf.namespace in lua/configuration.lua controls which configuration is active. The supported values for conf.namespace are ecovim free and onno. The free namespace is the same configuration used in previous releases of Lazyman. The onno namespace is based on the ONNO configuration with modifications and enhancements to integrate this config with lazyman. The ecovim namespace is based on the Ecovim configuration with modifications and enhancements to integrate with lazyman. The default Lazyman configuration namespace is ecovim.

To switch Lazyman namespaces, run the command:

lazyman -O <namespace>

Where <namespace> is one of ecovim, free, or onno.

This setting is configurable via the lazyman menu system, as are most of the Lazyman configuration settings (lazyman -F).

Theme configuration

The nvim-Lazyman Neovim configuration includes pre-configured support for several themes including support for statusline and tabline theme coordination. The active theme and colorscheme is selected in configuration.lua by setting conf.theme. For themes that support different styles, the theme style is selected by setting conf.theme_style. Theme transparency can be enabled with conf.enable_transparent. For example, to use the kanagawa theme with dragon style and transparency disabled, set:

conf.theme = "kanagawa"
conf.theme_style = "dragon"
conf.enable_transparent = false
Supported themes

A configuration file for each theme is in lua/themes/ and lualine theme configuration for each theme and its styles in lua/themes/lualine.

Use <F8> to step through themes.

Available styles are:

  • kanagawa
    • wave
    • dragon
    • lotus
  • tokyonight
    • night
    • storm
    • day
    • moon
  • onedarkpro
    • onedark
    • onelight
    • onedark_vivid
    • onedark_dark
  • catppuccin
    • latte
    • frappe
    • macchiato
    • mocha
    • custom
  • dracula
    • blood
    • magic
    • soft
    • default
  • nightfox
    • carbonfox
    • dawnfox
    • dayfox
    • duskfox
    • nightfox
    • nordfox
    • terafox
  • monokai-pro
    • classic
    • octagon
    • pro
    • machine
    • ristretto
    • spectrum
Plugin configuration

Several Neovim plugins in the nvim-Lazyman configuration can be optionally installed or replaced by another plugin with similar functionality. The plugins that are configurable in this way in configuration.lua are briefly described below along with their default settings:

  • Neovim session manager to use, either persistence or possession
    • conf.session_manager = "possession"
  • Enable display of ascii art
    • conf.enable_asciiart = false
  • Delete buffers and close files without closing your windows
    • conf.enable_bbye = true
  • Enable display of custom cheatsheets
    • conf.enable_cheatsheet = true
  • Enable coding plugins for diagnostics, debugging, and language sservers
    • conf.enable_coding = true
  • Enable compile plugin to compile and run current file
    • conf.enable_compile = false
  • If coding is enabled, enable Github Copilot
    • conf.enable_copilot = false
  • If coding is enabled, enable Neoai, https://github.com/Bryley/neoai.nvim
    • conf.enable_neoai = false
  • Enable dressing plugin for improved default vim.ui interfaces
    • conf.enable_dressing = true
  • Enable easy motions, can be one of "hop", "leap", or "none"
    • conf.enable_motion = "leap"
  • Enable note making using Markdown preview and Obsidian plugins
    • conf.enable_notes = true
  • Enable renamer plugin for VS Code-like renaming UI
    • conf.enable_renamer = true
  • Enable ranger in a floating window
    • conf.enable_ranger_float = true
  • Enable multiple cursors
    • conf.enable_multi_cursor = true
  • Neo-tree or nvim-tree, false will enable nvim-tree
    • conf.enable_neotree = true
  • Replace the UI for messages, cmdline and the popup menu
    • conf.enable_noice = true
  • Enable ChatGPT (set OPENAI_API_KEY environment variable)
    • conf.enable_chatgpt = false
  • Enable the wilder plugin
    • conf.enable_wilder = false
  • The statusline (lualine) can be enabled or disabled
    • conf.enable_statusline = true
  • The winbar with navic location can be one of barbecue, standard, or none
    • conf.enable_winbar = "standard"
  • Enable LSP progress in winbar
    • conf.enable_lualine_lsp_progress = true
  • Enable the rebelot/terminal.nvim terminal plugin
    • conf.enable_terminal = true
  • Enable playing games inside Neovim!
    • conf.enable_games = true
  • Enable the Alpha dashboard
    • conf.dashboard = "alpha"
  • Enable the Neovim bookmarks plugin (https://github.com/ldelossa/nvim-ide)
    • conf.enable_bookmarks = false
  • Enable the Neovim IDE plugin (https://github.com/ldelossa/nvim-ide)
    • conf.enable_ide = false
  • Enable Navigator
    • conf.enable_navigator = true
  • Enable Project manager
    • conf.enable_project = true
  • Enable smooth scrolling with the neoscroll plugin
    • conf.enable_smooth_scrolling = true
  • Enable window picker
    • conf.enable_picker = true
  • Show diagnostics, can be one of "none", "icons", "popup". Default is "popup"
    • conf.show_diagnostics = "icons"
  • Enable semantic highlighting
    • conf.enable_semantic_highlighting = true
  • Convert semantic highlights to treesitter highlights
    • conf.convert_semantic_highlighting = true

Additional plugin configuration and options are available in configuration.lua.

Click here to view the

Lazyman default configuration.lua

local conf = {}

-- Namespace to use, available namespaces are "ecovim", free", and "onno"
-- Switching namespace changes to a completely different configuration
-- This is an example of how to incorporate multiple Neovim configurations
-- into a single configuration.
conf.namespace = "ecovim"
--
-- THEME CONFIGURATION
-- Available themes:
--   nightfox, tokyonight, dracula, kanagawa, catppuccin,
--   tundra, onedarkpro, everforest, monokai-pro
-- A configuration file for each theme is in lua/themes/
-- Use <F8> to step through themes
conf.theme = "tokyonight"
-- Available styles are:
--   kanagawa:    wave, dragon, lotus
--   tokyonight:  night, storm, day, moon
--   onedarkpro:  onedark, onelight, onedark_vivid, onedark_dark
--   catppuccin:  latte, frappe, macchiato, mocha, custom
--   dracula:     blood, magic, soft, default
--   nightfox:    carbonfox, dawnfox, dayfox, duskfox, nightfox, nordfox, terafox
--   monokai-pro: classic, octagon, pro, machine, ristretto, spectrum
conf.theme_style = "moon"
-- enable transparency if the theme supports it
conf.enable_transparent = true

-- GLOBAL OPTIONS CONFIGURATION
-- Some prefer space as the map leader, but why
conf.mapleader = ","
conf.maplocalleader = ","
-- Toggle global status line
conf.global_statusline = true
-- set numbered lines
conf.number = true
-- enable mouse see :h mouse
conf.mouse = "nv"
-- set relative numbered lines
conf.relative_number = true
-- always show tabs; 0 never, 1 only if at least two tab pages, 2 always
conf.showtabline = 2
-- enable or disable listchars
conf.list = true
-- which list chars to show
conf.listchars = {
  eol = "",
  tab = ">.",
  trail = "~",
  extends = "",
  precedes = "",
}
-- use rg instead of grep
conf.grepprg = "rg --hidden --vimgrep --smart-case --"

-- ENABLE/DISABLE/SELECT PLUGINS
--
-- AI coding assistants - ChatGPT, Code Explain, Codeium, Copilot, NeoAI
-- Enable Github Copilot if you have an account, it is superior
--
-- Enable ChatGPT (set OPENAI_API_KEY environment variable)
conf.enable_chatgpt = false
-- Enable Code Explain (requires 3.5GB model, uses GPT4ALL)
conf.enable_codeexplain = false
-- Enable Codeium
conf.enable_codeium = false
-- Enable Github Copilot
conf.enable_copilot = false
-- Enable Neoai, https://github.com/Bryley/neoai.nvim
conf.enable_neoai = false
-- Enable tabnine, https://github.com/Bryley/neoai.nvim
conf.enable_tabnine = false
--
-- Enable display of ascii art
conf.enable_asciiart = false
-- Delete buffers and close files without closing your windows
conf.enable_bbye = true
-- Enable display of custom cheatsheets
conf.enable_cheatsheet = true
-- Enable coding plugins for diagnostics, debugging, and language servers
conf.enable_coding = true
-- Enable compile plugin to compile and run current file
conf.enable_compile = false
-- Enable dressing plugin for improved default vim.ui interfaces
conf.enable_dressing = true
-- Enable easy motions, can be one of "hop", "flash", "leap", or "none"
conf.enable_motion = "leap"
-- Enable note making using Markdown preview and Obsidian plugins
conf.enable_notes = false
-- If notes enabled, markdown preview to use (preview, peek, none)
conf.markdown_preview = "peek"
-- If notes enabled, Neorg notes folders, multiple folders supported
conf.neorg_notes = {
  "~/Documents/Notes/Neorg", -- NEORG_NOTES
  -- "XXXXX", -- NEORG_NOTES
  -- "YYYYY", -- NEORG_NOTES
  -- "ZZZZZ", -- NEORG_NOTES
}
-- Enable note making using Obsidian
conf.enable_obsidian = false
-- If Obsidian enabled, Obsidian vault folder (relative to HOME)
conf.obsidian_vault = "Documents/Notes/Obsidian"
-- Enable renamer plugin for VS Code-like renaming UI
conf.enable_renamer = true
-- Enable ranger in a floating window
conf.enable_ranger_float = true
-- Highlight sections of code which might have security or quality issues
conf.enable_securitree = false
-- neovim session manager to use: persistence, possession, or none
conf.session_manager = "persistence"
-- File explorer tree plugin: neo-tree, nvim-tree, or none
conf.file_tree = "neo-tree"
-- Replace the UI for messages, cmdline and the popupmenu
conf.enable_noice = true
-- Enable smart column display
conf.enable_smartcolumn = true
-- Enable 'StartupTime' command
conf.enable_startuptime = true
-- Add/change/delete surrounding delimiter pairs with ease
conf.enable_surround = true
-- Enable the wilder plugin
conf.enable_wilder = false
--
-- Lualine, Tabline, and Winbar configuration
--
-- The Lualine style can be "free" or "onno"
conf.lualine_style = "free"
-- Separator for 'onno' style lualine components, can be "bubble" or "arrow"
conf.lualine_separator = "bubble"
-- Enable fancy lualine components
conf.enable_fancy = false
-- The statusline (lualine), tabline, and winbar can each be enabled or disabled
-- Enable statusline (lualine)
conf.enable_statusline = true
-- Enable status in tabline
conf.enable_status_in_tab = false
-- Enable winbar with navic location
-- Can be one of "barbecue", "standard", or "none"
-- Barbecue provides a clickable navic location, standard has more info
conf.enable_winbar = "barbecue"
-- Enable LSP progress in winbar
conf.enable_lualine_lsp_progress = true
-- Enable rebelot/terminal.nvim
--
conf.enable_terminal = true
-- Enable toggleterm plugin
conf.enable_toggleterm = true
-- Enable window animations (mini.animate)
conf.enable_animate = true
-- Enable ducks, cats, dinosaurs, and other animals wandering around
conf.enable_duck = true
-- Enable window animations (flirt)
conf.enable_flirt = false
-- Enable playing games inside Neovim!
conf.enable_games = true
-- Enable the WakaTime metrics dashboard (requires API key)
conf.enable_wakatime = false
-- Enable zen mode distraction-free coding
conf.enable_zenmode = true
-- if zenmode enabled then enable terminal support as well
conf.enable_kitty = false
conf.enable_alacritty = false
conf.enable_wezterm = false
-- Enable a dashboard, can be one of "alpha", "dash", "mini", or "none"
conf.dashboard = "alpha"
-- Number of recent files, dashboard header and quick links settings
-- only apply to the Alpha dashboard
-- Number of recent files shown in dashboard
-- 0 disables showing recent files
conf.dashboard_recent_files = 3
-- Enable the header of the dashboard
conf.enable_dashboard_header = true
-- Enable quick links of the dashboard
conf.enable_dashboard_quick_links = true
-- Enable either the Drop screensaver or the Zone screensaver
-- Drop can be one of xmas, stars, leaves, snow, spring, summer, or drop
-- Zone can be one of treadmill, matrix, epilepsy, vanish, or zone
-- 'drop' indicates a random drop, 'zone' a random zone
-- 'random' to randomly select between the two, 'none' to disable
conf.enable_screensaver = "none"
-- Screensaver timeout in minutes
conf.screensaver_timeout = 15
-- Enable the Neovim bookmarks plugin (https://github.com/ldelossa/nvim-ide)
conf.enable_bookmarks = false
-- Enable the Neovim IDE plugin (https://github.com/ldelossa/nvim-ide)
conf.enable_ide = false
-- Enable Navigator
conf.enable_navigator = true
-- Enable Project manager
conf.enable_project = true
-- Enable window picker
conf.enable_picker = true
-- Enable smooth scrolling with neoscroll plugin
conf.enable_smooth_scrolling = true
-- Enable the Neotest plugin
conf.enable_neotest = false

-- PLUGINS CONFIGURATION
-- media backend, one of "ueberzug"|"viu"|"chafa"|"jp2a"|"catimg"|"none"
conf.media_backend = "jp2a"
-- Style of indentation, can be one of:
-- 'background' colored' 'context' 'listchars' 'mini' 'simple' 'none'
conf.indentline_style = "mini"
-- treesitter parsers to be installed
conf.treesitter_ensure_installed = {
  "bash",
  "c",
  "lua",
  "markdown",
  "markdown_inline",
  "query",
  "regex",
  "vim",
  "vimdoc",
}
-- Enable clangd or ccls for C/C++ diagnostics
-- Note: if enabled then the tool must be installed and in the execution path
conf.enable_ccls = true
conf.enable_clangd = false
-- Typescript language server. Can be "tsserver" "tools" or "none"
conf.typescript_server = "tools"
-- LSPs that should be installed by Mason-lspconfig
-- Leave the 'LSP_SERVERS' trailing comment, it is used by lazyman
conf.lsp_servers = {
  "bashls",        -- LSP_SERVERS
  "cssls",         -- LSP_SERVERS
  "cssmodules_ls", -- LSP_SERVERS
  "denols",        -- LSP_SERVERS
  "dockerls",      -- LSP_SERVERS
  "emmet_ls",      -- LSP_SERVERS
  -- "eslint",     -- LSP_SERVERS
  -- "gopls",      -- LSP_SERVERS
  "graphql",       -- LSP_SERVERS
  "html",          -- LSP_SERVERS
  "jdtls",         -- LSP_SERVERS
  "jsonls",        -- LSP_SERVERS
  "julials",       -- LSP_SERVERS
  "ltex",          -- LSP_SERVERS
  "lua_ls",        -- LSP_SERVERS
  "marksman",      -- LSP_SERVERS
  "prismals",      -- LSP_SERVERS
  "pylsp",         -- LSP_SERVERS
  "pyright",       -- LSP_SERVERS
  "sqlls",         -- LSP_SERVERS
  "tailwindcss",   -- LSP_SERVERS
  "texlab",        -- LSP_SERVERS
  "tsserver",      -- LSP_SERVERS
  "vimls",         -- LSP_SERVERS
  "vuels",         -- LSP_SERVERS
  "yamlls",        -- LSP_SERVERS
}
-- Formatters and linters installed by Mason
conf.formatters_linters = {
  "actionlint",      -- FORMATTERS_LINTERS
  "gofumpt",         -- FORMATTERS_LINTERS
  "goimports",       -- FORMATTERS_LINTERS
  "golines",         -- FORMATTERS_LINTERS
  "golangci-lint",   -- FORMATTERS_LINTERS
  "google-java-format", -- FORMATTERS_LINTERS
  "latexindent",     -- FORMATTERS_LINTERS
  "markdownlint",    -- FORMATTERS_LINTERS
  "prettier",        -- FORMATTERS_LINTERS
  "sql-formatter",   -- FORMATTERS_LINTERS
  -- "shellcheck",   -- FORMATTERS_LINTERS
  "shfmt",           -- FORMATTERS_LINTERS
  "stylua",          -- FORMATTERS_LINTERS
  "tflint",          -- FORMATTERS_LINTERS
  "yamllint",        -- FORMATTERS_LINTERS
}
-- Formatters and linters installed externally
conf.external_formatters = {
  "beautysh",        -- FORMATTERS_LINTERS
  "black",           -- FORMATTERS_LINTERS
  "flake8",          -- FORMATTERS_LINTERS
  "ruff",            -- FORMATTERS_LINTERS
}
-- enable greping in hidden files
conf.telescope_grep_hidden = true
-- Show diagnostics, can be one of "none", "icons", "popup". Default is "popup"
--   "none":  diagnostics are disabled but still underlined
--   "icons": only an icon will show, use ',de' to see the diagnostic
--   "popup": an icon will show and a popup with the diagnostic will appear
conf.show_diagnostics = "popup"
-- Enable semantic highlighting
conf.enable_semantic_highlighting = true
-- Convert semantic highlights to treesitter highlights
conf.convert_semantic_highlighting = true

return conf

Lazyman Neovim Terminal

The Lazyman Neovim configuration includes Neovim Terminal management via terminal.nvim. This Neovim terminal is preconfigured for execution of the lazyman command. Shortcut key bindings to execute lazyman in a Neovim terminal have been provided: <leader>lm to bring up the main Lazyman menu, and <leader>lc to bring up the Lazyman configuration menu. While in Neovim with the default nvim-Lazyman configuration, pressing ,lm will execute the lazyman command in a Neovim floating terminal window and pressing ,lc will execute lazyman -F in a terminal window. Alternately, executing the Neovim command :Lazyman will also bring up the lazyman command in a Neovim terminal.

The Lazyman Neovim configuration includes an autocmd to automatically enter insert mode when opening the Neovim Terminal. This allows immediate input to the lazyman prompt. While in the Neovim Terminal the normal Neovim mode, motion, and command key bindings are in effect. For example, to leave insert mode press <ESC>, to re-enter insert mode press i or a.

If Asciiville is installed, pressing ,A or executing the :Asciiville Neovim command will execute the asciiville command in a Neovim floating terminal window.

If the htop command is available, :Htop will execute the htop system monitor in a floating Neovim terminal window.

This preconfigured Neovim terminal capability is only available in the Lazyman Neovim configuration and not in the other configs.

Motivation

I'm a lazy man. I wanted to try out a bunch of nifty looking Neovim configurations but I didn't want to spend a lot of time setting each of them up and managing them. Instead, I spent a lot of time writing an install/initialize/manage tool I could use: lazyman.

Although the primary motivation for creating this project was to provide an easy way to try out various Neovim configurations, lazyman can be used to setup and manage Neovim configurations tailored for specific purposes. A Neovim configuration for work, one for school, one for Python development, another for git repository maintenance and markdown editing, one with language servers and debugging tools, one for your mom.

It's also pretty interesting and educational to see how some of these Neovim Wizards setup their configurations.

Inspiration

Lazyman was inspired by several other Neovim distributions and configurations including:

Some of these distributions, like the work of Michael Peter, are released under an MIT license and I was able to copy directly configuration or initialization code. Others, like the work of Marc Jakobi, are released under a more restrictive license and I was only able to use these as reference but still a valuable aid. I copied my own previous work liberally.

Thanks everybody!

Notes

View the Lazyman Notes in the Lazyman Notes article on the Lazyman website.

Windows Subsystem for Linux

If you have installed Lazyman in the Windows Subsystem for Linux (WSL) then set the NVIM_APPNAME environment variable on the Windows side with:

setx NVIM_APPNAME "nvim-<ConfigName>"
# For example, to use the AstroNvimV4 configuration
setx NVIM_APPNAME "nvim-AstroNvimV4"

Where nvim-<ConfigName> is the Neovim configuration directory you want to use in WSL.

Then set WSLENV to include NVIM_APPNAME with something like:

setx WSLENV NVIM_APPNAME/u

Removal

The lazyman.sh script can be used to remove previously installed Neovim configurations with the -r command line option. For example, to remove a previously installed LazyVim configuration, its initialized plugins, state, and cache, execute the following command:

$HOME/.config/nvim-Lazyman/lazyman.sh -l -r

To remove the nvim-Lazyman configuration and associated plugins, state, and cache:

$HOME/.config/nvim-Lazyman/lazyman.sh -r

All lazyman.sh operations can be performed as a dry run with -n. For example, to see which LazyVim folders would be removed without removing any:

$HOME/.config/nvim-Lazyman/lazyman.sh -n -l -r

Known limitations and troubleshooting

View Lazyman known limitations and troubleshooting in the Known Limitations and Troubleshooting article on the website.

Appendix

Get configuration script

Neovim 0.9 introduced a new feature which allows execution of Lua scripts in Neovim from the shell command line. The lazyman configuration menu interface uses this new feature to get the current Lazyman Neovim configuration with shell commands like:

GET_CONF="${HOME}/.config/nvim-Lazyman/scripts/get_conf.lua"
confval=$(NVIM_APPNAME="nvim-Lazyman" nvim -l ${GET_CONF} ${confname} 2>&1)

The get_conf.lua script can also be used to retrieve option or variable settings in any Neovim configuration. For example, to retrieve the value of the 'mouse' option in the nvim-Webdev Neovim configuration:

GET_CONF="${HOME}/.config/nvim-Lazyman/scripts/get_conf.lua"
NVIM_APPNAME="nvim-Webdev" nvim -l ${GET_CONF} mouse
Click here to view the

Lazyman get_conf.lua script

-- Invoke with 'nvim -l get_conf.lua conf_name'
-- Where 'conf_name' is:
--   - one of the entries in lua/configuration.lua
--   - the keyword 'config_home' to get configuration location info
--   - an option/variable name to retrieve its value
--
-- For example, to retrieve the Lazyman configuration 'namespace' setting:
--
-- #!/bin/bash
-- NVIM_APPNAME="nvim-Lazyman" \
--   nvim -l ~/.config/nvim-Lazyman/scripts/get_conf.lua namespace
--
-- or, to retrieve the value of the 'mouse' option in the Webdev config:
--
-- #!/bin/bash
-- NVIM_APPNAME="nvim-Webdev" \
--   nvim -l ~/.config/nvim-Lazyman/scripts/get_conf.lua mouse

local config = vim.inspect(_G.arg[1])
local arg = string.gsub(config, '"', "")
local app_name = os.getenv("NVIM_APPNAME") or ""

local function get_var(var_name, default_value)
  local s, v = pcall(function()
    return vim.api.nvim_get_option(var_name)
  end)
  if s then
    return v
  else
    s, v = pcall(function()
      return vim.api.nvim_get_var(var_name)
    end)
    if s then
      return v
    else
      return default_value
    end
  end
end

local function print_var(entry)
  if type(entry) == "string" then
    io.write(entry .. "\n")
  elseif type(entry) == "table" then
    table.sort(entry)
    for _, val in ipairs(entry) do
      io.write(val .. "\n")
    end
  else
    io.write(tostring(entry) .. "\n")
  end
end

if arg == "config_home" then
  local config_home = vim.fn.stdpath("config")
  io.write("Neovim configuration location = " .. vim.fn.expand(config_home) .. "\n")
  io.write("NVIM_APPNAME = " .. app_name .. "\n")
else
  local var_val = ""
  if app_name == "nvim-Lazyman" then
    local settings = require("configuration")
    local entry = settings[arg]
    if entry ~= nil then
      print_var(entry)
    else
      var_val = get_var(arg, "")
      print_var(var_val)
    end
  else
    var_val = get_var(arg, "")
    print_var(var_val)
  end
end

Pretty simple, huh? Thanks Neovim!

Lazyman source code

The convenience script to install and initialize nvim-Lazyman is provided at lazyman.sh. The automated install and initialization is performed by lazyman and install_neovim.sh.

View the lazyman.sh script on the Lazyman website

Install neovim and tools

The lazyman command checks for a current version of Neovim and, if not found or if the existing version is less than 0.9, invokes the install_neovim.sh script to install Neovim, dependencies, language servers, and tools.

Not all language servers and tools are installed. If additional language support is desired, it can usually be provided by Mason or Homebrew. For example, to provide support for Composer run brew install composer.

The automated Neovim installation is performed by install_neovim.sh. View the install_neovim.sh script on the Lazyman website.