Compare commits
20 commits
main
...
feature/8-
Author | SHA1 | Date | |
---|---|---|---|
da5cdc5220 | |||
bb44f0de33 | |||
50541208e6 | |||
9f8fce9599 | |||
026f2be379 | |||
baf6c92c30 | |||
3560e68e50 | |||
1af3d8796d | |||
62ec1ab944 | |||
6b8ee07795 | |||
bc8b0d5adc | |||
89c34c7689 | |||
f4149d4d2f | |||
c6669af194 | |||
33b86325aa | |||
49f378d5a3 | |||
34444445da | |||
e74756e61f | |||
8dea1aee0f | |||
9847dc9fab |
11 changed files with 274 additions and 192 deletions
|
@ -37,23 +37,17 @@ in {
|
|||
file = {
|
||||
"/home/${username}/.scripts/audio/get-sink-name.sh".source = ./home/scripts/audio/get-sink-name.sh;
|
||||
"/home/${username}/.cache/scripts/get-sink-name.txt".source = ./home/cache/audio/get-sink-name.txt;
|
||||
"/home/${username}/.cache/scripts/power.sh".source = ./home/scripts/system/power.sh;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
alacritty
|
||||
arandr
|
||||
asunder
|
||||
audacity
|
||||
autorandr
|
||||
brickstore
|
||||
brightnessctl
|
||||
csharp-ls
|
||||
cups
|
||||
curl
|
||||
dbeaver-bin
|
||||
discord
|
||||
distrobox
|
||||
dolphin-emu
|
||||
dotnet-sdk_8
|
||||
dotnetPackages.Nuget
|
||||
|
@ -78,7 +72,6 @@ in {
|
|||
i3lock-fancy
|
||||
keepassxc
|
||||
keepmenu
|
||||
lame
|
||||
lightdm
|
||||
lua
|
||||
meslo-lgs-nf
|
||||
|
@ -86,7 +79,6 @@ in {
|
|||
neovim
|
||||
networkmanager
|
||||
nextcloud-client
|
||||
nfs-utils
|
||||
nitrogen
|
||||
nodejs
|
||||
nodePackages.npm
|
||||
|
@ -113,7 +105,6 @@ in {
|
|||
tldr
|
||||
unzip
|
||||
vim
|
||||
vimPlugins.vim-plug
|
||||
virtio-win
|
||||
vscode
|
||||
wget
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
option=$(printf "sleep\nlogout\nshutdown\nrestart" | rofi -dmenu -theme Arc-Dark -font 'hack 18')
|
||||
|
||||
if [ "$option" = "sleep" ];
|
||||
then
|
||||
i3lock-fancy -g -t "System Locked" -f Hack-Regular
|
||||
systemctl suspend
|
||||
elif [ "$option" = "logout" ];
|
||||
then
|
||||
i3-msg exit
|
||||
elif [ "$option" = "shutdown" ];
|
||||
then
|
||||
poweroff
|
||||
elif [ "$option" = "restart" ];
|
||||
then
|
||||
reboot
|
||||
fi
|
|
@ -45,8 +45,8 @@ exec --no-startup-id "sh /home/vylpes/.screenlayout/default.sh"
|
|||
# Use pactl to adjust volume in PulseAudio.
|
||||
# Add "&& $refresh_i3status" if needed
|
||||
set $refresh_i3status killall -SIGUSR1 polybar
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
|
||||
|
@ -56,10 +56,6 @@ bindsym XF86AudioPause exec playerctl play-pause
|
|||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Use brightnessctl to adjust brightness
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set 10%+
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
|
@ -194,7 +190,7 @@ bindsym $mod+Mod1+r reload
|
|||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "bash /home/vylpes/.cache/scripts/power.sh"
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
|
@ -223,9 +219,6 @@ mode "resize" {
|
|||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Windows to force floating
|
||||
for_window [class="Plexamp"] floating enable
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
home.file."/home/vylpes/.config/nvim/init.vim".source = ./init.vim;
|
||||
home.file."/home/vylpes/.config/nvim/init.lua".source = ./init.lua;
|
||||
home.file."/home/vylpes/.config/nvim/coc-settings.json".source = ./coc-settings.json;
|
||||
}
|
||||
|
|
245
config/packages/neovim/init.lua
Normal file
245
config/packages/neovim/init.lua
Normal file
|
@ -0,0 +1,245 @@
|
|||
-- Leader key
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Disable Copilot by default
|
||||
vim.g.copilot_enabled = false
|
||||
|
||||
-- Basic settings
|
||||
vim.opt.compatible = false
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.mouse = "v"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
|
||||
-- Tab and indentation settings
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.autoindent = true
|
||||
|
||||
-- Line numbering
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Command-line completion mode
|
||||
vim.opt.wildmode = { "longest", "list" }
|
||||
|
||||
-- Column marker at 80 characters
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
-- Enable filetype plugins and indentation
|
||||
vim.cmd("filetype plugin indent on")
|
||||
|
||||
-- Enable syntax highlighting
|
||||
vim.cmd("syntax on")
|
||||
|
||||
-- Enable mouse support
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
-- Use system clipboard
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Enable cursorline
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Optimize for fast terminal
|
||||
vim.opt.ttyfast = true
|
||||
|
||||
-- Do not add a newline at the end of the file
|
||||
vim.opt.fixeol = false
|
||||
|
||||
-- Enable syntax highlighting
|
||||
vim.cmd("syntax enable")
|
||||
|
||||
-- Set colorscheme to dracula
|
||||
vim.cmd("colorscheme dracula")
|
||||
|
||||
-- Open new vertical splits to the right
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- Open new horizontal splits below
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Insert mode mappings
|
||||
vim.api.nvim_set_keymap('i', '<A-j>', '<Esc>:m .+1<CR>==gi', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('i', '<A-k>', '<Esc>:m .-2<CR>==gi', { noremap = true, silent = true })
|
||||
|
||||
-- Visual mode mappings
|
||||
vim.api.nvim_set_keymap('v', '<A-j>', ":m '>+1<CR>gv=gv", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<A-k>', ":m '<-2<CR>gv=gv", { noremap = true, silent = true })
|
||||
|
||||
-- Normal mode mappings for window movement
|
||||
vim.api.nvim_set_keymap('n', '<A-h>', '<C-W>H', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-j>', '<C-W>J', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-k>', '<C-W>K', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-l>', '<C-W>L', { noremap = true, silent = true })
|
||||
|
||||
-- Normal mode mappings for window navigation
|
||||
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', { noremap = true, silent = true })
|
||||
|
||||
-- Normal mode mapping for opening file in vertical split
|
||||
vim.api.nvim_set_keymap('n', 'gf', ':vert winc f<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Insert mode mappings for CoC (Conquer of Completion)
|
||||
vim.api.nvim_set_keymap('i', '<CR>', [[coc#pum#visible() ? coc#_select_confirm() : "\<C-g>u\<CR>"]], { noremap = true, silent = true, expr = true })
|
||||
vim.api.nvim_set_keymap('i', '<Tab>', [[coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"]], { noremap = true, silent = true, expr = true })
|
||||
vim.api.nvim_set_keymap('i', '<S-Tab>', [[coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"]], { noremap = true, silent = true, expr = true })
|
||||
|
||||
-- Normal mode mappings for NERDTree
|
||||
vim.api.nvim_set_keymap('n', '<leader>n', ':NERDTreeFocus<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-n>', ':NERDTree<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-t>', ':NERDTreeToggle<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-f>', ':NERDTreeFind<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Normal mode mapping for opening file explorer
|
||||
vim.api.nvim_set_keymap('n', '<leader>ee', ':Ex<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Harpoon mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>ha', '<cmd>lua require("harpoon.mark").add_file()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>hh', '<cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>1', '<cmd>lua require("harpoon.ui").nav_file(1)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>2', '<cmd>lua require("harpoon.ui").nav_file(2)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>3', '<cmd>lua require("harpoon.ui").nav_file(3)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>4', '<cmd>lua require("harpoon.ui").nav_file(4)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-[>', '<cmd>lua require("harpoon.ui").nav_prev()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-]>', '<cmd>lua require("harpoon.ui").nav_next()<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- FZF mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>ff', ':FZF<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Miscellaneous mappings
|
||||
vim.api.nvim_set_keymap('n', 'mm', ':nohl<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', 'ml', ':%s/\\r//g<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Yarn mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>yb', ':!yarn build<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>yi', ':!yarn install<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ys', ':!yarn start<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>yt', ':!yarn test<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Dotnet mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>dr', ':!dotnet run<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Prettier mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>p', '<Plug>(prettier-format)', { noremap = true, silent = true })
|
||||
|
||||
-- Copilot Chat mappings
|
||||
vim.api.nvim_set_keymap('n', '<C-p>', ':CopilotChatToggle<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ps', ':CopilotChatStop<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>pr', ':CopilotChatReset<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pe', ':CopilotChatExplain<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pr', ':CopilotChatReview<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pf', ':CopilotChatFix<CR>', { noremap = true, silent = true })
|
||||
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 })
|
||||
|
||||
-- Harpoon mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>ha', '<cmd>lua require("harpoon.mark").add_file()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>hh', '<cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>1', '<cmd>lua require("harpoon.ui").nav_file(1)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>2', '<cmd>lua require("harpoon.ui").nav_file(2)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>3', '<cmd>lua require("harpoon.ui").nav_file(3)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>4', '<cmd>lua require("harpoon.ui").nav_file(4)<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-[>', '<cmd>lua require("harpoon.ui").nav_prev()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<A-]>', '<cmd>lua require("harpoon.ui").nav_next()<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- FZF mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>ff', ':FZF<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Miscellaneous mappings
|
||||
vim.api.nvim_set_keymap('n', 'mm', ':nohl<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', 'ml', ':%s/\\r//g<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Yarn mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>yb', ':!yarn build<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>yi', ':!yarn install<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ys', ':!yarn start<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>yt', ':!yarn test<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Dotnet mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>dr', ':!dotnet run<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Prettier mapping
|
||||
vim.api.nvim_set_keymap('n', '<leader>p', '<Plug>(prettier-format)', { noremap = true, silent = true })
|
||||
|
||||
-- Copilot mappings
|
||||
vim.api.nvim_set_keymap('n', '<C-p>', ':CopilotChatToggle<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ps', ':CopilotChatStop<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>pr', ':CopilotChatReset<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pe', ':CopilotChatExplain<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pr', ':CopilotChatReview<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>pf', ':CopilotChatFix<CR>', { noremap = true, silent = true })
|
||||
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
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
let mapleader = " "
|
||||
let g:copilot_enabled = v:false
|
||||
|
||||
set nocompatible
|
||||
set showmatch
|
||||
set ignorecase
|
||||
set mouse=v
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set autoindent
|
||||
set number
|
||||
set relativenumber
|
||||
set wildmode=longest,list
|
||||
set cc=80
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
set mouse=a
|
||||
set clipboard=unnamedplus
|
||||
filetype plugin on
|
||||
set cursorline
|
||||
set ttyfast
|
||||
set nofixeol
|
||||
|
||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin("~/.vim/plugged")
|
||||
Plug 'dracula/vim'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
" Plug 'SirVer/ultisnips'
|
||||
Plug 'honza/vim-snippets'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'preservim/nerdcommenter'
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'ThePrimeagen/harpoon'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'jose-elias-alvarez/null-ls.nvim'
|
||||
Plug 'MunifTanjim/prettier.nvim'
|
||||
Plug 'github/copilot.vim'
|
||||
Plug 'CopilotC-Nvim/CopilotChat.nvim', { 'branch': 'canary' }
|
||||
call plug#end()
|
||||
|
||||
lua << EOF
|
||||
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',
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
endif
|
||||
syntax enable
|
||||
colorscheme dracula
|
||||
|
||||
set splitright
|
||||
set splitbelow
|
||||
|
||||
inoremap <A-j> <Esc>:m .+1<CR>==gi
|
||||
inoremap <A-k> <Esc>:m .-2<CR>==gi
|
||||
vnoremap <A-j> :m '>+1<CR>gv=gv
|
||||
vnoremap <A-k> :m '<-2<CR>gv=gv
|
||||
|
||||
nnoremap <A-h> <C-W>H
|
||||
nnoremap <A-j> <C-W>J
|
||||
nnoremap <A-k> <C-W>K
|
||||
nnoremap <A-l> <C-W>L
|
||||
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
||||
|
||||
nnoremap gf :vert winc f<cr>
|
||||
|
||||
inoremap <silent><expr> <cr> coc#pum#visible() ? coc#_select_confirm() : "\<C-g>u\<CR>"
|
||||
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
nnoremap <C-n> :NERDTree<CR>
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <C-f> :NERDTreeFind<CR>
|
||||
nnoremap <leader>ee :Ex<CR>
|
||||
|
||||
nnoremap <leader>ha <cmd>lua require("harpoon.mark").add_file()<CR>
|
||||
nnoremap <leader>hh <cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>
|
||||
nnoremap <leader>1 <cmd>lua require("harpoon.ui").nav_file(1)<CR>
|
||||
nnoremap <leader>2 <cmd>lua require("harpoon.ui").nav_file(2)<CR>
|
||||
nnoremap <leader>3 <cmd>lua require("harpoon.ui").nav_file(3)<CR>
|
||||
nnoremap <leader>4 <cmd>lua require("harpoon.ui").nav_file(4)<CR>
|
||||
nnoremap <A-[> <cmd>lua require("harpoon.ui").nav_prev()<CR>
|
||||
nnoremap <A-]> <cmd>lua require("harpoon.ui").nav_next()<CR>
|
||||
|
||||
nnoremap <leader>ff :FZF<CR>
|
||||
|
||||
nnoremap mm :nohl<CR>
|
||||
nnoremap ml :%s/\r//g<CR>
|
||||
|
||||
nnoremap <leader>yb :!yarn build<CR>
|
||||
nnoremap <leader>yi :!yarn install<CR>
|
||||
nnoremap <leader>ys :!yarn start<CR>
|
||||
nnoremap <leader>yt :!yarn test<CR>
|
||||
|
||||
nnoremap <leader>dr :!dotnet run<CR>
|
||||
|
||||
nnoremap <leader>p <Plug>(prettier-format)<CR>
|
||||
|
||||
nnoremap <C-p> :CopilotChatToggle<CR>
|
||||
nnoremap <leader>ps :CopilotChatStop<CR>
|
||||
nnoremap <leader>pr :CopilotChatReset<CR>
|
||||
vnoremap <leader>pe :CopilotChatExplain<CR>
|
||||
vnoremap <leader>pr :CopilotChatReview<CR>
|
||||
vnoremap <leader>pf :CopilotChatFix<CR>
|
||||
vnoremap <leader>po :CopilotChatOptimize<CR>
|
||||
vnoremap <leader>pd :CopilotChatDocs<CR>
|
||||
vnoremap <leader>pt :CopilotChatTests<CR>
|
13
docs/Neovim.md
Normal file
13
docs/Neovim.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Neovim
|
||||
|
||||
Neovim is mostly configured in the flake, we just need to install packer
|
||||
separately, although this is only required to do once.
|
||||
|
||||
## Installation
|
||||
|
||||
Run the following command in the terminal
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
```
|
|
@ -23,11 +23,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734017764,
|
||||
"narHash": "sha256-msOfmyJSjAHgIygI/JD0Ae3JsDv4rT54Nlfr5t6MQMQ=",
|
||||
"lastModified": 1729691686,
|
||||
"narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "64e9404f308e0f0a0d8cdd7c358f74e34802494b",
|
||||
"rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -115,7 +115,6 @@
|
|||
gco = "git checkout";
|
||||
|
||||
s = "swallow";
|
||||
nrb = "sudo nixos-rebuild switch --flake /home/vylpes/flake#\${HOST}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e157d325-4082-493a-8014-42c040feb213";
|
||||
{ device = "/dev/disk/by-uuid/3c957d4e-06fc-40bc-b5b9-2583d0f7ee94";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3673-F8D0";
|
||||
{ device = "/dev/disk/by-uuid/2D69-3A13";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/44178d5c-cecb-47d8-8375-9775a8e32e53"; }
|
||||
[ { device = "/dev/disk/by-uuid/3de826ff-b7e3-44bc-97d2-4bd2248f9555"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
@ -14,17 +14,19 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d1af6f1f-dc2d-4e09-9f1e-06bf052ede22";
|
||||
{ device = "/dev/disk/by-uuid/d3ac6957-c669-410a-836c-dbe67e684b55";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3470-FE54";
|
||||
{ device = "/dev/disk/by-uuid/877D-2522";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/552e97ec-9516-4c0e-bab8-411a7bbdbb69"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
Loading…
Reference in a new issue