From 0ae6be8361facad3b698529ef82cf12851394b1f Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 10 Feb 2024 22:51:14 +0530 Subject: [PATCH] start from scratch with lazy --- init.lua | 21 +++++++++++++++++++++ lazy-lock.json | 8 ++++++++ lua/options.lua | 20 ++++++++++++++++++++ lua/plugins/bufferline.lua | 30 ++++++++++++++++++++++++++++++ lua/plugins/colors.lua | 16 ++++++++++++++++ lua/plugins/ibl.lua | 17 +++++++++++++++++ lua/plugins/lualine.lua | 23 +++++++++++++++++++++++ stylua.toml | 5 +++++ 8 files changed, 140 insertions(+) create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/options.lua create mode 100644 lua/plugins/bufferline.lua create mode 100644 lua/plugins/colors.lua create mode 100644 lua/plugins/ibl.lua create mode 100644 lua/plugins/lualine.lua create mode 100644 stylua.toml diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..80eec0a --- /dev/null +++ b/init.lua @@ -0,0 +1,21 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("options") + +opts = { + spec = nil, + local_spec = true, +} + +require("lazy").setup("plugins", opts) diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..3b3dbda --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,8 @@ +{ + "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, + "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, + "lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" } +} \ No newline at end of file diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..3e76e10 --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,20 @@ +vim.opt.autowrite = true +vim.opt.background = "dark" +vim.opt.clipboard = "unnamedplus" +vim.opt.expandtab = true +vim.opt.laststatus = 2 +vim.opt.list = true +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.scrolloff = 10 +vim.opt.shiftwidth = 2 +vim.opt.showmode = false +vim.opt.signcolumn = "yes" +vim.opt.smartindent = true +vim.opt.softtabstop = 2 +vim.opt.splitbelow = true +vim.opt.splitright = true +vim.opt.swapfile = false +vim.opt.tabstop = 2 +vim.opt.updatetime = 100 +vim.opt.wrap = false diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua new file mode 100644 index 0000000..ab9025e --- /dev/null +++ b/lua/plugins/bufferline.lua @@ -0,0 +1,30 @@ +local Plugin = { "akinsho/bufferline.nvim" } +Plugin.version = "*" +Plugin.dependencies = "nvim-tree/nvim-web-devicons" + +Plugin.event = 'VeryLazy' + +function Plugin.init() + vim.opt.termguicolors = true +end + +Plugin.opts = { + options = { + mode = 'buffers', + offsets = { + {filetype = 'neo-tree'}, + }, + }, + -- :help bufferline-highlights + highlights = { + buffer_selected = { + italic = false + }, + indicator_selected = { + fg = {attribute = 'fg', highlight = 'Function'}, + italic = false + } + } +} + +return Plugin diff --git a/lua/plugins/colors.lua b/lua/plugins/colors.lua new file mode 100644 index 0000000..e5bd590 --- /dev/null +++ b/lua/plugins/colors.lua @@ -0,0 +1,16 @@ +local Plugin = { "Mofiqul/dracula.nvim" } + +Plugin.lazy = false +Plugin.priority = 1000 + +Plugin.opts = { + italic_comment = true, + show_end_of_buffer = true, + transparent_bg = true, +} + +function Plugin.config() + vim.cmd([[colorscheme dracula]]) +end + +return Plugin diff --git a/lua/plugins/ibl.lua b/lua/plugins/ibl.lua new file mode 100644 index 0000000..992e173 --- /dev/null +++ b/lua/plugins/ibl.lua @@ -0,0 +1,17 @@ +local Plugin = {'lukas-reineke/indent-blankline.nvim'} + +Plugin.main = 'ibl' +Plugin.event = {'BufReadPost', 'BufNewFile'} + +-- See :help ibl.setup() +Plugin.opts = { + enabled = true, + scope = { + enabled = false, + }, + indent = { + char = '▏', + }, +} + +return Plugin diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..fe5e029 --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,23 @@ +local Plugin = { "nvim-lualine/lualine.nvim" } +Plugin.dependencies = { "nvim-tree/nvim-web-devicons" } + +Plugin.event = "VeryLazy" + +function Plugin.init() + vim.opt.showmode = false +end + +-- See :help lualine.txt +Plugin.opts = { + options = { + theme = "dracula-nvim", + icons_enabled = true, + component_separators = "|", + section_separators = "", + disabled_filetypes = { + statusline = { "NvimTree" }, + }, + }, +} + +return Plugin diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..d0295e9 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,5 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 +[sort_requires] +enabled = true