Added a section on user commands

This commit is contained in:
Topy 2024-03-02 10:28:58 +01:00
parent 94a93643ab
commit 75940ccc48
1 changed files with 13 additions and 3 deletions

View File

@ -198,6 +198,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end,
})
-- [[ Basic user commands ]]
-- See `:help lua-guide-commands-create`
-- Quickly jump to your config with this awesome custom command
-- Try it by starting nvim in a random directory and typing :Config
vim.api.nvim_create_user_command("Config", function()
local path = "~/.config/nvim/" -- You can customize the path here
vim.cmd("e" .. path) -- vim.cmd allows you to execute vim commands from lua
end, {})
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'