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"
|
||||||
|
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
|
|
||||||
type = { italic = true }, -- (preferred) int, long, char, etc
|
|
||||||
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]])
|
|
||||||
|
|
||||||
|
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
|
||||||
|
},
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
-- Treesitter
|
||||||
-- Packer can manage itself
|
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
use {
|
-- Autopair
|
||||||
"loctvl842/monokai-pro.nvim",
|
{
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = 'InsertEnter',
|
||||||
config = function()
|
config = function()
|
||||||
require("monokai-pro").setup()
|
require('nvim-autopairs').setup{}
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
|
||||||
use {
|
-- init.lua:
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
{
|
||||||
|
'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',
|
{ 'neovim/nvim-lspconfig' },
|
||||||
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 {
|
-- Autocomplete
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
{
|
||||||
branch = 'v1.x',
|
'hrsh7th/nvim-cmp',
|
||||||
requires = {
|
-- load cmp on InsertEnter
|
||||||
-- LSP Support
|
event = 'InsertEnter',
|
||||||
{'neovim/nvim-lspconfig'},
|
-- these dependencies will only be loaded when cmp loads
|
||||||
{'williamboman/mason.nvim'},
|
-- dependencies are always lazy-loaded unless specified otherwise
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
dependencies = {
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- 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'},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
vim.cmd([[colorscheme monokai_pro]])
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue