From 0626b3148b6976d75fb1b20d86b5e0c385e19457 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 15 Aug 2023 13:44:53 -0700 Subject: [PATCH] update once more --- init.vim | 4 +- lua/plugins.lua | 263 +++++++++++++++++------------------ plugin-confs/copilot-cmp.lua | 8 ++ plugin-confs/copilot.lua | 39 +----- 4 files changed, 142 insertions(+), 172 deletions(-) create mode 100644 plugin-confs/copilot-cmp.lua diff --git a/init.vim b/init.vim index f0122ea..0db1d0c 100644 --- a/init.vim +++ b/init.vim @@ -17,7 +17,7 @@ source ~/.config/nvim/plugin-confs/bufferline.lua " source ~/.config/nvim/plugin-confs/dashboard-art.vim source ~/.config/nvim/plugin-confs/dashboard-nvim.lua source ~/.config/nvim/plugin-confs/gitsigns.lua -source ~/.config/nvim/plugin-confs/lspfuzzy.lua +" source ~/.config/nvim/plugin-confs/lspfuzzy.lua source ~/.config/nvim/plugin-confs/lualine.lua source ~/.config/nvim/plugin-confs/nvimtree.lua source ~/.config/nvim/plugin-confs/presence.lua @@ -26,7 +26,6 @@ source ~/.config/nvim/plugin-confs/whichkey.lua source ~/.config/nvim/plugin-confs/telescope.lua source ~/.config/nvim/plugin-confs/telescope-file-browser.lua -source ~/.config/nvim/plugin-confs/code_actions.lua source ~/.config/nvim/plugin-confs/goto-preview.lua source ~/.config/nvim/plugin-confs/lsp-kind.lua source ~/.config/nvim/plugin-confs/lspconfig.lua @@ -42,6 +41,7 @@ source ~/.config/nvim/plugin-confs/nvim-dap-bash.lua source ~/.config/nvim/plugin-confs/nvim-dap-ui.lua source ~/.config/nvim/plugin-confs/nvim-dap-virtual-text.lua " source ~/.config/nvim/plugin-confs/copilot.lua +source ~/.config/nvim/plugin-confs/copilot-cmp.lua " source ~/.config/nvim/plugin-confs/lsp-signature.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua diff --git a/lua/plugins.lua b/lua/plugins.lua index 2580eaf..f9de423 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -9,86 +9,146 @@ require('packer').startup(function(use) end } + -- TELESCOPE {{{ + + use { 'nvim-telescope/telescope.nvim' } + use { 'nvim-telescope/telescope-file-browser.nvim' } + use 'nvim-telescope/telescope-dap.nvim' + use { 'ghassan0/telescope-glyph.nvim' } use { - 'nvim-lualine/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true } + 'nvim-telescope/telescope-fzf-native.nvim', + run = + 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } + -- }}} + + -- LSP/DEV {{{ + use { "zbirenbaum/copilot.lua", event = "VimEnter", config = function() - vim.defer_fn(function() - require('copilot').setup({ - panel = { - enabled = false, - auto_refresh = false, - keymap = { - jump_prev = "[[", - jump_next = "]]", - accept = "", - refresh = "gr", - open = "" - }, - layout = { - position = "right", -- | top | left | right - ratio = 0.4 - } + require('copilot').setup({ + panel = { + enabled = false, + auto_refresh = false, + keymap = { + jump_prev = "[[", + jump_next = "]]", + accept = "", + refresh = "gr", + open = "" }, - suggestion = { - enabled = false, - auto_trigger = false, - debounce = 75, - keymap = { - accept = "", - -- accept = "", - next = "", - prev = "", - dismiss = "" - } - }, - -- filetypes = { - -- yaml = false, - -- markdown = false, - -- help = false, - -- gitcommit = false, - -- gitrebase = false, - -- hgcommit = false, - -- svn = false, - -- cvs = false, - -- ["."] = false, - -- }, - copilot_node_command = 'node', -- Node version must be < 18 - plugin_manager_path = vim.fn.stdpath("data") .. - "/site/pack/packer", - server_opts_overrides = { - trace = "verbose", - settings = { - advanced = { - listCount = 10, -- #completions for panel - inlineSuggestCount = 4 -- #completions for getCompletions - } + layout = { + position = "right", -- | top | left | right + ratio = 0.4 + } + }, + suggestion = { + enabled = false, + auto_trigger = false, + debounce = 75, + keymap = { + accept = "", + -- accept = "", + next = "", + prev = "", + dismiss = "" + } + }, + -- filetypes = { + -- yaml = false, + -- markdown = false, + -- help = false, + -- gitcommit = false, + -- gitrebase = false, + -- hgcommit = false, + -- svn = false, + -- cvs = false, + -- ["."] = false, + -- }, + copilot_node_command = 'node', -- Node version must be < 18 + plugin_manager_path = vim.fn.stdpath("data") .. + "/site/pack/packer", + server_opts_overrides = { + trace = "verbose", + settings = { + advanced = { + listCount = 10, -- #completions for panel + inlineSuggestCount = 4 -- #completions for getCompletions } } - }) - end, 100) - end - } - - use { - "zbirenbaum/copilot-cmp", - config = function() - require("copilot_cmp").setup({ - suggestion = { enabled = false }, - panel = { enabled = false } - -- method = "getCompletionsCycling", - -- formatters = { - -- insert_text = require("copilot_cmp.format").remove_existing - -- } + } }) end } + use { "zbirenbaum/copilot-cmp" } + use({ + "jackMort/ChatGPT.nvim", + commit = "24bcca7", + requires = { + "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim" + } + }) + use({ + "iamcco/markdown-preview.nvim", + run = function() vim.fn["mkdp#util#install"]() end + }) + + use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' } + use 'L3MON4D3/LuaSnip' + use { 'hrsh7th/nvim-cmp' } + use { 'hrsh7th/cmp-nvim-lsp' } + use { 'hrsh7th/cmp-nvim-lua' } + use { 'hrsh7th/cmp-nvim-lsp-signature-help' } + use { 'hrsh7th/cmp-path' } + use { 'hrsh7th/cmp-cmdline' } + use { 'hrsh7th/cmp-buffer' } + use 'saadparwaiz1/cmp_luasnip' + use { 'hrsh7th/cmp-nvim-lsp-document-symbol' } + use { 'neovim/nvim-lspconfig' } + use { 'onsails/lspkind-nvim' } + use { 'jose-elias-alvarez/null-ls.nvim' } + use 'folke/neodev.nvim' + use 'mfussenegger/nvim-dap' + use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } } + use { 'mfussenegger/nvim-dap-python' } + use { 'theHamsta/nvim-dap-virtual-text' } + + -- }}} + + -- UI {{{ + + use { + 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true } + } + use { + 'j-hui/fidget.nvim', + tag = 'legacy', + config = function() + require("fidget").setup { + -- options + } + end + } + use 'norcalli/nvim-colorizer.lua' + use { 'akinsho/nvim-bufferline.lua' } + use { 'andweeb/presence.nvim' } + use { 'folke/which-key.nvim' } + use { 'glepnir/dashboard-nvim' } + use { 'kyazdani42/nvim-tree.lua' } + use 'kyazdani42/nvim-web-devicons' + use { 'lewis6991/gitsigns.nvim' } + use { 'stevearc/dressing.nvim' } + + -- }}} + + -- EXTRAS {{{ + use { "nvim-neorg/neorg", -- tag = "*", @@ -107,81 +167,18 @@ require('packer').startup(function(use) } end } - - use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end } - use 'junegunn/fzf.vim' - use 'norcalli/nvim-colorizer.lua' use 'jiangmiao/auto-pairs' use 'pechorin/any-jump.vim' use 'tpope/vim-commentary' use 'tpope/vim-surround' use 'voldikss/vim-floaterm' use 'wakatime/vim-wakatime' + use 'rmagatti/goto-preview' - use { 'akinsho/nvim-bufferline.lua' } - use { 'andweeb/presence.nvim' } - use { 'folke/which-key.nvim' } - use { 'glepnir/dashboard-nvim' } - use { 'kyazdani42/nvim-tree.lua' } - use 'kyazdani42/nvim-web-devicons' - use { 'lewis6991/gitsigns.nvim' } - use { 'nvim-telescope/telescope.nvim' } - use { 'nvim-telescope/telescope-file-browser.nvim' } - use 'nvim-telescope/telescope-dap.nvim' - use { 'ghassan0/telescope-glyph.nvim' } - use { - 'nvim-telescope/telescope-fzf-native.nvim', - run = - 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' - } + -- }}} - use { 'ojroques/nvim-lspfuzzy' } + -- COLORSCHEMES {{{ - use 'L3MON4D3/LuaSnip' - -- use 'amrbashir/nvim-docs-view' - use { 'hrsh7th/nvim-cmp' } - use { 'hrsh7th/cmp-nvim-lsp' } - use { 'hrsh7th/cmp-nvim-lua' } - use { 'hrsh7th/cmp-nvim-lsp-signature-help' } - use { 'hrsh7th/cmp-path' } - use { 'hrsh7th/cmp-cmdline' } - use { 'hrsh7th/cmp-buffer' } - use { 'hrsh7th/cmp-nvim-lsp-document-symbol' } - use { - 'j-hui/fidget.nvim', - tag = 'legacy', - config = function() - require("fidget").setup { - -- options - } - end - } - use { 'jose-elias-alvarez/null-ls.nvim' } - use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' } - use { 'neovim/nvim-lspconfig' } - use { 'onsails/lspkind-nvim' } - -- use 'ray-x/lsp_signature.nvim' - use { 'rmagatti/goto-preview' } - use 'saadparwaiz1/cmp_luasnip' - use({ - "jackMort/ChatGPT.nvim", - commit = "24bcca7", - requires = { - "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim" - } - }) - - use({ - "iamcco/markdown-preview.nvim", - run = function() vim.fn["mkdp#util#install"]() end - }) - - use 'folke/neodev.nvim' - use 'mfussenegger/nvim-dap' - use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } } - use 'mfussenegger/nvim-dap-python' - use 'theHamsta/nvim-dap-virtual-text' use { 'Mofiqul/dracula.nvim' } use({ 'NTBBloodbath/doom-one.nvim', @@ -227,4 +224,6 @@ require('packer').startup(function(use) use { 'projekt0n/github-nvim-theme' } use { "catppuccin/nvim", as = "catppuccin" } + + -- }}} end) diff --git a/plugin-confs/copilot-cmp.lua b/plugin-confs/copilot-cmp.lua new file mode 100644 index 0000000..71883db --- /dev/null +++ b/plugin-confs/copilot-cmp.lua @@ -0,0 +1,8 @@ +require("copilot_cmp").setup({ + suggestion = { enabled = false }, + panel = { enabled = false } + -- method = "getCompletionsCycling", + -- formatters = { + -- insert_text = require("copilot_cmp.format").remove_existing + -- } +}) diff --git a/plugin-confs/copilot.lua b/plugin-confs/copilot.lua index 39b057a..8b13789 100644 --- a/plugin-confs/copilot.lua +++ b/plugin-confs/copilot.lua @@ -1,38 +1 @@ -require('copilot').setup({ - panel = { - enabled = true, - auto_refresh = false, - keymap = { - jump_prev = "[[", - jump_next = "]]", - accept = "", - refresh = "gr", - open = "" - }, - }, - suggestion = { - enabled = true, - auto_trigger = false, - debounce = 75, - keymap = { - accept = "", - next = "", - prev = "", - dismiss = "", - }, - }, - filetypes = { - yaml = false, - markdown = false, - help = false, - gitcommit = false, - gitrebase = false, - hgcommit = false, - svn = false, - cvs = false, - ["."] = false, - }, - copilot_node_command = 'node', -- Node version must be < 18 - plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer", - server_opts_overrides = {}, -}) +