Added a section on user commands
This commit is contained in:
parent
94a93643ab
commit
75940ccc48
10
init.lua
10
init.lua
|
@ -198,6 +198,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
end,
|
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 ]]
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
|
|
Loading…
Reference in New Issue