From bcb6043f93ec631b28f5709c558d0a9826abb727 Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Sun, 21 Apr 2024 19:16:29 -0400 Subject: [PATCH] Cleanup configs and add grapple --- init.lua | 59 --- lazy-lock.json | 11 +- lua/mappings.lua | 11 - lua/plugin-mappings.lua | 4 +- lua/plugins.lua | 1024 +++++++++++++++++++-------------------- 5 files changed, 503 insertions(+), 606 deletions(-) diff --git a/init.lua b/init.lua index 8bc9ee1..bf434bb 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,6 @@ require('plugin-mappings') require('gopls') require('code-completion') -require('cokeline-config') require('commands') local vim = vim @@ -17,65 +16,12 @@ local vim = vim vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 --- nvim-tree -require('nvim-tree').setup { - on_attach = nvim_tree_attach, -} - -- Bufferline vim.opt.termguicolors = true -- Theme require('onedark').load() --- navic -local navic = require("nvim-navic") -navic.setup({ - icons = { - File = "󰈙 ", - Module = " ", - Namespace = "󰌗 ", - Package = " ", - Class = "󰌗 ", - Method = "󰆧 ", - Property = " ", - Field = " ", - Constructor = " ", - Enum = "󰕘", - Interface = "󰕘", - Function = "󰊕 ", - Variable = "󰆧 ", - Constant = "󰏿 ", - String = "󰀬 ", - Number = "󰎠 ", - Boolean = "◩ ", - Array = "󰅪 ", - Object = "󰅩 ", - Key = "󰌋 ", - Null = "󰟢 ", - EnumMember = " ", - Struct = "󰌗 ", - Event = " ", - Operator = "󰆕 ", - TypeParameter = "󰊄 ", - }, -}) - -require("lualine").setup({ - sections = { - lualine_c = { - { - require('auto-session.lib').current_session_name - }, - { - "navic", - color_correction = nil, - navic_opts = nil - }, - } - }, -}) - -- neodev require("neodev").setup({}) @@ -101,11 +47,6 @@ lspconfig.clangd.setup { end } - --- Goto -goto_preview = require('goto-preview') -goto_preview.setup {} - -- conform require("conform").setup({ formatters_by_ft = { diff --git a/lazy-lock.json b/lazy-lock.json index 1551fce..f8810a2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -16,13 +16,11 @@ "copilot.lua": { "branch": "master", "commit": "858bbfa6fa81c88fb1f64107d7981f1658619e0a" }, "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, - "fzf": { "branch": "master", "commit": "f0fbed6007d628216a5b75b62646aea90d489afa" }, - "fzf.vim": { "branch": "master", "commit": "1e054c1d075d87903647db9320116d360eb8b024" }, "git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" }, "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" }, "go.nvim": { "branch": "master", "commit": "24d2fa373d55d9900cd4b502a88214dc17e6fab6" }, - "goto-preview": { "branch": "main", "commit": "16ec236fabb40b2cebfe283b1d701338886462db" }, + "grapple.nvim": { "branch": "main", "commit": "12172536620464f8cc124e07c6e3ccd306ea3c5c" }, "guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" }, "guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" }, "gx.nvim": { "branch": "main", "commit": "78070bbd8e7e15a1623cdd6832a9529d2ee63e0c" }, @@ -32,22 +30,21 @@ "indent-blankline.nvim": { "branch": "master", "commit": "5da5546947f3125dfd6aa85ab21074dc83f776d5" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, + "lspsaga.nvim": { "branch": "main", "commit": "f20985499cd8ff0fbbfe8e7c770428ef764fc3be" }, "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, "marks.nvim": { "branch": "master", "commit": "74e8d01b2a2131b6e46354cffc553aa7f81bcf5b" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "maximize.nvim": { "branch": "master", "commit": "97bfc171775c404396f8248776347ebe64474fe7" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neodev.nvim": { "branch": "main", "commit": "029899ea32d3dc8ed8c910ceca2ee5d16e566c11" }, "neogit": { "branch": "master", "commit": "e02121f5aad420dc16411a6cde59879230f9d5b9" }, "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, "nui.nvim": { "branch": "main", "commit": "80445d015d2b5f9af0d9e8bce63d303bc86eda8a" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-cokeline": { "branch": "main", "commit": "07069496c3a25c3d9956292d05008ca17036afe0" }, "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, - "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" }, "nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" }, - "nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" }, "nvim-treesitter": { "branch": "master", "commit": "27f68c0b6a87cbad900b3d016425450af8268026" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" }, "nvim-ufo": { "branch": "main", "commit": "c6d88523f574024b788f1c3400c5d5b9bb1a0407" }, @@ -61,8 +58,6 @@ "rainbow": { "branch": "master", "commit": "61f719aebe0dc5c3048330c50db72cfee1afdd34" }, "refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" }, "remember.nvim": { "branch": "master", "commit": "b7613e14692478a0428dc69ca380b6fbb2448e60" }, - "resession.nvim": { "branch": "master", "commit": "25b177d9068813972996381a6b1ed3df25ba912c" }, - "rest.nvim": { "branch": "main", "commit": "84e81a19ab24ccf05c9233d34d4dfce61c233abe" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "4bd5657b14b58e069287f5ac591a647bb860b2ed" }, "telescope-tabs": { "branch": "master", "commit": "a38c8fee471257a0ff233e065c4a0d123f8e67b0" }, diff --git a/lua/mappings.lua b/lua/mappings.lua index 1db769c..af1a42e 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -75,11 +75,6 @@ vim.api.nvim_set_keymap("n", "fe", "Telescope lsp_references", vim.api.nvim_set_keymap("n", "fd", "Telescope lsp_definitions", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", ",", "Telescope buffers", { noremap = true, silent = true }) --- rest -vim.api.nvim_set_keymap("n", "rr", "RestNvim", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "rp", "RestNvimPreview", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "rl", "RestNvimLast", { noremap = true, silent = true }) - -- aerial vim.api.nvim_set_keymap("n", "aa", "AerialToggle", { noremap = true, silent = true }) @@ -95,12 +90,6 @@ vim.api.nvim_set_keymap("n", "ss", "SessionSave", { noremap = t vim.api.nvim_set_keymap("n", "sr", "SessionRestore", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "sd", "SessionDelete", { noremap = true, silent = true }) --- cokeline -vim.keymap.set("n", "bb", function() - require('cokeline.mappings').pick("focus") -end, { desc = "Pick a buffer to focus" }) --- vim.keymap.set("n", "bd", "(cokeline-pick-close)", { silent = true }) - -- terminal vim.api.nvim_set_keymap("n", "tn", "ToggleTerm direction=horizontal size=15", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "tv", "ToggleTerm direction=vertical size=70", { noremap = true, silent = true }) diff --git a/lua/plugin-mappings.lua b/lua/plugin-mappings.lua index d7ed971..7b8e09a 100644 --- a/lua/plugin-mappings.lua +++ b/lua/plugin-mappings.lua @@ -66,8 +66,8 @@ vim.keymap.set('', 'T', function() hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 }) end, {remap=true}) --- Inc Rename -vim.keymap.set("n", "lr", ":IncRename ") +-- Lspsaga +vim.keymap.set("n", "lr", ":Lspsaga rename", { noremap = true, silent = true }) -- action-preview -- This is for code actions diff --git a/lua/plugins.lua b/lua/plugins.lua index d06567c..3ff6fe5 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,537 +1,509 @@ return { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - 'neovim/nvim-lspconfig', - { - "smjonas/inc-rename.nvim", - config = function() - require("inc_rename").setup() - end, - }, - 'lvimuser/lsp-inlayhints.nvim', - { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - config = function() - require("copilot").setup({ - panel = { - enabled = true, - auto_refresh = true, - }, - suggestion = { - enabled = true, - auto_trigger = true, - accept = false, -- disable built-in keymapping - }, - filetypes = { - markdown = true + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'neovim/nvim-lspconfig', + { + "smjonas/inc-rename.nvim", + config = function() + require("inc_rename").setup() + end, + }, + { + 'nvimdev/lspsaga.nvim', + config = function() + require('lspsaga').setup({}) + end, + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-tree/nvim-web-devicons' } - }) - end, - }, - 'hrsh7th/nvim-cmp', - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-nvim-lua', - 'hrsh7th/cmp-nvim-lsp-signature-help', - 'hrsh7th/cmp-vsnip', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-buffer', - 'hrsh7th/vim-vsnip', - { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = '' }, - section_separators = { left = '', right = '' }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = false, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = { 'mode' }, - lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { 'filename' }, - lualine_x = { 'encoding', 'fileformat', 'filetype', 'filename' }, - lualine_y = { 'progress' }, - lualine_z = { 'location' } - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {}, - lualine_x = { 'filename', 'location' }, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} - } - end - }, - 'nvim-tree/nvim-tree.lua', - 'nvim-tree/nvim-web-devicons', - 'navarasu/onedark.nvim', - { - 'smoka7/hop.nvim', - version = "*", - opts = {}, - }, - 'simrat39/rust-tools.nvim', - { - "ray-x/go.nvim", - dependencies = { -- optional packages - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter", }, - config = function() - require("go").setup() - end, - event = { "CmdlineEnter" }, - ft = { "go", 'gomod' }, - build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries - }, - { "ellisonleao/glow.nvim", config = function() require("glow").setup() end }, - { - "willothy/nvim-cokeline", - dependencies = { - "nvim-lua/plenary.nvim", -- Required for v0.4.0+ - "kyazdani42/nvim-web-devicons", -- If you want devicons - "stevearc/resession.nvim" -- Optional, for persistent history + 'lvimuser/lsp-inlayhints.nvim', + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + config = function() + require("copilot").setup({ + panel = { + enabled = true, + auto_refresh = true, + }, + suggestion = { + enabled = true, + auto_trigger = true, + accept = false, -- disable built-in keymapping + }, + filetypes = { + markdown = true + } + }) + end, }, - config = true - }, - { 'saadparwaiz1/cmp_luasnip' }, - ({ - "L3MON4D3/LuaSnip", - version = "v2.*", - run = "make install_jsregexp" - }), - { 'nvim-lua/plenary.nvim' }, - { 'ThePrimeagen/harpoon' }, - { - 'nvim-telescope/telescope.nvim', - config = function() - local tl = require('telescope') - tl.load_extension('aerial') - tl.setup { - pickers = { - find_files = { - theme = "dropdown", - hidden = true, - }, - } - } - end - }, - { - 'LukasPietzschmann/telescope-tabs', - requires = { 'nvim-telescope/telescope.nvim' }, - config = function() - require 'telescope-tabs'.setup { - -- Your custom config :^) - } - end - }, - { - "nvim-telescope/telescope-file-browser.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } - }, - { - "ThePrimeagen/refactoring.nvim", - requires = { - { "nvim-lua/plenary.nvim" }, - { "nvim-treesitter/nvim-treesitter" }, - }, - }, - { 'junegunn/fzf', run = ":call fzf#install()" }, - { 'junegunn/fzf.vim' }, - { - 'rmagatti/goto-preview', - config = function() - require('goto-preview').setup {} - end - }, - { - "NeogitOrg/neogit", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim", - "sindrets/diffview.nvim", - }, - config = true - }, - { 'mg979/vim-visual-multi' }, - { 'rhysd/git-messenger.vim' }, - { 'sindrets/diffview.nvim' }, - { - 'nvimdev/dashboard-nvim', - event = 'VimEnter', - config = function() - require('dashboard').setup { - -- config - } - end, - dependencies = { { 'nvim-tree/nvim-web-devicons' } } - }, - { - 'kevinhwang91/nvim-ufo', - dependencies = 'kevinhwang91/promise-async', - config = function() - require('ufo').setup({ - provider_selector = function(bufnr, filetype, buftype) - return { 'treesitter', 'indent' } + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-nvim-lua', + 'hrsh7th/cmp-nvim-lsp-signature-help', + 'hrsh7th/cmp-vsnip', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-buffer', + 'hrsh7th/vim-vsnip', + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = false, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype', 'filename' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {}, + lualine_x = { 'filename', 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + } end - }) - end - }, - { - 'stevearc/oil.nvim', - opts = {}, - -- Optional dependencies - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - 'stevearc/aerial.nvim', - opts = {}, - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons" }, - }, - { - "rest-nvim/rest.nvim", - dependencies = { { "nvim-lua/plenary.nvim" } }, - config = function() - require("rest-nvim").setup({ - -- Open request results in a horizontal split - result_split_horizontal = false, - -- Keep the http file buffer above|left when split horizontal|vertical - result_split_in_place = false, - -- Skip SSL verification, useful for unknown certificates - skip_ssl_verification = true, - -- Encode URL before making request - encode_url = true, - -- Highlight request on run - highlight = { - enabled = true, - timeout = 150, + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + } + }, + 'nvim-tree/nvim-web-devicons', + 'navarasu/onedark.nvim', + { + 'smoka7/hop.nvim', + version = "*", + opts = {}, + }, + { + "cbochs/grapple.nvim", + dependencies = { + { "nvim-tree/nvim-web-devicons", lazy = true } }, - result = { - -- toggle showing URL, HTTP info, headers at top the of result window - show_url = true, - -- show the generated curl command in case you want to launch - -- the same request via the terminal (can be verbose) - show_curl_command = false, - show_http_info = true, - show_headers = true, - -- executables or functions for formatting response body [optional] - -- set them to false if you want to disable them - formatters = { - json = "jq", - html = function(body) - return vim.fn.system({ "tidy", "-i", "-q", "-" }, body) + opts = { + scope = "git", -- also try out "git_branch" + }, + event = { "BufReadPost", "BufNewFile" }, + cmd = "Grapple", + keys = { + { "m", "Grapple toggle", desc = "Grapple toggle tag" }, + { "M", "Grapple toggle_tags", desc = "Grapple open tags window" }, + { "n", "Grapple cycle_tags next", desc = "Grapple cycle next tag" }, + { "N", "Grapple cycle_tags prev", desc = "Grapple cycle previous tag" }, + }, + }, + 'simrat39/rust-tools.nvim', + { + "ray-x/go.nvim", + dependencies = { -- optional packages + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("go").setup() + end, + event = { "CmdlineEnter" }, + ft = { "go", 'gomod' }, + build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries + }, + { "ellisonleao/glow.nvim", config = function() require("glow").setup() end }, + { 'saadparwaiz1/cmp_luasnip' }, + ({ + "L3MON4D3/LuaSnip", + version = "v2.*", + run = "make install_jsregexp" + }), + { 'nvim-lua/plenary.nvim' }, + { 'ThePrimeagen/harpoon' }, + { + 'nvim-telescope/telescope.nvim', + config = function() + local tl = require('telescope') + tl.load_extension('aerial') + tl.setup { + pickers = { + find_files = { + theme = "dropdown", + hidden = true, + }, + } + } + end + }, + { + 'LukasPietzschmann/telescope-tabs', + requires = { 'nvim-telescope/telescope.nvim' }, + config = function() + require 'telescope-tabs'.setup { + -- Your custom config :^) + } + end + }, + { + "nvim-telescope/telescope-file-browser.nvim", + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } + }, + { + "ThePrimeagen/refactoring.nvim", + requires = { + { "nvim-lua/plenary.nvim" }, + { "nvim-treesitter/nvim-treesitter" }, + }, + }, + { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "sindrets/diffview.nvim", + }, + config = true + }, + { 'mg979/vim-visual-multi' }, + { 'rhysd/git-messenger.vim' }, + { 'sindrets/diffview.nvim' }, + { + 'nvimdev/dashboard-nvim', + event = 'VimEnter', + config = function() + require('dashboard').setup { + -- config + } + end, + dependencies = { { 'nvim-tree/nvim-web-devicons' } } + }, + { + 'kevinhwang91/nvim-ufo', + dependencies = 'kevinhwang91/promise-async', + config = function() + require('ufo').setup({ + provider_selector = function(bufnr, filetype, buftype) + return { 'treesitter', 'indent' } + end + }) + end + }, + { + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + 'stevearc/aerial.nvim', + opts = {}, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons" + }, + }, + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + after = "nvim-treesitter", + requires = "nvim-treesitter/nvim-treesitter", + }, + { + "folke/noice.nvim", + event = "VeryLazy", + opts = { + -- add any options here + }, + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", plug + } + }, + { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } + }, + { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, + { + 'numToStr/Comment.nvim', + opts = { + -- add any options here + }, + lazy = false, + }, + 'jiangmiao/auto-pairs', + { 'luochen1990/rainbow' }, + { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + opts = {}, + config = function() + local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + } + + local hooks = require "ibl.hooks" + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + end) + + require("ibl").setup { indent = { highlight = highlight } } + end + }, + { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end + }, + 'nmac427/guess-indent.nvim', + { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } + }, + 'folke/neodev.nvim', + { 'vladdoster/remember.nvim', config = [[ require('remember') ]] }, + { + -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + -- See `:help gitsigns.txt` + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + vim.keymap.set('n', 'hp', require('gitsigns').preview_hunk, + { buffer = bufnr, desc = 'Preview git hunk' }) + + -- don't override the built-in and fugitive keymaps + local gs = package.loaded.gitsigns + vim.keymap.set({ 'n', 'v' }, ']c', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) + return '' + end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' }) + vim.keymap.set({ 'n', 'v' }, '[c', function() + if vim.wo.diff then + return '[c' + end + vim.schedule(function() + gs.prev_hunk() + end) + return '' + end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' }) + end, + }, + }, + { + "ahmedkhalf/project.nvim", + config = function() + require("project_nvim").setup { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } + end + }, + { + 'stevearc/conform.nvim', + opts = {}, + }, + { + 'rmagatti/auto-session', + config = function() + require("auto-session").setup { + log_level = "error", + auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" }, + } + end + }, + { + 'akinsho/toggleterm.nvim', + version = "*", + config = true + }, + { + "epwalsh/obsidian.nvim", + version = "*", + -- lazy = true, + -- ft = "markdown", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/Obsidian/notes/", + }, + }, + }, + }, + { + 'declancm/maximize.nvim', + config = function() require('maximize').setup() end + }, + { + -- https://github.com/aznhe21/actions-preview.nvim + "aznhe21/actions-preview.nvim", + config = function() + end, + }, + { + "chrishrb/gx.nvim", + keys = { { "gx", "Browse", mode = { "n", "x" } } }, + cmd = { "Browse" }, + init = function() + vim.g.netrw_nogx = 1 -- disable netrw gx + end, + dependencies = { "nvim-lua/plenary.nvim" }, + submodules = false, + config = function() + local platform = vim.loop.os_uname().sysname + local app = "" + if platform == "Darwin" then + app = "open" + elseif platform == "Linux" then + app = "xdg-open" end - }, - }, - -- Jump to request line on run - jump_to_request = false, - env_file = '.env', - custom_dynamic_variables = {}, - yank_dry_run = true, - }) - end - }, - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - }, - { - "nvim-treesitter/nvim-treesitter-textobjects", - after = "nvim-treesitter", - requires = "nvim-treesitter/nvim-treesitter", - }, - { - "folke/noice.nvim", - event = "VeryLazy", - opts = { - -- add any options here + require("gx").setup { + open_browser_app = app, + open_browser_args = { "--background" }, -- specify any arguments, such as --background for macOS' "open". + handlers = { + plugin = true, -- open plugin links in lua (e.g. packer, lazy, ..) + github = true, -- open github issues + brewfile = true, -- open Homebrew formulaes and casks + package_json = true, -- open dependencies from package.json + search = true, -- search the web/selection on the web if nothing else is found + }, + handler_options = { + search_engine = "duckduckgo", -- you can select between google, bing, duckduckgo, and ecosia + }, + } + end, }, - dependencies = { - "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", plug + { + 'chentoast/marks.nvim', + config = function() + require 'marks'.setup { + -- whether to map keybinds or not. default true + default_mappings = true, + -- which builtin marks to show. default {} + builtin_marks = { ".", "<", ">", "^" }, + -- whether movements cycle back to the beginning/end of buffer. default true + cyclic = true, + -- whether the shada file is updated after modifying uppercase marks. default false + force_write_shada = false, + -- how often (in ms) to redraw signs/recompute mark positions. + -- higher values will have better performance but may cause visual lag, + -- while lower values may cause performance penalties. default 150. + refresh_interval = 250, + -- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase + -- marks, and bookmarks. + -- can be either a table with all/none of the keys, or a single number, in which case + -- the priority applies to all marks. + -- default 10. + sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, + -- disables mark tracking for specific filetypes. default {} + excluded_filetypes = {}, + -- disables mark tracking for specific buftypes. default {} + excluded_buftypes = {}, + -- marks.nvim allows you to configure up to 10 bookmark groups, each with its own + -- sign/virttext. Bookmarks can be used to group together positions and quickly move + -- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and + -- default virt_text is "". + bookmark_0 = { + sign = "⚑", + virt_text = "hello world", + -- explicitly prompt for a virtual line annotation when setting a bookmark from this group. + -- defaults to false. + annotate = false, + }, + mappings = {} + } + end } - }, - { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - }, - { - "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, - }, - { - 'numToStr/Comment.nvim', - opts = { - -- add any options here - }, - lazy = false, - }, - 'jiangmiao/auto-pairs', - { 'luochen1990/rainbow' }, - { - "lukas-reineke/indent-blankline.nvim", - main = "ibl", - opts = {}, - config = function() - local highlight = { - "RainbowRed", - "RainbowYellow", - "RainbowBlue", - "RainbowOrange", - "RainbowGreen", - "RainbowViolet", - "RainbowCyan", - } - - local hooks = require "ibl.hooks" - -- create the highlight groups in the highlight setup hook, so they are reset - -- every time the colorscheme changes - hooks.register(hooks.type.HIGHLIGHT_SETUP, function() - vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) - vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) - vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) - vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) - vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) - vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) - vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) - end) - - require("ibl").setup { indent = { highlight = highlight } } - end - }, - { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - -- Configuration here, or leave empty to use defaults - }) - end - }, - -- 'tpope/vim-sleuth', - 'nmac427/guess-indent.nvim', - { - "SmiteshP/nvim-navic", - dependencies = { "neovim/nvim-lspconfig" }, - }, - { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - }, - 'folke/neodev.nvim', - { 'vladdoster/remember.nvim', config = [[ require('remember') ]] }, - { - -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - -- See `:help gitsigns.txt` - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - vim.keymap.set('n', 'hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' }) - - -- don't override the built-in and fugitive keymaps - local gs = package.loaded.gitsigns - vim.keymap.set({ 'n', 'v' }, ']c', function() - if vim.wo.diff then - return ']c' - end - vim.schedule(function() - gs.next_hunk() - end) - return '' - end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' }) - vim.keymap.set({ 'n', 'v' }, '[c', function() - if vim.wo.diff then - return '[c' - end - vim.schedule(function() - gs.prev_hunk() - end) - return '' - end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' }) - end, - }, - }, - { - "ahmedkhalf/project.nvim", - config = function() - require("project_nvim").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end - }, - { - 'stevearc/conform.nvim', - opts = {}, - }, - { - 'rmagatti/auto-session', - config = function() - require("auto-session").setup { - log_level = "error", - auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" }, - } - end - }, - { - 'akinsho/toggleterm.nvim', - version = "*", - config = true - }, - { - "epwalsh/obsidian.nvim", - version = "*", - -- lazy = true, - -- ft = "markdown", - dependencies = { - "nvim-lua/plenary.nvim", - }, - opts = { - workspaces = { - { - name = "personal", - path = "~/Obsidian/notes/", - }, - }, - }, - }, - { - 'declancm/maximize.nvim', - config = function() require('maximize').setup() end - }, - { - -- https://github.com/aznhe21/actions-preview.nvim - "aznhe21/actions-preview.nvim", - config = function() - end, - }, - { - "chrishrb/gx.nvim", - keys = { { "gx", "Browse", mode = { "n", "x" } } }, - cmd = { "Browse" }, - init = function() - vim.g.netrw_nogx = 1 -- disable netrw gx - end, - dependencies = { "nvim-lua/plenary.nvim" }, - submodules = false, - config = function() - local platform = vim.loop.os_uname().sysname - local app = "" - if platform == "Darwin" then - app = "open" - elseif platform == "Linux" then - app = "xdg-open" - end - require("gx").setup { - open_browser_app = app, - open_browser_args = { "--background" }, -- specify any arguments, such as --background for macOS' "open". - handlers = { - plugin = true, -- open plugin links in lua (e.g. packer, lazy, ..) - github = true, -- open github issues - brewfile = true, -- open Homebrew formulaes and casks - package_json = true, -- open dependencies from package.json - search = true, -- search the web/selection on the web if nothing else is found - }, - handler_options = { - search_engine = "duckduckgo", -- you can select between google, bing, duckduckgo, and ecosia - }, - } - end, - }, - { - 'chentoast/marks.nvim', - config = function() - require 'marks'.setup { - -- whether to map keybinds or not. default true - default_mappings = true, - -- which builtin marks to show. default {} - builtin_marks = { ".", "<", ">", "^" }, - -- whether movements cycle back to the beginning/end of buffer. default true - cyclic = true, - -- whether the shada file is updated after modifying uppercase marks. default false - force_write_shada = false, - -- how often (in ms) to redraw signs/recompute mark positions. - -- higher values will have better performance but may cause visual lag, - -- while lower values may cause performance penalties. default 150. - refresh_interval = 250, - -- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase - -- marks, and bookmarks. - -- can be either a table with all/none of the keys, or a single number, in which case - -- the priority applies to all marks. - -- default 10. - sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, - -- disables mark tracking for specific filetypes. default {} - excluded_filetypes = {}, - -- disables mark tracking for specific buftypes. default {} - excluded_buftypes = {}, - -- marks.nvim allows you to configure up to 10 bookmark groups, each with its own - -- sign/virttext. Bookmarks can be used to group together positions and quickly move - -- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and - -- default virt_text is "". - bookmark_0 = { - sign = "⚑", - virt_text = "hello world", - -- explicitly prompt for a virtual line annotation when setting a bookmark from this group. - -- defaults to false. - annotate = false, - }, - mappings = {} - } - end - } }