From 2a3645676ce5947cbbe1733ccf55c66e03da3e9d Mon Sep 17 00:00:00 2001 From: Artem Vinogradov Date: Tue, 13 Jan 2026 02:11:27 +0300 Subject: [PATCH] first commit --- init.lua | 3 +++ lazy-lock.json | 9 +++++++++ lua/core/config.lua | 20 ++++++++++++++++++++ lua/core/lazy.lua | 35 +++++++++++++++++++++++++++++++++++ lua/core/mappings.lua | 32 ++++++++++++++++++++++++++++++++ lua/plugins/gitsigns.lua | 8 ++++++++ lua/plugins/gruvbox.lua | 10 ++++++++++ lua/plugins/neo-tree.lua | 10 ++++++++++ 8 files changed, 127 insertions(+) create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/core/config.lua create mode 100644 lua/core/lazy.lua create mode 100644 lua/core/mappings.lua create mode 100644 lua/plugins/gitsigns.lua create mode 100644 lua/plugins/gruvbox.lua create mode 100644 lua/plugins/neo-tree.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..29d7ce0 --- /dev/null +++ b/init.lua @@ -0,0 +1,3 @@ +require("core.config") +require("core.mappings") +require("core.lazy") diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..2c9ef57 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,9 @@ +{ + "gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" }, + "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" } +} diff --git a/lua/core/config.lua b/lua/core/config.lua new file mode 100644 index 0000000..842668a --- /dev/null +++ b/lua/core/config.lua @@ -0,0 +1,20 @@ +-- Line numbers +vim.wo.nu = true +vim.wo.relativenumber = true + +-- Mouse enable +vim.opt.mouse = "a" +vim.opt.mousefocus = true + +-- Clipboard +vim.opt.clipboard ="unnamedplus" + +-- Indent Settings +vim.opt.shiftwidth = 4 +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 + +-- Other +vim.opt.scrolloff = 8 +vim.opt.wrap = false +vim.opt.termguicolors = true diff --git a/lua/core/lazy.lua b/lua/core/lazy.lua new file mode 100644 index 0000000..f00e1d6 --- /dev/null +++ b/lua/core/lazy.lua @@ -0,0 +1,35 @@ +-- 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 + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "grovbox" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua new file mode 100644 index 0000000..12f985b --- /dev/null +++ b/lua/core/mappings.lua @@ -0,0 +1,32 @@ +-- Leader +vim.g.mapleader = "," + +-- Buffers +vim.keymap.set("n", "w", "w") +vim.keymap.set("n", "q", "q") + +-- Insert mode +vim.keymap.set("i", "jj", "") + +-- Navigation split +vim.keymap.set("n", "", ":wincmd k") +vim.keymap.set("n", "", ":wincmd j") +vim.keymap.set("n", "", ":wincmd l") +vim.keymap.set("n", "", ":wincmd h") + +-- Splits +vim.keymap.set("n", "", ":wincmd k") +vim.keymap.set("n", "", ":wincmd j") +vim.keymap.set("n", "", ":wincmd l") +vim.keymap.set("n", "", ":wincmd h") + +-- Navidation +vim.keymap.set("n", "", "k") +vim.keymap.set("n", "", "j") +vim.keymap.set("n", "", "l") +vim.keymap.set("n", "", "h") + +-- Neo-tree +vim.keymap.set("n", "e", "Neotree toggle") + + diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..ec4230d --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,8 @@ +return { + { + "lewis6991/gitsigns.nvim", + config = function() + require('gitsigns').setup {} + end + } +} diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua new file mode 100644 index 0000000..9fe8b45 --- /dev/null +++ b/lua/plugins/gruvbox.lua @@ -0,0 +1,10 @@ +return { + "ellisonleao/gruvbox.nvim", + config = function() + require("gruvbox").setup({ + transparent_mode = true, + }) + vim.cmd("colorscheme gruvbox") + end +} + diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..ac8c49c --- /dev/null +++ b/lua/plugins/neo-tree.lua @@ -0,0 +1,10 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", -- optional, but recommended + }, + lazy = false, -- neo-tree will lazily load itself +}