Basic Lazy config

This commit is contained in:
Nickiel12 2023-12-21 19:30:56 -08:00 committed by GitHub
parent 290967a53f
commit c71d218ee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,108 +25,82 @@ vim.keymap.set("n", "<leader>y", "\"+y");
vim.keymap.set("v", "<leader>y", "\"+y"); vim.keymap.set("v", "<leader>y", "\"+y");
vim.keymap.set("n", "<leader>Y", "\"+Y"); vim.keymap.set("n", "<leader>Y", "\"+Y");
vim.keymap.set("v", ">", ">gv");
vim.keymap.set("v", "<", "<gv");
vim.keymap.set("n", "<leader>d", "\"_d"); vim.keymap.set("n", "<leader>d", "\"_d");
vim.keymap.set("v", "<leader>d", "\"_d"); vim.keymap.set("v", "<leader>d", "\"_d");
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("monokai-pro").setup({ -- Use a protected call so we don't error out on first use
transparent_background = false, local status_ok, lazy = pcall(require, 'lazy')
terminal_colors = true, if not status_ok then
devicons = true, -- highlight the icons of `nvim-web-devicons` return
styles = { end
comment = { italic = true },
keyword = { italic = true }, -- any other keyword lazy.setup({
type = { italic = true }, -- (preferred) int, long, char, etc spec = {
storageclass = { italic = true }, -- static, register, volatile, etc -- Colorscheme:
structure = { italic = true }, -- struct, union, enum, etc -- The colorscheme should be available when starting Neovim.
parameter = { italic = true }, -- parameter pass in function {
annotation = { italic = true }, 'tanvirtin/monokai.nvim', lazy = false,
tag_attribute = { italic = true }, -- attribute of tag in reactjs priority = 1000, -- make sure to load this before all the other start plugins
}, },
filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
-- Enable this will disable filter option -- Treesitter
day_night = { { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
enable = false, -- turn off by default
day_filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum -- Autopair
night_filter = "spectrum", -- classic | octagon | pro | machine | ristretto | spectrum {
}, 'windwp/nvim-autopairs',
inc_search = "background", -- underline | background event = 'InsertEnter',
background_clear = { config = function()
-- "float_win", require('nvim-autopairs').setup{}
"toggleterm", end
"telescope", },
-- "which-key",
"renamer", -- init.lua:
"notify", {
-- "nvim-tree", 'nvim-telescope/telescope.nvim', tag = '0.1.5',
-- "neo-tree", -- or , branch = '0.1.x',
-- "bufferline", -- better used if background of `neo-tree` or `nvim-tree` is cleared dependencies = { 'nvim-lua/plenary.nvim' }
},-- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline" }
plugins = {
bufferline = { -- LSP
underline_selected = false, { 'neovim/nvim-lspconfig' },
underline_visible = false,
}, -- Autocomplete
indent_blankline = { {
context_highlight = "default", -- default | pro 'hrsh7th/nvim-cmp',
context_start_underline = false, -- load cmp on InsertEnter
}, event = 'InsertEnter',
}, -- these dependencies will only be loaded when cmp loads
---@param c Colorscheme -- dependencies are always lazy-loaded unless specified otherwise
override = function(c) end, dependencies = {
'L3MON4D3/LuaSnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
'saadparwaiz1/cmp_luasnip',
},
},
}
}) })
-- lua
vim.cmd([[colorscheme monokai-pro]])
return require('packer').startup(function(use) vim.cmd([[colorscheme monokai_pro]])
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
"loctvl842/monokai-pro.nvim",
config = function()
require("monokai-pro").setup()
end
}
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,}
use("nvim-treesitter/playground")
use("nvim-treesitter/nvim-treesitter-context");
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v1.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},
-- Snippets
{'L3MON4D3/LuaSnip'},
{'rafamadriz/friendly-snippets'},
}
}
end)