From 95ecf82be9952d546c74ee277a9234c21b6ce069 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 30 Dec 2023 14:48:18 +0000 Subject: [PATCH] feat: initialise configuration --- .gitignore | 1 + init.lua | 65 ++++++++++++++++++++++++++++++++++++++++++ lua/core/dashboard.lua | 14 +++++++++ lua/core/init.lua | 2 ++ lua/core/options.lua | 47 ++++++++++++++++++++++++++++++ 5 files changed, 129 insertions(+) create mode 100644 .gitignore create mode 100644 init.lua create mode 100644 lua/core/dashboard.lua create mode 100644 lua/core/init.lua create mode 100644 lua/core/options.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb7d2a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lazy-lock.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..2eb16e6 --- /dev/null +++ b/init.lua @@ -0,0 +1,65 @@ +vim.g.mapleader = " " -- Set map leader + +-- Bootstrap package manager (lazy.nvim) +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Setup the package manager with plugins and configuration options +require("lazy").setup({ + "folke/which-key.nvim", + "nvim-telescope/telescope.nvim", + "neovim/nvim-lspconfig", + "romgrk/barbar.nvim", + "nvim-lualine/lualine.nvim", + "devraza/particle.nvim", + "ellisonleao/glow.nvim", + "rktjmp/lush.nvim", + { + "nvimdev/dashboard-nvim", + dependencies = { + "nvim-tree/nvim-web-devicons", + "nvim-lua/plenary.nvim", + } + }, + { + "nvim-treesitter/nvim-treesitter", + version = false, + build = ":TSUpdate", + opts = { + highlight = { enable = true }, + indent = { enable = true }, + ensure_installed = { + "bash", + "diff", + "html", + "json", + "lua", + "luadoc", + "markdown", + "markdown_inline", + "python", + "rust", + "go", + "query", + "regex", + "toml", + "vim", + "vimdoc", + "yaml", + }, + } + } +}) + +-- Imports from files +require 'core' diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua new file mode 100644 index 0000000..d351dbd --- /dev/null +++ b/lua/core/dashboard.lua @@ -0,0 +1,14 @@ +require("dashboard").setup({ + theme = 'hyper', + config = { + header = { + " quark.nvim", + "", + }, + shortcut = { + { desc = 'Update', group = '@property', action = 'Lazy update', key = 'u' }, + { desc = 'Files', group = '@property', action = 'Telescope find_files', key = 'f' }, + }, + footer = {}, + }, +}) diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..2880743 --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,2 @@ +require 'core.options' +require 'core.dashboard' diff --git a/lua/core/options.lua b/lua/core/options.lua new file mode 100644 index 0000000..43723ff --- /dev/null +++ b/lua/core/options.lua @@ -0,0 +1,47 @@ +-- Shorten name +local o = vim.opt + +-- Clipboard +o.clipboard = "unnamedplus" + +-- Completion improvement +o.updatetime = 300 + +-- Indentation +o.smartindent = true +o.expandtab = true +o.showtabline = 2 +o.shiftwidth = 2 +o.tabstop = 2 + +-- General improvements +o.fileencoding = "utf-8" +o.hlsearch = true +o.ignorecase = true +o.mouse = "a" +o.pumheight = 10 +o.showmode = false +o.smartcase = true +o.splitbelow = true +o.splitright = true +o.timeoutlen = 1000 +o.conceallevel = 0 +o.undofile = true +o.cursorline = true +o.number = true +o.numberwidth = 4 +o.relativenumber = true +o.signcolumn = "yes" +o.termguicolors = true + +-- Do not wrap lines +o.wrap = false + +-- Disable backups and swapfile +o.backup = false +o.swapfile = false + +-- Font +o.guifont = "Iosevka Comfy:h10.5" +-- Colorscheme +vim.cmd("colorscheme particle")