aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aerc/.config/aerc/Development.qmap1
-rw-r--r--aerc/.config/aerc/Job.qmap1
-rw-r--r--aerc/.config/aerc/Personal.qmap11
-rw-r--r--aerc/.config/aerc/TestMail.qmap1
-rw-r--r--aerc/.config/aerc/accounts.conf11
-rw-r--r--aerc/.config/aerc/aerc.conf4
-rw-r--r--aerc/.config/aerc/binds.conf3
-rw-r--r--alacritty/.config/alacritty/alacritty.toml10
-rw-r--r--ghostty/.config/ghostty/config21
-rw-r--r--guix/manifest.scm45
-rw-r--r--isync/.config/isyncrc19
-rw-r--r--newsboat/.config/newsboat/config4
-rw-r--r--newsboat/.config/newsboat/urls13
-rw-r--r--notmuch/.config/notmuch/account/config16
l---------notmuch/.config/notmuch/account/hooks1
-rwxr-xr-xnotmuch/.config/notmuch/hooks/post-new30
-rw-r--r--nvim/.config/nvim/init.lua10
-rw-r--r--nvim/.config/nvim/lsp/bashls.lua4
-rw-r--r--nvim/.config/nvim/lsp/clangd.lua5
-rw-r--r--nvim/.config/nvim/lsp/lua_ls.lua20
-rw-r--r--nvim/.config/nvim/lua/autocmds.lua (renamed from nvim/.config/nvim/plugin/autocmds.lua)1
-rw-r--r--nvim/.config/nvim/lua/custom/autopairs.lua5
-rw-r--r--nvim/.config/nvim/lua/custom/cmake.lua1
-rw-r--r--nvim/.config/nvim/lua/custom/cmp.lua69
-rw-r--r--nvim/.config/nvim/lua/custom/gitsigns.lua60
-rw-r--r--nvim/.config/nvim/lua/custom/harpoon.lua25
-rw-r--r--nvim/.config/nvim/lua/custom/init.lua5
-rw-r--r--nvim/.config/nvim/lua/custom/leap.lua3
-rw-r--r--nvim/.config/nvim/lua/custom/lsp.lua113
-rw-r--r--nvim/.config/nvim/lua/custom/mini.lua0
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/autopairs.lua9
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/cmake.lua17
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/cmp.lua22
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/conform.lua36
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/gitsigns.lua6
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/harpoon.lua8
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/leap.lua7
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/lsp.lua22
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/substitude.lua6
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/telescope.lua15
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/toggleterm.lua7
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/treesitter.lua7
-rw-r--r--nvim/.config/nvim/lua/custom/plugins/vim-sleuth.lua1
-rw-r--r--nvim/.config/nvim/lua/custom/substitude.lua6
-rw-r--r--nvim/.config/nvim/lua/custom/telescope.lua82
-rw-r--r--nvim/.config/nvim/lua/custom/toggleterm.lua41
-rw-r--r--nvim/.config/nvim/lua/custom/treesitter.lua51
-rw-r--r--nvim/.config/nvim/lua/keymaps.lua (renamed from nvim/.config/nvim/plugin/keymaps.lua)17
-rw-r--r--nvim/.config/nvim/lua/lsp.lua13
-rw-r--r--nvim/.config/nvim/lua/netrw.lua (renamed from nvim/.config/nvim/plugin/netrw.lua)0
-rw-r--r--nvim/.config/nvim/lua/options.lua41
-rw-r--r--nvim/.config/nvim/lua/plugins/autopairs.lua13
-rw-r--r--nvim/.config/nvim/lua/plugins/bqf.lua (renamed from nvim/.config/nvim/lua/custom/plugins/bqf.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/celluar.lua (renamed from nvim/.config/nvim/lua/custom/plugins/celluar.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/cmake.lua18
-rw-r--r--nvim/.config/nvim/lua/plugins/cmp.lua88
-rw-r--r--nvim/.config/nvim/lua/plugins/comment.lua (renamed from nvim/.config/nvim/lua/custom/plugins/comment.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/conform.lua56
-rw-r--r--nvim/.config/nvim/lua/plugins/dadbod.lua (renamed from nvim/.config/nvim/lua/custom/plugins/dadbod.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/fidget.lua6
-rw-r--r--nvim/.config/nvim/lua/plugins/gitsigns.lua65
-rw-r--r--nvim/.config/nvim/lua/plugins/harpoon.lua32
-rw-r--r--nvim/.config/nvim/lua/plugins/lazydev.lua10
-rw-r--r--nvim/.config/nvim/lua/plugins/leap.lua9
-rw-r--r--nvim/.config/nvim/lua/plugins/lualine.lua (renamed from nvim/.config/nvim/lua/custom/plugins/lualine.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/mini.lua (renamed from nvim/.config/nvim/lua/custom/plugins/mini.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/neorg.lua (renamed from nvim/.config/nvim/lua/custom/plugins/neorg.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/sort.lua (renamed from nvim/.config/nvim/lua/custom/plugins/sort.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/substitude.lua11
-rw-r--r--nvim/.config/nvim/lua/plugins/surround.lua (renamed from nvim/.config/nvim/lua/custom/plugins/surround.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/telescope.lua94
-rw-r--r--nvim/.config/nvim/lua/plugins/textcase.lua (renamed from nvim/.config/nvim/lua/custom/plugins/textcase.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/themes.lua (renamed from nvim/.config/nvim/lua/custom/plugins/themes.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/todo-comments.lua (renamed from nvim/.config/nvim/lua/custom/plugins/todo-comments.lua)0
-rw-r--r--nvim/.config/nvim/lua/plugins/toggleterm.lua47
-rw-r--r--nvim/.config/nvim/lua/plugins/treesitter.lua48
-rw-r--r--nvim/.config/nvim/lua/plugins/which-key.lua (renamed from nvim/.config/nvim/lua/custom/plugins/which-key.lua)0
-rw-r--r--nvim/.config/nvim/lua/terminal.lua (renamed from nvim/.config/nvim/plugin/terminal.lua)3
-rw-r--r--nvim/.config/nvim/plugin/options.lua41
-rw-r--r--zsh/.config/zsh/.zprofile3
-rw-r--r--zsh/.config/zsh/.zshrc13
81 files changed, 778 insertions, 705 deletions
diff --git a/aerc/.config/aerc/Development.qmap b/aerc/.config/aerc/Development.qmap
new file mode 100644
index 0000000..60418a0
--- /dev/null
+++ b/aerc/.config/aerc/Development.qmap
@@ -0,0 +1 @@
+INBOX = tag:inbox and not tag:archived
diff --git a/aerc/.config/aerc/Job.qmap b/aerc/.config/aerc/Job.qmap
new file mode 100644
index 0000000..60418a0
--- /dev/null
+++ b/aerc/.config/aerc/Job.qmap
@@ -0,0 +1 @@
+INBOX = tag:inbox and not tag:archived
diff --git a/aerc/.config/aerc/Personal.qmap b/aerc/.config/aerc/Personal.qmap
index b9094ee..16cd958 100644
--- a/aerc/.config/aerc/Personal.qmap
+++ b/aerc/.config/aerc/Personal.qmap
@@ -1,5 +1,12 @@
+_INBOX = tag:inbox and not tag:maillist and not tag:trash and not tag:sent and not tag:spam and not tag:draft
+_Trash = tag:trash
+_Sent = tag:sent
+_Spam = tag:spam
+_Drafts = tag:draft
+
info-gnu = tag:info-gnu
info-guix = tag:info-guix
+help-guix = tag:help-guix
sg7 = tag:sg7
sg13 = tag:sg13
sg14 = tag:sg14
@@ -9,3 +16,7 @@ std-discussion = tag:std-discussion
std-proposals = tag:std-proposals
notmuch = tag:notmuch
rjarry-aerc-discuss = tag:rjarry-aerc-discuss
+pgsql-general = tag:pgsql-general
+boost = tag:boost
+boost-users = tag:boost-users
+zsh-users = tag:zsh-users
diff --git a/aerc/.config/aerc/TestMail.qmap b/aerc/.config/aerc/TestMail.qmap
new file mode 100644
index 0000000..60418a0
--- /dev/null
+++ b/aerc/.config/aerc/TestMail.qmap
@@ -0,0 +1 @@
+INBOX = tag:inbox and not tag:archived
diff --git a/aerc/.config/aerc/accounts.conf b/aerc/.config/aerc/accounts.conf
index fdec2f1..d00167d 100644
--- a/aerc/.config/aerc/accounts.conf
+++ b/aerc/.config/aerc/accounts.conf
@@ -10,6 +10,7 @@ maildir-store = ~/Mail/personal
query-map = ~/.config/aerc/Personal.qmap
outgoing-cred-cmd = pass Email/personal@rozanov.info
check-mail-cmd = NOTMUCH_PROFILE=personal notmuch new
+multi-file-strategy = act-dir
[Development]
source = notmuch://~/Mail/dev
@@ -31,6 +32,16 @@ maildir-store = ~/Mail/job
outgoing-cred-cmd = pass Email/job@rozanov.info
check-mail-cmd = NOTMUCH_PROFILE=job notmuch new
+[Accounts]
+source = notmuch://~/Mail/account
+outgoing = smtp://account@rozanov.info@mail.rozanov.info:587
+default = INBOX
+from = Daniil Rozanov <account@rozanov.info>
+maildir-store = ~/Mail/account
+# query-map = ~/.config/aerc/Account.qmap
+outgoing-cred-cmd = pass Email/account@rozanov.info
+check-mail-cmd = NOTMUCH_PROFILE=account notmuch new
+
[TestMail]
source = notmuch://~/Mail/testmail
outgoing = smtp://testmail@rozanov.info@mail.rozanov.info:587
diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf
index 0cd144d..deb8cf7 100644
--- a/aerc/.config/aerc/aerc.conf
+++ b/aerc/.config/aerc/aerc.conf
@@ -604,7 +604,7 @@ pager=less -Rc
# none of their specified headers are present in the message.
#
# Default: From|To,Cc|Bcc,Date,Subject
-#header-layout=From|To,Cc|Bcc,Date,Subject
+header-layout=From,To,Cc,Bcc,Date,Subject
# Whether to always show the mimetype of an email, even when it is just a single part
#
@@ -674,7 +674,7 @@ pager=less -Rc
# ignored.
#
# This parameter can also be set per account in accounts.conf.
-#address-book-cmd=
+address-book-cmd=abook --mutt-query '%s'
# Specifies the command to be used to select attachments. Any occurrence of
# '%s' in the file-picker-cmd will be replaced with the argument <arg>
diff --git a/aerc/.config/aerc/binds.conf b/aerc/.config/aerc/binds.conf
index cebb942..58397e9 100644
--- a/aerc/.config/aerc/binds.conf
+++ b/aerc/.config/aerc/binds.conf
@@ -15,6 +15,7 @@
[messages]
q = :prompt 'Quit?' quit<Enter>
+md = :modify-labels +trash<Enter>
<C-r> = :check-mail<Enter>
j = :next<Enter>
@@ -63,7 +64,7 @@ a = :archive flat<Enter>
A = :unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>
C = :compose<Enter>
-m = :compose<Enter>
+# m = :compose<Enter>
b = :bounce<space>
diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml
index 8cc9953..9670328 100644
--- a/alacritty/.config/alacritty/alacritty.toml
+++ b/alacritty/.config/alacritty/alacritty.toml
@@ -1,18 +1,20 @@
[env]
-TERM = "xterm-256color"
+# TERM = "xterm-256color"
+
+[window]
[font]
-size = 11.0
+size = 10.5
[font.normal]
-family = "CommitMono Nerd Font Mono"
+family = "JetBrainsMono Nerd Font"
style = "Regular"
[font.bold]
style = "Bold"
[font.italic]
-style = "Regular" # Italic
+style = "Italic"
[[keyboard.bindings]]
action = "ToggleFullscreen"
diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config
new file mode 100644
index 0000000..813b1eb
--- /dev/null
+++ b/ghostty/.config/ghostty/config
@@ -0,0 +1,21 @@
+keybind = page_up=scroll_page_up
+keybind = page_down=scroll_page_down
+
+keybind = ctrl+shift+h=goto_split:left
+keybind = ctrl+shift+j=goto_split:down
+keybind = ctrl+shift+k=goto_split:up
+keybind = ctrl+shift+l=goto_split:right
+keybind = ctrl+shift+p=previous_tab
+keybind = ctrl+shift+n=next_tab
+
+keybind = ctrl+shift+alt+h=resize_split:left,15
+keybind = ctrl+shift+alt+j=resize_split:down,15
+keybind = ctrl+shift+alt+k=resize_split:up,15
+keybind = ctrl+shift+alt+l=resize_split:right,15
+keybind = ctrl+shift+alt+e=equalize_splits
+
+keybind = f11=toggle_fullscreen
+keybind = ctrl+shift+q=close_window
+keybind = ctrl+shift+d=close_tab
+
+font-size = 11.5
diff --git a/guix/manifest.scm b/guix/manifest.scm
new file mode 100644
index 0000000..f94ac0a
--- /dev/null
+++ b/guix/manifest.scm
@@ -0,0 +1,45 @@
+;; This "manifest" file can be passed to 'guix package -m' to reproduce
+;; the content of your profile. This is "symbolic": it only specifies
+;; package names. To reproduce the exact same profile, you also need to
+;; capture the channels being used, as returned by "guix describe".
+;; See the "Replicating Guix" section in the manual.
+
+(use-modules (guix transformations))
+
+(define transform1
+ (options->transformation
+ '((with-branch . "neovim=release-0.10")
+ (with-branch . "tree-sitter=release-0.24"))))
+
+(packages->manifest
+ (list (specification->package "cmatrix")
+ (specification->package "zsh")
+ (specification->package "cmake")
+ (transform1 (specification->package "neovim"))
+ (transform1
+ (specification->package "tree-sitter"))
+ (specification->package "docker")
+ (specification->package "vlc")
+ (specification->package "sbcl")
+ (specification->package "telegram-desktop")
+ (specification->package "tor-client")
+ (specification->package "tor")
+ (specification->package "clang")
+ (specification->package "llvm")
+ (specification->package "tmux")
+ (specification->package "rlwrap")
+ (specification->package "gcc-toolchain")
+ (specification->package "alacritty")
+ (specification->package "guile")
+ (specification->package "nftables")
+ (specification->package "w3m")
+ (specification->package "wireguard-tools")
+ (specification->package "torsocks")
+ (specification->package "postgresql")
+ (specification->package "less")
+ (specification->package "man-db")
+ (specification->package "coreutils")
+ (specification->package "ncurses")
+ (specification->package "neomutt")
+ (specification->package "mutt")
+ (specification->package "glibc-locales")))
diff --git a/isync/.config/isyncrc b/isync/.config/isyncrc
index d382511..65166a5 100644
--- a/isync/.config/isyncrc
+++ b/isync/.config/isyncrc
@@ -76,3 +76,22 @@ Channel testmail
Far :testmail-remote:
Near :testmail-local:
Patterns *
+
+
+IMAPStore account-remote
+Host mail.rozanov.info
+Port 993
+User account@rozanov.info
+PassCmd "pass Email/account@rozanov.info"
+TLSType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+MaildirStore account-local
+Path ~/Mail/account/
+Inbox ~/Mail/account/INBOX
+SubFolders Verbatim
+
+Channel account
+Far :account-remote:
+Near :account-local:
+Patterns *
diff --git a/newsboat/.config/newsboat/config b/newsboat/.config/newsboat/config
index 8aa6490..976cb31 100644
--- a/newsboat/.config/newsboat/config
+++ b/newsboat/.config/newsboat/config
@@ -1,7 +1,8 @@
#show-read-feeds no
auto-reload no
-browser "open %u >/dev/null 2>&1"
+browser firefox
+pager "less -R"
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
bind-key j down
@@ -30,7 +31,6 @@ color listfocus_unread yellow default bold
color info red black bold
color article white default bold
-browser linkhandler
macro , open-in-browser
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best --restrict-filenames" ; open-in-browser ; set browser linkhandler
diff --git a/newsboat/.config/newsboat/urls b/newsboat/.config/newsboat/urls
index 2ca9352..f038118 100644
--- a/newsboat/.config/newsboat/urls
+++ b/newsboat/.config/newsboat/urls
@@ -4,6 +4,7 @@ https://lukesmith.xyz/index.xml blog
---C++_organizations---
https://cppcon.org/rss c++
+https://cppnow.org/feed c++
https://isocpp.org/blog/rss/category/news c++ news
https://isocpp.org/blog/rss/category/product-news c++ news
https://isocpp.org/blog/rss/category/articles-books c++
@@ -18,7 +19,19 @@ https://guix.gnu.org/feeds/blog.atom
---Projects---
https://neovim.io/news.xml
+---Social---
+https://rabkor.ru/feed
+https://rabkor.ru/author/boris_kagarlitsky/feed
+https://rabkor.ru/author/alex-sakhnin/feed
+https://moskvichmag.ru/author/sahnin/feed
+
---YouTube---
https://www.youtube.com/feeds/videos.xml?channel_id=UCvmBEbr9NZt7UEh9doI7n_A
+https://www.youtube.com/feeds/videos.xml?channel_id=UC5e__RG9K3cHrPotPABnrwg
+https://www.youtube.com/feeds/videos.xml?channel_id=UCMlGfpWw-RUdWX_JbLCukXg
+---Reddit---
+https://www.reddit.com/r/neovim/.rss
+---Torrents---
+https://rutracker.org/forum/viewforum.php?f=7
diff --git a/notmuch/.config/notmuch/account/config b/notmuch/.config/notmuch/account/config
new file mode 100644
index 0000000..dc8d1f7
--- /dev/null
+++ b/notmuch/.config/notmuch/account/config
@@ -0,0 +1,16 @@
+# vim: filetype=dosini
+
+[database]
+path=/home/chell/Mail/account
+[user]
+name=Daniil Rozanov
+primary_email=account@rozanov.info
+[new]
+tags=inbox;unread
+ignore=.mbsyncstate;.uidvalidity
+[search]
+exclude_tags=deleted;spam;
+[maildir]
+synchronize_flags=true
+[crypto]
+gpg_path=gpg
diff --git a/notmuch/.config/notmuch/account/hooks b/notmuch/.config/notmuch/account/hooks
new file mode 120000
index 0000000..f631275
--- /dev/null
+++ b/notmuch/.config/notmuch/account/hooks
@@ -0,0 +1 @@
+../hooks \ No newline at end of file
diff --git a/notmuch/.config/notmuch/hooks/post-new b/notmuch/.config/notmuch/hooks/post-new
index 992e0b4..1cda0d8 100755
--- a/notmuch/.config/notmuch/hooks/post-new
+++ b/notmuch/.config/notmuch/hooks/post-new
@@ -1,16 +1,22 @@
#!/bin/sh
-notmuch tag +info-gnu -- cc:info-gnu@gnu.org or to:info-gnu@gnu.org
-notmuch tag +info-guix -- cc:info-guix@gnu.org or to:info-guix@gnu.org
-notmuch tag +sg7 -- cc:sg7@lists.isocpp.org or to:sg7@lists.isocpp.org
-notmuch tag +sg13 -- cc:sg13@lists.isocpp.org or to:sg13@lists.isocpp.org
-notmuch tag +sg14 -- cc:sg14@lists.isocpp.org or to:sg14@lists.isocpp.org
-notmuch tag +sg15 -- cc:sg15@lists.isocpp.org or to:sg15@lists.isocpp.org
-notmuch tag +sg16 -- cc:sg16@lists.isocpp.org or to:sg16@lists.isocpp.org
-notmuch tag +std-discussion -- cc:std-discussion@lists.isocpp.org or to:std-discussion@lists.isocpp.org
-notmuch tag +std-proposals -- cc:std-proposals@lists.isocpp.org or to:std-proposals@lists.isocpp.org
-notmuch tag +notmuch -- cc:notmuch@notmuchmail.org or to:notmuch@notmuchmail.org
-notmuch tag +rjarry-aerc-discuss -- cc:~rjarry/aerc-discuss@lists.sr.ht or to:~rjarry/aerc-discuss@lists.sr.ht
+notmuch tag +info-gnu +maillist -- cc:info-gnu@gnu.org or to:info-gnu@gnu.org
+notmuch tag +info-guix +maillist -- cc:info-guix@gnu.org or to:info-guix@gnu.org
+notmuch tag +help-guix +maillist -- cc:help-guix@gnu.org or to:help-guix@gnu.org
+notmuch tag +sg7 +maillist -- cc:sg7@lists.isocpp.org or to:sg7@lists.isocpp.org
+notmuch tag +sg13 +maillist -- cc:sg13@lists.isocpp.org or to:sg13@lists.isocpp.org
+notmuch tag +sg14 +maillist -- cc:sg14@lists.isocpp.org or to:sg14@lists.isocpp.org
+notmuch tag +sg15 +maillist -- cc:sg15@lists.isocpp.org or to:sg15@lists.isocpp.org
+notmuch tag +sg16 +maillist -- cc:sg16@lists.isocpp.org or to:sg16@lists.isocpp.org
+notmuch tag +std-discussion +maillist -- cc:std-discussion@lists.isocpp.org or to:std-discussion@lists.isocpp.org
+notmuch tag +std-proposals +maillist -- cc:std-proposals@lists.isocpp.org or to:std-proposals@lists.isocpp.org
+notmuch tag +notmuch +maillist -- cc:notmuch@notmuchmail.org or to:notmuch@notmuchmail.org
+notmuch tag +rjarry-aerc-discuss +maillist -- cc:~rjarry/aerc-discuss@lists.sr.ht or to:~rjarry/aerc-discuss@lists.sr.ht
+notmuch tag +pgsql-general +maillist -- cc:pgsql-general@lists.postgresql.org or to:pgsql-general@lists.postgresql.org
+notmuch tag +pgsql-general +maillist -- cc:pgsql-general@postgresql.org or to:pgsql-general@postgresql.org
+notmuch tag +boost-users +maillist -- cc:boost-users@lists.boost.org or to:boost-users@lists.boost.org
+notmuch tag +boost +maillist -- cc:boost@lists.boost.org or to:boost@lists.boost.org
+notmuch tag +zsh-users +maillist -- cc:zsh-users@zsh.org or to:zsh-users@zsh.org
# Some interesting trashing/trashed, Xing/Xed in general was mentioned
@@ -20,3 +26,5 @@ notmuch tag -inbox -unread -draft +sent -- folder:Sent
notmuch tag -inbox -unread +draft -- folder:Draft
notmuch tag +inbox -- folder:INBOX
+
+notmuch search --format=text0 --output=files tag:trash | xargs -0 --no-run-if-empty rm -v
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua
index d3ebf8f..765c55a 100644
--- a/nvim/.config/nvim/init.lua
+++ b/nvim/.config/nvim/init.lua
@@ -1,6 +1,12 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
+require("keymaps")
+require("autocmds")
+require("options")
+require("terminal")
+require("lsp")
+
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
@@ -17,8 +23,8 @@ end
---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
--- Set up lazy, and load my `lua/custom/plugins/` folder
-require("lazy").setup({ import = "custom/plugins" }, {
+-- Set up lazy, and load my `lua/plugins/` folder
+require("lazy").setup({ import = "plugins" }, {
change_detection = {
notify = false,
},
diff --git a/nvim/.config/nvim/lsp/bashls.lua b/nvim/.config/nvim/lsp/bashls.lua
new file mode 100644
index 0000000..ff1e16d
--- /dev/null
+++ b/nvim/.config/nvim/lsp/bashls.lua
@@ -0,0 +1,4 @@
+return {
+ cmd = { 'bash-language-server', 'start' },
+ filetypes = { 'bash', 'sh', 'zsh' }
+}
diff --git a/nvim/.config/nvim/lsp/clangd.lua b/nvim/.config/nvim/lsp/clangd.lua
new file mode 100644
index 0000000..ca25f94
--- /dev/null
+++ b/nvim/.config/nvim/lsp/clangd.lua
@@ -0,0 +1,5 @@
+return {
+ cmd = { 'clangd', '--background-index' },
+ root_markers = { 'compile_commands.json', 'compile_flags.txt', '.clangd', 'build/' },
+ filetypes = { 'c', 'cpp' },
+}
diff --git a/nvim/.config/nvim/lsp/lua_ls.lua b/nvim/.config/nvim/lsp/lua_ls.lua
new file mode 100644
index 0000000..3ea54d9
--- /dev/null
+++ b/nvim/.config/nvim/lsp/lua_ls.lua
@@ -0,0 +1,20 @@
+return {
+ cmd = { 'lua-language-server' },
+ root_makers = {
+ '.luarc.json',
+ '.luarc.jsonc',
+ '.luacheckrc',
+ '.stylua.toml',
+ 'stylua.toml',
+ 'selene.toml',
+ 'selene.yml',
+ },
+ filetypes = { 'lua' },
+ settings = {
+ Lua = {
+ runtime = {
+ version = 'LuaJIT',
+ }
+ }
+ }
+}
diff --git a/nvim/.config/nvim/plugin/autocmds.lua b/nvim/.config/nvim/lua/autocmds.lua
index 6349fb8..a14bd32 100644
--- a/nvim/.config/nvim/plugin/autocmds.lua
+++ b/nvim/.config/nvim/lua/autocmds.lua
@@ -43,6 +43,7 @@ vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, {
end
end,
})
+
vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
group = augroup "auto_cursorline_hide",
callback = function()
diff --git a/nvim/.config/nvim/lua/custom/autopairs.lua b/nvim/.config/nvim/lua/custom/autopairs.lua
deleted file mode 100644
index 00c7812..0000000
--- a/nvim/.config/nvim/lua/custom/autopairs.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-require("nvim-autopairs").setup {}
--- Automatically add `(` after selecting a function or method
-local cmp_autopairs = require "nvim-autopairs.completion.cmp"
-local cmp = require "cmp"
-cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
diff --git a/nvim/.config/nvim/lua/custom/cmake.lua b/nvim/.config/nvim/lua/custom/cmake.lua
deleted file mode 100644
index bef1fc7..0000000
--- a/nvim/.config/nvim/lua/custom/cmake.lua
+++ /dev/null
@@ -1 +0,0 @@
-require("cmake").setup { cmake = { parallel_jobs = #vim.uv.cpu_info() } }
diff --git a/nvim/.config/nvim/lua/custom/cmp.lua b/nvim/.config/nvim/lua/custom/cmp.lua
deleted file mode 100644
index 5cbb2e8..0000000
--- a/nvim/.config/nvim/lua/custom/cmp.lua
+++ /dev/null
@@ -1,69 +0,0 @@
-vim.opt.completeopt = { "menu", "menuone", "noselect" }
-vim.opt.shortmess:append "c"
-
-local lspkind = require "lspkind"
-lspkind.init {}
-
-local luasnip = require "luasnip"
-luasnip.config.setup {}
-require("luasnip.loaders.from_vscode").lazy_load()
-
-local cmp = require "cmp"
-
-cmp.setup {
- snippet = {
- expand = function(args)
- luasnip.lsp_expand(args.body)
- end,
- },
- completion = { completeopt = "menu,menuone,noinsert" },
- mapping = cmp.mapping.preset.insert {
- -- ["<C-n>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
- -- ["<C-p>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
- ["<C-y>"] = cmp.mapping(
- cmp.mapping.confirm {
- behavior = cmp.ConfirmBehavior.Insert,
- select = true,
- },
- { "i", "c" }
- ),
- ["<C-b>"] = cmp.mapping.scroll_docs(-4),
- ["<C-f>"] = cmp.mapping.scroll_docs(4),
- -- ["<C-y>"] = cmp.mapping.confirm { select = true },
- -- -- Will move you to the right of each of the snippet's expansion locations.
- ["<C-l>"] = cmp.mapping(function()
- if luasnip.expand_or_locally_jumpable() then
- luasnip.expand_or_jump()
- end
- end, { "i", "s" }),
- -- Will move you to the left of each of the snippet's expansion locations.
- ["<C-h>"] = cmp.mapping(function()
- if luasnip.locally_jumpable(-1) then
- luasnip.jump(-1)
- end
- end, { "i", "s" }),
- },
- sources = {
- { name = "nvim_lsp" },
- { name = "luasnip" },
- { name = "path" },
- { name = "buffer" },
- },
-}
-
--- Setup up vim-dadbod
-cmp.setup.filetype({ "sql" }, {
- sources = {
- { name = "vim-dadbod-completion" },
- { name = "buffer" },
- },
-})
-
-luasnip.config.set_config {
- history = false,
- updateevents = "TextChanged,TextChangedI",
-}
-
-for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do
- loadfile(ft_path)()
-end
diff --git a/nvim/.config/nvim/lua/custom/gitsigns.lua b/nvim/.config/nvim/lua/custom/gitsigns.lua
deleted file mode 100644
index 2a12ebb..0000000
--- a/nvim/.config/nvim/lua/custom/gitsigns.lua
+++ /dev/null
@@ -1,60 +0,0 @@
-local gitsigns = require "gitsigns"
-
-local on_attach = function(bufnr)
- local function map(mode, l, r, opts)
- opts = opts or {}
- opts.buffer = bufnr
- vim.keymap.set(mode, l, r, opts)
- end
-
- -- Navigation
- map("n", "]c", function()
- if vim.wo.diff then
- vim.cmd.normal { "]c", bang = true }
- else
- gitsigns.nav_hunk "next"
- end
- end)
-
- map("n", "[c", function()
- if vim.wo.diff then
- vim.cmd.normal { "[c", bang = true }
- else
- gitsigns.nav_hunk "prev"
- end
- end)
-
- -- Actions
- map("n", "<leader>gs", gitsigns.stage_hunk, { desc = "Stage hunk" })
- map("n", "<leader>gr", gitsigns.reset_hunk, { desc = "Reset hunk" })
- map("v", "<leader>gs", function()
- gitsigns.stage_hunk { vim.fn.line ".", vim.fn.line "v" }
- end, { desc = "Stage hunk" })
- map("v", "<leader>gr", function()
- gitsigns.reset_hunk { vim.fn.line ".", vim.fn.line "v" }
- end, { desc = "Reset hunk" })
- map("n", "<leader>gS", gitsigns.stage_buffer, { desc = "Stage buffer" })
- map("n", "<leader>gu", gitsigns.undo_stage_hunk, { desc = "Undo stage hunk" })
- map("n", "<leader>gR", gitsigns.reset_buffer, { desc = "Reset buffer" })
- map("n", "<leader>gp", gitsigns.preview_hunk, { desc = "Preview hunk" })
- map("n", "<leader>gb", function()
- gitsigns.blame_line { full = true }
- end, { desc = "Blame line" })
- map("n", "<leader>Tb", gitsigns.toggle_current_line_blame, { desc = "Toggle blame line" })
- map("n", "<leader>Td", gitsigns.toggle_deleted, { desc = "Toggle deleted" })
- map("n", "<leader>gd", gitsigns.diffthis, { desc = "Diff this" })
- map("n", "<leader>gD", function()
- gitsigns.diffthis "~"
- end, { desc = "Diff this ~" })
-end
-
-gitsigns.setup {
- signs = {
- add = { text = "+" },
- change = { text = "~" },
- delete = { text = "_" },
- topdelete = { text = "‾" },
- changedelete = { text = "~" },
- },
- on_attach = on_attach,
-}
diff --git a/nvim/.config/nvim/lua/custom/harpoon.lua b/nvim/.config/nvim/lua/custom/harpoon.lua
deleted file mode 100644
index 06a20d7..0000000
--- a/nvim/.config/nvim/lua/custom/harpoon.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-local harpoon = require "harpoon"
-harpoon:setup()
-
-vim.keymap.set("n", "<leader>a", function()
- harpoon:list():add()
-end)
-
-vim.keymap.set("n", "<leader><leader>", function()
- harpoon.ui:toggle_quick_menu(harpoon:list())
-end)
-
-vim.keymap.set("n", "<c-n>", function()
- require("harpoon"):list():next()
-end)
-
-vim.keymap.set("n", "<c-p>", function()
- require("harpoon"):list():prev()
-end)
-
--- Set <space>1..<space>5 be my shortcuts to moving to the files
-for _, idx in ipairs { 1, 2, 3, 4, 5 } do
- vim.keymap.set("n", string.format("<leader>%d", idx), function()
- harpoon:list():select(idx)
- end)
-end
diff --git a/nvim/.config/nvim/lua/custom/init.lua b/nvim/.config/nvim/lua/custom/init.lua
deleted file mode 100644
index 9e39d84..0000000
--- a/nvim/.config/nvim/lua/custom/init.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-require("chell.globals")
-require("chell.options")
-require("chell.keymaps")
-require("chell.autocmds")
-require("chell.lazy")
diff --git a/nvim/.config/nvim/lua/custom/leap.lua b/nvim/.config/nvim/lua/custom/leap.lua
deleted file mode 100644
index 5f25e50..0000000
--- a/nvim/.config/nvim/lua/custom/leap.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-vim.keymap.set("n", "s", "<Plug>(leap)", { desc = "Leap" })
-vim.keymap.set("n", "S", "<Plug>(leap-from-window)", { desc = "Leap other window" })
-require("leap").setup { safe_labels = {} }
diff --git a/nvim/.config/nvim/lua/custom/lsp.lua b/nvim/.config/nvim/lua/custom/lsp.lua
deleted file mode 100644
index 47ca1d3..0000000
--- a/nvim/.config/nvim/lua/custom/lsp.lua
+++ /dev/null
@@ -1,113 +0,0 @@
---TODO: make it prettier
-
-require("neodev").setup {
- library = {
- plugins = { "nvim-dap-ui" },
- types = true,
- },
-}
-
-local capabilities = nil
-if pcall(require, "cmp_nvim_lsp") then
- capabilities = require("cmp_nvim_lsp").default_capabilities()
-end
-
-local lspconfig = require "lspconfig"
-
-local servers = {
- bashls = true,
- gopls = true,
- lua_ls = true,
- rust_analyzer = true,
-
- jsonls = {
- settings = {
- json = {
- schemas = require("schemastore").json.schemas(),
- validate = { enable = true },
- },
- },
- },
-
- yamlls = {
- settings = {
- yaml = {
- schemaStore = {
- enable = false,
- url = "",
- },
- schemas = require("schemastore").yaml.schemas(),
- },
- },
- },
-
- clangd = {
- init_options = { clangdFileStatus = true },
- },
-}
-
-for name, config in pairs(servers) do
- if config == true then
- config = {}
- end
- config = vim.tbl_deep_extend("force", {}, {
- capabilities = capabilities,
- }, config)
-
- lspconfig[name].setup(config)
-end
-
-local disable_semantic_tokens = {
- lua = true,
-}
-
-vim.api.nvim_create_autocmd("LspAttach", {
- callback = function(args)
- local bufnr = args.buf
- local client = assert(vim.lsp.get_client_by_id(args.data.client_id), "must have valid client")
- local builtin = require "telescope.builtin"
-
- vim.opt_local.omnifunc = "v:lua.vim.lsp.omnifunc"
- vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = 0 })
- vim.keymap.set("n", "gr", vim.lsp.buf.references, { buffer = 0 })
- vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { buffer = 0 })
- vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, { buffer = 0 })
- vim.keymap.set("n", "<leader>lr", vim.lsp.buf.rename, { buffer = 0 })
- vim.keymap.set("n", "<leader>la", vim.lsp.buf.code_action, { buffer = 0 })
- vim.keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
- vim.keymap.set("n", "<leader>lw", builtin.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace Symbols" })
- -- nmap("gd", builtin.lsp_definitions, { desc = "[G]oto [D]efinition" })
- -- nmap("gr", builtin.lsp_references, { desc = "[G]oto [R]eferences" })
- -- nmap("gI", builtin.lsp_implementations, { desc = "[G]oto [I]mplementation" })
-
- local filetype = vim.bo[bufnr].filetype
- if disable_semantic_tokens[filetype] then
- client.server_capabilities.semanticTokensProvider = nil
- end
-
- if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
- vim.keymap.set("n", "<leader>Th", function()
- vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
- end, { desc = "[T]oggle Inlay [H]ints" })
- end
- end,
-})
-
--- Autoformatting Setup
-require("conform").setup {
- formatters_by_ft = {
- lua = { "stylua" },
- cpp = { "clang-format" },
- c = { "clang-format" },
- },
-}
-
-vim.api.nvim_create_autocmd("BufWritePre", {
- callback = function(args)
- require("conform").format {
- bufnr = args.buf,
- lsp_fallback = true,
- quiet = true,
- }
- end,
-})
diff --git a/nvim/.config/nvim/lua/custom/mini.lua b/nvim/.config/nvim/lua/custom/mini.lua
deleted file mode 100644
index e69de29..0000000
--- a/nvim/.config/nvim/lua/custom/mini.lua
+++ /dev/null
diff --git a/nvim/.config/nvim/lua/custom/plugins/autopairs.lua b/nvim/.config/nvim/lua/custom/plugins/autopairs.lua
deleted file mode 100644
index 170b337..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/autopairs.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-return {
- "windwp/nvim-autopairs",
- event = "InsertEnter",
- -- Optional dependency
- dependencies = { "hrsh7th/nvim-cmp" },
- config = function()
- require "custom.autopairs"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/cmake.lua b/nvim/.config/nvim/lua/custom/plugins/cmake.lua
deleted file mode 100644
index 8bd0207..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/cmake.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-if vim.loop.os_uname().sysname ~= "Darwin" then
- return {
- "daniilrozanov/cmake.nvim",
- lazy = false,
- config = function()
- require "custom.cmake"
- end,
- }
-else
- return {
- dir = "~/repositories/cmake.nvim",
- lazy = false,
- config = function()
- require "custom.cmake"
- end,
- }
-end
diff --git a/nvim/.config/nvim/lua/custom/plugins/cmp.lua b/nvim/.config/nvim/lua/custom/plugins/cmp.lua
deleted file mode 100644
index 83fb5a2..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/cmp.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-return {
- {
- "hrsh7th/nvim-cmp",
- event = "InsertEnter",
- priority = 100,
- dependencies = {
- "onsails/lspkind.nvim",
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-path",
- "hrsh7th/cmp-buffer",
- {
- "L3MON4D3/LuaSnip",
- build = "make install_jsregexp",
- dependencies = { "rafamadriz/friendly-snippets" },
- },
- "saadparwaiz1/cmp_luasnip",
- },
- config = function()
- require "custom.cmp"
- end,
- },
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/conform.lua b/nvim/.config/nvim/lua/custom/plugins/conform.lua
deleted file mode 100644
index 2fcf210..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/conform.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-return { -- Autoformat
- "stevearc/conform.nvim",
- lazy = false,
- keys = {
- {
- "<leader>lf",
- function()
- require("conform").format { async = true, lsp_fallback = true }
- end,
- mode = "",
- desc = "Format buffer",
- },
- },
- opts = {
- notify_on_error = false,
- format_on_save = function(bufnr)
- -- Disable "format_on_save lsp_fallback" for languages that don't
- -- have a well standardized coding style. You can add additional
- -- languages here or re-enable it for the disabled ones.
- local disable_filetypes = { c = true, cpp = true }
- return {
- timeout_ms = 500,
- lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
- }
- end,
- formatters_by_ft = {
- lua = { "stylua" },
- -- Conform can also run multiple formatters sequentially
- -- python = { "isort", "black" },
- --
- -- You can use a sub-list to tell conform to run *until* a formatter
- -- is found.
- -- javascript = { { "prettierd", "prettier" } },
- },
- },
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/gitsigns.lua b/nvim/.config/nvim/lua/custom/plugins/gitsigns.lua
deleted file mode 100644
index 3da8ed4..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/gitsigns.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return {
- "lewis6991/gitsigns.nvim",
- config = function()
- require "custom.gitsigns"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/harpoon.lua b/nvim/.config/nvim/lua/custom/plugins/harpoon.lua
deleted file mode 100644
index aa8dae8..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/harpoon.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-return {
- "ThePrimeagen/harpoon",
- branch = "harpoon2",
- dependencies = { "nvim-lua/plenary.nvim" },
- config = function()
- require "custom.harpoon"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/leap.lua b/nvim/.config/nvim/lua/custom/plugins/leap.lua
deleted file mode 100644
index 5566ecc..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/leap.lua
+++ /dev/null
@@ -1,7 +0,0 @@
-return {
- "ggandor/leap.nvim",
- lazy = false, --TODO: lazy
- config = function()
- require "custom.leap"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/lsp.lua b/nvim/.config/nvim/lua/custom/plugins/lsp.lua
deleted file mode 100644
index ac87b84..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/lsp.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-return {
- {
- "neovim/nvim-lspconfig",
- dependencies = {
- "folke/neodev.nvim",
- "williamboman/mason.nvim",
- "williamboman/mason-lspconfig.nvim",
- "WhoIsSethDaniel/mason-tool-installer.nvim",
-
- { "j-hui/fidget.nvim", opts = {} },
-
- -- Autoformatting
- "stevearc/conform.nvim",
-
- -- Schema information
- "b0o/SchemaStore.nvim",
- },
- config = function()
- require "custom.lsp"
- end,
- },
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/substitude.lua b/nvim/.config/nvim/lua/custom/plugins/substitude.lua
deleted file mode 100644
index bb8bd9f..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/substitude.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return {
- "gbprod/substitute.nvim",
- config = function()
- require "custom.substitude"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/telescope.lua b/nvim/.config/nvim/lua/custom/plugins/telescope.lua
deleted file mode 100644
index 00be4c1..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/telescope.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-return {
- "nvim-telescope/telescope.nvim",
- event = "VimEnter",
- branch = "0.1.x",
- dependencies = {
- "nvim-lua/plenary.nvim",
- { "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
- { "nvim-telescope/telescope-smart-history.nvim" },
- { "nvim-telescope/telescope-ui-select.nvim" },
- { "nvim-tree/nvim-web-devicons" },
- },
- config = function()
- require "custom.telescope"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua b/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua
deleted file mode 100644
index 8775389..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua
+++ /dev/null
@@ -1,7 +0,0 @@
-return {
- "akinsho/toggleterm.nvim",
- version = "*",
- config = function()
- require "custom.toggleterm"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/treesitter.lua b/nvim/.config/nvim/lua/custom/plugins/treesitter.lua
deleted file mode 100644
index dd37a3a..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/treesitter.lua
+++ /dev/null
@@ -1,7 +0,0 @@
-return {
- "nvim-treesitter/nvim-treesitter",
- build = ":TSUpdate",
- config = function()
- require "custom.treesitter"
- end,
-}
diff --git a/nvim/.config/nvim/lua/custom/plugins/vim-sleuth.lua b/nvim/.config/nvim/lua/custom/plugins/vim-sleuth.lua
deleted file mode 100644
index a564707..0000000
--- a/nvim/.config/nvim/lua/custom/plugins/vim-sleuth.lua
+++ /dev/null
@@ -1 +0,0 @@
-return {}
diff --git a/nvim/.config/nvim/lua/custom/substitude.lua b/nvim/.config/nvim/lua/custom/substitude.lua
deleted file mode 100644
index e666195..0000000
--- a/nvim/.config/nvim/lua/custom/substitude.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-require("substitute").setup {}
-
-vim.keymap.set("n", ",", require("substitute").operator, { noremap = true })
-vim.keymap.set("n", ",,", require("substitute").line, { noremap = true })
--- vim.keymap.set("n", "", require("substitute").eol, { noremap = true })
-vim.keymap.set("x", ",", require("substitute").visual, { noremap = true })
diff --git a/nvim/.config/nvim/lua/custom/telescope.lua b/nvim/.config/nvim/lua/custom/telescope.lua
deleted file mode 100644
index 219264b..0000000
--- a/nvim/.config/nvim/lua/custom/telescope.lua
+++ /dev/null
@@ -1,82 +0,0 @@
--- local data = assert(vim.fn.stdpath "data") --[[@as string]]
-
-require("telescope").setup {
- extensions = {
- fzf = {},
- wrap_results = true,
- history = {
- -- path = vim.fs.joinpath(data, "telescope_history.sqlite3"),
- limit = 100,
- },
- ["ui-select"] = {
- require("telescope.themes").get_dropdown(),
- },
- },
- defaults = {
- -- configure to use ripgrep
- vimgrep_arguments = {
- "rg",
- "--follow", -- Follow symbolic links
- "--hidden", -- Search for hidden files
- "--no-heading", -- Don't group matches by each file
- "--with-filename", -- Print the file path with the matched lines
- "--line-number", -- Show line numbers
- "--column", -- Show column numbers
- "--smart-case", -- Smart case search
-
- -- Exclude some patterns from search
- "--glob=!**/.git/*",
- "--glob=!**/.idea/*",
- "--glob=!**/.vscode/*",
- "--glob=!**/build/*",
- "--glob=!**/dist/*",
- "--glob=!**/yarn.lock",
- "--glob=!**/package-lock.json",
- },
- },
- pickers = {
- find_files = {
- hidden = true,
- -- needed to exclude some files & dirs from general search
- -- when not included or specified in .gitignore
- find_command = {
- "rg",
- "--files",
- "--hidden",
- "--glob=!**/.git/*",
- "--glob=!**/.idea/*",
- "--glob=!**/.vscode/*",
- "--glob=!**/build/*",
- "--glob=!**/dist/*",
- "--glob=!**/yarn.lock",
- "--glob=!**/package-lock.json",
- },
- },
- },
-}
-
-pcall(require("telescope").load_extension, "fzf")
-pcall(require("telescope").load_extension, "smart_history")
-pcall(require("telescope").load_extension, "rest")
-pcall(require("telescope").load_extension, "ui-select")
-
-local builtin = require "telescope.builtin"
-
-vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Search [H]elp" })
-vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Search [K]eymaps" })
-vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Search [F]iles" })
-vim.keymap.set("n", "<leader>fs", builtin.builtin, { desc = "Search [S]elect Telescope" })
-vim.keymap.set("n", "<leader>fw", builtin.grep_string, { desc = "Search current [W]ord" })
-vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Search by [G]rep" })
-vim.keymap.set("n", "<leader>fd", builtin.diagnostics, { desc = "Search [D]iagnostics" })
-vim.keymap.set("n", "<leader>fr", builtin.resume, { desc = "Search [R]esume" })
-vim.keymap.set("n", "<leader>f.", builtin.oldfiles, { desc = 'Search Recent Files ("." for repeat)' })
-vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "[ ] Find existing buffers" })
-vim.keymap.set("n", "<leader>fn", function()
- require("telescope.builtin").find_files { cwd = vim.fn.stdpath "config" }
-end, { desc = "Search [N]eovim files" })
-
-vim.keymap.set("n", "<leader>fa", function()
- ---@diagnostic disable-next-line: param-type-mismatch
- builtin.find_files { cwd = vim.fs.joinpath(vim.fn.stdpath "data", "lazy") }
-end)
diff --git a/nvim/.config/nvim/lua/custom/toggleterm.lua b/nvim/.config/nvim/lua/custom/toggleterm.lua
deleted file mode 100644
index 6aafb2f..0000000
--- a/nvim/.config/nvim/lua/custom/toggleterm.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-require("toggleterm").setup {
- size = function(term)
- if term.direction == "horizontal" then
- return 15
- elseif term.direction == "vertical" then
- return vim.o.columns * 0.33
- end
- end,
-}
-
-local Terminal = require("toggleterm.terminal").Terminal
-local on_open = function(_)
- vim.cmd "startinsert!"
- -- vim.keymap.set("n", "q", "<cmd>close<CR>", { noremap = true, silent = true, buffer = term.bufnr })
-end
-local on_close = function(_)
- vim.cmd "startinsert!"
-end
-if vim.fn.executable "lazygit" then
- local lazygit = Terminal:new {
- cmd = "lazygit",
- dir = "git_dir",
- direction = "float",
- on_open = on_open,
- on_close = on_close,
- count = 999,
- }
- vim.keymap.set("n", "<leader>gg", function()
- lazygit:toggle()
- end, { desc = "ToggleTerm LazyGit" })
-end
-
-vim.keymap.set("n", "<leader>tf", function()
- Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "float")
-end)
-vim.keymap.set("n", "<leader>tv", function()
- Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "vertical")
-end)
-vim.keymap.set("n", "<leader>th", function()
- Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "horizontal")
-end)
diff --git a/nvim/.config/nvim/lua/custom/treesitter.lua b/nvim/.config/nvim/lua/custom/treesitter.lua
deleted file mode 100644
index 5f8e8fb..0000000
--- a/nvim/.config/nvim/lua/custom/treesitter.lua
+++ /dev/null
@@ -1,51 +0,0 @@
-local M = {}
-
-M.setup = function()
- local group = vim.api.nvim_create_augroup("custom-treesitter", { clear = true })
-
- require("nvim-treesitter.configs").setup {
- ensure_installed = {
- "bash",
- "c",
- "diff",
- "html",
- "lua",
- "luadoc",
- "json",
- "markdown",
- "vim",
- "vimdoc",
- "cpp",
- "cmake",
- "query",
- "http",
- "proto",
- "xml",
- "graphql",
- },
- highlight = { enable = true },
- indent = { enable = true },
- }
-
- local syntax_on = {
- -- elixir = true,
- -- php = true,
- }
-
- vim.api.nvim_create_autocmd("FileType", {
- group = group,
- callback = function(args)
- local bufnr = args.buf
- local ft = vim.bo[bufnr].filetype
- pcall(vim.treesitter.start)
-
- -- if syntax_on[ft] then
- -- vim.bo[bufnr].syntax = "on"
- -- end
- end,
- })
-end
-
-M.setup()
-
-return M
diff --git a/nvim/.config/nvim/plugin/keymaps.lua b/nvim/.config/nvim/lua/keymaps.lua
index 48fff51..3d5337e 100644
--- a/nvim/.config/nvim/plugin/keymaps.lua
+++ b/nvim/.config/nvim/lua/keymaps.lua
@@ -39,10 +39,6 @@ set("n", "<cr>", function()
end
end, { expr = true })
--- useful for indent text
-set("v", ">", ">gv")
-set("v", "<", "<gv")
-
--swap lines
set("n", "<c-j>", function()
if vim.opt.diff:get() then
@@ -58,3 +54,16 @@ set("n", "<c-k>", function()
vim.cmd [[m .-2<cr>==]]
end
end)
+
+--lsp
+set("n", "grt", vim.lsp.buf.type_definition, { desc = "Go to type definition" })
+set("n", "gd", vim.lsp.buf.definition, { buffer = 0 })
+set("n", "gD", vim.lsp.buf.declaration, { buffer = 0 })
+--ui
+local toggle = function(obj)
+ return function()
+ obj.enable(not obj.is_enabled())
+ end
+end
+set("n", "<leader>uh", toggle(vim.lsp.inlay_hint), { desc = "Toggle inlay hints" })
+set("n", "<leader>ud", toggle(vim.diagnostic), { desc = "Toggle inlay hints" })
diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua
new file mode 100644
index 0000000..bbe1a8f
--- /dev/null
+++ b/nvim/.config/nvim/lua/lsp.lua
@@ -0,0 +1,13 @@
+vim.lsp.config('*', { root_makers = { '.git' } })
+
+vim.lsp.enable({ 'clangd', 'lua_ls' })
+
+--Probably I dont need this :\
+-- vim.api.nvim_create_autocmd('LspAttach', {
+-- callback = function(ev)
+-- local client = vim.lsp.get_client_by_id(ev.data.client_id)
+-- if client:supports_method('textDocument/completion') then
+-- vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
+-- end
+-- end,
+-- })
diff --git a/nvim/.config/nvim/plugin/netrw.lua b/nvim/.config/nvim/lua/netrw.lua
index e69de29..e69de29 100644
--- a/nvim/.config/nvim/plugin/netrw.lua
+++ b/nvim/.config/nvim/lua/netrw.lua
diff --git a/nvim/.config/nvim/lua/options.lua b/nvim/.config/nvim/lua/options.lua
new file mode 100644
index 0000000..087b599
--- /dev/null
+++ b/nvim/.config/nvim/lua/options.lua
@@ -0,0 +1,41 @@
+vim.opt.number = true
+vim.opt.relativenumber = true
+
+vim.opt.mouse = "a"
+
+vim.opt.clipboard = "unnamedplus" -- Sync clipboard between OS and Neovim.
+
+vim.opt.breakindent = true -- Enable break indent
+
+vim.opt.undofile = true -- Save undo history
+
+vim.opt.ignorecase = true -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
+vim.opt.smartcase = true
+
+vim.opt.signcolumn = "yes" -- Keep signcolumn on by default
+
+vim.opt.updatetime = 250 -- Decrease update time
+
+vim.opt.timeoutlen = 300 -- Decrease mapped sequence wait time
+
+vim.opt.splitright = true -- Configure how new splits should be opened
+vim.opt.splitbelow = true
+
+vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor.
+vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
+
+-- vim.opt.inccommand = "split" -- Preview substitutions live
+
+vim.opt.cursorline = true -- Show which line your cursor is on
+
+vim.opt.scrolloff = 10 -- Minimal number of screen lines to keep above and below the cursor.
+vim.opt.sidescrolloff = 5
+
+vim.opt.hlsearch = true -- Set highlight on search
+vim.opt.incsearch = true
+
+vim.opt.background = "dark"
+
+vim.opt.laststatus = 3
+
+vim.diagnostic.config({ virtual_text = true, virtual_line = false })
diff --git a/nvim/.config/nvim/lua/plugins/autopairs.lua b/nvim/.config/nvim/lua/plugins/autopairs.lua
new file mode 100644
index 0000000..b97128c
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/autopairs.lua
@@ -0,0 +1,13 @@
+return {
+ "windwp/nvim-autopairs",
+ event = "InsertEnter",
+ -- Optional dependency
+ dependencies = { "hrsh7th/nvim-cmp" },
+ config = function()
+ require("nvim-autopairs").setup {}
+ -- Automatically add `(` after selecting a function or method
+ local cmp_autopairs = require "nvim-autopairs.completion.cmp"
+ local cmp = require "cmp"
+ cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/bqf.lua b/nvim/.config/nvim/lua/plugins/bqf.lua
index 92630a8..92630a8 100644
--- a/nvim/.config/nvim/lua/custom/plugins/bqf.lua
+++ b/nvim/.config/nvim/lua/plugins/bqf.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/celluar.lua b/nvim/.config/nvim/lua/plugins/celluar.lua
index f90161e..f90161e 100644
--- a/nvim/.config/nvim/lua/custom/plugins/celluar.lua
+++ b/nvim/.config/nvim/lua/plugins/celluar.lua
diff --git a/nvim/.config/nvim/lua/plugins/cmake.lua b/nvim/.config/nvim/lua/plugins/cmake.lua
new file mode 100644
index 0000000..4e8c610
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/cmake.lua
@@ -0,0 +1,18 @@
+return {}
+-- if vim.loop.os_uname().sysname ~= "Darwin" then
+-- return {
+-- "daniilrozanov/cmake.nvim",
+-- lazy = false,
+-- config = function()
+-- require "custom.cmake"
+-- end,
+-- }
+-- else
+-- return {
+-- dir = "~/repositories/cmake.nvim",
+-- lazy = false,
+-- config = function()
+-- require "custom.cmake"
+-- end,
+-- }
+-- end
diff --git a/nvim/.config/nvim/lua/plugins/cmp.lua b/nvim/.config/nvim/lua/plugins/cmp.lua
new file mode 100644
index 0000000..6c4c89e
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/cmp.lua
@@ -0,0 +1,88 @@
+return {
+ "hrsh7th/nvim-cmp",
+ event = "InsertEnter",
+ priority = 100,
+ dependencies = {
+ "onsails/lspkind.nvim",
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-path",
+ "hrsh7th/cmp-buffer",
+ {
+ "L3MON4D3/LuaSnip",
+ build = "make install_jsregexp",
+ dependencies = { "rafamadriz/friendly-snippets" },
+ },
+ "saadparwaiz1/cmp_luasnip",
+ },
+ config = function()
+ vim.opt.completeopt = { "menu", "menuone", "noselect" }
+ vim.opt.shortmess:append "c"
+
+ local lspkind = require "lspkind"
+ lspkind.init {}
+
+ local luasnip = require "luasnip"
+ luasnip.config.setup {}
+ require("luasnip.loaders.from_vscode").lazy_load()
+
+ local cmp = require "cmp"
+
+ cmp.setup {
+ snippet = {
+ expand = function(args)
+ luasnip.lsp_expand(args.body)
+ end,
+ },
+ completion = { completeopt = "menu,menuone,noinsert" },
+ mapping = cmp.mapping.preset.insert {
+ -- ["<C-n>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
+ -- ["<C-p>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
+ ["<C-y>"] = cmp.mapping(
+ cmp.mapping.confirm {
+ behavior = cmp.ConfirmBehavior.Insert,
+ select = true,
+ },
+ { "i", "c" }
+ ),
+ ["<C-b>"] = cmp.mapping.scroll_docs(-4),
+ ["<C-f>"] = cmp.mapping.scroll_docs(4),
+ -- ["<C-y>"] = cmp.mapping.confirm { select = true },
+ -- -- Will move you to the right of each of the snippet's expansion locations.
+ ["<C-l>"] = cmp.mapping(function()
+ if luasnip.expand_or_locally_jumpable() then
+ luasnip.expand_or_jump()
+ end
+ end, { "i", "s" }),
+ -- Will move you to the left of each of the snippet's expansion locations.
+ ["<C-h>"] = cmp.mapping(function()
+ if luasnip.locally_jumpable(-1) then
+ luasnip.jump(-1)
+ end
+ end, { "i", "s" }),
+ },
+ sources = {
+ { name = "nvim_lsp" },
+ { name = "luasnip" },
+ { name = "path" },
+ { name = "buffer" },
+ },
+ }
+
+ -- Setup up vim-dadbod
+ cmp.setup.filetype({ "sql" }, {
+ sources = {
+ { name = "vim-dadbod-completion" },
+ { name = "buffer" },
+ },
+ })
+
+ luasnip.config.set_config {
+ history = false,
+ updateevents = "TextChanged,TextChangedI",
+ }
+
+ for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do
+ loadfile(ft_path)()
+ end
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/comment.lua b/nvim/.config/nvim/lua/plugins/comment.lua
index 46f5032..46f5032 100644
--- a/nvim/.config/nvim/lua/custom/plugins/comment.lua
+++ b/nvim/.config/nvim/lua/plugins/comment.lua
diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua
new file mode 100644
index 0000000..5220a84
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/conform.lua
@@ -0,0 +1,56 @@
+vim.api.nvim_create_autocmd("BufWritePre", {
+ callback = function(args)
+ require("conform").format {
+ bufnr = args.buf,
+ lsp_fallback = true,
+ quiet = true,
+ }
+ end,
+})
+
+return {
+ "stevearc/conform.nvim",
+ opts = {
+ formatters_by_ft = {
+ lua = { "stylua" },
+ cpp = { "clang-format" },
+ c = { "clang-format" },
+ },
+ }
+}
+-- {
+-- config = function()
+-- vim.api.nvim_create_autocmd("LspAttach", {
+-- callback = function(args)
+-- local bufnr = args.buf
+-- local client = assert(vim.lsp.get_client_by_id(args.data.client_id), "must have valid client")
+-- local builtin = require "telescope.builtin"
+--
+-- vim.opt_local.omnifunc = "v:lua.vim.lsp.omnifunc"
+-- vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = 0 })
+-- vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { buffer = 0 })
+-- vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, { buffer = 0 })
+-- vim.keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
+-- vim.keymap.set("n", "<leader>lw", builtin.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace Symbols" })
+-- -- nmap("gd", builtin.lsp_definitions, { desc = "[G]oto [D]efinition" })
+-- -- nmap("gr", builtin.lsp_references, { desc = "[G]oto [R]eferences" })
+--
+-- local filetype = vim.bo[bufnr].filetype
+-- if disable_semantic_tokens[filetype] then
+-- client.server_capabilities.semanticTokensProvider = nil
+-- end
+--
+-- if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
+-- vim.keymap.set("n", "<leader>Th", function()
+-- vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
+-- end, { desc = "[T]oggle Inlay [H]ints" })
+-- end
+-- end,
+-- })
+--
+-- -- Autoformatting Setup
+-- require("conform").setup {
+-- }
+--
+-- end,
+-- }
diff --git a/nvim/.config/nvim/lua/custom/plugins/dadbod.lua b/nvim/.config/nvim/lua/plugins/dadbod.lua
index 8411fa5..8411fa5 100644
--- a/nvim/.config/nvim/lua/custom/plugins/dadbod.lua
+++ b/nvim/.config/nvim/lua/plugins/dadbod.lua
diff --git a/nvim/.config/nvim/lua/plugins/fidget.lua b/nvim/.config/nvim/lua/plugins/fidget.lua
new file mode 100644
index 0000000..2d70394
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/fidget.lua
@@ -0,0 +1,6 @@
+return {
+ "j-hui/fidget.nvim",
+ opts = {
+ -- options
+ },
+}
diff --git a/nvim/.config/nvim/lua/plugins/gitsigns.lua b/nvim/.config/nvim/lua/plugins/gitsigns.lua
new file mode 100644
index 0000000..8856fae
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/gitsigns.lua
@@ -0,0 +1,65 @@
+return {
+ "lewis6991/gitsigns.nvim",
+ config = function()
+ local gitsigns = require "gitsigns"
+
+ local on_attach = function(bufnr)
+ local function map(mode, l, r, opts)
+ opts = opts or {}
+ opts.buffer = bufnr
+ vim.keymap.set(mode, l, r, opts)
+ end
+
+ -- Navigation
+ map("n", "]c", function()
+ if vim.wo.diff then
+ vim.cmd.normal { "]c", bang = true }
+ else
+ gitsigns.nav_hunk "next"
+ end
+ end)
+
+ map("n", "[c", function()
+ if vim.wo.diff then
+ vim.cmd.normal { "[c", bang = true }
+ else
+ gitsigns.nav_hunk "prev"
+ end
+ end)
+
+ -- Actions
+ map("n", "<leader>gs", gitsigns.stage_hunk, { desc = "Stage hunk" })
+ map("n", "<leader>gr", gitsigns.reset_hunk, { desc = "Reset hunk" })
+ map("v", "<leader>gs", function()
+ gitsigns.stage_hunk { vim.fn.line ".", vim.fn.line "v" }
+ end, { desc = "Stage hunk" })
+ map("v", "<leader>gr", function()
+ gitsigns.reset_hunk { vim.fn.line ".", vim.fn.line "v" }
+ end, { desc = "Reset hunk" })
+ map("n", "<leader>gS", gitsigns.stage_buffer, { desc = "Stage buffer" })
+ map("n", "<leader>gu", gitsigns.undo_stage_hunk, { desc = "Undo stage hunk" })
+ map("n", "<leader>gR", gitsigns.reset_buffer, { desc = "Reset buffer" })
+ map("n", "<leader>gp", gitsigns.preview_hunk, { desc = "Preview hunk" })
+ map("n", "<leader>gb", function()
+ gitsigns.blame_line { full = true }
+ end, { desc = "Blame line" })
+ map("n", "<leader>Tb", gitsigns.toggle_current_line_blame, { desc = "Toggle blame line" })
+ map("n", "<leader>Td", gitsigns.toggle_deleted, { desc = "Toggle deleted" })
+ map("n", "<leader>gd", gitsigns.diffthis, { desc = "Diff this" })
+ map("n", "<leader>gD", function()
+ gitsigns.diffthis "~"
+ end, { desc = "Diff this ~" })
+ end
+
+ gitsigns.setup {
+ signs = {
+ add = { text = "+" },
+ change = { text = "~" },
+ delete = { text = "_" },
+ topdelete = { text = "‾" },
+ changedelete = { text = "~" },
+ },
+ on_attach = on_attach,
+ }
+ end,
+}
diff --git a/nvim/.config/nvim/lua/plugins/harpoon.lua b/nvim/.config/nvim/lua/plugins/harpoon.lua
new file mode 100644
index 0000000..a464808
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/harpoon.lua
@@ -0,0 +1,32 @@
+return {
+ "ThePrimeagen/harpoon",
+ branch = "harpoon2",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ config = function()
+ local harpoon = require("harpoon")
+ harpoon:setup()
+
+ vim.keymap.set("n", "<leader>a", function()
+ harpoon:list():add()
+ end, { desc = "Add buffer to harpoon" })
+
+ vim.keymap.set("n", "<leader><leader>", function()
+ harpoon.ui:toggle_quick_menu(harpoon:list())
+ end, { desc = "Toggle harpoon menu" })
+
+ vim.keymap.set("n", "<c-n>", function()
+ require("harpoon"):list():next()
+ end, { desc = "Goto next harpooned" })
+
+ vim.keymap.set("n", "<c-p>", function()
+ require("harpoon"):list():prev()
+ end, { desc = "Goto prev harpooned" })
+
+ -- Set <space>1..<space>5 be my shortcuts to moving to the files
+ for _, idx in ipairs { 1, 2, 3, 4, 5 } do
+ vim.keymap.set("n", string.format("<leader>%d", idx), function()
+ harpoon:list():select(idx)
+ end, { desc = string.format("Goto %d harpooned", idx) })
+ end
+ end,
+}
diff --git a/nvim/.config/nvim/lua/plugins/lazydev.lua b/nvim/.config/nvim/lua/plugins/lazydev.lua
new file mode 100644
index 0000000..82739c2
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/lazydev.lua
@@ -0,0 +1,10 @@
+return {
+ "folke/lazydev.nvim",
+ ft = "lua", -- only load on lua files
+ opts = {
+ library = {
+ -- Load luvit types when the `vim.uv` word is found
+ { path = "${3rd}/luv/library", words = { "vim%.uv" } },
+ },
+ },
+}
diff --git a/nvim/.config/nvim/lua/plugins/leap.lua b/nvim/.config/nvim/lua/plugins/leap.lua
new file mode 100644
index 0000000..649f96e
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/leap.lua
@@ -0,0 +1,9 @@
+return {
+ "ggandor/leap.nvim",
+ lazy = false, --TODO: lazy
+ config = function()
+ vim.keymap.set("n", "s", "<Plug>(leap)", { desc = "Leap" })
+ vim.keymap.set("n", "S", "<Plug>(leap-from-window)", { desc = "Leap other window" })
+ require("leap").setup { safe_labels = {} }
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua
index 661f7fc..661f7fc 100644
--- a/nvim/.config/nvim/lua/custom/plugins/lualine.lua
+++ b/nvim/.config/nvim/lua/plugins/lualine.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/mini.lua b/nvim/.config/nvim/lua/plugins/mini.lua
index 654222e..654222e 100644
--- a/nvim/.config/nvim/lua/custom/plugins/mini.lua
+++ b/nvim/.config/nvim/lua/plugins/mini.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/neorg.lua b/nvim/.config/nvim/lua/plugins/neorg.lua
index 455b80d..455b80d 100644
--- a/nvim/.config/nvim/lua/custom/plugins/neorg.lua
+++ b/nvim/.config/nvim/lua/plugins/neorg.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/sort.lua b/nvim/.config/nvim/lua/plugins/sort.lua
index f5483e6..f5483e6 100644
--- a/nvim/.config/nvim/lua/custom/plugins/sort.lua
+++ b/nvim/.config/nvim/lua/plugins/sort.lua
diff --git a/nvim/.config/nvim/lua/plugins/substitude.lua b/nvim/.config/nvim/lua/plugins/substitude.lua
new file mode 100644
index 0000000..4e2c02f
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/substitude.lua
@@ -0,0 +1,11 @@
+return {
+ "gbprod/substitute.nvim",
+ config = function()
+ require("substitute").setup {}
+
+ vim.keymap.set("n", ",", require("substitute").operator, { noremap = true })
+ vim.keymap.set("n", ",,", require("substitute").line, { noremap = true })
+ -- vim.keymap.set("n", "", require("substitute").eol, { noremap = true })
+ vim.keymap.set("x", ",", require("substitute").visual, { noremap = true })
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/surround.lua b/nvim/.config/nvim/lua/plugins/surround.lua
index e3c3c6c..e3c3c6c 100644
--- a/nvim/.config/nvim/lua/custom/plugins/surround.lua
+++ b/nvim/.config/nvim/lua/plugins/surround.lua
diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua
new file mode 100644
index 0000000..a8d6484
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,94 @@
+return {
+ "nvim-telescope/telescope.nvim",
+ event = "VimEnter",
+ branch = "0.1.x",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ { "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
+ { "nvim-telescope/telescope-smart-history.nvim" },
+ { "nvim-telescope/telescope-ui-select.nvim" },
+ { "nvim-tree/nvim-web-devicons" },
+ },
+ config = function()
+ require("telescope").setup {
+ extensions = {
+ fzf = {},
+ wrap_results = true,
+ history = {
+ -- path = vim.fs.joinpath(data, "telescope_history.sqlite3"),
+ limit = 100,
+ },
+ ["ui-select"] = {
+ require("telescope.themes").get_dropdown(),
+ },
+ },
+ defaults = {
+ -- configure to use ripgrep
+ vimgrep_arguments = {
+ "rg",
+ "--follow", -- Follow symbolic links
+ "--hidden", -- Search for hidden files
+ "--no-heading", -- Don't group matches by each file
+ "--with-filename", -- Print the file path with the matched lines
+ "--line-number", -- Show line numbers
+ "--column", -- Show column numbers
+ "--smart-case", -- Smart case search
+
+ -- Exclude some patterns from search
+ "--glob=!**/.git/*",
+ "--glob=!**/.idea/*",
+ "--glob=!**/.vscode/*",
+ "--glob=!**/build/*",
+ "--glob=!**/dist/*",
+ "--glob=!**/yarn.lock",
+ "--glob=!**/package-lock.json",
+ },
+ },
+ pickers = {
+ find_files = {
+ hidden = true,
+ -- needed to exclude some files & dirs from general search
+ -- when not included or specified in .gitignore
+ find_command = {
+ "rg",
+ "--files",
+ "--hidden",
+ "--glob=!**/.git/*",
+ "--glob=!**/.idea/*",
+ "--glob=!**/.vscode/*",
+ "--glob=!**/build/*",
+ "--glob=!**/dist/*",
+ "--glob=!**/yarn.lock",
+ "--glob=!**/package-lock.json",
+ },
+ },
+ },
+ }
+
+ pcall(require("telescope").load_extension, "fzf")
+ pcall(require("telescope").load_extension, "smart_history")
+ pcall(require("telescope").load_extension, "rest")
+ pcall(require("telescope").load_extension, "ui-select")
+
+ local builtin = require "telescope.builtin"
+
+ vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Search [H]elp" })
+ vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Search [K]eymaps" })
+ vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Search [F]iles" })
+ vim.keymap.set("n", "<leader>fs", builtin.builtin, { desc = "Search [S]elect Telescope" })
+ vim.keymap.set("n", "<leader>fw", builtin.grep_string, { desc = "Search current [W]ord" })
+ vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Search by [G]rep" })
+ vim.keymap.set("n", "<leader>fd", builtin.diagnostics, { desc = "Search [D]iagnostics" })
+ vim.keymap.set("n", "<leader>fr", builtin.resume, { desc = "Search [R]esume" })
+ vim.keymap.set("n", "<leader>f.", builtin.oldfiles, { desc = 'Search Recent Files ("." for repeat)' })
+ vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "[ ] Find existing buffers" })
+ vim.keymap.set("n", "<leader>fn", function()
+ require("telescope.builtin").find_files { cwd = vim.fn.stdpath "config" }
+ end, { desc = "Search [N]eovim files" })
+
+ vim.keymap.set("n", "<leader>fa", function()
+ ---@diagnostic disable-next-line: param-type-mismatch
+ builtin.find_files { cwd = vim.fs.joinpath(vim.fn.stdpath "data", "lazy") }
+ end)
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/textcase.lua b/nvim/.config/nvim/lua/plugins/textcase.lua
index e335b38..e335b38 100644
--- a/nvim/.config/nvim/lua/custom/plugins/textcase.lua
+++ b/nvim/.config/nvim/lua/plugins/textcase.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/themes.lua b/nvim/.config/nvim/lua/plugins/themes.lua
index 0f9ca03..0f9ca03 100644
--- a/nvim/.config/nvim/lua/custom/plugins/themes.lua
+++ b/nvim/.config/nvim/lua/plugins/themes.lua
diff --git a/nvim/.config/nvim/lua/custom/plugins/todo-comments.lua b/nvim/.config/nvim/lua/plugins/todo-comments.lua
index 4b46f89..4b46f89 100644
--- a/nvim/.config/nvim/lua/custom/plugins/todo-comments.lua
+++ b/nvim/.config/nvim/lua/plugins/todo-comments.lua
diff --git a/nvim/.config/nvim/lua/plugins/toggleterm.lua b/nvim/.config/nvim/lua/plugins/toggleterm.lua
new file mode 100644
index 0000000..7f20237
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/toggleterm.lua
@@ -0,0 +1,47 @@
+return {
+ "akinsho/toggleterm.nvim",
+ version = "*",
+ config = function()
+ require("toggleterm").setup {
+ size = function(term)
+ if term.direction == "horizontal" then
+ return 15
+ elseif term.direction == "vertical" then
+ return vim.o.columns * 0.33
+ end
+ end,
+ }
+
+ local Terminal = require("toggleterm.terminal").Terminal
+ local on_open = function(_)
+ vim.cmd "startinsert!"
+ -- vim.keymap.set("n", "q", "<cmd>close<CR>", { noremap = true, silent = true, buffer = term.bufnr })
+ end
+ local on_close = function(_)
+ vim.cmd "startinsert!"
+ end
+ if vim.fn.executable "lazygit" then
+ local lazygit = Terminal:new {
+ cmd = "lazygit",
+ dir = "git_dir",
+ direction = "float",
+ on_open = on_open,
+ on_close = on_close,
+ count = 999,
+ }
+ vim.keymap.set("n", "<leader>gg", function()
+ lazygit:toggle()
+ end, { desc = "ToggleTerm LazyGit" })
+ end
+
+ vim.keymap.set("n", "<leader>tf", function()
+ Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "float")
+ end)
+ vim.keymap.set("n", "<leader>tv", function()
+ Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "vertical")
+ end)
+ vim.keymap.set("n", "<leader>th", function()
+ Terminal:new({ count = vim.v.count1, on_open = on_open, on_close = on_close }):toggle(nil, "horizontal")
+ end)
+ end,
+}
diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..9e01e7d
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,48 @@
+return {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ config = function()
+ local group = vim.api.nvim_create_augroup("custom-treesitter", { clear = true })
+
+ require("nvim-treesitter.configs").setup {
+ ensure_installed = {
+ "bash",
+ "c",
+ "diff",
+ "html",
+ "lua",
+ "luadoc",
+ "json",
+ "markdown",
+ "vim",
+ "vimdoc",
+ "cpp",
+ "cmake",
+ "query",
+ "http",
+ "proto",
+ "xml",
+ },
+ highlight = { enable = true },
+ indent = { enable = true },
+ }
+
+ local syntax_on = {
+ -- elixir = true,
+ -- php = true,
+ }
+
+ vim.api.nvim_create_autocmd("FileType", {
+ group = group,
+ callback = function(args)
+ local bufnr = args.buf
+ local ft = vim.bo[bufnr].filetype
+ pcall(vim.treesitter.start)
+
+ -- if syntax_on[ft] then
+ -- vim.bo[bufnr].syntax = "on"
+ -- end
+ end,
+ })
+ end,
+}
diff --git a/nvim/.config/nvim/lua/custom/plugins/which-key.lua b/nvim/.config/nvim/lua/plugins/which-key.lua
index 42ebe43..42ebe43 100644
--- a/nvim/.config/nvim/lua/custom/plugins/which-key.lua
+++ b/nvim/.config/nvim/lua/plugins/which-key.lua
diff --git a/nvim/.config/nvim/plugin/terminal.lua b/nvim/.config/nvim/lua/terminal.lua
index 0249feb..2327a34 100644
--- a/nvim/.config/nvim/plugin/terminal.lua
+++ b/nvim/.config/nvim/lua/terminal.lua
@@ -11,4 +11,5 @@ vim.api.nvim_create_autocmd("TermOpen", {
})
-- Easily hit escape in terminal mode.
-vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
+-- vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
+vim.keymap.set("t", "<m-q>", "<c-\\><c-n><cmd>quit<cr>")
diff --git a/nvim/.config/nvim/plugin/options.lua b/nvim/.config/nvim/plugin/options.lua
deleted file mode 100644
index cc3016c..0000000
--- a/nvim/.config/nvim/plugin/options.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-local opt = vim.opt
-
-opt.number = true
-opt.relativenumber = true
-
-opt.mouse = "a"
-
-opt.clipboard = "unnamedplus" -- Sync clipboard between OS and Neovim.
-
-opt.breakindent = true -- Enable break indent
-
-opt.undofile = true -- Save undo history
-
-opt.ignorecase = true -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
-opt.smartcase = true
-
-opt.signcolumn = "yes" -- Keep signcolumn on by default
-
-opt.updatetime = 250 -- Decrease update time
-
-opt.timeoutlen = 300 -- Decrease mapped sequence wait time
-
-opt.splitright = true -- Configure how new splits should be opened
-opt.splitbelow = true
-
-opt.list = true -- Sets how neovim will display certain whitespace characters in the editor.
-opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
-
--- opt.inccommand = "split" -- Preview substitutions live
-
-opt.cursorline = true -- Show which line your cursor is on
-
-opt.scrolloff = 10 -- Minimal number of screen lines to keep above and below the cursor.
-opt.sidescrolloff = 5
-
-opt.hlsearch = true -- Set highlight on search
-opt.incsearch = true
-
-opt.background = "dark"
-
-opt.laststatus = 3
diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile
index 38df93c..9e5f5fd 100644
--- a/zsh/.config/zsh/.zprofile
+++ b/zsh/.config/zsh/.zprofile
@@ -4,3 +4,6 @@ export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# User defaults
export EDITOR="nvim"
export PAGER="less"
+
+#CMake
+export CMAKE_EXPORT_COMPILE_COMMANDS=1
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index 4b256ce..fe0a35f 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -138,16 +138,3 @@ alias gsw='git switch'
# Shell integrations
source <(fzf --zsh)
-
-
-# Start tmux
-
-function start_tmux() {
- if type tmux &> /dev/null; then
- if [[ -z "$TMUX" && -z $TERMINAL_CONTEXT ]]; then
- tmux -2 new-session -A -s home
- fi
- fi
-}
-
-start_tmux