<commit_before>local d = {}

function d.nmap(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = false, silent = true })
end

function d.nnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = true, silent = true })
end

function d.nnoremap_ns(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = true })
end

function d.inoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('i', lhs, rhs, { noremap = true, silent = true })
end

function d.cnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('c', lhs, rhs, { noremap = true, silent = true })
end

function d.vnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('v', lhs, rhs, { noremap = true, silent = true })
end

function d.vnoremap_ns(lhs, rhs)
	return vim.api.nvim_set_keymap('v', lhs, rhs, { noremap = true })
end

function d.indent(indent, width)
	vim.o.shiftwidth = width
	vim.o.tabstop = width
	if indent == 'tab' then
		vim.o.expandtab = false
		vim.o.softtabstop = 0
	else
		vim.o.expandtab = true
		vim.o.softtabstop = width
	end
end

--[[ PACKER ]]--
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
	vim.fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
	vim.api.nvim_command('packadd packer.nvim')
end

require('packer').startup(function(use)
	use 'wbthomason/packer.nvim'
	use 'lifepillar/vim-solarized8'
	use 'christoomey/vim-tmux-navigator'
	use 'ap/vim-buftabline'
	use {
		'hoob3rt/lualine.nvim'
	}
	-- Linux only
	use 'airblade/vim-gitgutter'
	use 'tpope/vim-sleuth'
	use 'joereynolds/gtags-scope'
end)

--[[ VARIALBES ]]--
vim.g.mapleader = ','
vim.g.maplocalleader = ','

--[[ SOLARIZED8 ]]--
vim.o.termguicolors = true
vim.o.background = 'dark'
vim.cmd('colorscheme solarized8_flat')

--[[ OPTIONS ]]--
vim.o.swapfile = false
vim.o.autochdir = true			-- set working dir to current file
vim.o.showmatch = true			-- show matching brackets
vim.o.cursorline = true			-- highlight current line
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.sidescroll = 5			-- speedup horizontal scroll
vim.o.timeoutlen = 500
vim.o.shada = ''
vim.o.shadafile = ''
vim.o.mouse = 'a'			-- support mouse in all modes so it won't copy line numbers
vim.o.fileformats = 'unix,dos,mac'
vim.o.backspace = 'indent,eol,start'	-- let backspace delete over line breaks and tabs
vim.o.whichwrap = 'b,s,<,>,h,l,~,[,]'	-- let h and l keys to wrap when used at beginning or end of lines
vim.o.listchars = 'tab:> ,trail:-,nbsp:+,eol:$'
vim.o.pastetoggle = '<Leader>p'		-- paste without re-indent
<commit_msg>nvim: Update solarized8 config<commit_after>local d = {}

function d.nmap(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = false, silent = true })
end

function d.nnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = true, silent = true })
end

function d.nnoremap_ns(lhs, rhs)
	return vim.api.nvim_set_keymap('n', lhs, rhs, { noremap = true })
end

function d.inoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('i', lhs, rhs, { noremap = true, silent = true })
end

function d.cnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('c', lhs, rhs, { noremap = true, silent = true })
end

function d.vnoremap(lhs, rhs)
	return vim.api.nvim_set_keymap('v', lhs, rhs, { noremap = true, silent = true })
end

function d.vnoremap_ns(lhs, rhs)
	return vim.api.nvim_set_keymap('v', lhs, rhs, { noremap = true })
end

function d.indent(indent, width)
	vim.o.shiftwidth = width
	vim.o.tabstop = width
	if indent == 'tab' then
		vim.o.expandtab = false
		vim.o.softtabstop = 0
	else
		vim.o.expandtab = true
		vim.o.softtabstop = width
	end
end

--[[ PACKER ]]--
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
	vim.fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
	vim.api.nvim_command('packadd packer.nvim')
end

require('packer').startup(function(use)
	use 'wbthomason/packer.nvim'
	use 'lifepillar/vim-solarized8'
	use 'christoomey/vim-tmux-navigator'
	use 'ap/vim-buftabline'
	use {
		'hoob3rt/lualine.nvim'
	}
	-- Linux only
	use 'airblade/vim-gitgutter'
	use 'tpope/vim-sleuth'
	use 'joereynolds/gtags-scope'
end)

--[[ VARIALBES ]]--
vim.g.mapleader = ','
vim.g.maplocalleader = ','

--[[ SOLARIZED8 ]]--
vim.o.termguicolors = true
vim.o.background = 'dark'
vim.g.solarized_extra_hi_groups = 1
vim.cmd('colorscheme solarized8_flat')

--[[ OPTIONS ]]--
vim.o.swapfile = false
vim.o.autochdir = true			-- set working dir to current file
vim.o.showmatch = true			-- show matching brackets
vim.o.cursorline = true			-- highlight current line
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.sidescroll = 5			-- speedup horizontal scroll
vim.o.timeoutlen = 500
vim.o.shada = ''
vim.o.shadafile = ''
vim.o.mouse = 'a'			-- support mouse in all modes so it won't copy line numbers
vim.o.fileformats = 'unix,dos,mac'
vim.o.backspace = 'indent,eol,start'	-- let backspace delete over line breaks and tabs
vim.o.whichwrap = 'b,s,<,>,h,l,~,[,]'	-- let h and l keys to wrap when used at beginning or end of lines
vim.o.listchars = 'tab:> ,trail:-,nbsp:+,eol:$'
vim.o.pastetoggle = '<Leader>p'		-- paste without re-indent

{'fraction_non_alphanumeric': 0.16066377522157269, 'fraction_numerical': 0.004148595134829342, 'mean_word_length': 3.999057492931197, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2079389', 'n_tokens_mistral': 2348, 'n_tokens_neox': 2199, 'n_words': 471}