diff --git a/config/packages/neovim/default.nix b/config/packages/neovim/default.nix index dc0b484..4eb8d90 100644 --- a/config/packages/neovim/default.nix +++ b/config/packages/neovim/default.nix @@ -1,4 +1,5 @@ { home.file."/home/vylpes/.config/nvim/init.lua".source = ./init.lua; home.file."/home/vylpes/.config/nvim/coc-settings.json".source = ./coc-settings.json; + home.file."/home/vylpes/.config/nvim/lua/plugins.lua".source = ./lua/plugins.lua; } diff --git a/config/packages/neovim/init.lua b/config/packages/neovim/init.lua index 0ca4f94..06cbfd7 100644 --- a/config/packages/neovim/init.lua +++ b/config/packages/neovim/init.lua @@ -1,3 +1,5 @@ +lua require("plugins") + -- Leader key vim.g.mapleader = " " @@ -50,32 +52,6 @@ vim.opt.ttyfast = true -- Do not add a newline at the end of the file vim.opt.fixeol = false -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - - -- Plugins - use 'dracula/vim' - use 'ryanoasis/vim-devicons' - -- use 'SirVer/ultisnips' - use 'honza/vim-snippets' - use 'scrooloose/nerdtree' - use 'preservim/nerdcommenter' - use 'mhinz/vim-startify' - use {'neoclide/coc.nvim', branch = 'release'} - use 'nvim-lua/plenary.nvim' - use 'ThePrimeagen/harpoon' - use {'junegunn/fzf', run = function() vim.fn['fzf#install']() end} - use 'junegunn/fzf.vim' - use 'neovim/nvim-lspconfig' - use 'jose-elias-alvarez/null-ls.nvim' - use 'MunifTanjim/prettier.nvim' - use 'github/copilot.vim' - use {'CopilotC-Nvim/CopilotChat.nvim', branch = 'canary'} -end) - -- Copilot Chat local prompts = require('CopilotChat.prompts') local select = require('CopilotChat.select') diff --git a/config/packages/neovim/lua/plugins.lua b/config/packages/neovim/lua/plugins.lua new file mode 100644 index 0000000..6660012 --- /dev/null +++ b/config/packages/neovim/lua/plugins.lua @@ -0,0 +1,25 @@ +vim.cmd [[packadd packer.nvim]] + +return require('packer').startup(function(use) + -- Packer can manage itself + use 'wbthomason/packer.nvim' + + -- Plugins + use 'dracula/vim' + use 'ryanoasis/vim-devicons' + -- use 'SirVer/ultisnips' + use 'honza/vim-snippets' + use 'scrooloose/nerdtree' + use 'preservim/nerdcommenter' + use 'mhinz/vim-startify' + use {'neoclide/coc.nvim', branch = 'release'} + use 'nvim-lua/plenary.nvim' + use 'ThePrimeagen/harpoon' + use {'junegunn/fzf', run = function() vim.fn['fzf#install']() end} + use 'junegunn/fzf.vim' + use 'neovim/nvim-lspconfig' + use 'jose-elias-alvarez/null-ls.nvim' + use 'MunifTanjim/prettier.nvim' + use 'github/copilot.vim' + use {'CopilotC-Nvim/CopilotChat.nvim', branch = 'canary'} +end)