summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/colorscheme.lua2
-rw-r--r--lua/config.lua26
-rw-r--r--lua/nv-compe/init.lua2
-rw-r--r--lua/nv-globals.lua20
4 files changed, 26 insertions, 24 deletions
diff --git a/lua/colorscheme.lua b/lua/colorscheme.lua
index 52db4d50..bfd467f1 100644
--- a/lua/colorscheme.lua
+++ b/lua/colorscheme.lua
@@ -1,3 +1,3 @@
vim.cmd('let g:nvcode_termcolors=256')
-vim.cmd('colorscheme '..COLORSCHEME)
+vim.cmd('colorscheme ' .. O.colorscheme)
diff --git a/lua/config.lua b/lua/config.lua
index 0fe195c2..a579e092 100644
--- a/lua/config.lua
+++ b/lua/config.lua
@@ -1,21 +1,17 @@
-AUTO_COMPLETE=true
--- make list of languages
-AUTO_FORMAT=true
-
-COLORSCHEME='nvcode'
-
--- ideas
-
--[[
+O is the global options object
-nv.lint.python='flake8'
-nv.format.python='black'
-nv.format.python='yapf'
-nv.format.python='autopep8'
-nv.format.tsserver='prettier'
-nv.format.tsserver='eslint'
+Formatters and linters should be
+filled in as strings with either
+a global executable or a path to
+an executable
+]]
-]]
+O.auto_complete = true
+O.colorscheme = 'nvcode'
+O.python.formatter = 'yapf'
+O.python.linter = nil
+O.python.autoformat = false
diff --git a/lua/nv-compe/init.lua b/lua/nv-compe/init.lua
index 5c143e40..67e86be8 100644
--- a/lua/nv-compe/init.lua
+++ b/lua/nv-compe/init.lua
@@ -1,7 +1,7 @@
vim.o.completeopt = "menuone,noselect"
require'compe'.setup {
- enabled = AUTO_COMPLETE,
+ enabled = O.auto_complete,
autocomplete = true,
debug = false,
min_length = 1,
diff --git a/lua/nv-globals.lua b/lua/nv-globals.lua
index 7fa859a0..b5bdffc9 100644
--- a/lua/nv-globals.lua
+++ b/lua/nv-globals.lua
@@ -1,11 +1,17 @@
-local nv_options = {}
+O = {
-DATA_PATH = vim.fn.stdpath('data')
-CACHE_PATH = vim.fn.stdpath('cache')
-
-python = {
-linter = nil,
+ auto_complete = true,
+ colorscheme = 'nvcode',
+ python = {linter = nil, formatter = nil, autoformat = false},
+ javascript = {linter = nil, formatter = nil, autoformat = false},
+ javascriptreact = {linter = nil, formatter = nil, autoformat = false},
+ lua = {formatter = nil, autoformat = false},
+ bash = {linter = nil, formatter = nil, autoformat = false},
+ css = {formatter = nil, autoformat = false},
+ json = {formatter = nil, autoformat = false},
}
-return nv_options
+DATA_PATH = vim.fn.stdpath('data')
+CACHE_PATH = vim.fn.stdpath('cache')
+