diff --git a/dot_config/nvim/lua/plugins/init.lua b/dot_config/nvim/lua/plugins/init.lua index 272638e..fc2049f 100644 --- a/dot_config/nvim/lua/plugins/init.lua +++ b/dot_config/nvim/lua/plugins/init.lua @@ -28,31 +28,39 @@ require("lazy").setup({ end, }, { 'gaoDean/autolist.nvim', - -- after = { 'vim-markdown', 'nvim-autopairs' }, - commit = "aaadfa9a0d4de1c7628eb3cb7ee811dc94872ef8", - config = function() - local autolist = require("autolist") - autolist.setup({}) - -- below is for newer versions of autolist - -- pinned to older commit because newer ones with these mapping hooks introduced - -- lots of highlighting noise and erratic insert mode behavior, like not working - -- autolist.create_mapping_hook("i", "", autolist.new) - -- autolist.create_mapping_hook("i", "", autolist.indent) - -- autolist.create_mapping_hook("i", "", autolist.indent, "") - -- autolist.create_mapping_hook("n", "o", autolist.new) - -- autolist.create_mapping_hook("n", "O", autolist.new_before) - -- autolist.create_mapping_hook("n", ">>", autolist.indent) - -- autolist.create_mapping_hook("n", "<<", autolist.indent) - -- autolist.create_mapping_hook("n", "", autolist.force_recalculate) - -- autolist.create_mapping_hook("n", "x", autolist.invert_entry, "") - -- vim.api.nvim_create_autocmd("TextChanged", { - -- pattern = "*", - -- callback = function() - -- vim.cmd.normal({autolist.force_recalculate(nil, nil), bang = false}) - -- end - -- }) - end, + ft = { + "markdown", + "text", + "tex", + "plaintex", + "norg", }, + config = function() + require("autolist").setup() + vim.keymap.set("i", "", "AutolistTab") + vim.keymap.set("i", "", "AutolistShiftTab") + -- vim.keymap.set("i", "", "AutolistRecalculate") -- an example of using to indent + vim.keymap.set("i", "", "AutolistNewBullet") + vim.keymap.set("n", "o", "oAutolistNewBullet") + vim.keymap.set("n", "O", "OAutolistNewBulletBefore") + vim.keymap.set("n", "", "AutolistToggleCheckbox") + vim.keymap.set("n", "", "AutolistRecalculate") + + -- cycle list types with dot-repeat + vim.keymap.set("n", "cn", require("autolist").cycle_next_dr, { expr = true }) + vim.keymap.set("n", "cp", require("autolist").cycle_prev_dr, { expr = true }) + + -- if you don't want dot-repeat + -- vim.keymap.set("n", "cn", "AutolistCycleNext") + -- vim.keymap.set("n", "cp", "AutolistCycleNext") + + -- functions to recalculate list on edit + vim.keymap.set("n", ">>", ">>AutolistRecalculate") + vim.keymap.set("n", "<<", "<<AutolistRecalculate") + vim.keymap.set("n", "dd", "ddAutolistRecalculate") + vim.keymap.set("v", "d", "dAutolistRecalculate") + end, + }, -- Telescope { 'nvim-telescope/telescope.nvim', @@ -91,7 +99,13 @@ require("lazy").setup({ end, }, { "benfowler/telescope-luasnip.nvim" }, - { 'nvim-telescope/telescope-file-browser.nvim' }, + { "nvim-telescope/telescope-file-browser.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons" + } + }, { 'LukasPietzschmann/telescope-tabs', dependencies = { 'nvim-telescope/telescope.nvim' }, config = function() @@ -116,22 +130,31 @@ require("lazy").setup({ -- Golang { 'ray-x/go.nvim', - config = function() - require('go').setup({ - gofmt = 'gofmt', - max_line_len = 999, - }) - -- Run gofmt + goimport on save - vim.api.nvim_create_autocmd("BufWritePre", { - pattern = "*.go", - callback = function() - require('go.format').goimport() - end, - group = format_sync_grp, - }) - end, + dependencies = { + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter" }, - {'ray-x/guihua.lua', build = 'cd lua/fzy && make'}, + config = function() + require('go').setup({ + gofmt = 'gofmt', + max_line_len = 999, + }) + -- Run gofmt + goimport on save + local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {}) + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*.go", + callback = function() + require('go.format').goimport() + end, + group = format_sync_grp, + }) + end, + event = {"CmdlineEnter"}, + ft = {"go", "gomod"}, + build = ':lua require("go.install").update_all_sync()' + }, + { 'ray-x/guihua.lua', build = 'cd lua/fzy && make'}, { 'leoluz/nvim-dap-go', config = function() require('dap-go').setup() @@ -164,12 +187,13 @@ require("lazy").setup({ -- Statusline { 'nvim-lualine/lualine.nvim', - dependencies = { 'kyazdani42/nvim-web-devicons' }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() require('plugins.lualine') end, }, { 'akinsho/nvim-bufferline.lua', + dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() require('plugins.nvim-bufferline') end, @@ -178,7 +202,7 @@ require("lazy").setup({ -- Autocompletion, formatting, linting & intellisense -- cmp plugins { 'hrsh7th/nvim-cmp', - config = function() -- FIXME: "fun(LazyPlugin) instead" + config = function() require('plugins.cmp') end, }, -- The completion plugin @@ -195,6 +219,8 @@ require("lazy").setup({ -- cmp snippets { 'L3MON4D3/LuaSnip', + version = "v2.*", + build = "make install_jsregexp", config = function() require('luasnip.loaders.from_vscode').lazy_load({paths="~/.config/nvim/snips"}) end, @@ -208,9 +234,10 @@ require("lazy").setup({ dependencies = { 'williamboman/mason.nvim' } }, { 'neovim/nvim-lspconfig' }, { 'b0o/schemastore.nvim' }, - { 'jose-elias-alvarez/null-ls.nvim' }, + { 'nvimtools/none-ls.nvim', + dependencies = { 'nvim-lua/plenary.nvim' } }, { "folke/trouble.nvim", - dependencies = "kyazdani42/nvim-web-devicons", + dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() require("trouble").setup { -- your configuration comes here @@ -225,26 +252,32 @@ require("lazy").setup({ config = function() require('plugins.treesitter') end, + dependencies = { + { 'nvim-treesitter/nvim-treesitter-textobjects' }, + } }, - { 'nvim-treesitter/nvim-treesitter-textobjects' }, - { 'p00f/nvim-ts-rainbow' }, - { 'simrat39/symbols-outline.nvim', - config = function() - require('symbols-outline').setup() - end, + { 'HiPhish/rainbow-delimiters.nvim' }, + { 'stevearc/aerial.nvim', + opts = {}, + -- Optional dependencies + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons" + }, }, -- Utilities { 'windwp/nvim-autopairs', - config = function() - require('plugins.nvim-autopairs') - end - }, -- Insert or delete brackets, parens, quotes in pair. + config = function() + require('plugins.nvim-autopairs') + end + }, -- Insert or delete brackets, parens, quotes in pair. { 'numtostr/comment.nvim', - config = function() - require('plugins.comment') - end, - }, -- Comment stuff out easily + config = function() + require('plugins.comment') + end, + lazy = false, + }, -- Comment stuff out easily { 'miyakogi/conoline.vim', config = function() require('plugins.conoline') @@ -259,10 +292,10 @@ require("lazy").setup({ { 'alker0/chezmoi.vim' }, -- highlighting support for chezmoi templates { 'folke/which-key.nvim', - config = function() - require('plugins.which-key') - end, - }, -- key bindings + config = function() + require('plugins.which-key') + end, + }, -- key bindings { 'AckslD/messages.nvim', config = function() require("messages").setup() @@ -277,7 +310,7 @@ require("lazy").setup({ }, -- ZK - { 'mickael-menu/zk-nvim', + { 'zk-org/zk-nvim', config = function() require('zk').setup() end, diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua index ce4c581..c41fff0 100644 --- a/dot_config/nvim/lua/plugins/telescope.lua +++ b/dot_config/nvim/lua/plugins/telescope.lua @@ -58,6 +58,7 @@ telescope.load_extension('luasnip') telescope.load_extension('file_browser') telescope.load_extension('lazy') telescope.load_extension('dap') +telescope.load_extension('telescope-tabs') -- map('n', 'f', 'lua require("telescope.builtin").find_files({ hidden = true, find_command = { "rg", "--files", "--hidden", "--follow", "--ignore-file", "~/.vimignore" } })', { noremap = true, silent = true }) -- map('n', 'gt', 'lua require("telescope.builtin").live_grep()', { noremap = true, silent = true }) diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index e6efdb6..ef4427d 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -73,9 +73,4 @@ treesitter_configs.setup { }, }, }, - rainbow = { - enable = true, - extended_mode = true, - max_file_lines = nil, - }, } diff --git a/dot_config/nvim/lua/plugins/which-key.lua b/dot_config/nvim/lua/plugins/which-key.lua index 9dd0ff6..3038251 100644 --- a/dot_config/nvim/lua/plugins/which-key.lua +++ b/dot_config/nvim/lua/plugins/which-key.lua @@ -149,7 +149,7 @@ which_key.register({ which_key.register({ v = { name = "View", - s = { ':SymbolsOutline', "Toggle Symbols Outline" } + s = { 'AerialToggle!', "Toggle Aerial" } } }, { prefix = "", noremap = true, silent = true})