vim.g.statedir = vim.fn.expand("~/.local/state/nvim/")
-vim.g.mapleader = ';'
-vim.g.maplocalleader = ';'
+vim.g.mapleader = ";"
+vim.g.maplocalleader = ";"
vim.g.netrw_home = vim.g.statedir .. "netrw"
-vim.cmd.runtime 'options.lua'
-vim.cmd.runtime 'keymaps.lua'
-vim.cmd.runtime 'style.vim'
-vim.cmd.runtime 'emojis.vim'
+vim.cmd.runtime("options.lua")
+vim.cmd.runtime("keymaps.lua")
+vim.cmd.runtime("style.vim")
+vim.cmd.runtime("emojis.vim")
-vim.cmd 'packadd! gnupg'
+vim.cmd("packadd! gnupg")
-vim.call "plug#begin"
+vim.call("plug#begin")
-local Plug = vim.fn['plug#']
+local Plug = vim.fn["plug#"]
-- My preferred colour scheme
-Plug 'wimstefan/vim-artesanal'
+Plug("wimstefan/vim-artesanal")
-- Git operations from within files
-Plug 'tpope/vim-fugitive'
+Plug("tpope/vim-fugitive")
-- Detect tabstop and shiftwidth automatically
-Plug 'tpope/vim-sleuth'
+Plug("tpope/vim-sleuth")
-- Markdown support, which requires tabular.
-Plug 'godlygeek/tabular'
-Plug 'preservim/vim-markdown'
+Plug("godlygeek/tabular")
+Plug("preservim/vim-markdown")
-- ExplainPattern to visualise/help with Vim regular expressions
-Plug 'Houl/ExplainPattern-vim'
+Plug("Houl/ExplainPattern-vim")
-- Remember the last editing position
-Plug 'farmergreg/vim-lastplace'
+Plug("farmergreg/vim-lastplace")
-Plug 'neovim/nvim-lspconfig'
-Plug 'dense-analysis/ale'
+Plug("neovim/nvim-lspconfig")
+Plug("dense-analysis/ale")
-vim.call "plug#end"
+vim.call("plug#end")
function hasPlug(plugin)
- return vim.g.plugs[plugin] ~= nil
+ return vim.g.plugs[plugin] ~= nil
end
function prequire(m)
- local ok, err = pcall(require, m)
- if not ok then return nil, err end
- return err
+ local ok, err = pcall(require, m)
+ if not ok then
+ return nil, err
+ end
+ return err
end
-- this isn't windows, screw the F1->help key
-vim.keymap.set({'n', 'v', 'o', 'i'}, '<F1>', '<Esc>')
+vim.keymap.set({ "n", "v", "o", "i" }, "<F1>", "<Esc>")
-- toggle paste mode with F2
-vim.keymap.set({'n', 'v', 'o', 'i'}, '<F2>', ':set invpaste<CR>')
+vim.keymap.set({ "n", "v", "o", "i" }, "<F2>", "<cmd>set invpaste<CR>")
-- clear highlights on search when pressing <Esc> in normal mode
-vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
+vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
-- Pop-up menu navigation with tab
-vim.keymap.set('i', '<Tab>', function() return vim.fn.pumvisible() and "<C-n>" or "<Tab>" end, {expr = true, remap = false})
-vim.keymap.set('i', '<S-Tab>', function() return vim.fn.pumvisible() and "<C-p>" or "<S-Tab>" end, {expr = true, remap = false})
+vim.keymap.set("i", "<Tab>", function()
+ return vim.fn.pumvisible() and "<C-n>" or "<Tab>"
+end, { expr = true, remap = false })
+vim.keymap.set("i", "<S-Tab>", function()
+ return vim.fn.pumvisible() and "<C-p>" or "<S-Tab>"
+end, { expr = true, remap = false })
-----------------------------------------------------------------------------
-- "dark" or "light"; the background color brightness
-vim.opt.background = 'light'
+vim.opt.background = "light"
-----------------------------------------------------------------------------
--- messages and info
-----------------------------------------------------------------------------
-- list of flags to make messages shorter
-vim.opt.shortmess = 'atTWoOI'
+vim.opt.shortmess = "atTWoOI"
-- display the current mode in the status line
-vim.opt.showmode = false -- the cursor already reflects the mode
+vim.opt.showmode = false -- the cursor already reflects the mode
-- do not display a status line unless there is more than one window
vim.opt.laststatus = 1
vim.opt.textwidth = 78
-- list of flags that tell how automatic formatting works
-vim.opt.formatoptions = 'tcroqn1l'
+vim.opt.formatoptions = "tcroqn1l"
-- pattern to recognize a numbered list
-- [[…]] is the Lua way to disable escape sequences in strings
vim.opt.formatlistpat = [[^\v\s*(((#|\a|\d{,4}|[ivx]{,4})[]:.)}/])+|[-\*.·→+])\s+]]
-- whether to use a popup menu for Insert mode completion
-vim.opt.completeopt = { 'menu', 'noinsert', 'popup', 'preview' }
+vim.opt.completeopt = { "menu", "noinsert", "popup", "preview" }
-- number of spaces used for each step of (auto)indent
vim.opt.shiftwidth = 2
-----------------------------------------------------------------------------
-- folding type: "manual", "indent", "expr", "marker", "syntax" or "diff"
-vim.opt.foldmethod = 'marker'
+vim.opt.foldmethod = "marker"
-----------------------------------------------------------------------------
--- reading and writing files
-----------------------------------------------------------------------------
-- list of directories for the swap file
-vim.opt.directory = { '.', vim.g.statedir .. '/swap//', '/var/tmp//', '$TMPDIR//', '/tmp//' }
+vim.opt.directory = { ".", vim.g.statedir .. "/swap//", "/var/tmp//", "$TMPDIR//", "/tmp//" }
-----------------------------------------------------------------------------
--- command line editing
-----------------------------------------------------------------------------
-- list of patterns to ignore files for file name completion
-vim.opt.wildignore = { '*.o', '*.pyc', '*.pyo', '*~', '*.bk', '*.bak' }
+vim.opt.wildignore = { "*.o", "*.pyc", "*.pyo", "*~", "*.bk", "*.bak" }
-----------------------------------------------------------------------------
--- various
vim.opt.secure = true
-- list that specifies what to write in the ShaDa file
-vim.opt.shada = {'!', '%', '\'100', '/100', ':100', '<100', '@100', 'f1', 'h', 's10' }
+vim.opt.shada = { "!", "%", "'100", "/100", ":100", "<100", "@100", "f1", "h", "s10" }
-- location of shada file
vim.opt.shadafile = vim.g.statedir .. "shada/main.shada"
-- disable the mouse entirely
-vim.opt.mouse = ''
+vim.opt.mouse = ""
!/.config/nvim/init.lua
!/.config/nvim/keymaps.lua
!/.config/nvim/options.lua
+<<<<<<< HEAD
!/.config/nvim/plugin/ale.lua
!/.config/nvim/plugin/highlight-yank.lua
+=======
+>>>>>>> 27ab3a2 (Import options from vimrc)
!/.config/nvim/plugin/listmode.lua
!/.config/nvim/plugin/lspconfig.lua
!/.config/nvim/plugin/vim-artesanal.lua