summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua6
-rw-r--r--lazy-lock.json5
-rw-r--r--lua/config/lazy.lua53
-rw-r--r--lua/plugins/keybindings.lua27
4 files changed, 91 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..5f2496e
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,6 @@
+require("config.lazy")
+require("plugins.keybindings")
+
+vim.cmd([[colorscheme gruvbox]])
+vim.wo.relativenumber = true
+vim.opt.clipboard = "unnamedplus"
diff --git a/lazy-lock.json b/lazy-lock.json
new file mode 100644
index 0000000..ba149fd
--- /dev/null
+++ b/lazy-lock.json
@@ -0,0 +1,5 @@
+{
+ "gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
+ "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
+ "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }
+}
diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua
new file mode 100644
index 0000000..d3c4443
--- /dev/null
+++ b/lua/config/lazy.lua
@@ -0,0 +1,53 @@
+-- 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)
+
+-- Make sure to setup `mapleader` and `maplocalleader` before
+-- loading lazy.nvim so that mappings are correct.
+-- This is also a good place to setup other settings (vim.opt)
+vim.g.mapleader = " "
+vim.g.maplocalleader = "\\"
+
+-- Setup lazy.nvim
+require("lazy").setup({
+ spec = {
+ -- import your plugins
+ {
+ "nvim-treesitter/nvim-treesitter",
+ run = ":TSUpdate",
+ config = function()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = "all",
+ highlight = {
+ enable = true,
+ disable = {},
+ },
+ indent = {
+ enable = true,
+ },
+ })
+ end
+ },
+ {
+ "ellisonleao/gruvbox.nvim"
+ },
+ },
+ -- Configure any other settings here. See the documentation for more details.
+ -- colorscheme that will be used when installing plugins.
+ install = { colorscheme = { "gruvbox" } },
+ -- automatically check for plugin updates
+ checker = { enabled = true },
+})
diff --git a/lua/plugins/keybindings.lua b/lua/plugins/keybindings.lua
new file mode 100644
index 0000000..4665e69
--- /dev/null
+++ b/lua/plugins/keybindings.lua
@@ -0,0 +1,27 @@
+-- buffer commands
+vim.keymap.set('n', '<Leader>t', ':tabnew<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<Leader>n', 'gt')
+vim.keymap.set('n', '<Leader>p', 'gT')
+
+-- terminal
+vim.keymap.set('n', '<Leader>v', ':vertical term<CR>', { noremap = true, silent = true})
+vim.keymap.set('n', '<Leader>h', ':belowright term<CR>', { noremap = true, silent = true})
+
+-- lazy
+vim.keymap.set('n', '<Leader>l', ':Lazy<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>lu', ':Lazy update<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>ls', ':Lazy sync<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>lx', ':Lazy clean<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>lc', ':Lazy check<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>ll', ':Lazy log<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>lr', ':Lazy restore<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>lp', ':Lazy profile<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>ld', ':Lazy debug<CR>', { noremap = true })
+
+-- write commands
+vim.keymap.set('n', '<Leader>s', ':w<CR>', { noremap = true })
+vim.keymap.set('n', '<Leader>sq', ':wq<CR>', { noremap = true })
+
+-- quit
+vim.keymap.set('n', '<Leader>q', ':q<CR>', { silent = true })
+vim.keymap.set('n', '<Leader>Q', ':q!<CR>', { silent = true})