move folders around
This commit is contained in:
5
configs/nvim_g/nvim_packer/lua/soru/core/colorscheme.lua
Normal file
5
configs/nvim_g/nvim_packer/lua/soru/core/colorscheme.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
local status, _ = pcall(vim.cmd, "colorscheme nightfly")
|
||||
if not status then
|
||||
print("Colorscheme not found!")
|
||||
return
|
||||
end
|
||||
14
configs/nvim_g/nvim_packer/lua/soru/core/keymaps.lua
Normal file
14
configs/nvim_g/nvim_packer/lua/soru/core/keymaps.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
-- set leader key to space
|
||||
vim.g.mapleader = " "
|
||||
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
---------------------
|
||||
-- General Keymaps
|
||||
---------------------
|
||||
|
||||
-- use jk to exit insert mode
|
||||
keymap.set("i", "jk", "<ESC>")
|
||||
|
||||
-- clear search highlights
|
||||
keymap.set("n", "<leader>nh", ":nohl<CR>")
|
||||
37
configs/nvim_g/nvim_packer/lua/soru/core/options.lua
Normal file
37
configs/nvim_g/nvim_packer/lua/soru/core/options.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
local opt = vim.opt -- for conciseness
|
||||
|
||||
-- line numbers
|
||||
opt.relativenumber = true
|
||||
opt.number = true
|
||||
|
||||
-- tabs & indentation
|
||||
opt.tabstop = 2
|
||||
opt.shiftwidth = 2
|
||||
opt.expandtab = true
|
||||
opt.autoindent = true
|
||||
|
||||
-- line wrapping
|
||||
opt.wrap = false
|
||||
|
||||
-- search settings
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
-- cursor line
|
||||
opt.cursorline = true
|
||||
|
||||
-- appearance
|
||||
opt.termguicolors = true
|
||||
opt.background = "dark"
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
-- backspace
|
||||
opt.backspace = "indent,eol,start"
|
||||
opt.clipboard:append("unnamedplus")
|
||||
|
||||
-- split windows
|
||||
opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
|
||||
opt.iskeyword:append("-")
|
||||
|
||||
55
configs/nvim_g/nvim_packer/lua/soru/plugins-setup.lua
Normal file
55
configs/nvim_g/nvim_packer/lua/soru/plugins-setup.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
-- auto install packer if not installed
|
||||
local ensure_packer = function()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
local packer_bootstrap = ensure_packer() -- true if packer was just installed
|
||||
|
||||
-- autocommand that reloads neovim and installs/updates/removes plugins
|
||||
-- when file is saved
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins-setup.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]])
|
||||
|
||||
-- import packer safely
|
||||
local status, packer = pcall(require, "packer")
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
|
||||
-- add list of plugins to install
|
||||
return packer.startup(function(use)
|
||||
-- packer can manage itself
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
use("bluz71/vim-nightfly-guicolors") -- pretty cool colorscheme
|
||||
|
||||
-- essential plugins
|
||||
use("tpope/vim-surround") -- add, delete, change surroundings (it's awesome)
|
||||
use("inkarkat/vim-ReplaceWithRegister") -- replace with register contents using motion (gr + motion)
|
||||
|
||||
-- commenting with gc
|
||||
use("numToStr/Comment.nvim")
|
||||
|
||||
-- file explorer
|
||||
use("nvim-tree/nvim-tree.lua")
|
||||
|
||||
-- vs-code like icons
|
||||
use("nvim-tree/nvim-web-devicons")
|
||||
|
||||
-- statusline
|
||||
use("nvim-lualine/lualine.nvim")
|
||||
|
||||
if packer_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user