Compare commits
2 commits
e4f3ceaa86
...
1f52e22b17
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f52e22b17 | |||
| 3b5eceb42f |
12 changed files with 56 additions and 100 deletions
4
init.lua
4
init.lua
|
|
@ -1,2 +1,2 @@
|
||||||
require("config.settings")
|
require("config")
|
||||||
require("config.lazy")
|
require("plugins")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }
|
|
||||||
}
|
|
||||||
3
lua/config/init.lua
Normal file
3
lua/config/init.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
require('config.settings')
|
||||||
|
require('config.keybindings')
|
||||||
|
require('config.pack')
|
||||||
6
lua/config/keybindings.lua
Normal file
6
lua/config/keybindings.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
-- setup leader and local leader
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = ";"
|
||||||
|
|
||||||
|
-- source current file
|
||||||
|
vim.keymap.set("n", "<Leader> ", ":update<CR> :source<CR>")
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
-- Bootstrap lazy.nvim
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
--setup lazy.nvim
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- import plugins from specific directory
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
-- setup correct colorscheme
|
|
||||||
install = { colorscheme = { "gruvbox"} },
|
|
||||||
-- automatically check for plugin updates
|
|
||||||
checker = { enabled = true },
|
|
||||||
rocks = {
|
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
disabled_plugins = {
|
|
||||||
"gzip",
|
|
||||||
"matchit",
|
|
||||||
"matchparen",
|
|
||||||
"netrwPlugin",
|
|
||||||
"tarPlugin",
|
|
||||||
"tohtml",
|
|
||||||
"tutor",
|
|
||||||
"zipPlugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
5
lua/config/pack.lua
Normal file
5
lua/config/pack.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
vim.pack.add({
|
||||||
|
{src = "https://github.com/ellisonleao/gruvbox.nvim"},
|
||||||
|
{src = "https://github.com/nvim-treesitter/nvim-treesitter"},
|
||||||
|
{src = "https://github.com/neovim/nvim-lspconfig"},
|
||||||
|
})
|
||||||
|
|
@ -26,6 +26,5 @@ vim.opt.inccommand = "split"
|
||||||
-- ignore case
|
-- ignore case
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
|
|
||||||
-- setup leader and local leader
|
-- disable neovim swap files
|
||||||
vim.g.mapleader = " "
|
vim.opt.swapfile = false
|
||||||
vim.g.maplocalleader = ";"
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,2 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
-- load colorscheme here
|
|
||||||
vim.o.background = "dark"
|
vim.o.background = "dark"
|
||||||
vim.cmd([[colorscheme gruvbox]])
|
vim.cmd([[colorscheme gruvbox]])
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
1
lua/plugins/init.lua
Normal file
1
lua/plugins/init.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("plugins.colorscheme")
|
||||||
|
|
@ -1,9 +1,3 @@
|
||||||
return {
|
vim.lsp.enable(
|
||||||
{
|
"nixd"
|
||||||
"neovim/nvim-lspconfig",
|
)
|
||||||
config = function()
|
|
||||||
|
|
||||||
vim.lsp.enable("nixd")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "go", "nix" },
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "go", "nix" },
|
||||||
|
|
||||||
|
|
@ -21,6 +17,3 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
16
nvim-pack-lock.json
Normal file
16
nvim-pack-lock.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"gruvbox.nvim": {
|
||||||
|
"rev": "5e0a460",
|
||||||
|
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||||
|
},
|
||||||
|
"nvim-lspconfig": {
|
||||||
|
"rev": "ac98db2",
|
||||||
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"rev": "42fc28ba",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue