nvim
nvim copied to clipboard
neovim lua cfg
- Preview
- Try it out with Docker!
- Pitch
- The Main Goals
- Philosophy and side infos
- Nvim Log
- Setup
- Manual Setup
- Auto Setup
- Requirements
- Customize
- Mappings
- Inspirations and sources
Preview
https://user-images.githubusercontent.com/4050749/169545588-198c7dab-11fa-4306-bcd0-9f1eea4b0556.mp4
Try it out with Docker!
(stable version)
docker run -it \
-v $(pwd):/mnt/workspace \
danielnehrig/nvim:latest
(nightly version)
docker run -it \
-v $(pwd):/mnt/workspace \
danielnehrig/nvim:nightly
Pitch
This Config represents a full IDE experience
Focus on idiomatic mappings with simplicity
Synopsis
I've been using vim for about 7-8 years nowWhile I was aware that neovim was a thing I didn't really understand or tried to understand which problems it tries to solve which vim has one day I jumped about features for the 0.5.0 upcoming release which was about the native LSP in neovim while I was using YCM at that time for VIM (which I was pretty happy with) I thought lets give it a shot how it works for neovim this is when I realized that neovim had a LUA JIT implemented at that moment I was sold to it due to prior lua experience I investigated the lua plugin ecosystem while fairly small at that time it grew and grew and grew... It looked promising now we are here back at it again configuring the same editor with better features this time getting an IDE like experience getting rid of prior pain points with vim and getting rid of bad habits. The journey begins
Started 09.04.21
The Main Goals
The Config should fully support:
- Typescript / Javascript
- CSS/SASS/SCSS
- Rust
- Java
- Go
- Dockerfile
- Yaml
- Json
- Python
CONFIG SETUP:
- IDE capabilities (lsp, debug, project management, build, lint, test) ✅
- Debloating the Config (staying under 100ms boot uptime) ✅
- remove unused plugins ✅
- move to the build in LSP ✅
- add formatting and linting ✅
- Debug ✅
- intuitive mappings ✅
- fast tab/buffer navigation ✅
- project management ✅
- session management ✅
- file management ✅
- lazy load plugins ✅
- Treesitter Setup ✅
- Refactoring ✅
Philosophy and side infos
Vim is a modal text editing solution so is neovim
it does not strive to be an ID, but it offers IDE like capabilities
with it's exposed lua API and the Community revolving around it
creating a big up-and-coming plugin ecosystem
since vim/neovim are writtin in c it's a blazing fast editor
vs its competitors
while it has its plugin ecosystem and IDE like capabilities
it does not offer an out-of-the-box solution like VSCode
for that case boilerplate configurations like Lunarvim or Lvim are out there
even this config would be a great place to start to have IDE like capabilities
it's inspired by Lvim though not cloned
Nvim Log
Logs created on
- i9 9900k 5Ghz
- 32 GB Ram
- Arch Linux
Setup
Manual Setup
git clone https://github.com/danielnehrig/nvim ~/.config/nvim && cd ~/.config/nvim./package.pynvim +'autocmd User PackerComplete sleep 100ms | qa'nvim +'autocmd User PackerComplete TSInstall all' +'PackerSync'
Auto Setup
DESTRUCTIVE
NOTE: THIS WILL DELETE YOUR CURRENT ~/.config/nvim folder
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/danielnehrig/nvim/master/autoinstall.sh)"
Requirements
Most of the requirements can be installed over the ./package.py script
Requirements
Font:
Nerd Font any Monospaced One (if not monospaced the dashboard logo will not work) I use FiraCode Nerd Font Mono for regular and bold and VictorMono Nerd Font for italics
Package managers:
- python3.9
- node
- go
- rust/cargo
- luarocks
- brew (mac support)
- yay (archlinux support)
NVIM V ^0.7.*
LSPs in path:
- pyright
- efm (for lint and formatting mainly lua and JS, TS)
- typescript-language-server
- rust-analyzer
- gopls
- sumneko-lua
- jdtls
- etc... check lsp config for more info
DAP:
- Some Adapters can be installed with Dap install
- Java Adapter has to be installed manually
Customize
We have a config layer copy and paste the default config layout from config.core.default_config
and create folder and file rootFolder/lua/config/custom/init.lua
paste in the default_configs values and adjust accordingly
Mappings
Maps
-
Space is the leader key
-
d - is for Debug
-
g - is for misc LSP actions
-
q - quickfix
-
l - loclist
-
u - utility (disable diagnostic etc)
-
f - file related (telescope)
-
w - window
Inspirations and sources
- Lvim
- nvchad and module suite
- Theme based solution (which I incorporated packer themes in)
- If the theme modules wouldn't be strictly written for nvchad I would have used their module
- base16