~/.config/nvim
~/.config/better-vim
better-vim.lua
- You’ll use this lua file to pass options to Better Vim like the theme name/flavour and your custom mappings..bettervimrc
- Do not touch this file. It contains your license key from Gumroad that we use to install the updates for Better Vim.better-vim.lua
filebetter-vim.lua
file, which serves
as the entry point for configuring Better Vim.
The better-vim.lua
file is located in ~/.config/better-vim/better-vim.lua
.
This file acts as the main configuration file for Better Vim and allows you to
organize your configuration files and plugins within the ~/.config/better-vim/
directory.
Check the File Structure session to learn more.
better-vim.lua
file provides various configuration options to customize your
Vim environment. Below are the defaults for all possible entries to better-vim.lua
file:
~/.config/better-vim/
directory.
You can break your configuration in small modules to organize them better.
For example, if you have a configuration file called plugins.lua
, it should be
placed inside the ~/.config/better-vim/
directory.
You can import modules and configuration files using the better-vim
namespace.
To import a module, use the following syntax:
module_name
with the name of the module or configuration file you want
to import.
In the above example, if you want to put all your plugins inside
the file plugins.lua
, just create this file inside ~/.config/better-vim/
directory
and import it in better-vim.lua
:
better-vim-utils
module and use them:
load_theme
(deprecated)
NOTE: If you’re using this function, please, update to the latest version of Better Vim and use
should_load_theme
instead. This function will be removed in the next major release.
This function will be used to load a custom theme only after all other plugins are already loaded.
It will ensure your theme will have all the correct functionalities expected by your plugins.
The function expects your theme configuration table as argument and returns this table with
some additional properties (lazy = false
and priority = 1000
), to load the theme only when all other plugins are ready.
Here is an example of using this function to load poimandres theme:
should_load_theme
lazy = false
and priority = 1000
), to load the theme only when all other plugins are ready.
Here is an example of using this function to load poimandres theme:
statusline.get_file_name
lualine
plugin.
It will show Explorer
text when NvimTree
buffer is in focus, and the
filename when you have a file opened and the file buffer is in focus:
Usage example: