diff options
| author | christianchiarulli <[email protected]> | 2021-06-28 02:37:33 -0400 | 
|---|---|---|
| committer | christianchiarulli <[email protected]> | 2021-06-28 02:37:33 -0400 | 
| commit | 36daa90e7476007ede1638c1aead995140dbb240 (patch) | |
| tree | b08c7fe0289e40ef8fb2c5cc7ca87cb6bd4b88e5 /lua | |
| parent | 89ea86f0ae322fa9a207f03fcd6974c3ae9f35a2 (diff) | |
more optional plugins
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/default-config.lua | 9 | ||||
| -rw-r--r-- | lua/lv-dashboard/init.lua | 112 | ||||
| -rw-r--r-- | lua/lv-dial/init.lua | 20 | ||||
| -rw-r--r-- | lua/plugins.lua | 207 | 
4 files changed, 206 insertions, 142 deletions
| diff --git a/lua/default-config.lua b/lua/default-config.lua index 5c2027e2..a694cd25 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -27,7 +27,14 @@ O = {      database = {save_location = '~/.config/nvcode_db', auto_execute = 1}, -    plugins = {hop = {active = false}}, +    plugin = { +        hop = {active = false}, +        dial = {active = false}, +        dashboard = {active = false}, +        zen = {active = false} + + +    },      lang = {          python = { diff --git a/lua/lv-dashboard/init.lua b/lua/lv-dashboard/init.lua index 6a57efe8..283fe564 100644 --- a/lua/lv-dashboard/init.lua +++ b/lua/lv-dashboard/init.lua @@ -1,45 +1,67 @@ --- vim.g.dashboard_custom_header = { ---     '███╗   ██╗██╗   ██╗ ██████╗ ██████╗ ██████╗ ███████╗', ---     '████╗  ██║██║   ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝', ---     '██╔██╗ ██║██║   ██║██║     ██║   ██║██║  ██║█████╗', ---     '██║╚██╗██║╚██╗ ██╔╝██║     ██║   ██║██║  ██║██╔══╝', ---     '██║ ╚████║ ╚████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗', ---     '╚═╝  ╚═══╝  ╚═══╝   ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝' --- } --- vim.g.dashboard_custom_header = { --- --- '      _..._                                                                           ', --- '    .\'     `.   ██      ██    ██ ███    ██  █████  ██████  ██    ██ ██ ███    ███ ', --- '   :         :  ██      ██    ██ ████   ██ ██   ██ ██   ██ ██    ██ ██ ████  ████ ', --- '   :         :  ██      ██    ██ ██ ██  ██ ███████ ██████  ██    ██ ██ ██ ████ ██ ', --- '   `.       .\'  ██      ██    ██ ██  ██ ██ ██   ██ ██   ██  ██  ██  ██ ██  ██  ██ ', --- '     `-...-\'    ███████  ██████  ██   ████ ██   ██ ██   ██   ████   ██ ██      ██ ', --- --- } - -vim.g.dashboard_custom_header = O.dashboard.custom_header - -vim.g.dashboard_default_executive = 'telescope' - -vim.g.dashboard_custom_section = { -    a = {description = {'  Find File          '}, command = 'Telescope find_files'}, -    b = {description = {'  Recently Used Files'}, command = 'Telescope oldfiles'}, -    c = {description = {'  Load Last Session  '}, command = 'SessionLoad'}, -    d = {description = {'  Find Word          '}, command = 'Telescope live_grep'}, -    e = {description = {'  Settings           '}, command = ':e '..CONFIG_PATH..'/lv-settings.lua'} -    -- e = {description = {'  Marks              '}, command = 'Telescope marks'} -} - --- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'}, - --- vim.g.dashboard_custom_shortcut = { ---     a = 'f', ---     find_word = 'SPC f a', ---     last_session = 'SPC s l', ---     new_file = 'SPC c n', ---     book_marks = 'SPC f b' --- } --- find_history = 'SPC f h', - --- vim.g.dashboard_session_directory = CACHE_PATH..'/session' -vim.g.dashboard_custom_footer = O.dashboard.footer +local M = {} + +M.config = function() +    -- vim.g.dashboard_custom_header = { +    --     '███╗   ██╗██╗   ██╗ ██████╗ ██████╗ ██████╗ ███████╗', +    --     '████╗  ██║██║   ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝', +    --     '██╔██╗ ██║██║   ██║██║     ██║   ██║██║  ██║█████╗', +    --     '██║╚██╗██║╚██╗ ██╔╝██║     ██║   ██║██║  ██║██╔══╝', +    --     '██║ ╚████║ ╚████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗', +    --     '╚═╝  ╚═══╝  ╚═══╝   ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝' +    -- } +    -- vim.g.dashboard_custom_header = { +    -- +    -- '      _..._                                                                           ', +    -- '    .\'     `.   ██      ██    ██ ███    ██  █████  ██████  ██    ██ ██ ███    ███ ', +    -- '   :         :  ██      ██    ██ ████   ██ ██   ██ ██   ██ ██    ██ ██ ████  ████ ', +    -- '   :         :  ██      ██    ██ ██ ██  ██ ███████ ██████  ██    ██ ██ ██ ████ ██ ', +    -- '   `.       .\'  ██      ██    ██ ██  ██ ██ ██   ██ ██   ██  ██  ██  ██ ██  ██  ██ ', +    -- '     `-...-\'    ███████  ██████  ██   ████ ██   ██ ██   ██   ████   ██ ██      ██ ', +    -- +    -- } +    vim.g.dashboard_disable_at_vimenter = 0 + +    vim.g.dashboard_custom_header = O.dashboard.custom_header + +    vim.g.dashboard_default_executive = 'telescope' + +    vim.g.dashboard_custom_section = { +        a = { +            description = {'  Find File          '}, +            command = 'Telescope find_files' +        }, +        b = { +            description = {'  Recently Used Files'}, +            command = 'Telescope oldfiles' +        }, +        c = { +            description = {'  Load Last Session  '}, +            command = 'SessionLoad' +        }, +        d = { +            description = {'  Find Word          '}, +            command = 'Telescope live_grep' +        }, +        e = { +            description = {'  Settings           '}, +            command = ':e ' .. CONFIG_PATH .. '/lv-settings.lua' +        } +        -- e = {description = {'  Marks              '}, command = 'Telescope marks'} +    } + +    -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'}, + +    -- vim.g.dashboard_custom_shortcut = { +    --     a = 'f', +    --     find_word = 'SPC f a', +    --     last_session = 'SPC s l', +    --     new_file = 'SPC c n', +    --     book_marks = 'SPC f b' +    -- } +    -- find_history = 'SPC f h', + +    -- vim.g.dashboard_session_directory = CACHE_PATH..'/session' +    vim.g.dashboard_custom_footer = O.dashboard.footer +end + +return M diff --git a/lua/lv-dial/init.lua b/lua/lv-dial/init.lua index 439ab79e..aa32e050 100644 --- a/lua/lv-dial/init.lua +++ b/lua/lv-dial/init.lua @@ -1,4 +1,7 @@ -vim.cmd [[ +local M = {} + +M.config = function() +    vim.cmd [[  nmap <C-a> <Plug>(dial-increment)  nmap <C-x> <Plug>(dial-decrement)  vmap <C-a> <Plug>(dial-increment) @@ -7,10 +10,13 @@ vmap g<C-a> <Plug>(dial-increment-additional)  vmap g<C-x> <Plug>(dial-decrement-additional)  ]] -local dial = require("dial") +    local dial = require("dial") + +    dial.augends["custom#boolean"] = dial.common.enum_cyclic { +        name = "boolean", +        strlist = {"true", "false"} +    } +    table.insert(dial.config.searchlist.normal, "custom#boolean") +end -dial.augends["custom#boolean"] = dial.common.enum_cyclic{ -    name = "boolean", -    strlist = {"true", "false"}, -} -table.insert(dial.config.searchlist.normal, "custom#boolean") +return M diff --git a/lua/plugins.lua b/lua/plugins.lua index 9aa56b56..d68cd25c 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -110,53 +110,133 @@ return require("packer").startup(function(use)      }      use {"hrsh7th/vim-vsnip"} + +    -- extras, these do not load by default + +    -- Better motions      use { -        event = 'BufRead',          'phaazon/hop.nvim', +        event = 'BufRead',          config = function()              require('lv-hop').config()          end, -        disable = not O.plugins.hop.active, +        disable = not O.plugin.hop.active,          opt = true      } - -    -- extras -    -- if O.matchup then require('lv-matchup') end -    --     require('lv-rnvimr') -    --     require('lv-gitblame') -    --     require('lv-numb') -    --     require('lv-dial') -    --     require('lv-hop') -    --     require('lv-colorizer') -    --     require('lv-spectre') -    --     require('lv-symbols-outline') -    --     require('lv-vimtex') -    --     require('lv-zen') -    --     require('lv-dashboard') -    --     require('lv-lsp-rooter') -    -- end +    -- Enhanced increment/decrement +    use { +        'monaqa/dial.nvim', +        event = 'BufRead', +        config = function() +            require('lv-dial').config() +        end, +        disable = not O.plugin.dial.active, +        opt = true +    } +    -- Dashboard +    use { +        "ChristianChiarulli/dashboard-nvim", +        event = 'BufWinEnter', +        cmd = {"Dashboard", "DashboardNewFile", "DashboardJumpMarks"}, +        config = function() +            require('lv-dashboard').config() +        end, +        disable = not O.plugin.dashboard.active, +        opt = true +    } +    -- Zen Mode +    -- use { +    --     "Pocco81/TrueZen.nvim", +    --     cmd = {"TZAtaraxis", "TZMinimalist"}, +    --     config = function() +    --         require('lv-zen').config() +    --     end, +    --     disable = not O.plugin.zen.active, +    --     opt = true +    -- } + +    -- -- matchup +    -- use {'andymass/vim-matchup', opt = true} +    -- require_plugin('vim-matchup') + +    --     -- Snippets +    --     use {"rafamadriz/friendly-snippets", opt = true} +    --     require_plugin("friendly-snippets") + +    --     -- Colorizer +    --     use {'norcalli/nvim-colorizer.lua', opt = true} +    --     require_plugin('nvim-colorizer.lua') + +    --     -- Peek lines +    --     use {'nacro90/numb.nvim', opt = true} +    --     require_plugin('numb.nvim') +    --  +    --     -- Treesitter playground +    --     use {'nvim-treesitter/playground', opt = true} +    --     require_plugin('playground') +    --  +    --  +    --  +    --     -- Latex +    --     use {"lervag/vimtex", opt = true} +    --     require_plugin("vimtex") +    --  +    --     -- comments in context +    --     use {'JoosepAlviste/nvim-ts-context-commentstring', opt = true} +    --     require_plugin("nvim-ts-context-commentstring") +    --  +    --  +    --     -- Git extras +    --     use {'f-person/git-blame.nvim', opt = true} +    --     require_plugin("git-blame.nvim") +    --  +    --  +    --     -- diagnostics +    --     use {"folke/trouble.nvim", opt = true} +    --     require_plugin('trouble.nvim') +    --  +    --     -- Debugging +    --     use {"mfussenegger/nvim-dap", opt = true} +    --     require_plugin("nvim-dap") +    --  +    --  +    --     -- Better quickfix +    --     use {"kevinhwang91/nvim-bqf", opt = true} +    --     require_plugin("nvim-bqf") +    --  +    --     -- Search & Replace +    --     use {'windwp/nvim-spectre', opt = true} +    --     require_plugin('nvim-spectre') +    --  +    --     -- Symbol Outline +    --     use {'simrat39/symbols-outline.nvim', opt = true} +    --     require_plugin('symbols-outline.nvim') +    --  +    --     -- Interactive scratchpad +    --     use {'metakirby5/codi.vim', opt = true} +    --     require_plugin('codi.vim') +    --  +    --     -- Markdown preview +    --     use { +    --         'iamcco/markdown-preview.nvim', +    --         run = 'cd app && npm install', +    --         opt = true +    --     } +    --     require_plugin('markdown-preview.nvim') +    --  +    --     -- Floating terminal +    --     use {'numToStr/FTerm.nvim', opt = true} +    --     require_plugin('FTerm.nvim') +    --  +    --     -- Sane gx for netrw_gx bug +    --     use {"felipec/vim-sanegx", opt = true} + +    -- lsp root +    -- use {"ahmedkhalf/lsp-rooter.nvim", opt = true} -- with this nvim-tree will follow you +    -- require_plugin('lsp-rooter.nvim')      -- Extras      if O.extras then -        -- Interactive scratchpad -        use {'metakirby5/codi.vim', opt = true} -        require_plugin('codi.vim') -        -- Markdown preview -        use { -            'iamcco/markdown-preview.nvim', -            run = 'cd app && npm install', -            opt = true -        } -        require_plugin('markdown-preview.nvim') -        -- Floating terminal -        use {'numToStr/FTerm.nvim', opt = true} -        require_plugin('FTerm.nvim') -        -- Enhanced increment/decrement -        use {'monaqa/dial.nvim', opt = true} -        require_plugin('dial.nvim') -        -- Peek lines -        use {'nacro90/numb.nvim', opt = true} -        require_plugin('numb.nvim')          -- HTML preview          use {              'turbio/bracey.vim', @@ -164,62 +244,11 @@ return require("packer").startup(function(use)              opt = true          }          require_plugin('bracey.vim') -        -- Better motions -        use {'phaazon/hop.nvim', opt = true} -        require_plugin('hop.nvim') -        -- Colorizer -        use {'norcalli/nvim-colorizer.lua', opt = true} -        require_plugin('nvim-colorizer.lua') -        -- Search & Replace -        use {'windwp/nvim-spectre', opt = true} -        require_plugin('nvim-spectre') -        use {'simrat39/symbols-outline.nvim', opt = true} -        require_plugin('symbols-outline.nvim') -        -- Treesitter playground -        use {'nvim-treesitter/playground', opt = true} -        require_plugin('playground') -        -- Latex -        use {"lervag/vimtex", opt = true} -        require_plugin("vimtex") -        -- matchup -        use {'andymass/vim-matchup', opt = true} -        require_plugin('vim-matchup') -        -- comments in context -        use {'JoosepAlviste/nvim-ts-context-commentstring', opt = true} -        require_plugin("nvim-ts-context-commentstring") -        -- Zen Mode -        use {"Pocco81/TrueZen.nvim", opt = true} -        require_plugin("TrueZen.nvim") -        -- Git extras -        use {'f-person/git-blame.nvim', opt = true} -        require_plugin("git-blame.nvim") -        -- TODO remove when open on dir is supported by nvimtree -        --  use "kevinhwang91/rnvimr" +          use {"nvim-telescope/telescope-fzy-native.nvim", opt = true}          use {"nvim-telescope/telescope-project.nvim", opt = true}          require_plugin('telescope-project.nvim') -        -- Debugging -        use {"mfussenegger/nvim-dap", opt = true} -        require_plugin("nvim-dap") - -        use {"rafamadriz/friendly-snippets", opt = true} -        require_plugin("friendly-snippets") - -        use {"kevinhwang91/nvim-bqf", opt = true} -        require_plugin("nvim-bqf") - -        use {"ahmedkhalf/lsp-rooter.nvim", opt = true} -- with this nvim-tree will follow you -        require_plugin('lsp-rooter.nvim') - -        use {"ChristianChiarulli/dashboard-nvim", opt = true} -        require_plugin("dashboard-nvim") - -        use {"folke/trouble.nvim", opt = true} -        require_plugin('trouble.nvim') - -        -- Sane gx for netrw_gx bug -        use {"felipec/vim-sanegx", opt = true}          -- Autotag          -- use {"windwp/nvim-ts-autotag", opt = true}          -- require_plugin("nvim-ts-autotag") | 
