Compare commits

..

5 commits

Author SHA1 Message Date
da5cdc5220 Termgui colours 2024-10-30 12:19:56 +00:00
bb44f0de33 Remove return 2024-10-30 12:18:43 +00:00
50541208e6 Move copilot chat 2024-10-30 12:17:54 +00:00
9f8fce9599 Remove plugins.lua 2024-10-30 12:16:49 +00:00
026f2be379 Bootstrap packer 2024-10-30 12:16:21 +00:00
3 changed files with 65 additions and 53 deletions

View file

@ -1,5 +1,4 @@
{
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,5 +1,3 @@
lua require("plugins")
-- Leader key
vim.g.mapleader = " "
@ -52,31 +50,6 @@ 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")
@ -205,3 +178,68 @@ 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

@ -1,25 +0,0 @@
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)