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

enable LSP, add ALE
[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 -- ExplainPattern to visualise/help with Vim regular expressions
32 Plug 'Houl/ExplainPattern-vim'
33
34 -- Remember the last editing position
35 Plug 'farmergreg/vim-lastplace'
36
37 Plug 'neovim/nvim-lspconfig'
38 Plug 'dense-analysis/ale'
39
40 vim.call "plug#end"
41
42 function hasPlug(plugin)
43   return vim.g.plugs[plugin] ~= nil
44 end
45
46 function prequire(m)
47   local ok, err = pcall(require, m)
48   if not ok then return nil, err end
49   return err
50 end