Compare commits

..

No commits in common. "da5cdc5220107de11bf68cd838446830a6f90afb" and "baf6c92c30560162ebe0ac82c24c9d66c07498fe" have entirely different histories.

3 changed files with 53 additions and 65 deletions

View file

@ -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;
}

View file

@ -1,3 +1,5 @@
lua require("plugins")
-- Leader key
vim.g.mapleader = " "
@ -50,6 +52,31 @@ vim.opt.ttyfast = true
-- Do not add a newline at the end of the file
vim.opt.fixeol = false
-- Copilot Chat
local prompts = require('CopilotChat.prompts')
local select = require('CopilotChat.select')
require("CopilotChat").setup {
debug = false,
question_header = '## User ',
answer_header = '## Copilot ',
error_header = '## Error ',
separator = '---',
selection = function(source)
return select.visual(source) or select.line(source)
end,
window = {
layout = 'float',
},
}
if vim.fn.has("termguicolors") == 1 then
vim.opt.termguicolors = true
end
-- Enable syntax highlighting
vim.cmd("syntax enable")
@ -178,68 +205,3 @@ vim.api.nvim_set_keymap('v', '<leader>pf', ':CopilotChatFix<CR>', { noremap = tr
vim.api.nvim_set_keymap('v', '<leader>po', ':CopilotChatOptimize<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<leader>pd', ':CopilotChatDocs<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<leader>pt', ':CopilotChatTests<CR>', { noremap = true, silent = true })
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
vim.cmd [[packadd packer.nvim]]
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')
require("CopilotChat").setup {
debug = false,
question_header = '## User ',
answer_header = '## Copilot ',
error_header = '## Error ',
separator = '---',
selection = function(source)
return select.visual(source) or select.line(source)
end,
window = {
layout = 'float',
},
}
if vim.fn.has("termguicolors") == 1 then
vim.opt.termguicolors = true
end

View file

@ -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)