krsnac7 / nvim-one

All your nvim config in one single file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single file nvim configuration

A clean, organized pre-configured neovim configuration in a single init.lua.

For documentation check init.lua.

If you want to start from scratch but with some helper functions you can try out blank.lua file.

This init.lua comes with the following plugins pre-configured to work together with each other:

Motivation

This is just my take on creating just one single config file to handle all configurations for nvim. Where having multiple files brings an overhead of maintenance of logic in different files, I wanted to take a more straight forward approach of keeping it all in one file.

The aim is to take away the mental model of multiple files and just use one file with a couple simple methods to manage and organize your code within a single file in order to have a better nvim experience.

One such method is to navigate through different sections with search tags, that comes in the form of words attached to different sections in within comments. Using / and searching for the tag will jump you to that section.

For example, if you want to navigate to the packer section to add additional plugins you would then search for /PLUG and it will take you to that section. The same for when you want to configure some part of your LSP configuration, you would search for /LSP and you will be directed to the relevant LSP section of the code.

Installation

Linux/MacOS:

NOTE: If you have an existing config, you should make a backup of it.

git clone https://github.com/creativenull/nvim-one.git ~/.config/nvim

Troubleshooting

Errors installing on first time

You can ignore those and restart nvim, the problem is usually the plugin setup being called before the plugin is even installed.

Treesitter highlights don't work on lua files, getting errors on every line

Try to run :TSUpdate to get the latest parser for lua.

Saving file does not reload config, or run packer to install plugins

Make sure you follow the installation method above for it to work properly, if you ran with ln -s ... to link the directory to ~/.config/nvim then it won't work for now.

Alternatively, you can try <Leader>vs to reload config manually.

About

All your nvim config in one single file.


Languages

Language:Lua 100.0%