From 5fb42a5a39c60a3284cb541e87a7c8a242ab8e89 Mon Sep 17 00:00:00 2001 From: rebuilt Date: Tue, 6 Jul 2021 12:39:37 +0200 Subject: [PATCH] Created Getting Started (markdown) --- Getting-Started.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Getting-Started.md diff --git a/Getting-Started.md b/Getting-Started.md new file mode 100644 index 0000000..958de5f --- /dev/null +++ b/Getting-Started.md @@ -0,0 +1,46 @@ +## Leader and Whichkey + +The default leader key is set to <Space>. Pressing space will also +open up [Whichkey](https://github.com/folke/which-key.nvim). Whichkey +will help you easily access many of the default keybindings. Whichkey +defines keymappings in this file: +\~/.config/nvim/lua/lv-which-key/init.lua . + +The speed the Whichkey window opens is determined by the 'timeoutlen' setting. 'timeoutlen' also defines the timeout length for any key combination. Change this value in ~/.config/nvim/lua/settings.lua. Or add an entry +for it in your personal configuration file ~/.config/nvim/lv-config.lua so it +won't be changed the next time you update LunarVim. + +``` +-- ~/.config/nvim/lv-config.lua +O.timeoutlen = 400 -- Timeout value in milliseconds +``` + +## Other key bindings + +Other key bindings can be found in \~/.config/nvim/lua/keymappings.lua. This file is for the set of keybindings that aren't mapped to the Leader key. + +If you already have a set of keybindings you prefer, the best place to put these bindingsis the ~/.config/nvim/lv-config.lua file. This way, they won't be overwritten when you updateLunarVim. + +If you mappings are in vimscript you can translate your old bindings to lua by following the lua guide available +[here](https://github.com/nanotee/nvim-lua-guide) + +Or if you prefer to keep your mappings in vimscript, wrap them in the vim.cmd function + +``` +-- ~/.config/nvim/lv-config.lua +vim.cmd([[ + PLACE_YOUR_VIMSCRIPT_HERE +]]) +``` + +## Configuration files in the order they are loaded + +| Path | Description | +|-------------------------------------|----------------------------| +| \~/.config/nvim/lua/default-config.lua | This is where the global variable 'O' is defined. | +| \~/.config/nvim/lv-config.lua | Your personal settings file | +| \~/.config/nvim/settings.lua | Sane defaults for neovim. This file sets neovim editor related configurations like wrapping line and tab spacing, etc | +| \~/.config/nvim/lua/plugins.lua | Plugins are defined here | +| \~/.config/nvim/lua/lv-utils | LunarVim utility functions | +| \~/.config/nvim/lua/keymappings.lua | Key bindings that don't contain the leader key | +| \~/.config/nvim/lua/lv-which-key.lua | Key bindings that start with the leader key |