From de76d823e776964024bfaeb0c0a336150d112708 Mon Sep 17 00:00:00 2001 From: "timofey.kovalev" Date: Mon, 18 Nov 2024 16:24:04 +0300 Subject: [PATCH] first commit --- init.lua | 4 ++++ lua/config/keymaping.lua | 4 ++++ lua/config/lazy.lua | 35 +++++++++++++++++++++++++++++++++++ lua/config/options.lua | 16 ++++++++++++++++ lua/plugins/blankline.lua | 7 +++++++ lua/plugins/gitsigns.lua | 12 ++++++++++++ lua/plugins/init.lua | 1 + lua/plugins/lualine.lua | 7 +++++++ lua/plugins/neo-tree.lua | 10 ++++++++++ lua/plugins/onedark.lua | 6 ++++++ 10 files changed, 102 insertions(+) create mode 100644 init.lua create mode 100644 lua/config/keymaping.lua create mode 100644 lua/config/lazy.lua create mode 100644 lua/config/options.lua create mode 100644 lua/plugins/blankline.lua create mode 100644 lua/plugins/gitsigns.lua create mode 100644 lua/plugins/init.lua create mode 100644 lua/plugins/lualine.lua create mode 100644 lua/plugins/neo-tree.lua create mode 100644 lua/plugins/onedark.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..e3c2c03 --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +require("config.lazy") +require("config.options") +require("config.keymaping") + diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua new file mode 100644 index 0000000..f0b049d --- /dev/null +++ b/lua/config/keymaping.lua @@ -0,0 +1,4 @@ +local map = vim.keymap.set + +map("n", "e", ":Neotree", { desc = "nvimtree focus window" }) + diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..f5ee74c --- /dev/null +++ b/lua/config/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 = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/lua/config/options.lua b/lua/config/options.lua new file mode 100644 index 0000000..eee8d76 --- /dev/null +++ b/lua/config/options.lua @@ -0,0 +1,16 @@ +local opt = vim.opt +local o = vim.o +local g = vim.g + +g.mapleader = " " + +o.laststatus = 2 +o.showmode = false + +o.clipboard = "unnamedplus" +o.cursorline = true +o.cursorlineopt = "number" + +o.number = true +o.numberwidth = 2 +o.ruler = false diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua new file mode 100644 index 0000000..a1e1bc9 --- /dev/null +++ b/lua/plugins/blankline.lua @@ -0,0 +1,7 @@ +return { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + ---@module "ibl" + ---@type ibl.config + opts = {}, +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..8a46265 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,12 @@ +return { + "lewis6991/gitsigns.nvim", + event = "User FilePost", + opts = function() + return { + signs = { + delete = { text = "󰍵" }, + changedelete = { text = "󱕖" }, + }, + } + end, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1 @@ +return {} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..3c1da48 --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,7 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup() + end +} diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..25bd2a4 --- /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", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + } +} diff --git a/lua/plugins/onedark.lua b/lua/plugins/onedark.lua new file mode 100644 index 0000000..c372587 --- /dev/null +++ b/lua/plugins/onedark.lua @@ -0,0 +1,6 @@ +return { + "navarasu/onedark.nvim", + config = function() + require('onedark').load() + end, +}