lazy-nvim migration with basic plugins
This commit is contained in:
parent
b02e4dda6c
commit
e2a8848a27
@ -15,86 +15,16 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Basic Vim config
|
||||
vim.cmd("autocmd!")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
vim.scriptencoding = 'utf-8'
|
||||
vim.opt.encoding = 'utf-8'
|
||||
vim.opt.fileencoding = 'utf-8'
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.number = true
|
||||
vim.opt.title = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = vim.fn.expand('~/.vim/undodir')
|
||||
vim.opt.wrap = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.breakindentopt = "shift:2,min:40,sbr"
|
||||
|
||||
-- Plugin setup
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
priority = 1000
|
||||
},
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "hrsh7th/cmp-buffer" }
|
||||
},
|
||||
install = {},
|
||||
spec = { { import = "plugins" } },
|
||||
install = { colorscheme = { "catppuccin" } },
|
||||
checker = { enabled = true }
|
||||
})
|
||||
|
||||
-- Colour setup
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha", -- latte, frappe, macchiato, mocha
|
||||
background = {
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = false,
|
||||
no_italic = false,
|
||||
no_bold = false,
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
},
|
||||
color_overrides = {},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
},
|
||||
})
|
||||
-- General vim
|
||||
require("base")
|
||||
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
vim.api.nvim_set_hl(0, "Normal", { guibg = NONE, ctermbg = NONE })
|
||||
|
||||
-- LSP Setup
|
||||
local nvim_lsp = require("lspconfig")
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
nvim_lsp.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,8 +1,14 @@
|
||||
{
|
||||
"barbar.nvim": { "branch": "master", "commit": "807bede7ef1d8e2ac5f108e9ac8123b1e2d321e3" },
|
||||
"catppuccin": { "branch": "main", "commit": "4bb938bbba41d306db18bf0eb0633a5f28fd7ba0" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7c8cb61b21727a473663054edec4b83633d9e442" }
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7c8cb61b21727a473663054edec4b83633d9e442" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }
|
||||
}
|
||||
|
24
.config/nvim/lua/base.lua
Normal file
24
.config/nvim/lua/base.lua
Normal file
@ -0,0 +1,24 @@
|
||||
vim.cmd("autocmd!")
|
||||
|
||||
vim.scriptencoding = 'utf-8'
|
||||
vim.opt.encoding = 'utf-8'
|
||||
vim.opt.fileencoding = 'utf-8'
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.number = true
|
||||
vim.opt.title = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = vim.fn.expand('~/.vim/undodir')
|
||||
vim.opt.wrap = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.breakindentopt = "shift:2,min:40,sbr"
|
||||
|
||||
vim.cmd('colorscheme catppuccin')
|
9
.config/nvim/lua/plugins/barbar.lua
Normal file
9
.config/nvim/lua/plugins/barbar.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
opts = {},
|
||||
}
|
28
.config/nvim/lua/plugins/cattpuucin.lua
Normal file
28
.config/nvim/lua/plugins/cattpuucin.lua
Normal file
@ -0,0 +1,28 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function() require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
background = {
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
color_overrides = {
|
||||
mocha = {
|
||||
base = "#000000",
|
||||
mantle = "#000000"
|
||||
},
|
||||
},
|
||||
transparent_background = false,
|
||||
no_italic = false,
|
||||
no_bold = false,
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
},
|
||||
integrations = {
|
||||
cmp = true,
|
||||
},
|
||||
}) end,
|
||||
}
|
28
.config/nvim/lua/plugins/lsp.lua
Normal file
28
.config/nvim/lua/plugins/lsp.lua
Normal file
@ -0,0 +1,28 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
nvim_lsp.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
9
.config/nvim/lua/plugins/neo-tree.lua
Normal file
9
.config/nvim/lua/plugins/neo-tree.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user