--- /dev/null
+local map = vim.api.nvim_set_keymap
+local opts = { noremap=true, silent=true }
+
+-- General settings
+vim.opt.mouse = 'a'
+vim.opt.undofile = true
+vim.opt.textwidth = 80
+map('', 'Q', '<nop>', opts)
+
+-- Polyglot
+vim.g.polyglot_disabled = {'sensible'}
+
+-- Plugins
+local install_path = vim.fn.stdpath('data') .. '/site/pack/paqs/start/paq-nvim'
+
+if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
+ vim.fn.system({'git', 'clone', '--depth=1',
+ 'https://github.com/savq/paq-nvim.git', install_path})
+end
+
+require('paq') {
+ 'ap/vim-css-color'; -- Highlight css colors
+ 'ctrlpvim/ctrlp.vim'; -- Fuzzy file finding
+ 'editorconfig/editorconfig-vim'; -- Follow editorconfig
+ 'godlygeek/tabular'; -- Line things up
+ 'lifepillar/vim-mucomplete'; -- Simple autocompletion
+ 'meain/hima-vim'; -- Nice color scheme
+ 'neovim/nvim-lspconfig'; -- LSP configurations
+ 'sheerun/vim-polyglot'; -- Language pack
+ 'tpope/vim-commentary'; -- Easily comment
+ 'tpope/vim-rsi'; -- Readline bindings
+ 'tpope/vim-sensible'; -- Sensible defaults
+ 'tpope/vim-speeddating'; -- Modify dates with C-a, C-x
+ 'tpope/vim-surround'; -- Easily modify sorrounding characters
+}
+
+-- Colorscheme
+vim.opt.termguicolors = true
+vim.g.colors_name = 'hima'
+
+-- Easier split movement
+map('n', '<C-h>', '<C-w><C-h>', opts)
+map('n', '<C-j>', '<C-w><C-j>', opts)
+map('n', '<C-k>', '<C-w><C-k>', opts)
+map('n', '<C-l>', '<C-w><C-l>', opts)
+
+-- Clear search highlighting
+map('n', '<C-c>', ':noh<CR>', opts)
+
+-- Completion
+vim.opt.completeopt = vim.opt.completeopt + 'menuone'
+vim.opt.completeopt = vim.opt.completeopt - 'preview'
+vim.opt.shortmess = vim.opt.shortmess + 'c'
+
+-- LSP
+local lspconfig = require('lspconfig')
+
+local on_attach = function(client, bufnr)
+ -- Shorthand
+ local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,
+ ...) end
+ local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr,
+ ...) end
+
+ -- Use omnifunc for completion
+ buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
+
+ -- Keybindings
+ buf_set_keymap('n', 'gD',
+ '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
+ buf_set_keymap('n', 'gd',
+ '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
+ buf_set_keymap('n', 'gr',
+ '<cmd>lua vim.lsp.buf.references()<CR>', opts)
+ buf_set_keymap('n', 'K',
+ '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
+ buf_set_keymap('n', '<space>rn',
+ '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
+ buf_set_keymap('n', '[d',
+ '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
+ buf_set_keymap('n', ']d',
+ '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
+end
+
+-- Add servers
+local servers = {
+ 'clangd'
+}
+
+for _, server in ipairs(servers) do
+ lspconfig[server].setup {on_attach = on_attach}
+end
+
+vim.opt.signcolumn = 'no'
+++ /dev/null
-" General settings
-set mouse=a
-set undofile
-set textwidth=80
-map Q <nop>
-
-" Polyglot
-let g:polyglot_disabled = ['sensible']
-
-" Plugins
-call plug#begin()
-Plug 'ap/vim-css-color' " Highlight css colors
-Plug 'ctrlpvim/ctrlp.vim' " Fuzzy file finding
-Plug 'editorconfig/editorconfig-vim' " Follow editorconfig
-Plug 'godlygeek/tabular' " Line things up
-Plug 'lifepillar/vim-mucomplete' " Simple autocompletion
-Plug 'meain/hima-vim' " Nice color scheme
-Plug 'neovim/nvim-lspconfig' " LSP configurations
-Plug 'sheerun/vim-polyglot' " Language pack
-Plug 'tpope/vim-commentary' " Easily comment
-Plug 'tpope/vim-rsi' " Readline bindings
-Plug 'tpope/vim-sensible' " Sensible defaults
-Plug 'tpope/vim-speeddating' " Modify dates with C-a, C-x
-Plug 'tpope/vim-surround' " Easily modify sorrounding characters
-call plug#end()
-
-" Colorscheme
-set termguicolors
-colorscheme hima
-
-" Easier split movement
-nnoremap <C-j> <C-w><C-j>
-nnoremap <C-k> <C-w><C-k>
-nnoremap <C-l> <C-w><C-l>
-nnoremap <C-h> <C-w><C-h>
-
-" Clear search highlighting
-nnoremap <silent> <C-c> :noh<CR>
-
-" Completion
-set completeopt+=menuone
-set completeopt-=preview
-set shortmess+=c
-
-" LSP
-lua << EOF
-local lspconfig = require('lspconfig')
-
-local on_attach = function(client, bufnr)
- -- Shorthand
- local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,
- ...) end
- local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr,
- ...) end
-
- -- Use omnifunc for completion
- buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-
- -- Keybindings
- local opts = { noremap=true, silent=true }
- buf_set_keymap('n', 'gD',
- '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
- buf_set_keymap('n', 'gd',
- '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
- buf_set_keymap('n', 'gr',
- '<cmd>lua vim.lsp.buf.references()<CR>', opts)
- buf_set_keymap('n', 'K',
- '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
- buf_set_keymap('n', '<space>rn',
- '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
- buf_set_keymap('n', '[d',
- '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
- buf_set_keymap('n', ']d',
- '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
-end
-
--- Add servers
-local servers = {
- 'clangd'
-}
-
-for _, server in ipairs(servers) do
- lspconfig[server].setup {on_attach = on_attach}
-end
-EOF
-
-set signcolumn=no