feat: initialise configuration

This commit is contained in:
Muhammad Nauman Raza 2023-12-30 14:48:18 +00:00
commit 95ecf82be9
Signed by: devraza
GPG key ID: 91EAD6081011574B
5 changed files with 129 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
lazy-lock.lua

65
init.lua Normal file
View file

@ -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'

14
lua/core/dashboard.lua Normal file
View file

@ -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 = {},
},
})

2
lua/core/init.lua Normal file
View file

@ -0,0 +1,2 @@
require 'core.options'
require 'core.dashboard'

47
lua/core/options.lua Normal file
View file

@ -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")