Created
March 25, 2021 00:32
-
-
Save zetashift/50e025e3948b1ff185741b60b9a74df5 to your computer and use it in GitHub Desktop.
My WIP neovim init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- :version | |
-- NVIM v0.5.0-dev | |
-- Build type: RelWithDebInfo | |
-- LuaJIT 2.1.0-beta3 | |
local execute = vim.api.nvim_command | |
local fn = vim.fn | |
local cmd = vim.cmd | |
local g = vim.g | |
-- local function map(mode, lhs, rhs, opts) | |
-- local options = {noremap = true, silent = true} | |
-- if opts then | |
-- options = vim.tbl_extend('force', options, opts) | |
-- end | |
-- vim.api.nvim_set_keymap(mode, lhs, rhs, options) | |
-- end | |
local map = vim.api.nvim_set_keymap | |
-- Bootstrapping our plugin manager | |
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' | |
if fn.empty(fn.glob(install_path)) > 0 then | |
execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path) | |
end | |
---------------- | |
--Plugin Setup-- | |
---------------- | |
vim.cmd [[packadd packer.nvim]] | |
require 'plugins' | |
-- Globals | |
g.mapleader = '<Space>' | |
cmd 'syntax enable' | |
-- Keybindings | |
local opts = {noremap = true, silent = true} | |
vim.api.nvim_set_keymap('n', '<leader>fs', ':w<CR>', opts) | |
map('n', '<leader>qq', ':q!<CR >', opts) | |
-- Set theme | |
cmd 'colorscheme gruvbox' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment