12 Commits

Author SHA1 Message Date
  Yigit Colakoglu e79063b4c6 Neovim session support and more, sessions only support one buffer rn 1 year ago
  Yigit Colakoglu 3ba4441b9f Devdocs support 1 year ago
  Yigit Colakoglu a046d7c6e9 Neogit keybind 1 year ago
  Yigit Colakoglu 6f8ae21825 Copilot support 1 year ago
  Yigit Colakoglu fd1dc11f60 Fixed wrong telescope keybind 1 year ago
  Yigit Colakoglu 83e23bab00 Changed color scheme 1 year ago
  Yigit Colakoglu ae1dae2bf2 Cattpuccin 1 year ago
  Yigit Colakoglu 26f24e6791 Merge branch 'main' of github.com:theFr1nge/dotfiles 1 year ago
  Yigit Colakoglu b416e5ca58 Nvim config updated 1 year ago
  Fr1nge 17465e9fd4
Update README.md 2 years ago
  Fr1nge 30eb9495a1
Update README.md 2 years ago
  Yigit Colakoglu bfd0799ab3 Added dots for bird 2 years ago
163 changed files with 5064 additions and 8369 deletions
Unified View
  1. +2
    -0
      .config/X11/xinitrc
  2. +1
    -0
      .config/calcurse/keys
  3. +0
    -4
      .config/coc/extensions/.snyk
  4. +10
    -10
      .config/coc/extensions/package.json
  5. +0
    -4062
      .config/coc/extensions/yarn.lock
  6. +15
    -12
      .config/dunst/dunstrc
  7. +1
    -0
      .config/gdb/gefinit
  8. +0
    -18
      .config/gdb/pwninit
  9. +0
    -3
      .config/gtk-3.0/bookmarks
  10. +3
    -3
      .config/gtk-3.0/settings.ini
  11. +32
    -10
      .config/htop/htoprc
  12. +1
    -1
      .config/isync/mbsyncrc
  13. +17
    -5
      .config/mimeapps.list
  14. +1
    -0
      .config/mutt/mailcap
  15. +8
    -0
      .config/nvim/TODOS.md
  16. +0
    -25
      .config/nvim/coc-settings.json
  17. +28
    -0
      .config/nvim/init.lua
  18. +69
    -0
      .config/nvim/lazy-lock.json
  19. +30
    -0
      .config/nvim/lua/art.lua
  20. +25
    -0
      .config/nvim/lua/config/appearance.lua
  21. +62
    -0
      .config/nvim/lua/config/dap.lua
  22. +3
    -0
      .config/nvim/lua/config/init.lua
  23. +3
    -0
      .config/nvim/lua/config/lsp/cmake.lua
  24. +95
    -0
      .config/nvim/lua/config/lsp/init.lua
  25. +27
    -0
      .config/nvim/lua/config/lsp/lua_ls.lua
  26. +9
    -0
      .config/nvim/lua/config/lsp/rust_analyzer.lua
  27. +11
    -0
      .config/nvim/lua/config/plugin/aerial.lua
  28. +112
    -0
      .config/nvim/lua/config/plugin/alpha.lua
  29. +36
    -0
      .config/nvim/lua/config/plugin/auto-session.lua
  30. +32
    -0
      .config/nvim/lua/config/plugin/barbar.lua
  31. +50
    -0
      .config/nvim/lua/config/plugin/catppuccin.lua
  32. +12
    -0
      .config/nvim/lua/config/plugin/copilot.lua
  33. +40
    -0
      .config/nvim/lua/config/plugin/dashboard.lua
  34. +4
    -0
      .config/nvim/lua/config/plugin/harpoon2.lua
  35. +7
    -0
      .config/nvim/lua/config/plugin/ibl.lua
  36. +0
    -0
      .config/nvim/lua/config/plugin/init.lua
  37. +279
    -0
      .config/nvim/lua/config/plugin/lualine.lua
  38. +14
    -0
      .config/nvim/lua/config/plugin/mini.lua
  39. +3
    -0
      .config/nvim/lua/config/plugin/neodev.lua
  40. +18
    -0
      .config/nvim/lua/config/plugin/noice.lua
  41. +8
    -0
      .config/nvim/lua/config/plugin/null-ls.lua
  42. +110
    -0
      .config/nvim/lua/config/plugin/nvim-cmp.lua
  43. +17
    -0
      .config/nvim/lua/config/plugin/nvim-devdocs.lua
  44. +34
    -0
      .config/nvim/lua/config/plugin/nvim-tree.lua
  45. +31
    -0
      .config/nvim/lua/config/plugin/nvim-ufo.lua
  46. +0
    -0
      .config/nvim/lua/config/plugin/session-lens.lua
  47. +27
    -0
      .config/nvim/lua/config/plugin/telescope.lua
  48. +13
    -0
      .config/nvim/lua/config/plugin/treesitter.lua
  49. +9
    -0
      .config/nvim/lua/config/plugin/whichkey.lua
  50. +70
    -0
      .config/nvim/lua/config/settings.lua
  51. +21
    -0
      .config/nvim/lua/config/template.lua
  52. +39
    -0
      .config/nvim/lua/keybinds/barbar.lua
  53. +13
    -0
      .config/nvim/lua/keybinds/dap.lua
  54. +37
    -0
      .config/nvim/lua/keybinds/editor.lua
  55. +7
    -0
      .config/nvim/lua/keybinds/init.lua
  56. +78
    -0
      .config/nvim/lua/keybinds/plugin.lua
  57. +74
    -0
      .config/nvim/lua/keybinds/telescope.lua
  58. +25
    -0
      .config/nvim/lua/keybinds/terminal.lua
  59. +53
    -0
      .config/nvim/lua/lsp.lua
  60. +311
    -0
      .config/nvim/lua/plugins.lua
  61. +109
    -0
      .config/nvim/lua/quotes.lua
  62. +62
    -0
      .config/nvim/lua/utils.lua
  63. +0
    -1
      .config/nvim/plugin/YCM.vim
  64. +0
    -138
      .config/nvim/plugin/coc.vim
  65. +0
    -10
      .config/nvim/plugin/ctrlp.vim
  66. +0
    -33
      .config/nvim/plugin/lightline-bufferline.vim
  67. +0
    -53
      .config/nvim/plugin/lightline.vim
  68. +0
    -9
      .config/nvim/plugin/nerdcommenter.vim
  69. +0
    -4
      .config/nvim/plugin/nerdtree.vim
  70. +0
    -59
      .config/nvim/plugin/plugins.vim
  71. +0
    -9
      .config/nvim/plugin/vim-betterwhitespace.vim
  72. +0
    -3
      .config/nvim/plugin/vim-ripgrep.vim
  73. +0
    -7
      .config/nvim/plugin/vim-test.vim
  74. +0
    -9
      .config/nvim/plugin/vimux.vim
  75. +0
    -0
      .config/nvim/templates/skeleton.c
  76. +0
    -0
      .config/nvim/templates/skeleton.cpp
  77. +0
    -0
      .config/nvim/templates/skeleton.h
  78. +0
    -0
      .config/nvim/templates/skeleton.hpp
  79. +0
    -0
      .config/nvim/templates/skeleton.html
  80. +0
    -0
      .config/nvim/templates/skeleton.java
  81. +0
    -0
      .config/nvim/templates/skeleton.py
  82. +0
    -0
      .config/nvim/templates/skeleton.s
  83. +0
    -0
      .config/nvim/templates/skeleton.sh
  84. +0
    -0
      .config/nvim/templates/skeleton.tex
  85. +4
    -0
      .config/qt5ct/colors/Catppuccin-Mocha.conf
  86. +10
    -6
      .config/qt5ct/qt5ct.conf
  87. +2
    -2
      .config/tmux/tmux.conf
  88. +0
    -565
      .config/vim/colors/material.vim
  89. +0
    -240
      .config/vim/vimrc
  90. +10
    -3
      .config/zsh/aliases
  91. +8
    -0
      .config/zsh/cmds
  92. +1
    -1
      .local/bin/compiler
  93. +54
    -20
      .local/bin/dmenu-books
  94. +35
    -0
      .local/bin/dmenu-hamster
  95. +8
    -4
      .local/bin/dmenu-refresh
  96. +22
    -0
      .local/bin/dmenu-sessions
  97. +23
    -0
      .local/bin/dmenu-timer
  98. +39
    -0
      .local/bin/dmenu-toolkit
  99. +0
    -73
      .local/bin/dmenu-wallabag
  100. +1
    -37
      .local/bin/dmenu-web

+ 2
- 0
.config/X11/xinitrc View File

@ -14,6 +14,8 @@ EOF
chmod +x "$XDG_CACHE_HOME/dbus_settings" chmod +x "$XDG_CACHE_HOME/dbus_settings"
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
rm -rf $XDG_RUNTIME_DIR/day_cache rm -rf $XDG_RUNTIME_DIR/day_cache
export XSESSION_PID="$$" export XSESSION_PID="$$"


+ 1
- 0
.config/calcurse/keys View File

@ -16,6 +16,7 @@ generic-reload R
generic-copy c generic-copy c
generic-paste p ^V generic-paste p ^V
generic-change-view TAB generic-change-view TAB
generic-prev-view KEY_BTAB
generic-import i I generic-import i I
generic-export x X generic-export x X
generic-goto g G generic-goto g G


+ 0
- 4
.config/coc/extensions/.snyk View File

@ -1,4 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.19.0
ignore: {}
patch: {}

+ 10
- 10
.config/coc/extensions/package.json View File

@ -1,15 +1,15 @@
{ {
"dependencies": { "dependencies": {
"coc-css": ">=1.2.6",
"coc-html": ">=1.4.1",
"coc-java": ">=1.5.3",
"coc-jedi": ">=0.25.2",
"coc-json": ">=1.3.4",
"coc-markdownlint": ">=1.11.1",
"coc-prettier": ">=1.1.23",
"coc-css": ">=1.3.0",
"coc-html": ">=1.6.1",
"coc-java": ">=1.5.5",
"coc-java-lombok": ">=1.0.0",
"coc-jedi": ">=0.30.1",
"coc-json": ">=1.4.1",
"coc-markdownlint": ">=1.12.4",
"coc-prettier": ">=9.2.2",
"coc-tailwindcss": ">=0.7.0", "coc-tailwindcss": ">=0.7.0",
"coc-tsserver": ">=1.6.8",
"coc-vetur": ">=1.2.4",
"coc-vimtex": ">=1.0.4"
"coc-tsserver": ">=1.9.13",
"coc-vimtex": ">=1.1.1"
} }
} }

+ 0
- 4062
.config/coc/extensions/yarn.lock
File diff suppressed because it is too large
View File


+ 15
- 12
.config/dunst/dunstrc View File

@ -1,6 +1,7 @@
[global] [global]
frame_width = 0 frame_width = 0
font = CaskaydiaCove Nerd Font 10 font = CaskaydiaCove Nerd Font 10
follow = none follow = none
markup = yes markup = yes
@ -18,7 +19,9 @@
word_wrap = yes word_wrap = yes
ignore_newline = no ignore_newline = no
geometry = "500x8-8+50"
width=(0,500)
height=100
notification_limit=8
indicate_hidden = yes indicate_hidden = yes
shrink = yes shrink = yes
@ -34,8 +37,8 @@
padding = 8 padding = 8
horizontal_padding = 10 horizontal_padding = 10
separator_color = auto separator_color = auto
startup_notification = false
dmenu = /usr/local/bin/dmenu -p dmenu:
startup_notification = true
dmenu = /usr/local/bin/dmenu -p context:
browser = /bin/firefox browser = /bin/firefox
icon_position = left icon_position = left
#icon_path = /home/yigit/.icons/Tela-dark/16/actions:/home/yigit/.icons/Tela-dark/16/apps:/home/yigit/.icons/Tela-dark/16/devices:/home/yigit/.icons/Tela-dark/16/mimetypes:/home/yigit/.icons/Tela-dark/16/panel:/home/yigit/.icons/Tela-dark/16/places:/home/yigit/.icons/Tela-dark/16/status #icon_path = /home/yigit/.icons/Tela-dark/16/actions:/home/yigit/.icons/Tela-dark/16/apps:/home/yigit/.icons/Tela-dark/16/devices:/home/yigit/.icons/Tela-dark/16/mimetypes:/home/yigit/.icons/Tela-dark/16/panel:/home/yigit/.icons/Tela-dark/16/places:/home/yigit/.icons/Tela-dark/16/status
@ -43,6 +46,8 @@
mouse_left_click = close_current mouse_left_click = close_current
mouse_middle_click = do_action, close_current mouse_middle_click = do_action, close_current
mouse_right_click = close_all mouse_right_click = close_all
frame_color = "#89B4FA"
separator_color= frame
[shortcuts] [shortcuts]
close_all = ctrl+mod1+space close_all = ctrl+mod1+space
@ -50,21 +55,19 @@
context = ctrl+shift+period context = ctrl+shift+period
[urgency_low] [urgency_low]
background = "#0F111A"
foreground = "#E5E9F0"
frame_color = "#BF616A"
background = "#1E1E2E"
foreground = "#CDD6F4"
timeout = 5 timeout = 5
[urgency_normal] [urgency_normal]
background = "#0F111A"
foreground = "#E5E9F0"
frame_color = "#BF616A"
background = "#1E1E2E"
foreground = "#CDD6F4"
timeout = 5 timeout = 5
[urgency_critical] [urgency_critical]
background = "#BF616A"
foreground = "#00010A"
frame_color = "#E5E9F0"
background = "#1E1E2E"
foreground = "#CDD6F4"
frame_color = "#FAB387"
timeout = 0 timeout = 0
[volume] [volume]


+ 1
- 0
.config/gdb/gefinit View File

@ -0,0 +1 @@
source ~/.gef-7c170cf6be3d84b2672a22e43b9128a23fe53c3b.py

+ 0
- 18
.config/gdb/pwninit View File

@ -1,18 +0,0 @@
source /usr/share/pwndbg/gdbinit.py
source /home/yigit/.local/share/splitmind/gdbinit.py
python
import splitmind
(splitmind.Mind()
.tell_splitter(show_titles=True)
.tell_splitter(set_title="Main")
.right(display="backtrace", size="25%")
.above(of="main", display="disasm", size="80%", banner="top")
.show("code", on="disasm", banner="none")
.right(cmd='tty; tail -f /dev/null', size="65%", clearing=False)
.tell_splitter(set_title='Input / Output')
.above(display="stack", size="75%")
.above(display="legend", size="25")
.show("regs", on="legend")
.below(of="backtrace", cmd="ipython", size="30%")
).build(nobanner=True)
end

+ 0
- 3
.config/gtk-3.0/bookmarks View File

@ -1,3 +0,0 @@
file:///home/yigit/Nextcloud
file:///home/yigit/Documents/
file:///home/yigit/Pictures/

+ 3
- 3
.config/gtk-3.0/settings.ini View File

@ -1,6 +1,6 @@
[Settings] [Settings]
gtk-theme-name=material-ocean
gtk-icon-theme-name=Tela-dark
gtk-theme-name=Catppuccin-Mocha-Standard-Blue-Dark
gtk-icon-theme-name=Tela
gtk-font-name=CaskaydiaCove Nerd Font 10 gtk-font-name=CaskaydiaCove Nerd Font 10
gtk-cursor-theme-name=Adwaita gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0 gtk-cursor-theme-size=0
@ -12,5 +12,5 @@ gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1 gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1 gtk-xft-antialias=1
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-hintstyle=hintmedium
gtk-application-prefer-dark-theme=0 gtk-application-prefer-dark-theme=0

+ 32
- 10
.config/htop/htoprc View File

@ -1,16 +1,15 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
htop_version=3.2.0
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1 hide_kernel_threads=1
hide_userland_threads=1 hide_userland_threads=1
shadow_other_users=0 shadow_other_users=0
show_thread_names=0 show_thread_names=0
show_program_path=1 show_program_path=1
highlight_base_name=1 highlight_base_name=1
highlight_deleted_exe=1
highlight_megabytes=1 highlight_megabytes=1
highlight_threads=1 highlight_threads=1
highlight_changes=0 highlight_changes=0
@ -18,9 +17,8 @@ highlight_changes_delay_secs=5
find_comm_in_cmdline=1 find_comm_in_cmdline=1
strip_exe_from_cmdline=1 strip_exe_from_cmdline=1
show_merged_command=0 show_merged_command=0
tree_view=0
tree_view_always_by_pid=0
header_margin=1 header_margin=1
screen_tabs=0
detailed_cpu_time=0 detailed_cpu_time=0
cpu_count_from_one=1 cpu_count_from_one=1
show_cpu_usage=1 show_cpu_usage=1
@ -32,8 +30,32 @@ account_guest_in_cpu_meter=0
color_scheme=0 color_scheme=0
enable_mouse=1 enable_mouse=1
delay=15 delay=15
left_meters=LeftCPUs2 CPU Battery Blank Blank Blank Memory NetworkIO DiskIO
left_meter_modes=1 1 1 2 2 2 3 4 4
right_meters=RightCPUs2 Memory Swap Blank Blank Blank LoadAverage Uptime Tasks
right_meter_modes=1 1 1 2 2 2 3 4 4
hide_function_bar=0 hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs2 CPU Battery Blank Blank Blank Memory NetworkIO DiskIO
column_meter_modes_0=1 1 1 2 2 2 3 4 4
column_meters_1=RightCPUs2 Memory Swap Blank Blank Blank LoadAverage Uptime Tasks
column_meter_modes_1=1 1 1 2 2 2 3 4 4
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

+ 1
- 1
.config/isync/mbsyncrc View File

@ -79,7 +79,7 @@ IMAPStore Y.Colakoglu@student.tudelft.nl-remote
Host imap.tudelft.nl Host imap.tudelft.nl
Port 993 Port 993
User ycolakoglu@tudelft.net User ycolakoglu@tudelft.net
PassCmd "pass University/password.tudelft.nl/ycolakoglu"
PassCmd "pass University/login.tudelft.nl/ycolakoglu"
AuthMechs LOGIN AuthMechs LOGIN
SSLType IMAPS SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt CertificateFile /etc/ssl/certs/ca-certificates.crt


+ 17
- 5
.config/mimeapps.list View File

@ -1,8 +1,8 @@
[Default Applications] [Default Applications]
x-scheme-handler/jetbrains=jetbrains-toolbox.desktop x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
x-scheme-handler/mailspring=mailspring.desktop x-scheme-handler/mailspring=mailspring.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/http=userapp-Firefox-HRFVY1.desktop
x-scheme-handler/https=userapp-Firefox-HRFVY1.desktop
image/png=sxiv.desktop image/png=sxiv.desktop
image/jpeg=sxiv.desktop image/jpeg=sxiv.desktop
text/plain=vim.desktop text/plain=vim.desktop
@ -11,7 +11,7 @@ x-scheme-handler/gitkraken=GitKraken.desktop
x-scheme-handler/ssh=ktelnetservice5.desktop x-scheme-handler/ssh=ktelnetservice5.desktop
video/mp4=mpv.desktop video/mp4=mpv.desktop
video/x-matroska=mpv.desktop video/x-matroska=mpv.desktop
text/html=firefox.desktop
text/html=userapp-Firefox-HRFVY1.desktop
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
application/x-shellscript=vim.desktop application/x-shellscript=vim.desktop
inode/directory=lf.desktop inode/directory=lf.desktop
@ -20,18 +20,30 @@ application/pdf=zathura.desktop
application/epub=zathura.desktop application/epub=zathura.desktop
video/webm=mpv.desktop video/webm=mpv.desktop
application/zip=engrampa.desktop application/zip=engrampa.desktop
x-scheme-handler/tg=userapp-Telegram Desktop-APVS20.desktop
x-scheme-handler/tg=org.telegram.desktop.desktop
x-scheme-handler/mailto=neomutt.desktop x-scheme-handler/mailto=neomutt.desktop
message/rfc822=userapp-neomutt.desktop message/rfc822=userapp-neomutt.desktop
application/x-directory=lf.desktop application/x-directory=lf.desktop
x-scheme-handler/discord-474605546457137157=discord-474605546457137157.desktop x-scheme-handler/discord-474605546457137157=discord-474605546457137157.desktop
x-scheme-handler/msteams=teams.desktop x-scheme-handler/msteams=teams.desktop
x-scheme-handler/discord-402572971681644545=discord-402572971681644545.desktop
x-scheme-handler/discord-378347429537251328=discord-378347429537251328.desktop
x-scheme-handler/chrome=userapp-Firefox-HRFVY1.desktop
application/x-extension-htm=userapp-Firefox-HRFVY1.desktop
application/x-extension-html=userapp-Firefox-HRFVY1.desktop
application/x-extension-shtml=userapp-Firefox-HRFVY1.desktop
application/xhtml+xml=userapp-Firefox-HRFVY1.desktop
application/x-extension-xhtml=userapp-Firefox-HRFVY1.desktop
application/x-extension-xht=userapp-Firefox-HRFVY1.desktop
x-scheme-handler/discord-589393213723246592=discord-589393213723246592.desktop
x-scheme-handler/discord-1170028348756471908=discord-1170028348756471908.desktop
[Added Associations] [Added Associations]
application/rtf=libreoffice-writer.desktop;nvim.desktop; application/rtf=libreoffice-writer.desktop;nvim.desktop;
text/x-java-source=vim.desktop; text/x-java-source=vim.desktop;
x-scheme-handler/tg=userapp-Telegram Desktop-APVS20.desktop;
x-scheme-handler/tg=userapp-Telegram Desktop-APVS20.desktop;org.telegram.desktop.desktop;
application/x-rdp=vim.desktop; application/x-rdp=vim.desktop;
text/markdown=nvim.desktop; text/markdown=nvim.desktop;
application/pdf=zaread.desktop; application/pdf=zaread.desktop;
text/plain=nvim.desktop; text/plain=nvim.desktop;
x-scheme-handler/https=userapp-Firefox-HRFVY1.desktop;

+ 1
- 0
.config/mutt/mailcap View File

@ -1,5 +1,6 @@
text/plain; $EDITOR %s ; text/plain; $EDITOR %s ;
text/html; openfile %s ; nametemplate=%s.html text/html; openfile %s ; nametemplate=%s.html
#text/html; html2text --ignore-images --unicode-snob --reference-links --pad-tables %s; nametemplate=%s.html; copiousoutput;
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
#text/html; firefox-developer-edition %s; #text/html; firefox-developer-edition %s;
image/*; openfile %s ; image/*; openfile %s ;


+ 8
- 0
.config/nvim/TODOS.md View File

@ -0,0 +1,8 @@
# TODOs
- specific run keybinds for certain filetypes
- python
- ipython
- bash
- c/c++?
- java?

+ 0
- 25
.config/nvim/coc-settings.json View File

@ -1,25 +0,0 @@
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": [
"c",
"cpp",
"objc",
"objcpp"
],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
}
}

+ 28
- 0
.config/nvim/init.lua View File

@ -0,0 +1,28 @@
-- Set leader key
vim.g.mapleader = ','
-- Load lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")
-- Initialize Keybinds
require('config')
-- Initialize Keybinds
require('keybinds')
-- Initialize LSP
require('lsp')

+ 69
- 0
.config/nvim/lazy-lock.json View File

@ -0,0 +1,69 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"aerial.nvim": { "branch": "master", "commit": "e2e3bc2df4490690ea005395eecdc8eeb30c4def" },
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
"auto-session": { "branch": "main", "commit": "51196ca66b38fc1660fdf50031cb0b31a199b7c9" },
"barbar.nvim": { "branch": "master", "commit": "dd852401ee902745b67fc09a83d113b3fe82a96f" },
"barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-snippy": { "branch": "master", "commit": "6e39210aa3a74e2bf6462f492eaf0d436cd2b7d3" },
"cmp-vimtex": { "branch": "master", "commit": "50da2d9baeca3e9efb9ca9d90f68c7cc01377bc2" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"copilot-lualine": { "branch": "main", "commit": "4dd368bed56c424b4a6822ad007b7540d472ae6d" },
"copilot.lua": { "branch": "master", "commit": "858bbfa6fa81c88fb1f64107d7981f1658619e0a" },
"dap-buddy.nvim": { "branch": "main", "commit": "bbda2b062e5519cde4e10b6e4240d3dd1f867b20" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
"harpoon": { "branch": "harpoon2", "commit": "6afc142443f8135329f8dd09b77e229f65001c0c" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
"neodev.nvim": { "branch": "main", "commit": "2a8630847dbb93455936156c0689678e4eaee319" },
"neogit": { "branch": "master", "commit": "f2315fde7e6d154661dea91f8f8595adb0f44308" },
"neomutt.vim": { "branch": "main", "commit": "df510c3d5bcff2013accf957854e0f2a5c01d83b" },
"neotest": { "branch": "master", "commit": "6aa6e4529a4a125b49c48541b97ba146ceee2441" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "80445d015d2b5f9af0d9e8bce63d303bc86eda8a" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" },
"nvim-hlslens": { "branch": "main", "commit": "8ffc64bb6b624612cf762982b92633f283f7a715" },
"nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" },
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
"nvim-snippy": { "branch": "master", "commit": "7c8f18e90cad4f56c4e22a49101668735639f286" },
"nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" },
"nvim-treesitter": { "branch": "master", "commit": "65ef62092ef997d2ecf68ede01a0afbda17808c3" },
"nvim-ufo": { "branch": "main", "commit": "c6d88523f574024b788f1c3400c5d5b9bb1a0407" },
"nvim-web-devicons": { "branch": "master", "commit": "cff25ce621e6d15fae0b0bfe38c00be50ce38468" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
"rest.nvim": { "branch": "main", "commit": "84e81a19ab24ccf05c9233d34d4dfce61c233abe" },
"session-lens": { "branch": "main", "commit": "1b65d8e1bcd1836c5135cce118ba18d662a9dabd" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" },
"vim-cppman": { "branch": "master", "commit": "de1318252b68fba9b8249254475b6e050d160b73" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
"vim-snippets": { "branch": "master", "commit": "ba72b08e04e184ecd0a2a1b8012a81ddb040dbc3" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" },
"vimtex": { "branch": "master", "commit": "f9b19d09ee6f0ba70dad0b5c2e710dd700681000" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" }
}

+ 30
- 0
.config/nvim/lua/art.lua View File

@ -0,0 +1,30 @@
local M = {}
M.skull_bent = {
[[ :::!~!!!!!:. ]],
[[ .xUHWH!! !!?M88WHX:. ]],
[[ .X*#M@$!! !X!M$$$$$$WWx:. ]],
[[ :!!!!!!?H! :!$!$$$$$$$$$$8X: ]],
[[ !!~ ~:~!! :~!$!#$$$$$$$$$$8X: ]],
[[ :!~::!H!< ~.U$X!?R$$$$$$$$MM! ]],
[[ ~!~!!!!~~ .:XW$$$U!!?$$$$$$RMM! ]],
[[ !:~~~ .:!M"T#$$$$WX??#MRRMMM! ]],
[[ ~?WuxiW*` `"#$$$$8!!!!??!!! ]],
[[ :X- M$$$$ `"T#$T~!8$WUXU~ ]],
[[ :%` ~#$$$m: ~!~ ?$$$$$$ ]],
[[ :!`.- ~T$$$$8xx. .xWW- ~""##*" ]],
[[..... -~~:<` ! ~?T#$$@@W@*?$$ /` ]],
[[W$@@M!!! .!~~ !! .:XUW$W!~ `"~: : ]],
[[#"~~`.:x%`!! !H: !WM$$$$Ti.: .!WUn+!` ]],
[[:::~:!!`:X~ .: ?H.!u "$$$B$$$!W:U!T$$M~ ]],
[[.~~ :X@!.-~ ?@WTWo("*$$$W$TH$! ` ]],
[[Wi.~!X$?!-~ : ?$$$B$Wu("**$RM! ]],
[[$R@i.~~ ! : ~$$$$$B$$en:`` ]],
[[?MXT@Wx.~ : ~"##*$$$$M~ ]],
}
M.all = {
M.skull_bent
}
return M

+ 25
- 0
.config/nvim/lua/config/appearance.lua View File

@ -0,0 +1,25 @@
-- Appearance Settings
-- Set command-line height
vim.opt.cmdheight = 2
-- Tab and indent settings
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
-- Status line
vim.opt.laststatus = 2
-- Material theme style
vim.opt.termguicolors = true
-- Colorscheme settings
vim.opt.background = "dark"
vim.cmd.colorscheme "catppuccin"
vim.wo.relativenumber = true
vim.wo.number = true
vim.o.guifont = "CaskaydiaCove Nerd Font Mono:h8:#h-slight"
vim.g.neovide_cursor_vfx_mode = "railgun"

+ 62
- 0
.config/nvim/lua/config/dap.lua View File

@ -0,0 +1,62 @@
local dap, dapui = require("dap"), require("dapui")
-- Set breakpoint icon
vim.fn.sign_define('DapBreakpoint', {text='', texthl='red', linehl='red', numhl='red'})
-- Bind nvim-dap-ui to dap events
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
-- Python
dap.adapters.python = {
type = 'executable';
command = 'python';
args = { '-m', 'debugpy.adapter' };
}
dap.configurations.python = {
{
type = 'python';
request = 'launch';
name = "Launch file";
program = "${file}";
pythonPath = function()
return '/usr/bin/python'
end;
},
}
dap.adapters.bashdb = {
type = 'executable';
command = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/bash-debug-adapter';
name = 'bashdb';
}
dap.configurations.sh = {
{
type = 'bashdb';
request = 'launch';
name = "Launch file";
showDebugOutput = true;
pathBashdb = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb';
pathBashdbLib = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir';
trace = true;
file = "${file}";
program = "${file}";
cwd = '${workspaceFolder}';
pathCat = "cat";
pathBash = "/bin/bash";
pathMkfifo = "mkfifo";
pathPkill = "pkill";
args = {};
env = {};
terminalKind = "integrated";
}
}

+ 3
- 0
.config/nvim/lua/config/init.lua View File

@ -0,0 +1,3 @@
require('config.settings')
require('config.appearance')
require('config.dap')

+ 3
- 0
.config/nvim/lua/config/lsp/cmake.lua View File

@ -0,0 +1,3 @@
return {
filetypes = {'cmake', 'CMakeLists.txt'}
}

+ 95
- 0
.config/nvim/lua/config/lsp/init.lua View File

@ -0,0 +1,95 @@
local function is_null_ls_formatting_enabled(bufnr)
local file_type = vim.api.nvim_buf_get_option(bufnr, "filetype")
local generators = require("null-ls.generators").get_available(
file_type,
require("null-ls.methods").internal.FORMATTING
)
return #generators > 0
end
local custom_attach = function(client, bufnr)
-- null-ls formatting support
if client.server_capabilities.documentFormattingProvider then
if
client.name == "null-ls" and is_null_ls_formatting_enabled(bufnr)
or client.name ~= "null-ls"
then
vim.bo[bufnr].formatexpr = "v:lua.vim.lsp.formatexpr()"
vim.keymap.set("n", "<leader>gq", "<cmd>lua vim.lsp.buf.format({ async = true })<CR>", opts)
else
vim.bo[bufnr].formatexpr = nil
end
end
vim.api.nvim_create_autocmd("CursorHold", {
buffer=bufnr,
callback = function()
local opts = {
focusable = false,
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
border = 'rounded',
source = 'always', -- show source in diagnostic popup window
prefix = ' '
}
if not vim.b.diagnostics_pos then
vim.b.diagnostics_pos = { nil, nil }
end
local cursor_pos = vim.api.nvim_win_get_cursor(0)
if (cursor_pos[1] ~= vim.b.diagnostics_pos[1] or cursor_pos[2] ~= vim.b.diagnostics_pos[2]) and
#vim.diagnostic.get() > 0
then
vim.diagnostic.open_float(nil, opts)
end
vim.b.diagnostics_pos = cursor_pos
end
})
-- Make K show hover menu if it is supported
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = bufnr })
-- The blow command will highlight the current variable and its usages in the buffer.
if client.server_capabilities.document_highlight then
vim.cmd([[
hi! link LspReferenceRead Visual
hi! link LspReferenceText Visual
hi! link LspReferenceWrite Visual
augroup lsp_document_highlight
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]])
end
if vim.g.logging_level == 'debug' then
local msg = string.format("Language server %s started!", client.name)
vim.notify(msg, 'info', {title = 'Nvim-config'})
end
end
local utils = require("utils")
local lspconfigs = {
clangd = {},
pyright = {},
bashls = {},
html = {},
tsserver = {},
lua_ls = require("config.lsp.lua_ls"),
cssls = {},
asm_lsp = {},
rust_analyzer = require("config.lsp.rust_analyzer"),
cmake = require("config.lsp.cmake"),
}
local mason_extras = {
}
return {
mason_servers = utils.mergeTables(utils.getTableKeys(lspconfigs), mason_extras),
lspconfigs = lspconfigs,
lsp_onattach = custom_attach
}

+ 27
- 0
.config/nvim/lua/config/lsp/lua_ls.lua View File

@ -0,0 +1,27 @@
return {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';'),
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
},
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}

+ 9
- 0
.config/nvim/lua/config/lsp/rust_analyzer.lua View File

@ -0,0 +1,9 @@
return {
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = false;
}
}
}
}

+ 11
- 0
.config/nvim/lua/config/plugin/aerial.lua View File

@ -0,0 +1,11 @@
return function ()
require('aerial').setup({
-- Your configuration here
-- To auto-open the aerial window on entering a buffer:
on_attach = function(bufnr)
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
require('aerial').open({focus = false})
end
})
end

+ 112
- 0
.config/nvim/lua/config/plugin/alpha.lua View File

@ -0,0 +1,112 @@
return function()
local theme = require("alpha.themes.theta")
local art = require("art")
local quotes = require("quotes")
-- Header
local function apply_gradient_hl(text)
local gradient = require("utils").create_gradient("#CBA6F7", "#94E2D5", #text)
local lines = {}
for i, line in ipairs(text) do
local tbl = {
type = "text",
val = line,
opts = {
hl = "HeaderGradient" .. i,
shrink_margin = false,
position = "center",
},
}
table.insert(lines, tbl)
-- create hl group
vim.api.nvim_set_hl(0, "HeaderGradient" .. i, { fg = gradient[i] })
end
return {
type = "group",
val = lines,
opts = { position = "center" },
}
end
local function footer_align(quote_text, width)
local max_width = width or 35
local tbl = {}
for _, text in ipairs(quote_text) do
local padded_text = require("utils").pad_string(text, max_width, "right")
table.insert(tbl, { type = "text", val = padded_text, opts = { hl = "Comment", position = "center" } })
end
return {
type = "group",
val = tbl,
opts = {},
}
end
local function get_info()
local lazy_stats = require("lazy").stats()
local total_plugins = "" .. lazy_stats.loaded .. "/" .. lazy_stats.count .. " packages"
local datetime = os.date(" %A %B %d")
local version = vim.version()
local nvim_version_info = "" .. version.major .. "." .. version.minor .. "." .. version.patch
local info_string = datetime .. " | " .. total_plugins .. " | " .. nvim_version_info
return {
type = "text",
val = info_string,
opts = {
hl = "Delimiter",
position = "center",
},
}
end
-- Links / tools
local dashboard = require("alpha.themes.dashboard")
local links = {
type = "group",
val = {
dashboard.button("e", " Edit Empty Buffer", "<cmd>ene<CR>"),
dashboard.button("s", " Open Sesssion", "<cmd>Telescope session-lens<CR>"),
dashboard.button("o", "󰈔 Open File", "<cmd>Telescope fd<CR>"),
dashboard.button("d", " Open Folder", "<cmd>let dir=system(\"zenity --file-selection --directory\")<CR><cmd>cd `=dir`<CR>"),
dashboard.button("c", " Edit Configuration", "<cmd>cd ~/.config/nvim<CR><cmd> Telescope fd<CR>"),
dashboard.button("u", "󰏔 Update Plugins", "<cmd>Lazy update<CR>"),
},
position = "center",
}
-- MRU
local function get_mru(max_shown)
local tbl = {
{ type = "text", val = "Recent Files", opts = { hl = "SpecialComment", position = "center" } },
}
local mru_list = theme.mru(1, "", max_shown)
for _, file in ipairs(mru_list.val) do
table.insert(tbl, file)
end
return { type = "group", val = tbl, opts = {} }
end
theme.config.layout = {
{ type = "padding", val = 4 },
apply_gradient_hl(art.skull_bent),
{ type = "padding", val = 1 },
get_info(),
{ type = "padding", val = 1 },
links,
{ type = "padding", val = 2 },
get_mru(5),
{ type = "padding", val = 3 },
footer_align(quotes.simple_einstein, 50),
}
require("alpha").setup(theme.config)
end

+ 36
- 0
.config/nvim/lua/config/plugin/auto-session.lua View File

@ -0,0 +1,36 @@
return function()
require("auto-session").setup {
log_level = "error",
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/"},
auto_save_enabled = true,
auto_session_enabled = true,
bypass_session_save_file_types = {
"alpha",
"NvimTree",
"aerial",
},
post_restore_cmds = {
function()
local unwanted_fts = {
alpha=true,
aerial=true,
NvimTree=true,
}
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
-- Check if the buffer's filetype matches
local ft = vim.api.nvim_buf_get_option(buffer, 'filetype')
if unwanted_fts[ft] or #ft == 0 then
-- Close the buffer
vim.api.nvim_buf_delete(buffer, {force = true})
end
end
end,
function()
require("nvim-tree.api").tree.open({ focus = false })
end,
}
}
end

+ 32
- 0
.config/nvim/lua/config/plugin/barbar.lua View File

@ -0,0 +1,32 @@
vim.g.barbar_auto_setup = false -- disable auto-setup
return {
auto_hide = 1,
clickable = true,
focus_on_close = 'previous',
icons = {
button = '',
-- Enables / disables diagnostic symbols
diagnostics = {
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = ''},
[vim.diagnostic.severity.WARN] = {enabled = false},
[vim.diagnostic.severity.INFO] = {enabled = false},
[vim.diagnostic.severity.HINT] = {enabled = true},
},
gitsigns = {
added = {enabled = true, icon = '+'},
changed = {enabled = true, icon = '~'},
deleted = {enabled = true, icon = '-'},
},
modified = {button = ''},
pinned = {button = '', filename = true},
},
-- Set the filetypes which barbar will offset itself for
sidebar_filetypes = {
NvimTree = true,
},
}

+ 50
- 0
.config/nvim/lua/config/plugin/catppuccin.lua View File

@ -0,0 +1,50 @@
return {
flavour = "mocha", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
},
transparent_background = false, -- disables setting the background color.
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
dim_inactive = {
enabled = false, -- dims the background color of inactive window
shade = "dark",
percentage = 0.15, -- percentage of the shade to apply to the inactive window
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = { "italic" }, -- Change the style of comments
conditionals = { "italic" },
loops = {}, functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
},
color_overrides = {},
custom_highlights = {},
integrations = {
cmp = true,
gitsigns = true,
treesitter = true,
which_key = true,
alpha=true,
noice = true,
mason = true,
neogit = true,
nvimtree = true,
mini = {
enabled = true,
indentscope_color = "",
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
}

+ 12
- 0
.config/nvim/lua/config/plugin/copilot.lua View File

@ -0,0 +1,12 @@
return function ()
-- require("copilot").setup({
-- auto_refresh = false,
-- suggestion = {
-- enabled = false,
-- auto_trigger = false,
-- },
-- panel = {
-- enabled = false
-- },
-- })
end

+ 40
- 0
.config/nvim/lua/config/plugin/dashboard.lua View File

@ -0,0 +1,40 @@
local function setup()
local db = require("dashboard");
local art = require("art")
local utils = require("utils")
db.setup({
theme = 'hyper',
config = {
header = art.skull_bent,
week_header = {
append = true
},
shortcut = {
{ desc = '󰊳 Update', group = '@property', action = 'Lazy update', key = 'u' },
{
icon = '',
icon_hl = '@variable',
desc = 'Files',
group = 'Label',
action = 'Telescope find_files',
key = 'f',
},
{
desc = ' Apps',
group = 'DiagnosticHint',
action = 'Telescope app',
key = 'a',
},
{
desc = ' dotfiles',
group = 'Number',
action = 'Telescope dotfiles',
key = 'd',
},
},
},
})
end
return setup;

+ 4
- 0
.config/nvim/lua/config/plugin/harpoon2.lua View File

@ -0,0 +1,4 @@
return function ()
local harpoon = require('harpoon')
harpoon:setup({})
end

+ 7
- 0
.config/nvim/lua/config/plugin/ibl.lua View File

@ -0,0 +1,7 @@
return {
exclude = {
filetypes = {
"dashboard"
}
}
}

+ 0
- 0
.config/nvim/lua/config/plugin/init.lua View File


+ 279
- 0
.config/nvim/lua/config/plugin/lualine.lua View File

@ -0,0 +1,279 @@
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
-- Color table for highlights
-- stylua: ignore
local colors = {
bg = '#202328',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67',
}
local function show_macro_recording()
local recording_register = vim.fn.reg_recording()
if recording_register == "" then
return ""
else
return "Recording @" .. recording_register
end
end
local conditions = {
buffer_not_empty = function()
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
end,
hide_in_width = function()
return vim.fn.winwidth(0) > 80
end,
check_git_workspace = function()
local filepath = vim.fn.expand('%:p:h')
local gitdir = vim.fn.finddir('.git', filepath .. ';')
return gitdir and #gitdir > 0 and #gitdir < #filepath
end,
}
-- Config
local config = function()
local config = {
extensions = {'nvim-tree', 'nvim-dap-ui', 'aerial'},
options = {
-- Disable lualine in nvim-tree
-- disabled_filetypes = { 'packer', 'NvimTree' },
-- Disable sections and component separators
component_separators = '',
section_separators = '',
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we
-- are just setting default looks o statusline
normal = { c = { fg = colors.fg, bg = colors.bg } },
inactive = { c = { fg = colors.fg, bg = colors.bg } },
},
},
sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
-- These will be filled later
lualine_c = {},
lualine_x = {},
},
inactive_sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
lualine_c = {},
lualine_x = {},
},
}
-- Inserts a component in lualine_c at left section
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
-- Inserts a component in lualine_x at right section
local function ins_right(component)
table.insert(config.sections.lualine_x, component)
end
ins_left {
function()
return ''
end,
color = { fg = colors.blue }, -- Sets highlighting of component
padding = { left = 0, right = 1 }, -- We don't need space before this
}
ins_left {
-- mode component
function()
return ''
end,
color = function()
-- auto change color according to neovims mode
local mode_color = {
n = colors.red,
i = colors.green,
v = colors.blue,
[''] = colors.blue,
V = colors.blue,
c = colors.magenta,
no = colors.red,
s = colors.orange,
S = colors.orange,
[''] = colors.orange,
ic = colors.yellow,
R = colors.violet,
Rv = colors.violet,
cv = colors.red,
ce = colors.red,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.red,
t = colors.red,
}
return { fg = mode_color[vim.fn.mode()] }
end,
padding = { right = 1 },
}
ins_left {
-- filesize component
'filesize',
cond = conditions.buffer_not_empty,
}
ins_left {
'macro-recording',
fmt = show_macro_recording,
}
ins_left {
'filename',
cond = conditions.buffer_not_empty,
color = { fg = colors.magenta, gui = 'bold' },
}
ins_left { 'location' }
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
ins_left {
'diagnostics',
sources = { 'nvim_diagnostic' },
symbols = { error = '', warn = '', info = '' },
diagnostics_color = {
color_error = { fg = colors.red },
color_warn = { fg = colors.yellow },
color_info = { fg = colors.cyan },
},
}
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left {
function()
return '%='
end,
}
ins_left {
-- Lsp server name .
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = ' LSP:',
color = { fg = '#ffffff', gui = 'bold' },
}
ins_right {
'copilot',
show_colors = true,
show_loading = true
}
-- Add components to right sections
ins_right {
'o:encoding', -- option component same as &encoding in viml
fmt = string.upper, -- I'm not sure why it's upper case either ;)
cond = conditions.hide_in_width,
color = { fg = colors.green, gui = 'bold' },
}
ins_right {
'fileformat',
fmt = string.upper,
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
color = { fg = colors.green, gui = 'bold' },
}
ins_right {
'branch',
icon = '',
color = { fg = colors.violet, gui = 'bold' },
}
ins_right {
'diff',
-- Is it me or the symbol for modified us really weird
symbols = { added = '', modified = '󰝤 ', removed = '' },
diff_color = {
added = { fg = colors.green },
modified = { fg = colors.orange },
removed = { fg = colors.red },
},
cond = conditions.hide_in_width,
}
ins_right {
function()
return ''
end,
color = { fg = colors.blue },
padding = { left = 1 },
}
local lualine = require("lualine");
vim.api.nvim_create_autocmd("RecordingEnter", {
callback = function()
lualine.refresh({
place = { "statusline" },
})
end,
})
vim.api.nvim_create_autocmd("RecordingLeave", {
callback = function()
-- This is going to seem really weird!
-- Instead of just calling refresh we need to wait a moment because of the nature of
-- `vim.fn.reg_recording`. If we tell lualine to refresh right now it actually will
-- still show a recording occuring because `vim.fn.reg_recording` hasn't emptied yet.
-- So what we need to do is wait a tiny amount of time (in this instance 50 ms) to
-- ensure `vim.fn.reg_recording` is purged before asking lualine to refresh.
local timer = vim.loop.new_timer()
timer:start(
50,
0,
vim.schedule_wrap(function()
lualine.refresh({
place = { "statusline" },
})
end)
)
end,
})
lualine.setup(config)
end
return config

+ 14
- 0
.config/nvim/lua/config/plugin/mini.lua View File

@ -0,0 +1,14 @@
return function ()
require('mini.surround').setup({})
require('mini.splitjoin').setup({})
require('mini.trailspace').setup({})
require('mini.comment').setup({})
require('mini.align').setup({})
vim.api.nvim_create_autocmd("Filetype", {
pattern = "dashboard",
callback = function()
vim.b.minitrailspace_disable = true
end
})
end

+ 3
- 0
.config/nvim/lua/config/plugin/neodev.lua View File

@ -0,0 +1,3 @@
return {
library = { plugins = { "nvim-dap-ui" }, types = true },
}

+ 18
- 0
.config/nvim/lua/config/plugin/noice.lua View File

@ -0,0 +1,18 @@
return {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
}

+ 8
- 0
.config/nvim/lua/config/plugin/null-ls.lua View File

@ -0,0 +1,8 @@
return function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
},
})
end

+ 110
- 0
.config/nvim/lua/config/plugin/nvim-cmp.lua View File

@ -0,0 +1,110 @@
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
return function()
local cmp = require'cmp'
local snippy = require("snippy")
local lspkind = require('lspkind')
cmp.setup({
snippet = {
expand = function(args)
require('snippy').expand_snippet(args.body) -- For `snippy` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
else
fallback()
end
end,
s = cmp.mapping.confirm({ select = false }),
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }),
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif snippy.can_expand_or_advance() then
snippy.expand_or_advance()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif snippy.can_jump(-1) then
snippy.previous()
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "copilot" },
{ name = 'nvim_lsp' },
{ name = 'snippy' },
{ name = 'vimtex', },
{ name = 'path' },
}, {
{ name = 'buffer' },
}),
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text',
preset = 'codicons',
maxwidth = 50,
ellipsis_char = '...',
before = function (entry, vim_item)
return vim_item
end,
symbol_map = { Copilot = "" },
})
}
})
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' },
}, {
{ name = 'buffer' },
})
})
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
view = {
entries = {name = 'wildmenu', separator = '|' }
},
sources = {
{ name = 'buffer' },
{ name = 'path' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
end

+ 17
- 0
.config/nvim/lua/config/plugin/nvim-devdocs.lua View File

@ -0,0 +1,17 @@
return function ()
require('nvim-devdocs').setup({
float_win = {
relative = "editor",
height = 50,
width = 170,
border = "rounded",
},
wrap = false,
previewer_cmd = "glow",
cmd_args = { "-s", "dark", "-w", "80" },
after_open = function(bufnr)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<Esc>', ':close<CR>', {})
end
})
end

+ 34
- 0
.config/nvim/lua/config/plugin/nvim-tree.lua View File

@ -0,0 +1,34 @@
local function open_nvim_tree(data)
-- buffer is a real file on the disk
local real_file = vim.fn.filereadable(data.file) == 1
if not real_file then
return
end
-- open the tree, find the file but don't focus it
require("nvim-tree.api").tree.open({ focus = false, find_file = true, })
end
vim.api.nvim_create_autocmd({ "BufCreate" }, { callback = open_nvim_tree })
return function ()
require("nvim-tree").setup({
sort_by = "case_sensitive",
update_focused_file = {
enable = true,
update_cwd = true,
},
view = {
adaptive_size = true,
},
diagnostics = {
enable = true,
show_on_dirs = true
},
renderer = {
group_empty = false,
},
})
end

+ 31
- 0
.config/nvim/lua/config/plugin/nvim-ufo.lua View File

@ -0,0 +1,31 @@
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (" 󰁂 %d "):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, { suffix, "MoreMsg" })
return newVirtText
end
return {
fold_virt_text_handler = handler,
}

+ 0
- 0
.config/nvim/lua/config/plugin/session-lens.lua View File


+ 27
- 0
.config/nvim/lua/config/plugin/telescope.lua View File

@ -0,0 +1,27 @@
local options = {
defaults = {
layout_strategy = 'horizontal',
layout_config = {
height = 0.95,
prompt_position = "top"
},
sorting_strategy = "ascending",
color_devicons = true,
mappings = {
},
},
pickers = {
man_pages = {
sections = { "2", "3" }
}
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown {
}
},
},
extensions_list = { "ui-select", "session-lens" },
}
return options

+ 13
- 0
.config/nvim/lua/config/plugin/treesitter.lua View File

@ -0,0 +1,13 @@
return {
ensure_installed = { "html", "json", "c", "cpp", "css", "bash", "lua", "java", "python", "javascript", "latex", "markdown" },
sync_install = false,
auto_install = true,
ignore_install = { },
highlight = {
enable = true,
additional_vim_regex_highlighting = { "markdown" }
},
}

+ 9
- 0
.config/nvim/lua/config/plugin/whichkey.lua View File

@ -0,0 +1,9 @@
return {
opts = {},
register = {
["<leader>f"] = { name = "+file" },
["<leader>s"] = { name = "+search" },
["<leader>g"] = { name = "+git" },
["<leader>l"] = { name = "+lsp" },
}
}

+ 70
- 0
.config/nvim/lua/config/settings.lua View File

@ -0,0 +1,70 @@
-- Enable syntax highlighting
vim.opt.syntax = "on"
-- Autocomplete settings in command mode
vim.opt.wildmenu = true
vim.opt.wildmode = "longest,list,full"
-- Various settings
vim.opt.autoread = true
vim.opt.backspace = { "indent", "eol", "start" }
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.lazyredraw = false
vim.opt.ttyfast = true
vim.opt.wrap = false
vim.opt.backup = false
vim.opt.writebackup = false
vim.opt.swapfile = false
vim.opt.errorbells = false
vim.opt.visualbell = false
vim.opt.history = 500
vim.opt.hidden = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.incsearch = true
vim.opt.timeoutlen = 500
vim.opt.ttimeoutlen = 0
vim.opt.showcmd = true
vim.cmd('nohlsearch')
vim.opt.scrolloff = 5
vim.opt.sidescrolloff = 10
vim.opt.shortmess:append("c")
vim.opt.updatetime = 300
-- Persistent undo settings
vim.opt.undodir = vim.fn.expand('~/.local/share/vim/undo/')
vim.opt.undofile = true
vim.opt.undolevels = 1000
vim.opt.undoreload = 10000
-- Wildignore settings
vim.opt.wildignore:append({"*/tmp/*", "*.so", "*.zip", "*/vendor/bundle/*", "*/node_modules/"})
-- Autocommand to disable auto commenting on new lines
vim.api.nvim_create_autocmd("FileType", {
pattern = "*",
callback = function()
vim.opt_local.formatoptions:remove("c")
vim.opt_local.formatoptions:remove("r")
vim.opt_local.formatoptions:remove("o")
end
})
-- Filetype settings
vim.cmd('filetype off')
vim.cmd('filetype plugin on')
-- Autocomplete settings
vim.opt.completeopt = {"menu", "menuone", "noselect"}
-- Folding settings
vim.o.foldcolumn = '1' -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions,globals"

+ 21
- 0
.config/nvim/lua/config/template.lua View File

@ -0,0 +1,21 @@
local function load_skeleton(filetype)
-- do nothing if no filetype
if filetype == "" then return end
-- glob every directory of 'runtimepath' to search for skeleton/filetype
local skeletons = vim.api.nvim_get_runtime_file('skeleton/' .. filetype, true)
if #skeletons == 0 then return end
-- read last skeleton into 1st line.
vim.api.nvim_command('0read ' .. skeletons[#skeletons])
end
-- augroup setup
vim.api.nvim_create_augroup('aug_skeleton', {clear = true})
vim.api.nvim_create_autocmd('BufNewFile', {
group = 'aug_skeleton',
pattern = '*',
callback = function()
load_skeleton(vim.bo.filetype)
end,
})

+ 39
- 0
.config/nvim/lua/keybinds/barbar.lua View File

@ -0,0 +1,39 @@
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-Tab>', '<Cmd>b#<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Magic buffer-picking mode
map('n', '<C-b>', '<Cmd>BufferPick<CR>', opts)
-- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)

+ 13
- 0
.config/nvim/lua/keybinds/dap.lua View File

@ -0,0 +1,13 @@
local map = vim.api.nvim_set_keymap
-- Toggle breakpoint with F11
vim.api.nvim_set_keymap('n', '<F11>', "<cmd>lua require'dap'.toggle_breakpoint()<CR>", {noremap = true, silent = true})
-- Start debugging with F4
vim.api.nvim_set_keymap('n', '<F4>', "<cmd>lua require'dap'.continue()<CR>", {noremap = true, silent = true})
-- Step into with F7
vim.api.nvim_set_keymap('n', '<F7>', "<cmd>lua require'dap'.step_into()<CR>", {noremap = true, silent = true})
-- Step over with F8
vim.api.nvim_set_keymap('n', '<F8>', "<cmd>lua require'dap'.step_over()<CR>", {noremap = true, silent = true})

+ 37
- 0
.config/nvim/lua/keybinds/editor.lua View File

@ -0,0 +1,37 @@
local map = vim.api.nvim_set_keymap
local opts = {noremap = true}
-- [,w] SAVE
map('', '<Leader>w', ':update<CR>', opts)
-- <VISUAL> [Q] REFORMAT TEXT
map('v', 'Q', 'gq', opts)
-- Clipboard Bindings, Prefixing with leader copies to global
map('n', '<Leader>y', '"+y', opts)
map('n', '<Leader>p', '"+p', opts)
map('v', '<Leader>y', '"+y', opts)
map('v', '<Leader>p', '"+p', opts)
map('n', '<Leader>Y', '"+Y', opts)
map('n', '<Leader>P', '"+P', opts)
map('v', '<Leader>d', '"+d', opts)
map('n', '<Leader>D', '"+D', opts)
-- Find and replace with Ctrl-R
map('v', '<C-r>', '"hy:%s/<C-r>h//g<left><left><left>', opts)
-- Apply . to all selected lines
map('v', '.', ':normal .<CR>', opts)
-- Quit window
map('', '<Leader>qb', ':q<CR>', opts)
-- Quit all without saving
map('', '<Leader>qq', ':qa!<CR>', opts)
-- Quit with escape from man pages
vim.api.nvim_create_autocmd("FileType", {
pattern = "man",
command = "nnoremap <buffer> <Esc> :AerialClose<CR>:bd<CR>"
})

+ 7
- 0
.config/nvim/lua/keybinds/init.lua View File

@ -0,0 +1,7 @@
require('keybinds.editor') -- Vim native keybinds
require('keybinds.telescope') -- Keybinds for use with telescope
require('keybinds.plugin') -- Keybinds for use nvim tree
require('keybinds.barbar')
require('keybinds.terminal')
require('keybinds.dap')

+ 78
- 0
.config/nvim/lua/keybinds/plugin.lua View File

@ -0,0 +1,78 @@
local map = vim.api.nvim_set_keymap
local harpoon = require('harpoon')
-- basic telescope configuration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window" })
map('n', '<Leader>tt', "<Cmd> NvimTreeToggle<CR>", {
noremap = true,
desc = "Toggle directory tree"
})
map('n', '<Leader>tf', "<Cmd> NvimTreeFindFile<CR>", {
noremap = true,
desc = "Go to current file in dir tree"
})
map('n', '<Leader>ta', "<Cmd> AerialToggle<CR>", {
noremap = true,
desc = "Open aerial sidebar"
})
map('n', '<Leader>tn', "<Cmd> AerialNavToggle<CR>", {
noremap = true,
desc = "Toggle aerial navigator"
})
map('n', '<Leader>Z', "<Cmd> lua require('zen-mode').toggle({})<CR>", {
noremap = true,
desc = "Toggle zen mode"
})
map('n', '<Leader>G', "<Cmd> Neogit<CR>", {
noremap = true,
desc = "Open Neogit"
})
map('n', '<Leader>lz', "<Cmd>DevdocsOpenFloat<CR>", {
noremap = true,
desc = "Open devdocs viewer"
})
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window" })
map('n', '<Leader>C', "<Cmd>NoiceDismiss<CR>", {
noremap = true,
desc = "Dismiss noice notifications"
})
map('n', '<Leader>\'', "<Cmd>Telescope fd cwd=~/.config/nvim<CR>", {
noremap = true,
desc = "Edit config file"
})

+ 74
- 0
.config/nvim/lua/keybinds/telescope.lua View File

@ -0,0 +1,74 @@
local map = vim.api.nvim_set_keymap
-- == LSP Pickers ==
map('n', '<Leader>ll', "<Cmd> Telescope <CR>", {
noremap = true,
desc = "Open main telescope picket"
})
map('n', '<C-p>', "<Cmd> Telescope commands <CR>", {
noremap = true,
desc = "Open main telescope picket"
})
map('n', '<Leader><Leader>', "<Cmd>lua vim.lsp.buf.code_action()<CR>", {
noremap = true,
desc = "Resume last pick action"
})
map('n', '<Leader>lf', "<Cmd> lua require('telescope.builtin').find_files()<CR>", {
noremap = true,
desc = "Open File"
})
map('n', '<Leader>ld', "<Cmd> lua require('telescope.builtin').lsp_definitions()<CR>", {
noremap = true,
desc = "Go to definition"
})
map('n', '<Leader>lr', "<Cmd> lua require('telescope.builtin').lsp_references()<CR>", {
noremap = true,
desc = "List to references to word under cursor"
})
map('n', '<Leader>lt', "<Cmd>lua require('telescope.builtin').treesitter()<CR>", {
noremap = true,
desc = "List symbols in workspace with treesitter"
})
map('n', '<Leader>lw', "<Cmd>lua require('telescope.builtin').diagnostics()<CR>", {
noremap = true,
desc = "List diagnostic items"
})
map('n', '<Leader>lm', "<Cmd>lua require('telescope.builtin').man_pages()<CR>", {
noremap = true,
desc = "List view manpage"
})
map('n', '<Leader><Space>', "<Cmd>lua vim.lsp.buf.code_action()<CR>", {
noremap = true,
desc = "Pick code action"
})
map("v", "<Leader><Space>", "<Cmd>'<,'>lua vim.lsp.buf.code_action()<CR>", {
noremap = true,
desc = "Pick code action for selection"
})
map('n', '<Leader>ls', "<Cmd>lua require('telescope.builtin').live_grep()<CR>", {
noremap = true,
desc = "Live search"
})
-- == Misc Keybinds ==
map('n', '<Leader>b', "<Cmd>lua require('telescope.builtin').buffers()<CR>", {
noremap = true,
desc = "List and pick buffers"
})
map('n', '<Leader>S', "<Cmd>Telescope persisted<CR>", {
noremap = true,
desc = "Select a persisted session"
})

+ 25
- 0
.config/nvim/lua/keybinds/terminal.lua View File

@ -0,0 +1,25 @@
local map = vim.api.nvim_set_keymap
map('n', '<C-t>', "<Cmd>ToggleTerm direction=horizontal<CR>", {
noremap = true,
desc = "Create terminal split"
})
map('n', '<C-s>', "<Cmd>ToggleTerm direction=float<CR>", {
noremap = true,
desc = "Toggle terminal floating"
})
local trim_spaces = true
vim.keymap.set("v", "<Leader>s", function()
require("toggleterm").send_lines_to_terminal("visual_selection", trim_spaces, { args = vim.v.count })
end)
vim.api.nvim_create_autocmd("TermOpen", {
pattern = "term://*",
callback = function()
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
end,
})

+ 53
- 0
.config/nvim/lua/lsp.lua View File

@ -0,0 +1,53 @@
-- === Initialize LSP Servers ===
-- For a list of LSP Servers and documentation:
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local lspconfig = require'lspconfig'
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local configs = require("config.lsp").lspconfigs
local on_attach = require("config.lsp").lsp_onattach
local utils = require("utils")
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
-- LSP diagnostics
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
signs = true,
virtual_text = false,
severity_sort = true,
})
local signs = {
Error = "",
Warning = "",
Hint = "",
Information = ""
}
for type, icon in pairs(signs) do
local hl = "LspDiagnosticsSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
-- LSP diagnostics
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
signs = true,
virtual_text = true,
severity_sort = true,
})
for k, v in pairs(configs) do
lspconfig[k].setup(
utils.mergeTables(v, {
on_attach = on_attach,
capabilities = capabilities
}))
end
vim.api.nvim_exec_autocmds("FileType", {})

+ 311
- 0
.config/nvim/lua/plugins.lua View File

@ -0,0 +1,311 @@
return {
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = require("config.plugin.catppuccin"),
},
{
"goolord/alpha-nvim",
cond = vim.g.vscode == nil,
dependencies = {
"nvim-tree/nvim-web-devicons",
"nvim-telescope/telescope.nvim",
},
event = "VimEnter",
config = require("config.plugin.alpha"),
},
{
"romgrk/barbar.nvim",
dependencies = {
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
},
init = function()
vim.g.barbar_auto_setup = false
end,
opts = {},
version = "^1.0.0", -- optional: only update when a new 1.x version is released
},
{
"nvim-lualine/lualine.nvim",
dependencies = {
"catppuccin/nvim",
"nvim-tree/nvim-web-devicons",
'AndreM222/copilot-lualine',
"zbirenbaum/copilot.lua",
},
config = require("config.plugin.lualine"),
},
{
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
opts = {},
},
{
"lewis6991/gitsigns.nvim",
opts = {},
},
{
"lukas-reineke/headlines.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
opts = {},
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = require("config.plugin.harpoon2"),
},
{
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"romgrk/barbar.nvim",
"nvim-tree/nvim-web-devicons",
},
config = require("config.plugin.nvim-tree"),
},
{
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
},
},
{
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
config = function()
local settings = require("config.plugin.whichkey")
require("which-key").setup(settings.opts)
require("which-key").register(settings.register)
end,
},
{
"folke/zen-mode.nvim",
opts = {},
},
{
"gauteh/vim-cppman",
},
{
"lervag/vimtex",
},
{
"christoomey/vim-tmux-navigator",
},
{
"echasnovski/mini.nvim",
version = '*',
config = require("config.plugin.mini")
},
{
"tpope/vim-surround",
},
{
"jose-elias-alvarez/null-ls.nvim",
config = require("config.plugin.null-ls"),
},
{
"williamboman/mason.nvim",
config = true,
dependencies = {
"neovim/nvim-lspconfig",
},
},
{
"neovim/nvim-lspconfig",
dependencies = {
"folke/neodev.nvim"
}
},
{
"williamboman/mason-lspconfig.nvim",
opts = {
ensure_installed = require("config.lsp").mason_servers
},
dependencies = {
"folke/neodev.nvim"
}
},
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
"neovim/nvim-lspconfig",
},
event = { "BufRead", "BufWinEnter", "BufNewFile" },
opts = require("config.plugin.treesitter"),
},
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
"nvim-telescope/telescope.nvim",
},
config = true,
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-ui-select.nvim",
"rmagatti/session-lens",
},
config = function()
local telescope = require("telescope")
local config = require("config.plugin.telescope")
for _, ext in ipairs(config.extensions_list) do
telescope.load_extension(ext)
end
telescope.setup(config)
end,
},
{
"folke/noice.nvim",
event = "VeryLazy",
opts = require("config.plugin.noice"),
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
},
{
"neomutt/neomutt.vim",
},
{
"stevearc/aerial.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons",
},
config = require("config.plugin.aerial")
},
{
"dcampos/nvim-snippy",
dependencies = {
"honza/vim-snippets",
},
opts = {},
},
{
"kevinhwang91/nvim-ufo",
dependencies = {
"kevinhwang91/promise-async",
"neovim/nvim-lspconfig",
},
opts = require("config.plugin.nvim-ufo"),
},
{
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
config = function()
require("rest-nvim").setup({})
end,
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = require("config.plugin.copilot")
},
{
"zbirenbaum/copilot-cmp",
dependencies = {
"zbirenbaum/copilot.lua",
},
config = true,
},
{
"hrsh7th/nvim-cmp",
config = require("config.plugin.nvim-cmp"),
dependencies = {
"onsails/lspkind.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp-signature-help",
"dcampos/cmp-snippy",
"micangl/cmp-vimtex",
"dcampos/nvim-snippy",
},
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = require("config.plugin.ibl"),
},
{
"akinsho/toggleterm.nvim",
version = "*",
config = true,
},
{
"folke/neodev.nvim",
opts = require("config.plugin.neodev")
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"pocco81/dap-buddy.nvim",
"mfussenegger/nvim-dap",
},
opts = {}
},
{
"luckasRanarison/nvim-devdocs",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter",
},
config = require("config.plugin.nvim-devdocs")
},
{
'rmagatti/auto-session',
config = require("config.plugin.auto-session")
},
{
'rmagatti/session-lens',
dependencies = {
'rmagatti/auto-session',
'nvim-telescope/telescope.nvim'
},
opts = {}
},
{
"RRethy/vim-illuminate",
},
{
"petertriho/nvim-scrollbar",
opts = {}
},
{
"kevinhwang91/nvim-hlslens",
config = function()
require("scrollbar.handlers.search").setup({
override_lens = function() end,
})
end,
}
}

+ 109
- 0
.config/nvim/lua/quotes.lua View File

@ -0,0 +1,109 @@
local M = {}
M.simple_einstein = {
[["Everything should be made as simple as possible, but not simpler."]],
[[ -- Albert Einstein]]
}
M.honesty = {
[[Honesty pays, but it doesn't seem to pay enough to suit some people.]],
[[ -- F. M. Hubbard]],
}
M.autonomy = {
[[Cult of Aloneness: ]],
[[ The need for autonomy at all costs, usually at the expense of ]],
[[long-term relationships. Often brought about by overly high ]],
[[expectations of others. ]],
[[ -- Douglas Coupland, "Generation X: Tales for an Accelerated ]],
[[ Culture" ]],
}
M.evil = {
[[No evil can happen to a good man. ]],
[[ -- Plato ]],
}
M.violence = {
[[Vulcans do not approve of violence. ]],
[[ -- Spock, "Journey to Babel", stardate 3842.4 ]],
}
M.fortune_cookie = {
[[ *** ]],
[[ ******* ]],
[[ ********* ]],
[[ ****** Confucious say: "Is stuffy inside fortune cookie." ]],
[[ ******* ]],
[[ *** ]],
}
M.god = {
[[God was satisfied with his own work, and that is fatal. ]],
[[ -- Samuel Butler ]],
}
M.maintenance = {
[[no maintenance: ]],
[[ Impossible to fix. ]],
}
M.coordinates = {
[[It is not that polar co-ordinates are complicated, it is simply ]],
[[that cartesian co-ordinates are simpler than they have a right to be. ]],
[[ -- Kleppner & Kolenhow, "An Introduction to Mechanics" ]],
}
M.byte = {
[[I have not yet begun to byte! ]],
}
M.fanatic = {
[[A fanatic is a person who can't change his mind and won't change the subject. ]],
[[ -- Winston Churchill ]],
}
M.lovelace = {
[[The Analytical Engine weaves Algebraical patterns just as the Jacquard ]],
[[loom weaves flowers and leaves. ]],
[[ -- Ada Augusta, Countess of Lovelace, the first programmer ]],
}
M.dopeler = {
[[Dopeler effect: ]],
[[ The tendency of stupid ideas to seem smarter when they come at you ]],
[[rapidly. ]],
}
M.change = {
[[Subject to change without notice. ]],
}
M.doubt = {
[[Doubt is not a pleasant condition, but certainty is absurd. ]],
[[ -- Voltaire ]],
}
M.guest = {
[[Nobody can be as agreeable as an uninvited guest. ]],
}
M.perl = {
[[Of course, I reserve the right to make wholly stupid changes to Perl ]],
[[if I think they improve the language. :-) ]],
[[ -- Larry Wall in <199704251604.JAA27300@wall.org> ]],
}
return M

+ 62
- 0
.config/nvim/lua/utils.lua View File

@ -0,0 +1,62 @@
local M = {}
-- create colour gradient from hex values
M.create_gradient = function(start, finish, steps)
local r1, g1, b1 =
tonumber("0x" .. start:sub(2, 3)), tonumber("0x" .. start:sub(4, 5)), tonumber("0x" .. start:sub(6, 7))
local r2, g2, b2 =
tonumber("0x" .. finish:sub(2, 3)), tonumber("0x" .. finish:sub(4, 5)), tonumber("0x" .. finish:sub(6, 7))
local r_step = (r2 - r1) / steps
local g_step = (g2 - g1) / steps
local b_step = (b2 - b1) / steps
local gradient = {}
for i = 1, steps do
local r = math.floor(r1 + r_step * i)
local g = math.floor(g1 + g_step * i)
local b = math.floor(b1 + b_step * i)
table.insert(gradient, string.format("#%02x%02x%02x", r, g, b))
end
return gradient
end
M.mergeTables = function(t1, t2)
for k, v in pairs(t2) do
t1[k] = v
end
return t1
end
M.getTableKeys = function(tbl)
local keys = {}
for key in pairs(tbl) do
table.insert(keys, key)
end
return keys
end
-- string padding
M.pad_string = function(str, len, align)
local str_len = #str
if str_len >= len then
return str
end
local pad_len = len - str_len
local pad = string.rep(" ", pad_len)
if align == "left" then
return str .. pad
elseif align == "right" then
return pad .. str
elseif align == "center" then
local left_pad = math.floor(pad_len / 2)
local right_pad = pad_len - left_pad
return string.rep(" ", left_pad) .. str .. string.rep(" ", right_pad)
end
end
return M

+ 0
- 1
.config/nvim/plugin/YCM.vim View File

@ -1 +0,0 @@
nnoremap <leader>gl :YcmCompleter GoToDeclaration<CR>

+ 0
- 138
.config/nvim/plugin/coc.vim View File

@ -1,138 +0,0 @@
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" Coc Prettier
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>

+ 0
- 10
.config/nvim/plugin/ctrlp.vim View File

@ -1,10 +0,0 @@
" Use ripgrep if available
if executable('rg')
set grepprg=rg\ --color=never
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': [],
\ 'AcceptSelection("t")': ['<cr>'],
\ }
let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""'
let g:ctrlp_use_caching = 1
endif

+ 0
- 33
.config/nvim/plugin/lightline-bufferline.vim View File

@ -1,33 +0,0 @@
set showtabline=2
set guioptions-=e
let g:lightline#bufferline#show_number = 2
let g:lightline#bufferline#shorten_path = 0
let g:lightline#bufferline#unnamed = '[No Name]'
let g:lightline#bufferline#enable_nerdfont = 1
let g:lightline#bufferline#modified = ' *'
let g:lightline#bufferline#read_only = ' '
" Movement bindings
nmap <Leader>1 <Plug>lightline#bufferline#go(1)
nmap <Leader>2 <Plug>lightline#bufferline#go(2)
nmap <Leader>3 <Plug>lightline#bufferline#go(3)
nmap <Leader>4 <Plug>lightline#bufferline#go(4)
nmap <Leader>5 <Plug>lightline#bufferline#go(5)
nmap <Leader>6 <Plug>lightline#bufferline#go(6)
nmap <Leader>7 <Plug>lightline#bufferline#go(7)
nmap <Leader>8 <Plug>lightline#bufferline#go(8)
nmap <Leader>9 <Plug>lightline#bufferline#go(9)
nmap <Leader>0 <Plug>lightline#bufferline#go(10)
" Deletion Bindings
nmap <Leader>c1 <Plug>lightline#bufferline#delete(1)
nmap <Leader>c2 <Plug>lightline#bufferline#delete(2)
nmap <Leader>c3 <Plug>lightline#bufferline#delete(3)
nmap <Leader>c4 <Plug>lightline#bufferline#delete(4)
nmap <Leader>c5 <Plug>lightline#bufferline#delete(5)
nmap <Leader>c6 <Plug>lightline#bufferline#delete(6)
nmap <Leader>c7 <Plug>lightline#bufferline#delete(7)
nmap <Leader>c8 <Plug>lightline#bufferline#delete(8)
nmap <Leader>c9 <Plug>lightline#bufferline#delete(9)
nmap <Leader>c0 <Plug>lightline#bufferline#delete(10)

+ 0
- 53
.config/nvim/plugin/lightline.vim View File

@ -1,53 +0,0 @@
let g:lightline = {
\ 'colorscheme': 'material_vim',
\ 'active': {
\ 'right': [ [ 'lineinfo' ], [ 'percent', 'wordcount' ], [ 'fileformat', 'fileencoding', 'filetype' ] ],
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ],
\ },
\ 'component_function': {
\ 'wordcount': 'WordCount',
\ },
\ 'tabline': {
\ 'left': [ ['buffers'] ],
\ 'right': [ ['close'] ],
\ },
\ 'component_expand': {
\ 'buffers': 'lightline#bufferline#buffers',
\ },
\ 'component_type': {
\ 'buffers': 'tabsel',
\ }
\ }
function! WordCount()
let currentmode = mode()
if !exists("g:lastmode_wc")
let g:lastmode_wc = currentmode
endif
" if we modify file, open a new buffer, be in visual ever, or switch modes
" since last run, we recompute.
if &modified || !exists("b:wordcount") || currentmode =~? '\c.*v' || currentmode != g:lastmode_wc
let g:lastmode_wc = currentmode
let l:old_position = getpos('.')
let l:old_status = v:statusmsg
execute "silent normal g\<c-g>"
if v:statusmsg == "--No lines in buffer--"
let b:wordcount = 0
else
let s:split_wc = split(v:statusmsg)
if index(s:split_wc, "Selected") < 0
let b:wordcount = str2nr(s:split_wc[11])
else
let b:wordcount = str2nr(s:split_wc[5])
endif
let v:statusmsg = l:old_status
endif
call setpos('.', l:old_position)
return b:wordcount
else
return b:wordcount
endif
endfunction
let g:lightline#trailing_whitespace#indicator = ''

+ 0
- 9
.config/nvim/plugin/nerdcommenter.vim View File

@ -1,9 +0,0 @@
let g:NERDCreateDefaultMappings = 1
let g:NERDSpaceDelims = 1
let g:NERDCompactSexyComs = 1
let g:NERDDefaultAlign = 'left'
let g:NERDAltDelims_java = 1
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
let g:NERDCommentEmptyLines = 1
let g:NERDTrimTrailingWhitespace = 1
let g:NERDToggleCheckAllLines = 1

+ 0
- 4
.config/nvim/plugin/nerdtree.vim View File

@ -1,4 +0,0 @@
" Toggle nerdtree with F10
map <F10> :NERDTreeToggle<CR>
" Current file in nerdtree
map <F9> :NERDTreeFind<CR>

+ 0
- 59
.config/nvim/plugin/plugins.vim View File

@ -1,59 +0,0 @@
call plug#begin('~/.local/share/vim/plugged')
" Look & Feel
Plug 'kaicataldo/material.vim'
Plug 'itchyny/lightline.vim'
Plug 'mengelbrecht/lightline-bufferline'
Plug 'lambdalisue/nerdfont.vim'
" Addons
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-surround'
Plug 'jremmen/vim-ripgrep'
Plug 'blarghmatey/split-expander'
Plug 'sheerun/vim-polyglot'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/goyo.vim'
Plug 'vim-scripts/indentpython.vim'
Plug 'preservim/nerdcommenter'
Plug 'mileszs/ack.vim'
Plug 'yegappan/taglist'
"Plug 'puremourning/vimspector'
Plug 'lervag/vimtex'
Plug 'gu-fan/riv.vim'
Plug 'isene/hyperlist.vim'
Plug 'neomutt/neomutt.vim'
Plug 'VebbNix/lf-vim'
" Tmux integration
Plug 'benmills/vimux'
Plug 'christoomey/vim-tmux-navigator'
" Neuron
Plug 'oberblastmeister/neuron.nvim', { 'branch' : 'unstable' }
Plug 'nvim-lua/popup.nvim'
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
" File system navigation
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
" OCS Yank PLugin for use with Blink Shell
Plug 'ojroques/vim-oscyank'
" Syntax highlighting
Plug 'joelbeedle/pseudo-syntax'
Plug 'rhysd/vim-wasm'
Plug 'elzr/vim-json'
Plug 'tpope/vim-markdown'
Plug 'pangloss/vim-javascript'
Plug 'leafgarland/typescript-vim'
Plug 'vim-scripts/cool.vim'
Plug 'justinmk/vim-syntax-extra'
Plug 'arrufat/vala.vim'
Plug 'Shirk/vim-gas'
call plug#end()

+ 0
- 9
.config/nvim/plugin/vim-betterwhitespace.vim View File

@ -1,9 +0,0 @@
let g:better_whitespace_enabled=0
let g:better_whitespace_ctermcolor='LightRed'
let g:better_whitespace_guicolor='LightRed'
let g:better_whitespace_operator='_s'
let g:strip_whitespace_on_save=1
let g:strip_max_file_size=1000
let g:strip_whitespace_confirm=0
let g:better_whitespace_filetypes_blacklist=['md', 'markdown']

+ 0
- 3
.config/nvim/plugin/vim-ripgrep.vim View File

@ -1,3 +0,0 @@
" bind K to search word under cursor
nnoremap ,K :Rg <C-R><C-W><CR>
cnoreabbrev <expr> Ag ((getcmdtype() is# ':' && getcmdline() is# 'Ag')?('Rg'):('Ag')) " Map Ag to Rg as well

+ 0
- 7
.config/nvim/plugin/vim-test.vim View File

@ -1,7 +0,0 @@
let test#strategy = "vimux"
let test#runners = {}
nmap <silent> <leader>s :TestNearest<CR>
nmap <silent> <leader>t :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>

+ 0
- 9
.config/nvim/plugin/vimux.vim View File

@ -1,9 +0,0 @@
function! RunCommand()
call inputsave()
let replacement = input('Enter Command: ')
call inputrestore()
execute 'call VimuxRunCommand("'.replacement.'")'
endfunction
nnoremap <F5> :call RunCommand()<CR>
nnoremap <F6> :VimuxRunLastCommand<CR>

.config/vim/templates/skeleton.c → .config/nvim/templates/skeleton.c View File


.config/vim/templates/skeleton.cpp → .config/nvim/templates/skeleton.cpp View File


.config/vim/templates/skeleton.h → .config/nvim/templates/skeleton.h View File


.config/vim/templates/skeleton.hpp → .config/nvim/templates/skeleton.hpp View File


.config/vim/templates/skeleton.html → .config/nvim/templates/skeleton.html View File


.config/vim/templates/skeleton.java → .config/nvim/templates/skeleton.java View File


.config/vim/templates/skeleton.py → .config/nvim/templates/skeleton.py View File


.config/vim/templates/skeleton.s → .config/nvim/templates/skeleton.s View File


.config/vim/templates/skeleton.sh → .config/nvim/templates/skeleton.sh View File


.config/vim/templates/skeleton.tex → .config/nvim/templates/skeleton.tex View File


+ 4
- 0
.config/qt5ct/colors/Catppuccin-Mocha.conf View File

@ -0,0 +1,4 @@
[ColorScheme]
active_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ff1e1e2e, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
disabled_colors=#ffa6adc8, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffa6adc8, #ffa6adc8, #ffa6adc8, #ff1e1e2e, #ff11111b, #ff7f849c, #ff89b4fa, #ff45475a, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
inactive_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ffa6adc8, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c

+ 10
- 6
.config/qt5ct/qt5ct.conf View File

@ -1,13 +1,13 @@
[Appearance] [Appearance]
color_scheme_path=/home/yigit/.config/qt5ct/colors/Material Ocean.conf
color_scheme_path=/home/yigit/.config/qt5ct/colors/Catppuccin-Mocha.conf
custom_palette=true custom_palette=true
icon_theme=Tela icon_theme=Tela
standard_dialogs=gtk3
style=Windows
standard_dialogs=default
style=Fusion
[Fonts] [Fonts]
fixed=@Variant(\0\0\0@\0\0\0.\0\x43\0\x61\0s\0k\0\x61\0y\0\x64\0i\0\x61\0\x43\0o\0v\0\x65\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0.\0\x43\0\x61\0s\0k\0\x61\0y\0\x64\0i\0\x61\0\x43\0o\0v\0\x65\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
fixed="CaskaydiaCove Nerd Font,10,-1,5,50,0,0,0,0,0"
general="CaskaydiaCove Nerd Font,10,-1,5,50,0,0,0,0,0"
[Interface] [Interface]
activate_item_on_single_click=1 activate_item_on_single_click=1
@ -25,4 +25,8 @@ underline_shortcut=2
wheel_scroll_lines=3 wheel_scroll_lines=3
[SettingsWindow] [SettingsWindow]
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x4\"\0\0\0/\0\0\aa\0\0\x4-\0\0\x4#\0\0\0\x30\0\0\a`\0\0\x4,\0\0\0\0\0\0\0\0\a\x80\0\0\x4#\0\0\0\x30\0\0\a`\0\0\x4,)"
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\x4#\0\0\0\x30\0\0\a`\0\0\x4,\0\0\0\0\0\x4\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37)"
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

+ 2
- 2
.config/tmux/tmux.conf View File

@ -27,8 +27,8 @@ unbind f
set -g @thumbs-key f set -g @thumbs-key f
# use 256 colors # use 256 colors
set -g default-terminal screen-256color
set -ag terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# Keep plenty of history for scrollback # Keep plenty of history for scrollback
set -g history-limit 50000 set -g history-limit 50000


+ 0
- 565
.config/vim/colors/material.vim View File

@ -1,565 +0,0 @@
" Vim Color File
" Name: material.vim
" Maintainer: https://github.com/kaicataldo/material.vim
" License: The MIT License (MIT)
" === Configuration ===
" Clear any other set colors
highlight clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'material'
let g:material_theme_style = get(g:, 'material_theme_style', 'default')
let g:material_terminal_italics = get(g:, 'material_terminal_italics', 0)
" For backwards compatibility
if (g:material_theme_style == 'dark')
let g:material_theme_style = 'darker'
endif
" === Functions ===
function! s:SetHighlight(group, fg, bg, attr)
let l:attr = a:attr
if !g:material_terminal_italics && l:attr == 'italic'
let l:attr = ''
endif
if empty(l:attr)
let l:attr = 'none'
endif
if !empty(a:fg)
exec 'hi ' . a:group . ' guifg=' . a:fg.gui . ' ctermfg=' . a:fg.cterm
endif
if !empty(a:bg)
exec 'hi ' . a:group . ' guibg=' . a:bg.gui . ' ctermbg=' . a:bg.cterm
endif
if !empty(l:attr)
exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr
endif
endfun
" === Color Definitions ===
" Default colors
set background=dark
let s:bg = { 'gui': '#263238', 'cterm': 'none' }
let s:fg = { 'gui': '#eeffff', 'cterm': 231 }
let s:invisibles = { 'gui': '#65738e', 'cterm': 66 }
let s:comments = { 'gui': '#546e7a', 'cterm': 145 }
let s:caret = { 'gui': '#ffcc00', 'cterm': 220 }
let s:selection = { 'gui': '#2c3b41', 'cterm': 239 }
let s:guides = { 'gui': '#37474f', 'cterm': 17 }
let s:line_numbers = { 'gui': '#37474f', 'cterm': 145 }
let s:line_highlight = { 'gui': '#1a2327', 'cterm': 235 }
let s:white = { 'gui': '#ffffff', 'cterm': 231 }
let s:black = { 'gui': '#000000', 'cterm': 232 }
let s:red = { 'gui': '#ff5370', 'cterm': 203 }
let s:orange = { 'gui': '#f78c6c', 'cterm': 209 }
let s:yellow = { 'gui': '#ffcb6b', 'cterm': 11 }
let s:green = { 'gui': '#c3e88d', 'cterm': 2 } " 186 –– almost perfect match
let s:cyan = { 'gui': '#89ddff', 'cterm': 117 }
let s:blue = { 'gui': '#82aaff', 'cterm': 111 }
let s:paleblue = { 'gui': '#b2ccd6', 'cterm': 152 }
let s:purple = { 'gui': '#c792ea', 'cterm': 176 }
let s:brown = { 'gui': '#c17e70', 'cterm': 137 }
let s:pink = { 'gui': '#f07178', 'cterm': 204 }
let s:violet = { 'gui': '#bb80b3', 'cterm': 139 }
" Theme-specific color overrides
if g:material_theme_style == 'palenight' || g:material_theme_style == 'palenight-community'
let s:bg = { 'gui': '#292d3e', 'cterm': 'none' }
let s:fg = { 'gui': '#a6accd', 'cterm': 146 }
let s:invisibles = { 'gui': '#4e5579', 'cterm': 60 }
let s:comments = { 'gui': '#676e95', 'cterm': 60 }
let s:selection = { 'gui': '#343b51', 'cterm': 60 }
let s:guides = { 'gui': '#4e5579', 'cterm': 60 }
let s:line_numbers = { 'gui': '#3a3f58', 'cterm': 60 }
let s:line_highlight = { 'gui': '#1c1f2b', 'cterm': 234 }
elseif g:material_theme_style == 'darker' || g:material_theme_style == 'darker-community'
let s:bg = { 'gui': '#212121', 'cterm': 'none' }
let s:fg = { 'gui': '#eeffff', 'cterm': 231 }
let s:invisibles = { 'gui': '#65737e', 'cterm': 66 }
let s:comments = { 'gui': '#545454', 'cterm': 59 }
let s:selection = { 'gui': '#2c2c2c', 'cterm': 237 }
let s:guides = { 'gui': '#424242', 'cterm': 0 }
let s:line_numbers = { 'gui': '#424242', 'cterm': 0 }
let s:line_highlight = { 'gui': '#171717', 'cterm': 0 }
elseif g:material_theme_style == 'ocean' || g:material_theme_style == 'ocean-community'
let s:bg = { 'gui': '#0f111a', 'cterm': 'none' }
let s:fg = { 'gui': '#8f93a2', 'cterm': 103 }
let s:invisibles = { 'gui': '#80869e', 'cterm': 103 }
let s:comments = { 'gui': '#464b5d', 'cterm': 60 }
let s:selection = { 'gui': '#1f2233', 'cterm': 60 }
let s:guides = { 'gui': '#3b3f51', 'cterm': 17 }
let s:line_numbers = { 'gui': '#3b3f51', 'cterm': 60 }
let s:line_highlight = { 'gui': '#0a0c12', 'cterm': 0 }
elseif g:material_theme_style == 'lighter' || g:material_theme_style == 'lighter-community'
set background=light
let s:bg = { 'gui': '#fafafa', 'cterm': 'none' }
let s:fg = { 'gui': '#90a4ae', 'cterm': 109 }
let s:invisibles = { 'gui': '#e7eaec', 'cterm': 189 }
let s:comments = { 'gui': '#90a4ae', 'cterm': 109 }
let s:caret = { 'gui': '#272727', 'cterm': 0 }
let s:selection = { 'gui': '#ebf4f3', 'cterm': 254 }
let s:guides = { 'gui': '#b0bec5', 'cterm': 146 }
let s:line_numbers = { 'gui': '#cfd8dc', 'cterm': 188 }
let s:line_highlight = { 'gui': '#ecf0f1', 'cterm': 253 }
let s:white = { 'gui': '#ffffff', 'cterm': 231 }
let s:black = { 'gui': '#000000', 'cterm': 0 }
let s:red = { 'gui': '#e53935', 'cterm': 160 }
let s:orange = { 'gui': '#f76d47', 'cterm': 202 }
let s:yellow = { 'gui': '#ffb62c', 'cterm': 214 }
let s:green = { 'gui': '#91b859', 'cterm': 107 }
let s:cyan = { 'gui': '#39adb5', 'cterm': 37 }
let s:blue = { 'gui': '#6182b8', 'cterm': 67 }
let s:paleblue = { 'gui': '#8796b0', 'cterm': 103 }
let s:purple = { 'gui': '#7c4dff', 'cterm': 99 }
let s:brown = { 'gui': '#c17e70', 'cterm': 137 }
let s:pink = { 'gui': '#ff5370', 'cterm': 203 }
let s:violet = { 'gui': '#945eb8', 'cterm': 97 }
endif
" Defined globally so that the Airline theme has access
let g:material_colorscheme_map = {}
let g:material_colorscheme_map.bg = s:bg
let g:material_colorscheme_map.fg = s:fg
let g:material_colorscheme_map.invisibles = s:invisibles
let g:material_colorscheme_map.comments = s:comments
let g:material_colorscheme_map.caret = s:caret
let g:material_colorscheme_map.selection = s:selection
let g:material_colorscheme_map.guides = s:guides
let g:material_colorscheme_map.line_numbers = s:line_numbers
let g:material_colorscheme_map.line_highlight = s:line_highlight
let g:material_colorscheme_map.white = s:white
let g:material_colorscheme_map.black = s:black
let g:material_colorscheme_map.red = s:red
let g:material_colorscheme_map.orange = s:orange
let g:material_colorscheme_map.yellow = s:yellow
let g:material_colorscheme_map.green = s:green
let g:material_colorscheme_map.cyan = s:cyan
let g:material_colorscheme_map.blue = s:blue
let g:material_colorscheme_map.paleblue = s:paleblue
let g:material_colorscheme_map.purple = s:purple
let g:material_colorscheme_map.brown = s:brown
let g:material_colorscheme_map.pink = s:pink
let g:material_colorscheme_map.violet = s:violet
" === Highlights ===
" Vim Editor
call s:SetHighlight('ColorColumn', '', s:invisibles, '')
call s:SetHighlight('Cursor', s:bg, s:caret, '')
call s:SetHighlight('CursorColumn', '', s:line_highlight, '')
call s:SetHighlight('CursorLine', '', s:line_highlight, '')
call s:SetHighlight('CursorLineNr', s:comments, '', '')
call s:SetHighlight('Directory', s:blue, '', '')
call s:SetHighlight('DiffAdd', s:green, s:bg, '')
call s:SetHighlight('DiffDelete', s:red, s:bg, '')
call s:SetHighlight('DiffChange', s:yellow, s:bg, '')
call s:SetHighlight('DiffText', s:orange, s:bg, '')
call s:SetHighlight('ErrorMsg', s:bg, s:red, 'bold')
call s:SetHighlight('FoldColumn', s:line_numbers, s:bg, '')
call s:SetHighlight('Folded', s:brown, s:bg, 'bold')
call s:SetHighlight('LineNr', s:line_numbers, '', '')
call s:SetHighlight('MatchParen', s:comments, s:cyan, 'bold')
call s:SetHighlight('ModeMsg', s:green, '', '')
call s:SetHighlight('MoreMsg', s:green, '', '')
call s:SetHighlight('NonText', s:comments, '', '')
call s:SetHighlight('Normal', s:fg, s:bg, '')
call s:SetHighlight('Pmenu', s:fg, s:selection, '')
call s:SetHighlight('PmenuSel', s:bg, s:cyan, '')
call s:SetHighlight('PmenuSbar', '', s:selection, '')
call s:SetHighlight('PmenuThumb', '', s:comments, '')
call s:SetHighlight('Question', s:blue, '', '')
call s:SetHighlight('IncSearch', s:white, s:comments, 'none')
call s:SetHighlight('Search', s:white, s:comments, 'none')
call s:SetHighlight('SignColumn', s:fg, s:bg, '')
call s:SetHighlight('SpecialKey', s:comments, '', '')
call s:SetHighlight('SpellCap', s:blue, '', 'undercurl')
call s:SetHighlight('SpellBad', s:red, '', 'undercurl')
call s:SetHighlight('StatusLine', s:fg, s:selection, '')
call s:SetHighlight('StatusLineNC', s:comments, s:selection, '')
call s:SetHighlight('StatusLineTerm', s:bg, s:green, '')
call s:SetHighlight('StatusLineTermNC', s:bg, s:green, '')
call s:SetHighlight('TabLine', s:fg, s:line_numbers, '')
call s:SetHighlight('TabLineFill', s:fg, s:selection, '')
call s:SetHighlight('TabLineSel', s:bg, s:cyan, '')
call s:SetHighlight('Title', s:green, '', '')
call s:SetHighlight('VertSplit', s:comments, '', '')
call s:SetHighlight('Visual', s:fg, s:selection, '')
call s:SetHighlight('WarningMsg', s:red, '', '')
call s:SetHighlight('WildMenu', s:bg, s:cyan, '')
" Syntax
call s:SetHighlight('Comment', s:comments, '', 'italic')
call s:SetHighlight('Conceal', s:brown, s:bg, '')
call s:SetHighlight('Constant', s:orange, '', '')
call s:SetHighlight('String', s:green, '', '')
call s:SetHighlight('Character', s:green, '', '')
call s:SetHighlight('Identifier', s:red, '', '')
call s:SetHighlight('Function', s:blue, '', '')
call s:SetHighlight('Statement', s:purple, '', '')
call s:SetHighlight('Operator', s:cyan, '', '')
call s:SetHighlight('PreProc', s:cyan, '', '')
call s:SetHighlight('Include', s:blue, '', '')
call s:SetHighlight('Define', s:purple, '', '')
call s:SetHighlight('Macro', s:purple, '', '')
call s:SetHighlight('Type', s:yellow, '', '')
call s:SetHighlight('Structure', s:cyan, '', '')
call s:SetHighlight('Special', s:violet, '', '')
call s:SetHighlight('Underlined', s:blue, '', '')
call s:SetHighlight('Error', s:bg, s:red, '')
call s:SetHighlight('Todo', s:orange, s:bg, 'italic')
" Legacy groups for official git.vim and diff.vim syntax
hi! link diffFile DiffAdd
hi! link diffNewFile DiffDelete
hi! link diffAdded DiffAdd
hi! link diffChanged DiffChange
hi! link diffLine DiffChange
hi! link diffRemoved DiffDelete
" Git Commit Messages
call s:SetHighlight('gitcommitHeader', s:purple, '', '')
call s:SetHighlight('gitcommitUnmerged', s:green, '', '')
call s:SetHighlight('gitcommitSelectedFile', s:green, '', '')
call s:SetHighlight('gitcommitDiscardedFile', s:red, '', '')
call s:SetHighlight('gitcommitUnmergedFile', s:yellow, '', '')
call s:SetHighlight('gitcommitSelectedType', s:green, '', '')
call s:SetHighlight('gitcommitSummary', s:blue, '', '')
call s:SetHighlight('gitcommitDiscardedType', s:red, '', '')
hi link gitcommitNoBranch gitcommitBranch
hi link gitcommitUntracked gitcommitComment
hi link gitcommitDiscarded gitcommitComment
hi link gitcommitSelected gitcommitComment
hi link gitcommitDiscardedArrow gitcommitDiscardedFile
hi link gitcommitSelectedArrow gitcommitSelectedFile
hi link gitcommitUnmergedArrow gitcommitUnmergedFile
" Javascript
call s:SetHighlight('javaScriptBraces', s:fg, '', '')
call s:SetHighlight('javaScriptNull', s:orange, '', '')
call s:SetHighlight('javaScriptIdentifier', s:purple, '', '')
call s:SetHighlight('javaScriptNumber', s:orange, '', '')
call s:SetHighlight('javaScriptRequire', s:cyan, '', '')
call s:SetHighlight('javaScriptReserved', s:purple, '', '')
" pangloss/vim-javascript
if g:material_theme_style !~ '-community$'
call s:SetHighlight('jsArrowFunction', s:purple, '', '')
call s:SetHighlight('jsAsyncKeyword', s:purple, '', '')
call s:SetHighlight('jsBooleanTrue', s:orange, '', '')
call s:SetHighlight('jsBooleanFalse', s:orange, '', '')
call s:SetHighlight('jsBrackets', s:pink, '', '')
call s:SetHighlight('jsCatch', s:cyan, '', 'italic')
call s:SetHighlight('jsClassBraces', s:cyan, '', '')
call s:SetHighlight('jsClassDefinition', s:yellow, '', '')
call s:SetHighlight('jsClassFuncName', s:pink, '', '')
call s:SetHighlight('jsClassProperty', s:pink, '', '')
call s:SetHighlight('jsClassKeyword', s:purple, '', '')
call s:SetHighlight('jsConditional', s:cyan, '', 'italic')
call s:SetHighlight('jsDocParam', s:green, '', '')
call s:SetHighlight('jsDocTags', s:cyan, '', '')
call s:SetHighlight('jsDot', s:cyan, '', '')
call s:SetHighlight('jsException', s:cyan, '', 'italic')
call s:SetHighlight('jsExceptions', s:yellow, '', '')
call s:SetHighlight('jsExport', s:cyan, '', 'italic')
call s:SetHighlight('jsExportDefault', s:cyan, '', 'italic')
call s:SetHighlight('jsExtendsKeyword', s:purple, '', '')
call s:SetHighlight('jsFinally', s:cyan, '', 'italic')
call s:SetHighlight('jsFinallyBraces', s:cyan, '', '')
call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '')
call s:SetHighlight('jsForAwait', s:cyan, '', 'italic')
call s:SetHighlight('jsFrom', s:cyan, '', 'italic')
call s:SetHighlight('jsFuncBraces', s:cyan, '', '')
call s:SetHighlight('jsFuncCall', s:blue, '', '')
call s:SetHighlight('jsFuncParens', s:cyan, '', '')
call s:SetHighlight('jsFunction', s:purple, '', '')
call s:SetHighlight('jsFunctionKey', s:pink, '', '')
call s:SetHighlight('jsGlobalObjects', s:yellow, '', '')
call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '')
call s:SetHighlight('jsIfElseBraces', s:cyan, '', '')
call s:SetHighlight('jsImport', s:cyan, '', 'italic')
call s:SetHighlight('jsModuleAs', s:cyan, '', 'italic')
call s:SetHighlight('jsModuleBraces', s:cyan, '', '')
call s:SetHighlight('jsNull', s:cyan, '', '')
call s:SetHighlight('jsNoise', s:cyan, '', '')
call s:SetHighlight('jsObjectBraces', s:cyan, '', '')
call s:SetHighlight('jsObjectColon', s:cyan, '', '')
call s:SetHighlight('jsObjectKey', s:pink, '', '')
call s:SetHighlight('jsObjectSeparator', s:cyan, '', '')
call s:SetHighlight('jsParens', s:pink, '', '')
call s:SetHighlight('jsRepeat', s:cyan, '', 'italic')
call s:SetHighlight('jsReturn', s:cyan, '', 'italic')
call s:SetHighlight('jsStorageClass', s:purple, '', '')
call s:SetHighlight('jsTemplateBraces', s:cyan, '', '')
call s:SetHighlight('jsTemplateExpression', s:fg, '', '')
call s:SetHighlight('jsTemplateString', s:green, '', '')
call s:SetHighlight('jsThis', s:cyan, '', 'italic')
call s:SetHighlight('jsTry', s:cyan, '', 'italic')
call s:SetHighlight('jsTryCatchBraces', s:cyan, '', '')
call s:SetHighlight('jsUndefined', s:cyan, '', '')
else
call s:SetHighlight('jsArrowFunction', s:purple, '', '')
call s:SetHighlight('jsAsyncKeyword', s:purple, '', '')
call s:SetHighlight('jsExtendsKeyword', s:purple, '', '')
call s:SetHighlight('jsClassKeyword', s:purple, '', '')
call s:SetHighlight('jsDocParam', s:green, '', '')
call s:SetHighlight('jsDocTags', s:cyan, '', '')
call s:SetHighlight('jsForAwait', s:purple, '', '')
call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '')
call s:SetHighlight('jsFrom', s:purple, '', '')
call s:SetHighlight('jsImport', s:purple, '', '')
call s:SetHighlight('jsExport', s:purple, '', '')
call s:SetHighlight('jsExportDefault', s:purple, '', '')
call s:SetHighlight('jsFuncCall', s:blue, '', '')
call s:SetHighlight('jsFunction', s:purple, '', '')
call s:SetHighlight('jsGlobalObjects', s:yellow, '', '')
call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '')
call s:SetHighlight('jsModuleAs', s:purple, '', '')
call s:SetHighlight('jsNull', s:orange, '', '')
call s:SetHighlight('jsStorageClass', s:purple, '', '')
call s:SetHighlight('jsTemplateBraces', s:red, '', '')
call s:SetHighlight('jsTemplateExpression', s:red, '', '')
call s:SetHighlight('jsThis', s:red, '', '')
call s:SetHighlight('jsUndefined', s:orange, '', '')
endif
" MaxMEllon/vim-jsx-pretty
call s:SetHighlight('jsxTag', s:cyan, '', '')
call s:SetHighlight('jsxTagName', s:pink, '', '')
call s:SetHighlight('jsxComponentName', s:yellow, '', '')
call s:SetHighlight('jsxCloseTag', s:cyan, '', '')
call s:SetHighlight('jsxEscapeJs', s:fg, '', '')
call s:SetHighlight('jsxCloseString', s:cyan, '', '')
call s:SetHighlight('jsxAttrib', s:purple, '', 'italic')
call s:SetHighlight('jsxString', s:green, '', '')
call s:SetHighlight('jsxEqual', s:purple, '', '')
call s:SetHighlight('jsxDot', s:cyan, '', '')
call s:SetHighlight('jsxSpreadOperator', s:purple, '', '')
call s:SetHighlight('jsxBraces', s:cyan, '', '')
call s:SetHighlight('jsxNamespace', s:cyan, '', '')
" JSON
call s:SetHighlight('jsonBraces', s:fg, '', '')
" CSS
call s:SetHighlight('cssAttrComma', s:fg, '', '')
call s:SetHighlight('cssPseudoClassId', s:yellow, '', '')
call s:SetHighlight('cssBraces', s:fg, '', '')
call s:SetHighlight('cssClassName', s:yellow, '', '')
call s:SetHighlight('cssClassNameDot', s:yellow, '', '')
call s:SetHighlight('cssFunctionName', s:blue, '', '')
call s:SetHighlight('cssImportant', s:cyan, '', '')
call s:SetHighlight('cssIncludeKeyword', s:purple, '', '')
call s:SetHighlight('cssTagName', s:red, '', '')
call s:SetHighlight('cssMediaType', s:orange, '', '')
call s:SetHighlight('cssProp', s:fg, '', '')
call s:SetHighlight('cssSelectorOp', s:cyan, '', '')
call s:SetHighlight('cssSelectorOp2', s:cyan, '', '')
" Sass
call s:SetHighlight('sassAmpersand', s:red, '', '')
call s:SetHighlight('sassClassChar', s:yellow, '', '')
call s:SetHighlight('sassMixinName', s:blue, '', '')
call s:SetHighlight('sassVariable', s:purple, '', '')
" Less
call s:SetHighlight('lessAmpersand', s:red, '', '')
call s:SetHighlight('lessClassChar', s:yellow, '', '')
call s:SetHighlight('lessCssAttribute', s:fg, '', '')
call s:SetHighlight('lessFunction', s:blue, '', '')
call s:SetHighlight('lessVariable', s:purple, '', '')
" HTML
call s:SetHighlight('htmlTagName', s:pink, '', '')
call s:SetHighlight('htmlEndTag', s:cyan, '', '')
call s:SetHighlight('htmlTag', s:cyan, '', '')
call s:SetHighlight('htmlSpecialTagName', s:yellow, '', '')
call s:SetHighlight('htmlArg', s:purple, '', 'italic')
call s:SetHighlight('htmlTitle', s:fg, '', '')
call s:SetHighlight('htmlLink', s:fg, '', '')
"" Consistency with plasticboy/vim-markdown
call s:SetHighlight('htmlBold', s:pink, '', 'bold')
call s:SetHighlight('htmlH1', s:yellow, '', '')
call s:SetHighlight('htmlH2', s:yellow, '', '')
call s:SetHighlight('htmlH3', s:yellow, '', '')
call s:SetHighlight('htmlH4', s:yellow, '', '')
call s:SetHighlight('htmlH5', s:yellow, '', '')
call s:SetHighlight('htmlH6', s:yellow, '', '')
call s:SetHighlight('htmlItalic', s:pink, '', 'italic')
" XML
call s:SetHighlight('xmlAttrib', s:purple, '', 'italic')
call s:SetHighlight('xmlEndTag', s:cyan, '', '')
call s:SetHighlight('xmlTag', s:cyan, '', '')
call s:SetHighlight('xmlTagName', s:pink, '', '')
" Golang
call s:SetHighlight('goFunctionCall', s:blue, '', '')
call s:SetHighlight('goReceiverType', s:green, '', '')
call s:SetHighlight('goParamName', s:orange, '', '')
call s:SetHighlight('goParamType', s:green, '', '')
call s:SetHighlight('goTypeDecl', s:purple, '', '')
call s:SetHighlight('goTypeName', s:yellow, '', '')
call s:SetHighlight('goBuiltins', s:red, '', '')
call s:SetHighlight('goType', s:purple, '', '')
call s:SetHighlight('goSignedInts', s:purple, '', '')
call s:SetHighlight('goUnsignedInts', s:purple, '', '')
call s:SetHighlight('goFloats', s:purple, '', '')
call s:SetHighlight('goComplexes', s:purple, '', '')
" Ruby
call s:SetHighlight('rubyInterpolation', s:cyan, '', '')
call s:SetHighlight('rubyInterpolationDelimiter', s:violet, '', '')
call s:SetHighlight('rubyRegexp', s:cyan, '', '')
call s:SetHighlight('rubyRegexpDelimiter', s:violet, '', '')
call s:SetHighlight('rubyStringDelimiter', s:green, '', '')
" Rust
call s:SetHighlight('CocRustTypeHint', s:invisibles, '', '')
call s:SetHighlight('CocRustChainingHint', s:invisibles, '', '')
" TeX
call s:SetHighlight('texBeginEndName', s:blue, '', '')
call s:SetHighlight('texMathMatcher', s:blue, '', '')
call s:SetHighlight('texCite', s:green, '', '')
call s:SetHighlight('texRefZone', s:green, '', '')
call s:SetHighlight('texInputFile', s:green, '', '')
call s:SetHighlight('texMath', s:orange, '', '')
call s:SetHighlight('texMathOper', s:yellow, '', '')
" Markdown
if g:material_theme_style !~ '-community$'
call s:SetHighlight('markdownBold', s:pink, '', 'bold')
call s:SetHighlight('markdownBoldDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownCode', s:paleblue, '', '')
call s:SetHighlight('markdownCodeDelimiter', s:green, '', '')
call s:SetHighlight('markdownHeadingDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownH1', s:yellow, '', '')
call s:SetHighlight('markdownH2', s:yellow, '', '')
call s:SetHighlight('markdownH3', s:yellow, '', '')
call s:SetHighlight('markdownH4', s:yellow, '', '')
call s:SetHighlight('markdownH5', s:yellow, '', '')
call s:SetHighlight('markdownH6', s:yellow, '', '')
call s:SetHighlight('markdownItalic', s:pink, '', 'italic')
call s:SetHighlight('markdownItalicDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownLinkDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownLinkText', s:green, '', '')
call s:SetHighlight('markdownLinkTextDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownListMarker', s:cyan, '', '')
call s:SetHighlight('markdownUrl', s:pink, '', 'underline')
call s:SetHighlight('markdownUrlTitleDelimiter', s:green, '', '')
else
call s:SetHighlight('markdownBold', s:yellow, '', 'bold')
call s:SetHighlight('markdownCode', s:cyan, '', '')
call s:SetHighlight('markdownCodeBlock', s:cyan, '', '')
call s:SetHighlight('markdownCodeDelimiter', s:cyan, '', '')
call s:SetHighlight('markdownHeadingDelimiter', s:green, '', '')
call s:SetHighlight('markdownHeadingRule', s:comments, '', '')
call s:SetHighlight('markdownId', s:purple, '', '')
call s:SetHighlight('markdownItalic', s:blue, '', 'italic')
call s:SetHighlight('markdownListMarker', s:orange, '', '')
call s:SetHighlight('markdownOrderedListMarker', s:orange, '', '')
call s:SetHighlight('markdownRule', s:comments, '', '')
call s:SetHighlight('markdownUrl', s:purple, '', '')
call s:SetHighlight('markdownUrlTitleDelimiter', s:yellow, '', '')
endif
" plasticboy/vim-markdown
if g:material_theme_style !~ '-community$'
call s:SetHighlight('mkdBold', s:cyan, '', '')
call s:SetHighlight('mkdCodeStart', s:green, '', '')
call s:SetHighlight('mkdCodeDelimiter', s:cyan, '', '')
call s:SetHighlight('mkdDelimiter', s:cyan, '', '')
call s:SetHighlight('mkdHeading', s:cyan, '', '')
call s:SetHighlight('mkdItalic', s:cyan, '', '')
call s:SetHighlight('mkdLink', s:green, '', '')
call s:SetHighlight('mkdListItem', s:cyan, '', '')
call s:SetHighlight('mkdURL', s:pink, '', 'underline')
endif
" vimwiki/vimwiki
if g:material_theme_style !~ '-community$'
call s:SetHighlight('VimwikiBold', s:pink, '', 'bold')
call s:SetHighlight('VimwikiBoldChar', s:cyan, '', 'bold')
call s:SetHighlight('VimwikiDelText', s:pink, '', 'strikethrough')
call s:SetHighlight('VimwikiDelTextChar', s:cyan, '', '')
call s:SetHighlight('VimwikiCode', s:green, '', '')
call s:SetHighlight('VimwikiCodeChar', s:cyan, '', '')
call s:SetHighlight('VimwikiHeader1', s:yellow, '', '')
call s:SetHighlight('VimwikiHeader2', s:yellow, '', '')
call s:SetHighlight('VimwikiHeader3', s:yellow, '', '')
call s:SetHighlight('VimwikiHeader4', s:yellow, '', '')
call s:SetHighlight('VimwikiHeader5', s:yellow, '', '')
call s:SetHighlight('VimwikiHeader6', s:yellow, '', '')
call s:SetHighlight('VimwikiHeaderChar', s:cyan, '', '')
call s:SetHighlight('VimwikiImage', s:cyan, '', '')
call s:SetHighlight('VimwikiItalic', s:pink, '', 'italic')
call s:SetHighlight('VimwikiItalicChar', s:cyan, '', '')
call s:SetHighlight('VimwikiLink', s:green, '', 'underline')
call s:SetHighlight('VimwikiListTodo', s:cyan, '', '')
call s:SetHighlight('VimwikiPre', s:green, '', '')
call s:SetHighlight('VimwikiWebLink1', s:green, '', 'underline')
endif
" vim-gitgutter
call s:SetHighlight('GitGutterAdd', s:green, '', '')
call s:SetHighlight('GitGutterChange', s:yellow, '', '')
call s:SetHighlight('GitGutterChangeDelete', s:orange, '', '')
call s:SetHighlight('GitGutterDelete', s:red, '', '')
" vim-signify
hi link SignifySignAdd GitGutterAdd
hi link SignifySignChange GitGutterChange
hi link SignifySignDelete GitGutterDelete
" vim-better-whitespace
call s:SetHighlight('ExtraWhitespace', '', s:red, '')
" NERDTree
if has('nvim')
call s:SetHighlight('NERDTreeFile', s:fg, '', '')
endif
" coc.nvim
call s:SetHighlight('CocMarkdownLink', s:purple, '', '')
call s:SetHighlight('CocErrorSign', s:red, '', '')
call s:SetHighlight('CocWarningSign', s:orange, '', '')
call s:SetHighlight('CocHintSign', s:yellow, '', '')
call s:SetHighlight('CocInfoSign', s:green, '', '')
" Neovim terminal colors
if has('nvim')
let g:terminal_color_background = s:bg.gui
let g:terminal_color_foreground = s:fg.gui
let g:terminal_color_0 = s:comments.gui
let g:terminal_color_1 = s:red.gui
let g:terminal_color_2 = s:green.gui
let g:terminal_color_3 = s:yellow.gui
let g:terminal_color_4 = s:blue.gui
let g:terminal_color_5 = s:purple.gui
let g:terminal_color_6 = s:cyan.gui
let g:terminal_color_7 = s:white.gui
let g:terminal_color_8 = g:terminal_color_0
let g:terminal_color_9 = g:terminal_color_1
let g:terminal_color_10 = g:terminal_color_2
let g:terminal_color_11 = g:terminal_color_3
let g:terminal_color_12 = g:terminal_color_4
let g:terminal_color_13 = g:terminal_color_5
let g:terminal_color_14 = g:terminal_color_6
let g:terminal_color_15 = g:terminal_color_7
endif

+ 0
- 240
.config/vim/vimrc View File

@ -1,240 +0,0 @@
"" __ _______ _____ _____
"" \ \ / / ____| ____|_ _|
"" \ V /| _| | _| | |
"" | | | |___| |___ | |
"" |_| |_____|_____| |_|
"" Yeet's vim configuration
" XDG Base Directory Specification
set runtimepath^=$XDG_CONFIG_HOME/vim
set runtimepath+=$XDG_DATA_HOME/vim
set runtimepath+=$XDG_CONFIG_HOME/vim/after
set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
let g:netrw_home = $XDG_DATA_HOME."/vim"
call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p')
let s:MRU_File = $XDG_CACHE_HOME."/vim/mru"
if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif
" Set leader
let mapleader = ","
" Leader Mappings
nnoremap <Leader>c :w! \| !compiler "<c-r>%"<CR>
map <Leader>w :update<CR>
map <Leader>q :qall<CR>
map <Leader>gs :Gstatus<CR>
" map Q to gq for line formatting cuz Q is useless
nnoremap Q gq
" Recently edited files
map <Leader>h :History<CR>
" CtrlP use FZF (faster!)
nnoremap <C-p> :Telescope find_files<cr>
" ,b Buffers
nnoremap <Leader>b :Buffers<CR>
" ,u urlview
noremap <Leader>u :w<Home>silent <End> !urlview<CR>
" System clipboard copy
nnoremap <Leader>y "+y
nnoremap <Leader>p "+p
vnoremap <Leader>y "+y
vnoremap <Leader>p "+p
nnoremap <Leader>Y "+Y
nnoremap <Leader>P "+P
vnoremap <Leader>d "+d
nnoremap <Leader>D "+D
if has('nvim')
source ~/.config/nvim/plugin/plugins.vim
endif
syntax on
filetype plugin on
set autoread " Auto reload changed files
set wildmenu " Tab autocomplete in command mode
set backspace=indent,eol,start " http://vi.stackexchange.com/a/2163
set laststatus=2 " Show status line on startup
set splitright " Open new splits to the right
set splitbelow " Open new splits to the bottom
set lazyredraw " Reduce the redraw frequency
set ttyfast " Send more characters in fast terminals
set nowrap " Don't wrap long lines
set listchars=extends:→ " Show arrow if line continues rightwards
set listchars+=precedes:← " Show arrow if line continues leftwards
set nobackup nowritebackup noswapfile " Turn off backup files
set noerrorbells novisualbell " Turn off visual and audible bells
set expandtab shiftwidth=2 tabstop=2 " Two spaces for tabs everywhere
set history=500
set hidden " Save buffers automatically
set ignorecase smartcase " Search queries intelligently set case
set incsearch " Show search results as you type
set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape
set showcmd " Show size of visual selection
set cmdheight=2
set t_Co=256
noh
" set clipboard=unnamedplus
set shortmess+=c
set updatetime=300
if has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
" Persistent undo
set undodir=~/.local/share/vim/undo/
set undofile
set undolevels=1000
set undoreload=10000
" Ignored files/directories from autocomplete (and CtrlP)
set wildignore+=*/tmp/*
set wildignore+=*.so
set wildignore+=*.zip
set wildignore+=*/vendor/bundle/*
set wildignore+=*/node_modules/
" Enable autocompletion:
set wildmode=longest,list,full
" Disables automatic commenting on newline:
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
vnoremap . :normal .<CR>
map <leader>f :Goyo \| set linebreak<CR>
map <leader>o :setlocal spell! spelllang=en_us<CR>
set splitbelow splitright
map <leader>s :!clear && shellcheck -x %<CR>
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
"-------------------------------------------------------------------------------
" Interface
"-------------------------------------------------------------------------------
set number " Enable line numbers
set scrolloff=5 " Leave 5 lines of buffer when scrolling
set sidescrolloff=10 " Leave 10 characters of horizontal buffer when scrolling
"-------------------------------------------------------------------------------
" Colors & Formatting
"-------------------------------------------------------------------------------
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
if (has("termguicolors"))
set termguicolors
endif
let g:material_theme_style='ocean-community'
set background=dark
try
colorscheme material
catch /^Vim\%((\a\+)\)\=:E185/
colorscheme default
endtry
" Showcase comments in italics
highlight Comment cterm=italic gui=italic
" Easy tab navigation
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
" Find/replace
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left><left>
" DON'T USE ARROWS NORMIE
nnoremap <C-c> :echoe "Use Esc"<CR>
nnoremap <Left> :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up> :echoe "Use k"<CR>
nnoremap <Down> :echoe "Use j"<CR>
" Split resize
nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
" Make vim obey transparency
hi! Normal ctermbg=NONE guibg=NONE
hi! NonText ctermbg=NONE guibg=NONE
"-------------------------------------------------------------------------------
" Neovim-specific configurations
if has('nvim')
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors
" Fix vim-tmux-navigator <C-h> https://git.io/viGRU
nmap <BS> <C-W>h
" Fix vim-tmux-navigator <C-h> https://git.io/vS5QH
nmap <BS> :<C-u>TmuxNavigateLeft<CR>
" The following require plugins to be loaded so they should only be set in neovim
let g:vimtex_view_general_viewer = 'zathura'
" Syntastic max file size for python
let g:syntastic_python_pylint_post_args="--max-line-length=120"
" Widths fot several plugins
let g:goyo_width = 120 " Goyo
let g:Tlist_WinWidth = 40 " Tlist
lua <<EOF
require'neuron'.setup {
virtual_titles = true,
mappings = true,
run = nil, -- function to run when in neuron dir
neuron_dir = "~/Projects/Neocortex", -- the directory of all of your notes, expanded by default (currently supports only one directory for notes, find a way to detect neuron.dhall to use any directory)
leader = "gz", -- the leader key to for all mappings, remember with 'go zettel'
}
EOF
endif
" Don't clear clipboard on exit
autocmd VimLeave * call system("xsel -ib", getreg('+'))
" Useful for GDB debugging
packadd termdebug
" File Specific Settings
if has("autocmd")
" Use skeleton files
augroup templates
autocmd BufNewFile *.* silent! execute '0r ~/.config/vim/templates/skeleton.'.expand("<afile>:e")
autocmd BufNewFile * %substitute#\[:VIM_EVAL:\]\(.\{-\}\)\[:END_EVAL:\]#\=eval(submatch(1))#ge
augroup END
autocmd BufWinLeave *.tex !texclear %:p " Run texclear on exit
autocmd BufRead calcurse-note.* :set filetype=markdown " Use markdown for calcurse notes
endif

+ 10
- 3
.config/zsh/aliases View File

@ -33,6 +33,10 @@ alias gshh="gcloud cloud-shell ssh --authorize-session"
# Git # Git
alias ga="git add" alias ga="git add"
alias gcl="git clone --recursive --depth=16" alias gcl="git clone --recursive --depth=16"
alias gck="git checkout"
alias gmg="git merge"
alias gss="git stash"
alias gsp="git stash pop"
alias gc="git commit" alias gc="git commit"
alias gcm="git commit -m" alias gcm="git commit -m"
alias gp="git push" alias gp="git push"
@ -53,6 +57,7 @@ alias dignore="dots update-index --assume-unchanged {pkg.list,install.sh,README.
alias da="dots add -u" alias da="dots add -u"
alias dcm="dots commit" alias dcm="dots commit"
alias pwndbg="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/pwninit" alias pwndbg="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/pwninit"
alias gef="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/gefinit"
alias bon="sudo bash -c 'rc-service bluetooth start && rfkill unblock bluetooth'" alias bon="sudo bash -c 'rc-service bluetooth start && rfkill unblock bluetooth'"
@ -62,7 +67,9 @@ alias lights_on="curl 'http://yeetclock/setcolor?R=136&G=192&B=208'"
alias v="nvim" alias v="nvim"
alias m='e --eval "(progn (magit-status) (delete-other-windows))"'
alias mt="m -t"
alias et="e -t"
alias eduvpn="sudo openvpn ~/Documents/eduVPN.ovpn"
alias sshlogin="ssh -o IdentitiesOnly=yes"
alias scplogin="scp -o IdentitiesOnly=yes"
alias pastebin="curl -F 'sprunge=<-' http://sprunge.us"

+ 8
- 0
.config/zsh/cmds View File

@ -145,6 +145,10 @@ tmate-unpair() {
fi fi
} }
transfer() {
curl --upload-file "$1" "https://transfer.sh/$1"
}
rawurlencode() { rawurlencode() {
local string="${1}:$(cat -)" local string="${1}:$(cat -)"
@ -169,3 +173,7 @@ rawurldecode() {
echo "${REPLY}" #+or echo the result (EASIER)... or both... :p echo "${REPLY}" #+or echo the result (EASIER)... or both... :p
} }
pdfcomp(){
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${2}" "${1}"
}

+ 1
- 1
.local/bin/compiler View File

@ -29,7 +29,7 @@ textype() { \
case "$ext" in case "$ext" in
# Try to keep these cases in alphabetical order. # Try to keep these cases in alphabetical order.
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;;
c) cc "$file" -o "$base" && "$base" ;;
c) gcc -g "$file" -o "$base" && "$base" ;;
cpp) g++ "$file" -o "$base" && "$base" ;; cpp) g++ "$file" -o "$base" && "$base" ;;
cs) mcs "$file" && mono "$base".exe ;; cs) mcs "$file" && mono "$base".exe ;;
go) go run "$file" ;; go) go run "$file" ;;


+ 54
- 20
.local/bin/dmenu-books View File

@ -5,35 +5,69 @@
USERNAME="yigitcolakoglu" USERNAME="yigitcolakoglu"
PASSWORD="$(pass show Server/calibre.yigitcolakoglu.com/yigitcolakoglu)" PASSWORD="$(pass show Server/calibre.yigitcolakoglu.com/yigitcolakoglu)"
HOST="https://calibre.fr1nge.xyz"
HOST="https://calibre.yigit.run"
BOOKS_DIR="$HOME/Documents/books/"
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
query=$(printf "" | dmenu -p "Please enter the book's name")
[ -z $query ] && exit
rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
local pos c o
XML=$(curl -s -u "$USERNAME:$PASSWORD" "$HOST/opds/search?query=$query")
for (( pos=0 ; pos<strlen ; pos++ )); do
c=${string:$pos:1}
case "$c" in
[-_.~a-zA-Z0-9] ) o="${c}" ;;
* ) printf -v o '%%%02x' "'$c"
esac
encoded+="${o}"
done
echo "${encoded}" # You can either set a return variable (FASTER)
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
}
menu=$(echo $XML | xpath -q -e '//entry/title | //entry/author/name | //entry/link[@type="application/pdf"]/@href')
book=$(echo "$menu" | \
sed 's/<title>\(.*\)<\/title>/\1|/;N;s/<name>\(.*\)<\/name>/\1|/;N;s/href="\(.*\)"/\1/;s/\n/ /g' | \
column -s '|' -t | dmenu -p "Please select the book" -l 5)
if [ -d "$BOOKS_DIR" ]; then
selection="$(find "$BOOKS_DIR" -type f | dmenu -l 5 -p "Please enter the book's name")"
else
mkdir -p "$BOOKS_DIR"
selection="$(printf "" | dmenu -p "Please enter the book's name")"
fi
[ -z "$book" ] && exit
if [ -f "$selection" ]; then
filename="$selection"
else
bookname="$selection"
query=$(rawurlencode "$bookname")
[ -z "$query" ] && exit
name=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | head -n 1)
author=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | head -n 2 | tail -n 1)
path=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | tail -n 1)
XML=$(curl --insecure -s -u "$USERNAME:$PASSWORD" "$HOST/opds/search?query=$query")
mkdir -p "$XDG_RUNTIME_DIR/books"
notify-send -a " Downloading" "$(printf "%s\n%s" "$name" "$author")"
menu=$(echo $XML | xpath -q -e '//entry/title | //entry/author/name | //entry/link[@rel="http://opds-spec.org/acquisition"][position()<=1]/@href')
wget -nc -P "$XDG_RUNTIME_DIR/books" -q --content-disposition \
--user "$USERNAME" --password "$PASSWORD" "$HOST$path"
book=$(echo "$menu" | \
sed 's/<title>\(.*\)<\/title>/\1|/;N;s/<name>\(.*\)<\/name>/\1|/;N;s/href="\(.*\)"/\1/;s/\n/ /g' | \
column -s '|' -t -T 1 -c 200| dmenu -i -p "Please select the book" -l 5)
filename=$(curl -s --head -u "$USERNAME:$PASSWORD" "$HOST$path" | \
grep "Content-Disposition" |\
sed -E 's/Content-Disposition:.*filename=([^;]*);.*/\1/g')
[ -z "$book" ] && exit
xdg-open "$XDG_RUNTIME_DIR/books/$(urldecode $filename)"
name=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | head -n 1)
author=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | head -n 2 | tail -n 1)
path=$(echo "$book" | sed 's/\s\{2,\}/\n/g' | tail -n 1)
mkdir -p "$BOOKS_DIR"
notify-send -a " Downloading" "$(printf "%s\n%s" "$name" "$author")"
wget --no-check-certificate -nc -P "$BOOKS_DIR" -q --content-disposition \
--user "$USERNAME" --password "$PASSWORD" "$HOST$path"
header="$(curl -s --insecure --head -u "$USERNAME:$PASSWORD" "$HOST$path")"
out=$( printf "%s" "$header" | \
grep "Content-Disposition" |\
sed -E 's/Content-Disposition:.*filename=([^;]*);.*/\1/g')
filename="$BOOKS_DIR/$(urldecode "$out")"
fi
xdg-open "$filename"

+ 35
- 0
.local/bin/dmenu-hamster View File

@ -0,0 +1,35 @@
#!/bin/sh
function menu {
dmenu -i -l 20 $@
}
function refresh {
echo "refresh"
}
current=$(hamster current)
# choose an action
if [ "No activity" = "$current" ]; then
action="start"
else
action=$(echo -e -n "start\nstop $current" | menu -p Action)
fi
[ -z "$action" ] && exit 1
case "$action" in
start)
activity=$(hamster activities | menu -p Start)
[ -z "$activity" ] && exit 1
hamster start $activity
notify-send "Started $activity"
refresh
;;
stop*)
hamster stop
notify-send "Stopped $current"
refresh
;;
esac

+ 8
- 4
.local/bin/dmenu-refresh View File

@ -16,7 +16,7 @@ dunst
clipmenud clipmenud
darkhttpd darkhttpd
devmon devmon
emacs
activitywatcher
spotifyd" spotifyd"
# Open menu # Open menu
@ -46,9 +46,13 @@ case $selection in
kill -9 $(pidof dunst) kill -9 $(pidof dunst)
dunst & dunst &
;; ;;
emacs)
emacsclient -e '(kill-emacs)'
emacs --daemon && emacsclient -c --eval "(delete-frame)"
activitywatcher)
pkill -f aw-watcher-window
pkill -f aw-watcher-afk
pkill -f aw-server
aw-server &
aw-watcher-window &
aw-watcher-afk &
;; ;;
devmon) devmon)
pkill -f devmon pkill -f devmon


+ 22
- 0
.local/bin/dmenu-sessions View File

@ -0,0 +1,22 @@
#!/bin/sh
if [ ! -d "$XDG_CONFIG_HOME/sessions" ]; then
mkdir -p "$XDG_CONFIG_HOME/sessions"
fi
list=""
for i in $(ls -1 "$XDG_CONFIG_HOME/sessions/"); do
list="${list}${i} : $(head -n 1 "$XDG_CONFIG_HOME/sessions/$i" | sed 's/# //g')\n"
done
selection=$(printf "$list" | dmenu -l 4 | sed 's/ :.*//g')
echo "$selection"
if [ ! -f "$XDG_CONFIG_HOME/sessions/$selection" ]; then
touch "$XDG_CONFIG_HOME/sessions/$selection"
st -c vim -n vim -e "$EDITOR" "$XDG_CONFIG_HOME/sessions/$selection"
else
bash "$XDG_CONFIG_HOME/sessions/$selection"
fi

+ 23
- 0
.local/bin/dmenu-timer View File

@ -0,0 +1,23 @@
#!/bin/sh
if [ ! -f $XDG_RUNTIME_DIR/timer ] || [ -z $(cat $XDG_RUNTIME_DIR/timer) ]; then
duration="$(printf "" | dmenu -p "Please enter duration:")"
[ -z "$duration" ] && exit 1
timestamp="$(date -d "$duration" '+%s')"
[ -z "$timestamp" ] && notify-send -a "Timer utility" "Time format not recognized" && exit 1
printf "$timestamp" > $XDG_RUNTIME_DIR/timer
else
operation=$(printf "Cancel" | dmenu -p "Please select action:")
case $operation in
Cancel)
echo "" > $XDG_RUNTIME_DIR/timer
;;
esac
fi
kill -64 $(pidof dwmblocks)

+ 39
- 0
.local/bin/dmenu-toolkit View File

@ -0,0 +1,39 @@
#!/bin/sh
read -r -d '' MENU << EOM
Arch Wiki | Open an entry from the Arch Wiki (offline) | dmenu-ambient
Bluetooth | Manage bluetooth and bluetooth devices | dmenu-bluetooth
Read Books | Connect to calibre-web and read a book | dmenu-books
Edit Config | Select and edit configuration files in your dotfiles | dmenu-edit
Kill Process | Kill a process that is bothering you | dmenu-killall
Mobile Device | Manage your mobile device through mconnect | dmenu-mconnect
Record Screen | Record your screen, voice or anything | dmenu-record
Mount Storage Devices | Manage connected detachable storage devices | dmenu-udevil
Unmount Storage Devices | Manage connected detachable storage devices | dmenu-udevil -u
Word Count | Count the words, letters and lines in any string | dmenu-wc
Grab Color | Grab any color on your screen | grabcolor
Sync Mail | Synchronize your mail | mailsync
Toggle Trackpad | Enable/Disable your trackpad | toggle_trackpad.sh
Sync Nextcloud | Synchronize with your nextcloud instance | nextcloud-sync
Network Settings | Manage network settings using connman | connman_dmenu
Backup | Backup your system | backup
Ambient Sounds | Play ambient sounds | dmenu-ambient
Insert Emoji | Insert an emoji or glyph | dmenu-emoji
Create Timer | Create or manage a timer | dmenu-timer
Watch Youtube | Search and watch a youtube video | ytfzf_dmenu
EOM
selection=$(printf "$MENU" | column -s '|' -t | dmenu -p "Select a tool" -l 7)
[ -z "$selection" ] && exit
cmd=$(echo "$selection" | sed 's/\s\{2,\}/\n/g' | tail -n 1)
bash -c "$cmd"

+ 0
- 73
.local/bin/dmenu-wallabag View File

@ -1,73 +0,0 @@
#!/bin/sh
itemcache="${XDG_DATA_HOME:-$HOME/.cache}/wallabag-dmenu"
DMENU=${DMENU:-dmenu}
usage() {
cat <<-EOF
usage: dmenu-wallabag [-lah]
-l List Entries
-s Select Menu
-a Add an entry
-h Print help
EOF
}
update_items(){
[ "$(date -r "$itemcache" "+%d-%m-%Y %H")" = "$(date '+%d-%m-%Y') %H" ] ||
wallabag list | head -n -1 | tail -n +2 > $itemcache
}
list_entries() {
update_items
items="$(cat $itemcache)"
selection=$(echo -e "$items\n~SYNC~" | dmenu -l 10 -p "Choose an article:")
if [ "$selection" = "~SYNC~" ]; then
wallabag list | head -n -1 | tail -n +2 > $itemcache
items="$(cat $itemcache)"
selection=$(echo "$items" | dmenu -l 10 -p "Choose an article:")
fi
if [ "$selection" = "" ]; then
exit
fi
selection=$(echo "$selection" | cut -d" " -f1)
wallabag update --read $selection
wallabag open $selection
wallabag list | head -n -1 | tail -n +2 > $itemcache
}
add_entry() {
url=$(echo -n "" | dmenu -p "Enter URL:")
if [ "$url" = "" ]; then
exit
fi
wallabag add $url
wallabag list | head -n -1 | tail -n +2 > $itemcache
}
select_mode() {
menu="Read\nAdd"
action=$(echo -e "$menu" | dmenu -p "Select action: ")
if [ "$action" = "" ]; then
return
fi
if [ "$action" = "Read" ];then
list_entries
else
add_entry
fi
}
while getopts ':lahs' opt; do
case "$opt" in
l) list_entries ;;
s) select_mode;;
a) add_entry ;;
h) usage && exit;;
/?) echo "Unrecognized command: $OPTARG";;
esac
done

+ 1
- 37
.local/bin/dmenu-web View File

@ -39,43 +39,7 @@ searchweb() {
gotourl gotourl
} }
xprop -root | grep '^_NET_ACTIVE_WINDOW' && {
winid=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/.*[[:space:]]//')
class=$(xprop -id "$winid" WM_CLASS | awk -F'\"' '{ print $(NF - 1) }')
case "$class" in
Firefox) nbrowser='firefox' ;;
#Firefox) shortcut='ctrl+l' ;; # alternative method, uses xdotool
IceCat) nbrowser='icecat' ;;
Chromium) nbrowser='chromium' ;;
Chrome) nbrowser='chrome' ;;
Opera) nbrowser='opera' ;;
Vivaldi) nbrowser='vivaldi' ;; # not tested
Brave) nbrowser='brave' ;; # not tested
Conkeror) nbrowser='conkeror' ;; # not tested
Palemoon) nbrowser='palemoon' ;; # not tested
Iceweasel) nbrowser='iceweasel' ;; # not tested
qutebrowser) nbrowser='qutebrowser' ;;
Midori) nbrowser='midori' ;; # not that good
Luakit) nbrowser='luakit' ;; # uses the last window instance
Uzbl|Vimb) shortcut='o' ;;
Links) shortcut='g' ;;
Netsurf*|Epiphany|Dillo|Konqueror|Arora) shortcut='ctrl+l' ;;
Surf) nbrowser='surf' ; uricur=$(xprop -id "$winid" _SURF_URI |\
awk -F'\"' '{ print $( NF - 1 ) }') ;;
*) pid=$(xprop -id "$winid" _NET_WM_PID | awk '{ print $3 }')
while pgrep -oP "$pid" >/dev/null
do
pid=$(pgrep -oP "$pid")
done
pname=$(awk '/^Name\:/{ print $NF }' /proc/"$pid"/status) ||
winid="" ;;
esac
[ -n "$pname" ] && case "$pname" in
w3m) shortcut="U" ;;
lynx|elinks|links) shortcut="g" ;;
*) winid="" ;;
esac
}
nbrowser=$BROWSER
tmpfile=$(mktemp /tmp/dmenu_websearch.XXXXXX) tmpfile=$(mktemp /tmp/dmenu_websearch.XXXXXX)
trap 'rm "$tmpfile"' 0 1 15 trap 'rm "$tmpfile"' 0 1 15


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save