Skip to content
Ronald Record edited this page Sep 14, 2023 · 8 revisions

Usage

The lazyman.sh script is located in ~/.config/nvim-lazyman. It installs itself as $HOME/.local/bin/lazyman. If $HOME/.local/bin is in your execution PATH then lazyman can be executed from the command line as simply lazyman. The manual page can be viewed with man lazyman. Within Neovim the nvim-lazyman help doc can be viewed with :h nvim-lazyman.

The lazyman command can be used to install and initialize multiple Neovim configurations. For example, to install and initialize the LazyVim starter configuration execute the command lazyman -l. To install and initialize all supported Lazyman Neovim configurations execute lazyman -A. To update a previously installed Lazyman Neovim configuration execute lazyman -U -N <nvimdir> or lazyman -U -A to update all configurations.

After installing and initializing Neovim configurations with lazyman, easily explore various configurations with the lazyman -e <config> ... command. See the Using lazyman to explore configurations section below for details.

To remove a Lazyman Neovim configuration execute lazyman -r -N <nvimdir>. To remove the configuration and all its backups, lazyman -R -N <nvimdir>. To remove all installed Lazyman Neovim configurations and their backups without being prompted to proceed, execute lazyman -A -R -y.

The usage message for lazyman:

Usage: lazyman [-A] [-a] [-B] [-b branch] [-c] [-d] [-E config] [-e]
   [-f path] [-F menu] [-g] [-i group] [-j] [-k] [-l] [-m] [-M] [-s]
   [-S] [-v] [-n] [-O name] [-p] [-P] [-q] [-Q] [-h] [-H] [-I] [-J]
   [-L lang] [-rR] [-C url] [-D subdir] [-N nvimdir] [-G] [-tT] [-U]
   [-V url] [-w conf] [-W] [-x conf] [-X] [-y] [-Y] [-z] [-Z] [-K conf] [-u]
   [health] [info] [init] [install [bob]] [open] [remove] [search] [status] [usage]
Where:
    -A indicates install all supported Neovim configurations
    -a indicates install and initialize AstroNvimPlus Neovim configuration
    -B indicates install and initialize all 'Base' Neovim configurations
    -b 'branch' specifies an nvim-Lazyman git branch to checkout
    -c indicates install and initialize NvChad Neovim configuration
    -d indicates debug mode
    -D 'subdir' specifies the subdirectory of the repository to retrieve
    -e indicates install and initialize Ecovim Neovim configuration
    -E 'config' execute 'nvim' with 'config' Neovim configuration
       'config' can be one of:
           'lazyman', 'astronvim', 'kickstart', 'magicvim',
           'ecovim', 'nvchad', 'lazyvim', 'lunarvim', 'spacevim'
       or any Neovim configuration directory in '~/.config'
           (e.g. 'lazyman -E lazyvim foo.lua')
    -f 'path' fix treesitter 'help' parser in config file 'path'
    -F 'menu' indicates present the specified Lazyman menu
       'menu' can be one of:
           'main', 'conf', 'lsp', 'format', 'plugin', 'lazyide', 'webdev'
    -G indicates no plugin manager, initialize with :TSUpdate
    -g indicates install and initialize Abstract Neovim configuration
    -j indicates install and initialize BasicIde Neovim configuration
    -k indicates install and initialize Kickstart Neovim configuration
    -l indicates install and initialize LazyVim Neovim configuration
    -m indicates install and initialize MagicVim Neovim configuration
    -M indicates install and initialize Mini Neovim configuration
    -O 'name' indicates set Lazyman configuration to namespace 'name'
       'name' can be one of: free onno toggle
    -s indicates install and initialize SpaceVim Neovim configuration
    -v indicates install and initialize LunarVim Neovim configuration
    -S indicates show Neovim configuration fuzzy selector menu
    -n indicates dry run, don't actually do anything, just printf's
    -p indicates use vim-plug rather than Lazy to initialize
    -P indicates use Packer rather than Lazy to initialize
    -q indicates quiet install
    -Q indicates exit after performing specified action(s)
    -h indicates use Homebrew to install rather than native pkg mgr
        (Pacman is always used on Arch Linux, Homebrew on macOS)
    -H indicates compile and install the nightly Neovim build
    -i 'group' specifies a group to install/remove/update
       'group' can be one of:
           astronvim kickstart lazyvim lunarvim nvchad packer plug
    -I indicates install all language servers and tools for coding diagnostics
    -J indicates install indicated repo as an AstroNvim custom configuration
    -L 'lang' indicates install the 'lang' Language configuration
       'lang' can be one of:
           All AlanVim Allaman CatNvim Cpp Go Go2one Insis Knvim LaTeX LazyIde LunarIde LvimIde Magidc Nv NV-IDE Orange Python Rust SaleVim Shuvro Webdev
    -r indicates remove the previously installed configuration
    -R indicates remove previously installed configuration and backups
    -C 'url' specifies a URL to a Neovim configuration git repository
    -N 'nvimdir' specifies the folder name to use for the config given by -C
    -t indicates list all installed Lazyman Neovim configurations
    -T indicates list all uninstalled Lazyman Neovim configurations
    -U indicates update an existing configuration
    -V 'url' specifies an NvChad user configuration git repository
    -w 'conf' indicates install and initialize Personal 'conf' config
       'conf' can be one of:
           All Adib Artur Beethoven Brain Charles Craftzdog Daniel Dillon Elianiva Elijah Enrique Kristijan Heiker J4de Josean JustinLvim JustinNvim Kodo LamarVim Lukas LvimAdib Maddison Metis Mini ONNO OnMyWay Optixal Orhun Primeagen Rafi Roiz Simple Slydragonn Spider Traap Wuelner xero Xiao
    -W indicates install and initialize all 'Personal' Neovim configurations
    -x 'conf' indicates install and initialize nvim-starter 'conf' config
       'conf' can be one of:
           All 2k AstroNvimStart Barebones Basic CodeArt Cosmic Ember Fennel HardHacker JustinOhMy Kabin Kickstart Lamia Micah Normal NvPak Modern pde Rohit Scratch SingleFile BasicLsp BasicMason Extralight LspCmp Minimal StartBase Opinion StartLsp StartMason Modular
    -X indicates install and initialize all 'Starter' configs
    -y indicates do not prompt, answer 'yes' to any prompt
    -Y indicates use the following arguments as 'name'/'value' to set Lazyman config
       For example: lazyman -Y theme kanagawa
       If the 'name' argument is 'get' then the current value is returned
    -z indicates do not run nvim after initialization
    -Z indicates do not install Homebrew, Neovim, or any other tools
    -K 'conf' indicates install 'conf' in development unsupported config
    -u displays this usage message and exits
    'health' generate and display a health check for a configuration
    'info' open an information page for a configuration in the default browser
    'init' initialize specified Neovim configuration and exit
    'install' fuzzy search and select configuration to install
    'install bob' install the Bob Neovim version manager
    'open' fuzzy search and select configuration to open
    'remove' fuzzy search and select configuration to remove
    'search' fuzzy search and select configurations for a plugin
    'status' displays a brief status report and exits
    'usage' displays this usage message and exits
Commands act on NVIM_APPNAME, override with '-N nvimdir' or '-A'
Without arguments lazyman installs and initializes nvim-Lazyman
or, if initialized, an interactive menu system is displayed.

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 nvim-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:

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 M.theme. For themes that support different styles, the theme style is selected by setting M.theme_style. Theme transparency can be enabled with M.enable_transparent. For example, to use the kanagawa theme with dragon style and transparency disabled, set:

M.theme = "kanagawa"
M.theme_style = "dragon"
M.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
  • monokai-pro
    • classic
    • octagon
    • pro
    • machine
    • ristretto
    • spectrum
  • catppuccin
    • latte
    • frappe
    • macchiato
    • mocha
  • nightfox
    • carbonfox
    • dawnfox
    • dayfox
    • duskfox
    • nightfox
    • nordfox
    • terafox
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
    • M.session_manager = "possession"
  • Neo-tree or nvim-tree, false will enable nvim-tree
    • M.enable_neotree = true
  • Replace the UI for messages, cmdline and the popupmenu
    • M.enable_noice = true
  • Enable the newer rainbow treesitter delimiter highlighting
    • M.enable_rainbow2 = true
  • Enable the wilder plugin
    • M.enable_wilder = false
  • The statusline (lualine) and tabline can each be enabled or disabled
    • M.disable_statusline = false
    • M.enable_tabline = true
  • The winbar with location
    • M.enable_winbar = false
  • Enable playing games inside Neovim!
    • M.enable_games = true
  • Enable the Alpha dashboard
    • M.enable_alpha = true
  • Enable the Neovim bookmarks plugin (https://github.com/ldelossa/nvim-ide)
    • M.enable_bookmarks = false
  • Enable the Neovim IDE plugin (https://github.com/ldelossa/nvim-ide)
    • M.enable_ide = false
  • Enable Navigator
    • M.enable_navigator = true
  • Enable Project manager
    • M.enable_project = true
  • Enable window picker
    • M.enable_picker = true

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

View the 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