initial nvim config

This commit is contained in:
tastytea 2022-08-08 01:41:01 +02:00
parent a8f3e416a8
commit e1ab9ebdb0
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
4 changed files with 44 additions and 0 deletions

3
.config/nvim/init.lua Normal file
View File

@ -0,0 +1,3 @@
require('plugins')
require('settings')
require('keymaps')

View File

@ -0,0 +1,6 @@
function map(mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
end
map('n', '<M-Left>', ':tabprevious<cr>')
map('n', '<M-Right>', ':tabnext<cr>')

View File

@ -0,0 +1,24 @@
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
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
end
require('packer').startup(function(use)
use 'https://github.com/wbthomason/packer.nvim'
use 'https://github.com/GuiLra/vim'
if packer_bootstrap then
require('packer').sync()
end
end)
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd User PackerComplete PackerCompile
autocmd BufWritePost plugins.lua source <afile> | PackerInstall
augroup end
]])

View File

@ -0,0 +1,11 @@
vim.o.number = true -- line numbers
vim.o.list = true -- show whitespace
vim.o.expandtab = true -- indent using spaces
vim.o.tabstop = 4 -- 1 tab = 4 spaces
vim.o.shiftwidth = 4 -- 1 indentation = 4 spaces
-- theme
vim.o.termguicolors = true
vim.o.background = 'dark'
vim.cmd('colorscheme omni')