I also noticed that all formatting (including indentation) is reset when an error occurs when loading the lazy package manager;manager, the code in this case looks the same as in the photo from GitHub.
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- AUTOPAIRS
{
'windwp/nvim-autopairs',
event = "InsertEnter",
opts = {}
},
-- TELESCOPE
{
'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local actions = require("telescope.actions")
require("telescope").setup{
defaults = {
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result
},
},
},
}
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
end
},
-- TREE-SITTER
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
},
-- COLORSCHEME
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
require("tokyonight").setup({
transparent = true
})
vim.cmd[[colorscheme tokyonight-moon]]
end
}
})
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- AUTOPAIRS
{
'windwp/nvim-autopairs',
event = "InsertEnter",
opts = {}
},
-- TELESCOPE
{
'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local actions = require("telescope.actions")
require("telescope").setup{
defaults = {
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result
},
},
},
}
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
end
},
-- TREE-SITTER
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "html", "css", "javascript", "typescript", "lua", "vim" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
},
-- COLORSCHEME
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
require("tokyonight").setup({
transparent = true
})
vim.cmd[[colorscheme tokyonight-moon]]
end
}
})
vim.g.mapleader = " "
vim.wo.number = true
vim.o.mouse = 'a'
vim.o.termguicolors = true
vim.o.expandtab = false
vim.o.shiftwidth = 2
vim.o.tabstop = 2
vim.o.smartindent = true