mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 20:59:32 -08:00
Basic Lazy config
This commit is contained in:
parent
290967a53f
commit
c71d218ee3
1 changed files with 70 additions and 96 deletions
|
@ -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"
|
||||||
require("monokai-pro").setup({
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
transparent_background = false,
|
vim.fn.system({
|
||||||
terminal_colors = true,
|
"git",
|
||||||
devicons = true, -- highlight the icons of `nvim-web-devicons`
|
"clone",
|
||||||
styles = {
|
"--filter=blob:none",
|
||||||
comment = { italic = true },
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
keyword = { italic = true }, -- any other keyword
|
"--branch=stable", -- latest stable release
|
||||||
type = { italic = true }, -- (preferred) int, long, char, etc
|
lazypath,
|
||||||
storageclass = { italic = true }, -- static, register, volatile, etc
|
|
||||||
structure = { italic = true }, -- struct, union, enum, etc
|
|
||||||
parameter = { italic = true }, -- parameter pass in function
|
|
||||||
annotation = { italic = true },
|
|
||||||
tag_attribute = { italic = true }, -- attribute of tag in reactjs
|
|
||||||
},
|
|
||||||
filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
|
|
||||||
-- Enable this will disable filter option
|
|
||||||
day_night = {
|
|
||||||
enable = false, -- turn off by default
|
|
||||||
day_filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
|
|
||||||
night_filter = "spectrum", -- classic | octagon | pro | machine | ristretto | spectrum
|
|
||||||
},
|
|
||||||
inc_search = "background", -- underline | background
|
|
||||||
background_clear = {
|
|
||||||
-- "float_win",
|
|
||||||
"toggleterm",
|
|
||||||
"telescope",
|
|
||||||
-- "which-key",
|
|
||||||
"renamer",
|
|
||||||
"notify",
|
|
||||||
-- "nvim-tree",
|
|
||||||
-- "neo-tree",
|
|
||||||
-- "bufferline", -- better used if background of `neo-tree` or `nvim-tree` is cleared
|
|
||||||
},-- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline"
|
|
||||||
plugins = {
|
|
||||||
bufferline = {
|
|
||||||
underline_selected = false,
|
|
||||||
underline_visible = false,
|
|
||||||
},
|
|
||||||
indent_blankline = {
|
|
||||||
context_highlight = "default", -- default | pro
|
|
||||||
context_start_underline = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@param c Colorscheme
|
|
||||||
override = function(c) end,
|
|
||||||
})
|
})
|
||||||
-- lua
|
|
||||||
vim.cmd([[colorscheme monokai-pro]])
|
|
||||||
|
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
|
||||||
-- Packer can manage itself
|
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
use {
|
|
||||||
"loctvl842/monokai-pro.nvim",
|
|
||||||
config = function()
|
|
||||||
require("monokai-pro").setup()
|
|
||||||
end
|
end
|
||||||
}
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
use {
|
-- Use a protected call so we don't error out on first use
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
local status_ok, lazy = pcall(require, 'lazy')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
lazy.setup({
|
||||||
|
spec = {
|
||||||
|
-- Colorscheme:
|
||||||
|
-- The colorscheme should be available when starting Neovim.
|
||||||
|
{
|
||||||
|
'tanvirtin/monokai.nvim', lazy = false,
|
||||||
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Treesitter
|
||||||
|
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
||||||
|
|
||||||
|
-- Autopair
|
||||||
|
{
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
config = function()
|
||||||
|
require('nvim-autopairs').setup{}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- init.lua:
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||||
-- or , branch = '0.1.x',
|
-- or , branch = '0.1.x',
|
||||||
requires = { {'nvim-lua/plenary.nvim'} }
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
-- LSP
|
||||||
'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' },
|
{ 'neovim/nvim-lspconfig' },
|
||||||
{'williamboman/mason.nvim'},
|
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
|
||||||
|
|
||||||
-- Autocompletion
|
-- Autocomplete
|
||||||
{'hrsh7th/nvim-cmp'},
|
{
|
||||||
{'hrsh7th/cmp-buffer'},
|
'hrsh7th/nvim-cmp',
|
||||||
{'hrsh7th/cmp-path'},
|
-- load cmp on InsertEnter
|
||||||
{'saadparwaiz1/cmp_luasnip'},
|
event = 'InsertEnter',
|
||||||
{'hrsh7th/cmp-nvim-lsp'},
|
-- these dependencies will only be loaded when cmp loads
|
||||||
{'hrsh7th/cmp-nvim-lua'},
|
-- dependencies are always lazy-loaded unless specified otherwise
|
||||||
|
dependencies = {
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Snippets
|
|
||||||
{'L3MON4D3/LuaSnip'},
|
|
||||||
{'rafamadriz/friendly-snippets'},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
vim.cmd([[colorscheme monokai_pro]])
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue