diff options
author | rebuilt <[email protected]> | 2021-05-03 02:31:16 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-02 20:31:16 -0400 |
commit | f15428e6550db4e37e25af54fb511459e26b6cb1 (patch) | |
tree | 8bb3555f89e7a421c6f3ba880d7a4e2ba4ae6480 /lua | |
parent | 99364ef2b736c28e4b4afd739ca3469a604c4a02 (diff) |
Adds the ability to toggle on/off whichkey and dashboard (#337)
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lv-globals.lua | 13 | ||||
-rw-r--r-- | lua/plugins.lua | 15 |
2 files changed, 22 insertions, 6 deletions
diff --git a/lua/lv-globals.lua b/lua/lv-globals.lua index dedf397b..5cf4e606 100644 --- a/lua/lv-globals.lua +++ b/lua/lv-globals.lua @@ -7,6 +7,17 @@ O = { number = true, relative_number = true, shell = 'bash', + -- Plugin settings + -- ======================================== + dashboard = { + enable = true, + }, + whichkey = { + enable = true, + }, + + -- LSP settings + -- ======================================== -- @usage pass a table with your desired languages treesitter = { @@ -60,7 +71,7 @@ O = { ruby = { diagnostics = {virtualtext = true, signs = true, underline = true}, filetypes = {'rb', 'erb', 'rakefile'} - } + }, -- css = {formatter = '', autoformat = false, virtual_text = true}, -- json = {formatter = '', autoformat = false, virtual_text = true} } diff --git a/lua/plugins.lua b/lua/plugins.lua index 0bf74511..a6c18efd 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -64,9 +64,14 @@ return require("packer").startup( -- use {'lukas-reineke/indent-blankline.nvim', opt=true, branch = 'lua'} use {"lewis6991/gitsigns.nvim", opt = true} - -- use {"liuchengxu/vim-which-key", opt = true} - use {"folke/which-key.nvim", opt = true} - use {"ChristianChiarulli/dashboard-nvim", opt = true} + use {"folke/which-key.nvim", opt = true, + config = function() require('lv-which-key') end, + cond = function() return O.whichkey.enable end,} + + use {"ChristianChiarulli/dashboard-nvim", + opt = true, + config = function() require'lv-dashboard' end, + cond = function() return O.dashboard.enable end} use {"windwp/nvim-autopairs", opt = true} use {"terrortylor/nvim-comment", opt = true} use {"kevinhwang91/nvim-bqf", opt = true} @@ -95,8 +100,7 @@ return require("packer").startup( require_plugin("nvim-ts-autotag") require_plugin("nvim-tree.lua") require_plugin("gitsigns.nvim") - require_plugin("which-key.nvim") - require_plugin("dashboard-nvim") + -- require_plugin("which-key.nvim") require_plugin("nvim-autopairs") require_plugin("nvim-comment") require_plugin("nvim-bqf") @@ -106,3 +110,4 @@ return require("packer").startup( require_plugin("barbar.nvim") end ) + |