Compare commits

..

4 commits

Author SHA1 Message Date
09e897c956 Switch config to 5% 2024-11-04 19:35:59 +00:00
66d11771f2 Update media keys to go by 2% 2024-11-04 17:27:54 +00:00
56bf25c656 Nix flake update - 03/11/24 2024-11-03 10:13:08 +00:00
58b9a4d946 Install brickstore 2024-10-30 22:51:51 +00:00
7 changed files with 151 additions and 264 deletions

View file

@ -43,6 +43,7 @@ in {
alacritty alacritty
arandr arandr
autorandr autorandr
brickstore
csharp-ls csharp-ls
cups cups
curl curl
@ -105,6 +106,7 @@ in {
tldr tldr
unzip unzip
vim vim
vimPlugins.vim-plug
virtio-win virtio-win
vscode vscode
wget wget

View file

@ -45,8 +45,8 @@ exec --no-startup-id "sh /home/vylpes/.screenlayout/default.sh"
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
# Add "&& $refresh_i3status" if needed # Add "&& $refresh_i3status" if needed
set $refresh_i3status killall -SIGUSR1 polybar set $refresh_i3status killall -SIGUSR1 polybar
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% 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@ -10% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle 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 bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle

View file

@ -1,4 +1,4 @@
{ {
home.file."/home/vylpes/.config/nvim/init.lua".source = ./init.lua; home.file."/home/vylpes/.config/nvim/init.vim".source = ./init.vim;
home.file."/home/vylpes/.config/nvim/coc-settings.json".source = ./coc-settings.json; home.file."/home/vylpes/.config/nvim/coc-settings.json".source = ./coc-settings.json;
} }

View file

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

View file

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

View file

@ -1,13 +0,0 @@
# 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
```

View file

@ -23,11 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1729691686, "lastModified": 1730327045,
"narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", "narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", "rev": "080166c15633801df010977d9d7474b4a6c549d7",
"type": "github" "type": "github"
}, },
"original": { "original": {