Skip to content

liraymond04/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim

My personal neovim configuration

Used as a submodule in my main dotfiles repository

Structure

Document points of interest in config file structure

nvim/               // root
├─ lua/
│  ├─ core/         // main vim configs
│  ├─ plugins/
│  │  ├─ configs/   // plugin setup
│  │  ├─ utils/
├─ init.lua         // entry point

core

  • init.lua - loads in user options and handles basic flow
  • autocommands.lua - creates autocommands and augroups
  • keymaps.lua - user defined key mappings
  • options.lua - user defined vim options
  • plugins.lua - plugin install and setup

plugins

  • init.lua - returns table of plugins to install
  • setup.lua - include file for plugin configuration and setup
  • configs/ - contains configuration and setup for plugins
  • utils/ - contains utility functions not part of plugin setup

Tips

  • Commenting out the requires "core" in the root init.lua disables the configuration (same as using unconfigured Neovim)
  • Commenting out requires "core.plugins" in core/init.lua disables user installed plugins
  • Individual plugins can be disabled by commenting out their requires lines in plugins/setup.lua
    • Note: tpope/vim-sleuth is an exception, it's not a Lua plugin and is loaded by the package manager
  • Plugins can be installed by adding a plugin's repo [author]/[repo-name] to the lua table in plugins/init.lua

Setup

Arch Linux

Install nvim and make

sudo pacman -S nvim make

If copy and paste doesn't work, install xsel

sudo pacman -S xsel

Open Neovim with the nvim command

nvim

Plugins, language servers, and treesitter parsers should be installed when entering nvim for the first time (may need a restart after installation is complete)