diff options
author | Chris <[email protected]> | 2021-03-27 01:59:28 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-27 01:59:28 -0400 |
commit | 127ff7231a63a75887647c11485338b354617c0b (patch) | |
tree | 81dc75a1dc28534699660af67d5c55bf2cd3bbd4 | |
parent | 56f8d4ccbd2380838207df60cf36e60710235e77 (diff) |
rough user config, not finished
-rw-r--r-- | init.lua | 3 | ||||
-rw-r--r-- | lua/colorscheme.lua | 2 | ||||
-rw-r--r-- | lua/config.lua | 26 | ||||
-rw-r--r-- | lua/nv-compe/init.lua | 2 | ||||
-rw-r--r-- | lua/nv-globals.lua | 20 |
5 files changed, 28 insertions, 25 deletions
@@ -1,6 +1,5 @@ -- General mappings require('plugins') -require('config') require('nv-utils') require('nv-globals') require('settings') @@ -58,5 +57,7 @@ require('lsp.html-ls') require('lsp.efm-general-ls') require('lsp.virtual_text') +-- Source config last +require('config') -- vim.lsp.callbacks["textDocument/publishDiagnostics"] = function() end -- vim.lsp.handlers["textDocument/publishDiagnostics"] = nil 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') + |