- Notifications
You must be signed in to change notification settings - Fork116
Neovim KISS configuration with Lua
License
brainfucksec/neovim-lua
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Plugins
- Directory Tree
- Files and Settings
- Installation
- LSP Configuration
- Appearance
- Keymaps
- Configuration Check
- Screenshots
- Guides and Resources
- Other Neovim Lua Project
- Lua Resources
- Disclaimer
- Thanks to
lazy.nvim - A modern plugin manager for Neovim
lualine.nvim - A blazing fast and easy to configure neovim statusline plugin written in pure lua.
nvim-lspconfig - A collection of common configurations for Neovim's built-in language server client
nvim-cmp - Auto completion plugin
LuaSnip - Snippet Engine for Neovim written in Lua
nvim-tree.lua - A File Explorer written In Lua
indentBlankline - Adds indentation guides to all lines (including empty lines)
nvim-autopairs - A super powerful autopairs for Neovim
Tagbar - A class outline viewer for Vim
gitsigns - Super fast git decorations implemented purely in lua/teal
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
alpha-nvim - A fast and highly customizable greeter for neovim.
nvim-web-devicons - A Lua fork of vim-devicons
${HOME}/.config/nvim
/nvim
init.lua: Main configuration file that call
luamoduleslua: The directory of
luamodules, these modules are called in theinit.luafile (see below).
See:nanotee/nvim-lua-guide: Where to put Lua files
/nvim/lua/core
autocmds.lua: Define autocommands with Lua APIs
colors.lua: Define Neovim and plugins color scheme
keymaps.lua: Keymaps configuration file, Neovim and plugins keymaps
lazy.lua: Plugin manager configuration file
options.lua: General Neovim settings
statusline.lua: Statusline configuration file
/nvim/lua/plugins
alpha-nvim.lua: Dashboard
indent-blankline.lua: Indent line
nvim-cmp.lua: Autocompletion settings
nvim-tree.lua: File manager settings
nvim-treesitter: Treesitter interface configuration
InstallNeovim v0.11.x.
InstallNerd Fonts, (the font of the screenshots are
JetBrainsMono Nerd Font).InstallNode.js - npm for download packages of LSP language servers, see:LSP Configuration.
Make a backup of your current
nvimfolder if necessary:
mv ~/.config/nvim ~/.config/nvim.backup- Download neovim-lua with
gitand copy thenvimfolder in the${HOME}/.configdirectory:
git clone https://github.com/brainfucksec/neovim-lua.gitcd neovim-lua/cp -Rv nvim ~/.config/Installlazy.nvim for install and manage the plugins, see:lazy.nvim - Installation
Run Neovim for download/sync plugins with
lazy
nvim- Install LSP language servers with
npm, see:Languages Currently Supported
sudo npm install -g \ bash-language-server \ pyright \ vscode-langservers-extracted \ typescript typescript-language-server- Install additional packages for plugins support:
C, C++:
Python:
- Open a source file of one of the supported languages with Neovim, and run command:LspInfo for verify the LSP support.
See:nvim-lspconfig - Quickstart
Lua -builtin
Bash -bashls
Python -pyright
C, C++ -clangd
HTML, CSS, JSON -vscode-langservers-extracted
JavaScript, TypeScript -ts_ls
LSP server configs:nvim-lspconfig #doc/LSP configs
Fonts: See:Installation
Icons:nvim-web-devicons
See:Screenshots
The color scheme (default: OneDark) is defined in the following file:
- Neovim UI -nvim/lua/core/colors.lua:
--[[Set Neovim UI color scheme.Current available color schemes: onedark, kanagawa, monokai-pro, rose-pine.See: https://github.com/brainfucksec/neovim-lua#appearanceInsert preferred color scheme in the `color_scheme` variable.Note: Color scheme is loaded in the "Load color scheme" section below, setupmust be called before loading.--]]localstatus_ok,color_scheme=pcall(require,'onedark')-- Color scheme setup before load:require('onedark').setup({-- Your settings here.})--[[Load color scheme:Note: The instruction to load the color scheme may vary depending on thepackage.See the README of the related color scheme (i.e. git package) for information,Examples: require('color_scheme').setup{}, vim.cmd('color_scheme')--]]require('onedark').load()
These are the default keymaps, in the following shortcuts, the<leader> key is set up to, (comma) character, see:keymaps.lua.
| Shortcut | Mode | Description |
|---|---|---|
kk | Insert | Esc withkk |
<leader>c | Normal | Clear search highlights |
<F2> | Normal | Toggle Paste mode |
<leader>tk/th | Normal | Change split orientation (vertical/horizontal) |
<Ctrl> + {h,j,k,l} | Normal | Move around splits windows |
<leader>r | Normal | Reload configuration file |
<leader>s | Normal | Save file |
<leader>q | Normal | Save (close all windows) and exit from Neovim |
<Ctrl> + t | Normal | Open terminal (:Term) |
<Esc> | Terminal | Exit terminal |
<Ctrl> + n | Normal | Open NvimTree |
<leader>t | Normal | Open/Close Tagbar |
- Open nvim and run command
checkhealth, you should not see any error in the output (except for the one related to the Python 2 interpreter if don't have it):
:checkhealth
- You can also use the
startuptimeoption to read the nvim startup logs:
nvim --startuptime nvim-start.lognvim nvim-start.logSee::help startuptime
Also you can check the plugins configuration and startup time withlazy:
:checkhealth lazy
:LazyprofileNote: Screenshots may be out of date compared to the actual setup.
(Click to expand)
OneDark Darker
OneDark Dark
OneDark Cool
OneDark Deep
Kanagawa Wave (lualine theme: palenight)
Kanagawa Dragon (lualine theme: seoul256)
Monokai (lualine theme: molokai)
Rosé Pine (lualine theme: nightfly)
lazy.nvim
This setup is based onKISS principle, probably some concepts may not be valid for everyone. Then feel free to take what you need butdon't install anything without checking first!
This setup is not a Framework but it is the configuration I use to work on Linux, it can be used by default as it can be a start point to understand how Neovim is structured and maybe improve this config. Is the base configuration I use, and it tries to stay as simple as possible, with each addition weighted along these lines.
- All the contributors who helped improve this setup with their reports and advices and all the authors of the sources mentioned above.
About
Neovim KISS configuration with Lua
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.












