summaryrefslogtreecommitdiff
path: root/lua/config/00-options.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/config/00-options.lua')
-rw-r--r--lua/config/00-options.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/lua/config/00-options.lua b/lua/config/00-options.lua
new file mode 100644
index 0000000..629c14d
--- /dev/null
+++ b/lua/config/00-options.lua
@@ -0,0 +1,42 @@
+-- Editor options extracted from the original init.vim.
+-- Load before plugin setup where possible (especially netrw and mapleader).
+
+local opt = vim.opt
+local g = vim.g
+
+g.loaded_netrw = 1
+g.loaded_netrwPlugin = 1
+g.mapleader = ' '
+
+
+-- Display and navigation.
+opt.termguicolors = true
+opt.number = true
+opt.relativenumber = true
+opt.wrap = false
+opt.scrolloff = 8
+opt.title = true
+opt.colorcolumn = '+1'
+
+-- Indentation and text layout.
+opt.shiftwidth = 2
+opt.tabstop = 2
+opt.expandtab = true
+opt.textwidth = 80
+
+-- Splits and completion.
+opt.splitright = true
+opt.splitbelow = true
+opt.wildmode = { 'longest', 'list', 'full' }
+opt.pumheight = 20
+opt.completeopt = { 'menu', 'menuone', 'noselect' }
+
+-- Performance, responsiveness, and matching pairs.
+opt.updatetime = 1000
+opt.matchpairs:append('<:>')
+
+-- Global configuration for plugins.
+g.vsnip_snippet_dir = vim.fn.expand('~/.config/nvim/snippets')
+g.vsnip_snippet_dirs = { vim.fn.expand('~/.config/nvim/local/snippets') }
+g.jq_highlight_objects = 1
+g.jq_highlight_function_calls = 1