Browse Source

more options

Chris 4 years ago
parent
commit
43f067e0b4
4 changed files with 32 additions and 20 deletions
  1. 2 1
      lua/nv-galaxyline/init.lua
  2. 14 13
      lua/nv-globals.lua
  3. 5 5
      lua/nv-treesitter/init.lua
  4. 11 1
      nv-settings.lua

+ 2 - 1
lua/nv-galaxyline/init.lua

@@ -2,7 +2,8 @@ local gl = require('galaxyline')
 -- get my theme in galaxyline repo
 -- local colors = require('galaxyline.theme').default
 local colors = {
-    bg = '#2E2E2E',
+    -- bg = '#2E2E2E',
+    bg = '#292D38',
     yellow = '#DCDCAA',
     dark_yellow = '#D7BA7D',
     cyan = '#4EC9B0',

+ 14 - 13
lua/nv-globals.lua

@@ -3,14 +3,21 @@ O = {
     auto_complete = true,
     colorscheme = 'nvcode',
     hidden_files = true,
-    wrap_lines = true,
+    wrap_lines = false,
     number = true,
     relative_number = true,
     shell = 'bash',
-    database = {
-        save_location = '~/.config/nvcode_db',
-        auto_execute = 1
+
+    -- @usage pass a table with your desired languages
+    treesitter = {
+        ensure_installed = "all",
+        ignore_install = {"haskell"},
+        highlight = {enabled = true},
+        playground = {enabled = true},
+        rainbow = {enabled = false}
     },
+
+    database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
     python = {
         linter = '',
         -- @usage can be 'yapf', 'black'
@@ -19,9 +26,7 @@ O = {
         isort = false,
         diagnostics = {virtual_text = true, signs = true, underline = true}
     },
-    dart = {
-        sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'
-    },
+    dart = {sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'},
     lua = {
         -- @usage can be 'lua-format'
         formatter = '',
@@ -50,12 +55,8 @@ O = {
         autoformat = false,
         diagnostics = {virtual_text = true, signs = true, underline = true}
     },
-    tailwindls = {
-        filetypes = {'html', 'css', 'scss', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact'}
-    },
-    clang = {
-        diagnostics = {virtual_text = true, signs = true, underline = true}
-    }
+    tailwindls = {filetypes = {'html', 'css', 'scss', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact'}},
+    clang = {diagnostics = {virtual_text = true, signs = true, underline = true}}
     -- css = {formatter = '', autoformat = false, virtual_text = true},
     -- json = {formatter = '', autoformat = false, virtual_text = true}
 }

+ 5 - 5
lua/nv-treesitter/init.lua

@@ -1,20 +1,20 @@
 require'nvim-treesitter.configs'.setup {
-    ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
+    ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
     -- TODO seems to be broken
-    ignore_install = {"haskell"},
+    ignore_install = O.treesitter.ignore_install,
     highlight = {
-        enable = true -- false will disable the whole extension
+        enable = O.treesitter.highlight.enabled -- false will disable the whole extension
     },
     -- indent = {enable = true, disable = {"python", "html", "javascript"}},
     indent = {enable = {"javascriptreact"}},
     playground = {
-        enable = true,
+        enable = O.treesitter.playground.enabled,
         disable = {},
         updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
         persist_queries = false -- Whether the query persists across vim sessions
     },
     autotag = {enable = true},
-    rainbow = {enable = true},
+    rainbow = {enable = O.treesitter.rainbow.enabled},
     context_commentstring = {enable = true, config = {javascriptreact = {style_element = '{/*%s*/}'}}}
     -- refactor = {highlight_definitions = {enable = true}}
 }

+ 11 - 1
nv-settings.lua

@@ -5,12 +5,22 @@ Formatters and linters should be
 filled in as strings with either
 a global executable or a path to
 an executable
-]] -- general
+]] 
+
+-- general
 O.auto_complete = true
 O.colorscheme = 'nvcode'
 O.auto_close_tree = 0
 O.wrap_lines = false
 
+-- @usage pass a table with your desired languages
+--O.treesitter.ensure_installed = "all"
+--O.treesitter.ignore_install = {"haskell"}
+--O.treesitter.highlight.enabled = true
+--O.treesitter.playground.enabled = true
+--O.treesitter.rainbow.enabled = false
+
+
 O.clang.diagnostics.virtual_text = false
 O.clang.diagnostics.signs = false
 O.clang.diagnostics.underline = false