Skip to content

Neovim

Terminal window
# Create directory
mkdir -p ~/.config/nvim
# Get starter nvim config from https://github.com/nvim-lua/kickstart.nvim
cd ~/.config/nvim
curl -O https://raw.githubusercontent.com/nvim-lua/kickstart.nvim/master/init.lua
# On any OS, locate the configuration directory used for nvim with
:echo stdpath('config')
# e.g. on Windows it is %AppData%/Local/nvim

Read through init.lua to understand installed packages and keymaps

Source: LazyVim From Scratch To BEAST MODE

Goal is set up Neovim with LazyVim distribution for common editing tasks to start use with computer programming languages.

  • Follow LazyVim Install instructions and its documentation for description of its files and usage.
  • On first run of nvim, plugins and configurations will be set up
  • Recommend to look through key mappings. You can search key mappings to discover them and their functions with leader + s + k.

Use Astrovim with existing nvim configuration:

Terminal window
git clone --depth 1 https://github.com/AstroNvim/template ~/.config/astronvim
# Set nvim configuration to use
export NVIM_APPNAME='astronvim'
nvim
Terminal window
git clone --depth 1 https://github.com/AstroNvim/template $env:LOCALAPPDATA\astronvim
# Set nvim configuration to use
$env:NVIM_APPNAME = "astronvim"
nvim
-- mouse users + nvimtree users!
vim.keymap.set("n", "<RightMouse>", function()
vim.cmd.exec('"normal! \\<RightMouse>"')
local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
require("menu").open(options, { mouse = true })
end, {})
return {
{
{ "nvchad/volt", lazy = true },
{
"nvchad/menu",
config = function()
local options = "default" -- Load default menus
local opts = { mouse = true, border = false }
require("menu").open(options, opts)
end,
-- opts = { mouse = true, border = false },
-- config = function()
-- require("menu").open("menu", { mouse = true, border = false })
-- end,
lazy = true,
},
},
}