]> 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:

Highlight yanked text
[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
10 vim.cmd 'packadd! gnupg'
11
12 vim.call "plug#begin"
13
14 local Plug = vim.fn['plug#']
15
16 -- My preferred colour scheme
17 Plug 'wimstefan/vim-artesanal'
18
19 -- Git operations from within files
20 Plug 'tpope/vim-fugitive'
21
22 -- Detect tabstop and shiftwidth automatically
23 Plug 'tpope/vim-sleuth'
24
25 vim.call "plug#end"
26
27 function hasPlug(plugin)
28   return vim.g.plugs[plugin] ~= nil
29 end
30
31 function prequire(m)
32   local ok, err = pcall(require, m)
33   if not ok then return nil, err end
34   return err
35 end