]> git.madduck.net Git - etc/neovim.git/blob - .config/nvim/init.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

83082c4414ef0f581bef832865c971a563e4b60b
[etc/neovim.git] / .config / nvim / init.lua
1 vim.g.statedir = vim.fn.expand("~/.local/state/nvim/")
2 vim.g.mapleader = ';'
3 vim.g.maplocalleader = ';'
4
5 vim.g.netrw_home = vim.g.statedir .. "netrw"
6
7 vim.cmd.runtime 'options.lua'
8 vim.cmd.runtime 'keymaps.lua'
9 vim.cmd.runtime 'style.vim'
10 vim.cmd.runtime 'emojis.vim'
11
12 vim.cmd 'packadd! gnupg'
13
14 vim.call "plug#begin"
15
16 local Plug = vim.fn['plug#']
17
18 -- My preferred colour scheme
19 Plug 'wimstefan/vim-artesanal'
20
21 -- Git operations from within files
22 Plug 'tpope/vim-fugitive'
23
24 -- Detect tabstop and shiftwidth automatically
25 Plug 'tpope/vim-sleuth'
26
27 -- Markdown support, which requires tabular.
28 Plug 'godlygeek/tabular'
29 Plug 'preservim/vim-markdown'
30
31 vim.call "plug#end"
32
33 function hasPlug(plugin)
34   return vim.g.plugs[plugin] ~= nil
35 end
36
37 function prequire(m)
38   local ok, err = pcall(require, m)
39   if not ok then return nil, err end
40   return err
41 end