1
0

feat: Initial commit

This commit is contained in:
2024-07-29 20:11:11 +02:00
commit 028893231b
18 changed files with 5999 additions and 0 deletions

82
.bashrc Normal file
View File

@@ -0,0 +1,82 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
roundseconds () {
echo m=$1";h=0.5;scale=4;t=1000;if(m<0) h=-0.5;a=m*t+h;scale=3;a/t;" | bc
}
# Function to get the start time in nanoseconds
bash_getstarttime () {
date +%s.%N > "/dev/shm/${USER}.bashtime.${1}"
}
bash_getstoptime () {
local endtime=$(date +%s.%N)
local starttime=$(cat /dev/shm/${USER}.bashtime.${1})
local duration=$(roundseconds $(echo $(eval echo "$endtime - $starttime") | bc))
# Only return time if duration is greater than 0.2 seconds
if (( $(echo "$duration > 0.2" | bc -l) )); then
echo "took ${duration}s"
else
echo ""
fi
}
parse_git_branch() {
git branch 2>/dev/null | grep '^*' | colrm 1 2
}
# Initialize the root PID and start time
ROOTPID=$BASHPID
bash_getstarttime $ROOTPID
# Set PS0 to record the start time
PS0='$(bash_getstarttime $ROOTPID)'
prompt_command() {
local exec_time=$(bash_getstoptime $ROOTPID)
if [[ -n "$exec_time" ]]; then
PS1='\[\033[36m\]'"$exec_time"'\n'
else
PS1=''
fi
PS1+='\[\e[1;32m\]\u\[\e[0m\]@\[\e[1;94m\]\h \[\e[1;95m\]\w\[\e[1;33m\]$([[ $(parse_git_branch) ]] && echo " [$(parse_git_branch)]")\[\e[0m\]'
#h that's what I was tYu Add virtual environment if exists
if [[ -n "$VIRTUAL_ENV" ]]; then
PS1+="\[\e[1;35m\]($(basename $VIRTUAL_ENV)) \[\e[0m\]"
fi
# Root indicator
if [[ $EUID -eq 0 ]]; then
PS1+="\[\e[1;31m\]# \[\e[0m\]"
else
PS1+="\[\e[0;0m\]\$ \[\e[0m\]"
fi
}
PROMPT_COMMAND=prompt_command
# PS1='\[\033[32m\]\u\[\033[0m\]@\[\033[94m\]\h \[\033[95m\033[3m\]\W\[\033[0m\]$ '
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
alias ..='cd ..'
alias cls='clear'
alias explorer='nautilus'
alias vencord='sh -c "$(curl -sS https://raw.githubusercontent.com/Vendicated/VencordInstaller/main/install.sh)"'
alias apps='cd ~/.local/share/applications/'
alias tasklist='ps -aux'
alias louis='ssh anton@192.168.178.48'
alias la='ls -a --color=auto'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
# WG
alias wgon='wg-quick up ~/Downloads/wg0.conf'
alias wgoff='wg-quick down ~/Downloads/wg0.conf'

223
.config/i3/config Normal file
View File

@@ -0,0 +1,223 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
# set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
# set $up l
# set $down k
# set $left j
# set $right semicolon
# Use winkey
set $mod Mod4
# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec kitty
# start an app
bindsym $mod+n exec kitty -- ldesk && exit
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindsym $mod+d exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#Screenshot
bindsym Print exec flameshot gui
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c 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 "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" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.config/i3/config (or $XDG_CONFIG_HOME/i3/config if set) or
# ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard

View File

@@ -0,0 +1,47 @@
background #222222
foreground #f7f1ff
cursor #f7f1ff
cursor_text_color #000000
selection_foreground #363537
selection_background #f7f1ff
# dull black
color0 #363537
# light black
color8 #69676c
# dull red
color1 #fc618d
# light red
color9 #fc618d
# dull green
color2 #7bd88f
# light green
color10 #7bd88f
# yellow
color3 #fce566
# light yellow
color11 #fce566
# blue
color4 #fd9353
# light blue
color12 #fd9353
# magenta
color5 #948ae3
# light magenta
color13 #948ae3
# cyan
color6 #5ad4e6
# light cyan
color14 #5ad4e6
# dull white
color7 #f7f1ff
# bright white
color15 #f7f1ff

2535
.config/kitty/kitty.conf Normal file

File diff suppressed because it is too large Load Diff

2529
.config/kitty/kitty.conf.bak Normal file

File diff suppressed because it is too large Load Diff

34
.config/nvim/init.lua Normal file
View File

@@ -0,0 +1,34 @@
-- Lazy bootstrap
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
{ '\nPress any key to exit...' },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require('BluePlum.set')
require('BluePlum.keymap')
-- Lualine filename
local function hello()
return [[hello world]]
end
require('lazy').setup({
-- Plugins
spec = {
{ import = 'plugins' },
},
checker = { enabled = true },
})
require('lsp')

View File

@@ -0,0 +1,29 @@
{
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"formatter.nvim": { "branch": "fix-305-index-out-of-bounds", "commit": "a8a8b196c9ca37afa53f7ee30a98a343bbbca325" },
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" },
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"markview.nvim": { "branch": "main", "commit": "8537f7f03e4683b9ef98202e7a0286373a5b7135" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ba9c2f0b93deb48d0a99ae0e8d8dd36f7cc286d6" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" },
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "fdc44768a09a65140aa00c92872a5381ad486485" },
"nvim-treesitter": { "branch": "master", "commit": "a7ba147b4b51631f7cf7d9da56f7d5763073b18d" },
"nvim-ufo": { "branch": "main", "commit": "1b5f2838099f283857729e820cc05e2b19df7a2c" },
"nvim-web-devicons": { "branch": "master", "commit": "5be6c4e685618b99c3210a69375b38a1202369b4" },
"oil.nvim": { "branch": "master", "commit": "71c972fbd218723a3c15afcb70421f67340f5a6d" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"promise-async": { "branch": "main", "commit": "28c1d5a295eb5310afa2523d4ae9aa41ec5a9de2" },
"rustaceanvim": { "branch": "master", "commit": "e539aa2494460e4cf51df1c7ac6fb16549408f79" },
"telescope.nvim": { "branch": "master", "commit": "10b8a82b042caf50b78e619d92caf0910211973d" },
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }
}

View File

@@ -0,0 +1,27 @@
vim.keymap.set('i', '<M-Up>', '<ESC>:move-2<CR>i')
vim.keymap.set('i', '<M-Down>', '<ESC>:move+<CR>i')
vim.keymap.set('n', '<C-Up>', '<C-u>zz')
vim.keymap.set('n', '<C-Down>', '<C-d>zz')
-- yank to clipboard with leader
vim.keymap.set('n', '<leader>y', '"+y')
vim.keymap.set('v', '<leader>y', '"+y')
vim.keymap.set('n', 'Q', '<nop>')
-- terminal
vim.keymap.set('n', '<leader>t', ':terminal <CR>')
vim.keymap.set('t', '<ESC>', '<C-\\><C-n>')
-- nice additions
vim.keymap.set('n', '<leader>er', function()
vim.diagnostic.open_float()
end)
vim.keymap.set('n', '<leader>l', ':e#<CR>')
-- vim.keymap.set('n', '<leader>ca', ':CodeActionMenu<CR>')
-- vim.keymap.set('n', '<leader>cn', ':IncRename ')
vim.keymap.set('n', '<leader>i', 'cc')
-- peek
vim.keymap.set('n', '<leader>p', vim.lsp.buf.hover)

View File

@@ -0,0 +1,21 @@
-- Tabs for indenting
vim.opt.autoindent = true
vim.g.noexpandtab = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
-- Line numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- Folding
vim.opt.foldlevelstart = 99
vim.g.mapleader = ' '
-- Terminal
vim.g.termguicolors = true
vim.g.terminal_emulator = 'kitty'
-- LSP
vim.lsp.inlay_hint.enable()

190
.config/nvim/lua/lsp.lua Normal file
View File

@@ -0,0 +1,190 @@
vim = vim
local required = { 'mason', 'mason-lspconfig', 'lspconfig', 'lsp-zero', 'cmp' }
local ready = true
vim.cmd.echohl('WarningMsg')
for _, module in ipairs(required) do
local ok, _ = pcall(require, module)
if not ok then
ready = false
vim.cmd.echo('"Module \'' .. module .. "' isn't present!\"")
end
end
if not ready then
vim.cmd.echo('"LSP disabled!"')
vim.cmd.echohl('None')
return
end
vim.cmd.echohl('None')
local zero = require('lsp-zero')
zero.preset('recommended')
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {
'lua_ls',
'tsserver',
},
handlers = {
-- zero.default_setup,
function(name)
require('lspconfig')[name].setup({
capabilities = require('cmp_nvim_lsp').default_capabilities(),
})
end,
},
})
zero.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
end)
-- #region CMP
local cmp_kind_icons = {
Text = '',
Method = '󰆧',
Function = '󰊕',
Constructor = '',
Field = '󰇽',
Variable = '󰂡',
Class = '󰠱',
Interface = '',
Module = '',
Property = '󰜢',
Unit = '',
Value = '󰎠',
Enum = '',
Keyword = '󰌋',
Snippet = '',
Color = '󰏘',
File = '󰈙',
Reference = '',
Folder = '󰉋',
EnumMember = '',
Constant = '󰏿',
Struct = '',
Event = '',
Operator = '󰆕',
TypeParameter = '󰅲',
}
local cmp = require('cmp')
cmp.setup({
mapping = cmp.mapping.preset.insert({
['<Tab>'] = cmp.mapping.confirm({ select = true }),
}),
snippet = {
expand = function(args)
local luasnip = require('luasnip')
if not luasnip then
return
end
luasnip.lsp_expand(args.body)
end,
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'calc' },
},
window = {
completion = {
winhighlight = 'Normal:Pmeny,FloatBorder:Pmenu,Search:None',
col_offset = -3,
side_padding = 0,
},
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, vim_item)
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, '%s', { trimempty = true })
kind.kind = ' ' .. (strings[1] or '') .. ' '
kind.menu = ' (' .. (strings[2] or '') .. ')'
return kind
end,
-- format = function(entry, vim_item)
-- -- Kind icons
-- vim_item.kind = string.format('%s %s ', cmp_kind_icons[vim_item.kind], vim_item.kind)
--
-- return vim_item
-- end,
-- format = function(entry, item)
-- local menu_icon = {
-- nvim_lsp = 'λ',
-- luasnip = '⋗',
-- buffer = 'Ω',
-- path = '🖫',
-- }
-- item.menu = menu_icon[entry.source.name]
-- return item
-- end
},
})
-- #region Highlight groups
-- Customization for Pmenu
vim.api.nvim_set_hl(0, 'PmenuSel', { bg = '#282C34', fg = 'NONE' })
vim.api.nvim_set_hl(0, 'Pmenu', { fg = '#C5CDD9', bg = '#22252A' })
vim.api.nvim_set_hl(0, 'CmpItemAbbrDeprecated', { fg = '#7E8294', bg = 'NONE', strikethrough = true })
vim.api.nvim_set_hl(0, 'CmpItemAbbrMatch', { fg = '#82AAFF', bg = 'NONE', bold = true })
vim.api.nvim_set_hl(0, 'CmpItemAbbrMatchFuzzy', { fg = '#82AAFF', bg = 'NONE', bold = true })
vim.api.nvim_set_hl(0, 'CmpItemMenu', { fg = '#C792EA', bg = 'NONE', italic = true })
vim.api.nvim_set_hl(0, 'CmpItemKindField', { fg = '#EED8DA', bg = '#B5585F' })
vim.api.nvim_set_hl(0, 'CmpItemKindProperty', { fg = '#EED8DA', bg = '#B5585F' })
vim.api.nvim_set_hl(0, 'CmpItemKindEvent', { fg = '#EED8DA', bg = '#B5585F' })
vim.api.nvim_set_hl(0, 'CmpItemKindText', { fg = '#e2f3c9', bg = '#94c549' })
vim.api.nvim_set_hl(0, 'CmpItemKindEnum', { fg = '#e2f3c9', bg = '#94c549' })
vim.api.nvim_set_hl(0, 'CmpItemKindKeyword', { fg = '#e2f3c9', bg = '#94c549' })
vim.api.nvim_set_hl(0, 'CmpItemKindConstant', { fg = '#FFE082', bg = '#D4BB6C' })
vim.api.nvim_set_hl(0, 'CmpItemKindConstructor', { fg = '#FFE082', bg = '#D4BB6C' })
vim.api.nvim_set_hl(0, 'CmpItemKindReference', { fg = '#FFE082', bg = '#D4BB6C' })
vim.api.nvim_set_hl(0, 'CmpItemKindFunction', { fg = '#EADFF0', bg = '#A377BF' })
vim.api.nvim_set_hl(0, 'CmpItemKindStruct', { fg = '#EADFF0', bg = '#A377BF' })
vim.api.nvim_set_hl(0, 'CmpItemKindClass', { fg = '#EADFF0', bg = '#A377BF' })
vim.api.nvim_set_hl(0, 'CmpItemKindModule', { fg = '#EADFF0', bg = '#A377BF' })
vim.api.nvim_set_hl(0, 'CmpItemKindOperator', { fg = '#EADFF0', bg = '#A377BF' })
vim.api.nvim_set_hl(0, 'CmpItemKindVariable', { fg = '#C5CDD9', bg = '#7E8294' })
vim.api.nvim_set_hl(0, 'CmpItemKindFile', { fg = '#C5CDD9', bg = '#7E8294' })
vim.api.nvim_set_hl(0, 'CmpItemKindUnit', { fg = '#F5EBD9', bg = '#D29a32' })
vim.api.nvim_set_hl(0, 'CmpItemKindSnippet', { fg = '#F5EBD9', bg = '#D29a32' })
vim.api.nvim_set_hl(0, 'CmpItemKindFolder', { fg = '#F5EBD9', bg = '#D29a32' })
vim.api.nvim_set_hl(0, 'CmpItemKindMethod', { fg = '#DDE5F5', bg = '#6C8ED4' })
vim.api.nvim_set_hl(0, 'CmpItemKindValue', { fg = '#DDE5F5', bg = '#6C8ED4' })
vim.api.nvim_set_hl(0, 'CmpItemKindEnumMember', { fg = '#DDE5F5', bg = '#6C8ED4' })
vim.api.nvim_set_hl(0, 'CmpItemKindInterface', { fg = '#D8EEEB', bg = '#58B5A8' })
vim.api.nvim_set_hl(0, 'CmpItemKindColor', { fg = '#D8EEEB', bg = '#58B5A8' })
vim.api.nvim_set_hl(0, 'CmpItemKindTypeParameter', { fg = '#D8EEEB', bg = '#58B5A8' })
-- #endregion
-- #endregion
vim.diagnostic.config({
severity_sort = true,
})

View File

@@ -0,0 +1,21 @@
return {
{
'smjonas/inc-rename.nvim',
keys = { {
'<leader>cn',
':IncRename ',
} },
config = function()
require('inc_rename').setup({
input_buffer_type = 'dressing',
})
end,
},
{
'aznhe21/actions-preview.nvim',
config = function()
require('actions-preview').setup({})
vim.keymap.set('n', '<leader>ca', require('actions-preview').code_actions)
end,
},
}

View File

@@ -0,0 +1,21 @@
return {
{ 'nvim-tree/nvim-web-devicons' },
{ 'stevearc/dressing.nvim', opts = {} },
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('todo-comments').setup()
end,
},
{ 'norcalli/nvim-colorizer.lua', opts = {} },
{
'OXY2DEV/markview.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' },
ft = 'markdown',
config = function()
require('markview')
vim.api.nvim_set_hl(0, 'MarkviewLayer', { fg = '#2a2a2a', bg = '#373737' })
end,
},
}

View File

@@ -0,0 +1,63 @@
return {
{
'kevinhwang91/nvim-ufo',
dependencies = {
{
'kevinhwang91/promise-async',
},
},
config = function()
-- Implement custom marker provider.
local CustomMarkerProvider = {}
function CustomMarkerProvider.getFolds(bufnr)
local buf = require('ufo.bufmanager'):get(bufnr)
if not buf then
return
end
local openRegex = '#region'
local closeRegex = '#endregion'
local summaryRegx = openRegex .. '%s*(.*)'
local ranges = {}
local stack = {}
local lines = buf:lines(1, -1)
for lnum, line in ipairs(lines) do
-- Check for start marker
if line:match(openRegex) then
table.insert(stack, lnum)
-- Check for end marker
elseif line:match(closeRegex) then
local startLnum = table.remove(stack)
if startLnum then
local summary = lines[startLnum]:match(summaryRegx)
table.insert(ranges, require('ufo.model.foldingrange').new(startLnum - 1, lnum - 1, summary))
end
end
end
return ranges
end
local function customizeSelector(bufnr)
local ranges = CustomMarkerProvider.getFolds(bufnr)
local maybe_additional_ranges = require('ufo').getFolds(bufnr, 'treesitter')
if next(maybe_additional_ranges) ~= nil then
ranges = vim.list_extend(ranges, maybe_additional_ranges)
else
ranges = vim.list_extend(ranges, require('ufo').getFolds(bufnr, 'indent'))
end
return ranges
end
require('ufo').setup({
provider_selector = function(bufnr, filetype, buftype)
return customizeSelector
end,
})
end,
},
}

View File

@@ -0,0 +1,91 @@
return {
{
'tjex/formatter.nvim',
branch = 'fix-305-index-out-of-bounds',
config = function()
local util = require('formatter.util')
local function prettier()
return {
exe = 'prettier',
args = {
'--config-precedence',
'prefer-file',
'--single-quote',
'--use-tabs',
'--trailing-comma',
'es5',
'--bracket-same-line',
'--insert-pragma',
'--stdin-filepath',
vim.fn.shellescape(vim.api.nvim_buf_get_name(0)),
},
stdin = true,
}
end
require('formatter').setup({
filetype = {
javascript = {
prettier,
},
typescript = {
prettier,
},
markdown = {
prettier,
},
css = {
prettier,
},
json = {
prettier,
},
html = {
prettier,
},
scss = {
prettier,
},
lua = {
function()
return {
exe = 'stylua',
args = {
'--indent-type',
'Tabs',
'--line-endings',
'Unix',
'--quote-style',
'AutoPreferSingle',
'--column-width',
vim.api.nvim_command_output('echo &columns'),
'-',
},
stdin = true,
}
end,
},
['*'] = {
function()
if vim.lsp.buf.formatting then
vim.lsp.buf.format()
end
end,
},
},
})
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
augroup('__formatter__', {
clear = true,
})
autocmd('BufWritePost', {
group = '__formatter__',
command = ':FormatWrite',
})
end,
},
}

View File

@@ -0,0 +1,20 @@
return {
-- Mason
{ 'williamboman/mason.nvim', opts = {}, cmd = 'Mason' },
{ 'williamboman/mason-lspconfig.nvim', opts = {} },
-- Lsp configuration
{ 'VonHeikemen/lsp-zero.nvim' },
{ 'neovim/nvim-lspconfig' },
-- Completion
{ 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-calc', 'L3MON4D3/LuaSnip', 'hrsh7th/cmp-nvim-lsp', 'onsails/lspkind.nvim' } },
-- Additions
{ 'ray-x/lsp_signature.nvim', event = 'VeryLazy', opts = {
hint_prefix = '',
} },
-- Rust
{ 'mrcjkb/rustaceanvim' },
}

View File

@@ -0,0 +1,33 @@
return {
-- Telescope
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
keys = {
{ '<leader>ff', function() require('telescope.builtin').find_files({ show_hidden = true }) end },
{ '<leader>fs', require('telescope.builtin').live_grep },
{ '<leader>bb', require('telescope.builtin').buffers },
},
},
{ 'nvim-lua/plenary.nvim' },
-- Oil
{
'stevearc/oil.nvim',
opts = {
default_file_explorer = true,
view_options = {
show_hidden = true,
},
},
lazy = false,
keys = {
{
'<leader>ex',
function()
vim.cmd('Oil')
end,
},
},
},
}

View File

@@ -0,0 +1,13 @@
return {
{
'loctvl842/monokai-pro.nvim',
-- lazy = true,
priority = 999,
config = function()
require('monokai-pro').setup({
filter = 'spectrum',
})
vim.cmd.colorscheme('monokai-pro')
end,
},
}

View File

@@ -0,0 +1,20 @@
return {
-- Highlighting
{
'nvim-treesitter/nvim-treesitter',
config = function()
vim.cmd('TSUpdate')
require('nvim-treesitter.configs').setup({
ensure_installed = { 'lua', 'markdown', 'typescript', 'javascript', 'rust', 'json', 'toml' },
highlight = {
enable = true,
},
auto_install = true,
-- additional_vim_regex_highlighting = true,
})
end,
},
}