<commit_before>-- Function to replicate noremap feature
local function map(mode, lhs, rhs, opts)
    local options = {noremap = true}

    if opts then options = vim.tbl_extend('force', options, opts) end

    vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end

-- Ensure packer is 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()

require('packer').startup(function(use)
    use 'wbthomason/packer.nvim'
    -- My plugins here

    use {'vimwiki/vimwiki', branch = 'dev'}
    use 'lervag/vimtex'
    vim.g.vimtex_view_method = 'zathura'

    -- Language Packs
    vim.g.polyglot_disabled = {'latex'}
    use 'sheerun/vim-polyglot'

    -- LSP
    use 'neovim/nvim-lspconfig'

    -- Git
    use 'tpope/vim-fugitive'

    -- Rust
    use 'rust-lang/rust.vim'

    -- Autoformatting
    use 'chiel92/vim-autoformat'

    use 'scrooloose/nerdtree'
    map("n", "<silent> <C-n>", ":NERDTreeToggle<CR>")

    -- Pandoc
    use 'vim-pandoc/vim-pandoc'
    use 'vim-pandoc/vim-pandoc-syntax'

    -- Fuzzy search
    use 'junegunn/fzf'

    -- Autocompletion plugin
    use 'hrsh7th/nvim-cmp'

    -- LSP source for nvim-cmp
    use 'hrsh7th/cmp-nvim-lsp'

    -- Snippets source for nvim-cmp
    use 'saadparwaiz1/cmp_luasnip'

    -- Snippets plugin
    use 'L3MON4D3/LuaSnip'

    -- Base16
    use 'chriskempson/base16-vim'
    vim.api.nvim_exec(
        [[
            if filereadable(expand("~/.vimrc_background"))
                let base16colorspace=256
                source ~/.vimrc_background
            endif
        ]],
        true)<commit_msg>Run base16 script after load<commit_after>-- Function to replicate noremap feature
local function map(mode, lhs, rhs, opts)
    local options = {noremap = true}

    if opts then options = vim.tbl_extend('force', options, opts) end

    vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end

-- Ensure packer is 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()

require('packer').startup(function(use)
    use 'wbthomason/packer.nvim'
    -- My plugins here

    use {'vimwiki/vimwiki', branch = 'dev'}
    use 'lervag/vimtex'
    vim.g.vimtex_view_method = 'zathura'

    -- Language Packs
    vim.g.polyglot_disabled = {'latex'}
    use 'sheerun/vim-polyglot'

    -- LSP
    use 'neovim/nvim-lspconfig'

    -- Git
    use 'tpope/vim-fugitive'

    -- Rust
    use 'rust-lang/rust.vim'

    -- Autoformatting
    use 'chiel92/vim-autoformat'

    use 'scrooloose/nerdtree'
    map("n", "<silent> <C-n>", ":NERDTreeToggle<CR>")

    -- Pandoc
    use 'vim-pandoc/vim-pandoc'
    use 'vim-pandoc/vim-pandoc-syntax'

    -- Fuzzy search
    use 'junegunn/fzf'

    -- Autocompletion plugin
    use 'hrsh7th/nvim-cmp'

    -- LSP source for nvim-cmp
    use 'hrsh7th/cmp-nvim-lsp'

    -- Snippets source for nvim-cmp
    use 'saadparwaiz1/cmp_luasnip'

    -- Snippets plugin
    use 'L3MON4D3/LuaSnip'

    -- Base16
    use {'chriskempson/base16-vim', config =
    vim.api.nvim_exec(
        [[
            if filereadable(expand("~/.vimrc_background"))
                let base16colorspace=256
                source ~/.vimrc_background
            endif
        ]],
        true)
    }
{'fraction_non_alphanumeric': 0.13258541560428352, 'fraction_numerical': 0.010198878123406425, 'mean_word_length': 2.4472759226713534, 'pattern_counts': {'":': 2, '<': 9, '<?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': '598107', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1411, 'n_words': 290}