From 2f0a29ce9ff0328575415efc9743ad75cb9f1128 Mon Sep 17 00:00:00 2001 From: Kacper Marzecki Date: Sun, 16 Mar 2025 14:15:18 +0100 Subject: [PATCH] link tmux --- .gitignore | 1 + .tmux.conf | 110 ++++++++ nvim/.DS_Store | Bin 0 -> 6148 bytes nvim/.gitignore | 8 + nvim/.neoconf.json | 15 ++ nvim/LICENSE | 201 ++++++++++++++ nvim/README.md | 4 + nvim/bookmarks.db.json | 20 ++ nvim/bookmarks.db.json.backup | 32 +++ nvim/init.lua | 4 + nvim/lazy-lock.json | 77 ++++++ nvim/lazyvim.json | 10 + nvim/lua/.DS_Store | Bin 0 -> 6148 bytes nvim/lua/config/autocmds.lua | 194 ++++++++++++++ nvim/lua/config/keymaps.lua | 87 +++++++ nvim/lua/config/lazy.lua | 71 +++++ nvim/lua/config/options.lua | 5 + nvim/lua/plugins/ai.lua | 10 + nvim/lua/plugins/completion.lua | 12 + nvim/lua/plugins/plugins.lua | 448 ++++++++++++++++++++++++++++++++ nvim/lua/plugins/themes.lua | 17 ++ nvim/stylua.toml | 3 + readme.md | 5 + 23 files changed, 1334 insertions(+) create mode 100644 .gitignore create mode 100644 .tmux.conf create mode 100644 nvim/.DS_Store create mode 100644 nvim/.gitignore create mode 100644 nvim/.neoconf.json create mode 100644 nvim/LICENSE create mode 100644 nvim/README.md create mode 100644 nvim/bookmarks.db.json create mode 100644 nvim/bookmarks.db.json.backup create mode 100644 nvim/init.lua create mode 100644 nvim/lazy-lock.json create mode 100644 nvim/lazyvim.json create mode 100644 nvim/lua/.DS_Store create mode 100644 nvim/lua/config/autocmds.lua create mode 100644 nvim/lua/config/keymaps.lua create mode 100644 nvim/lua/config/lazy.lua create mode 100644 nvim/lua/config/options.lua create mode 100644 nvim/lua/plugins/ai.lua create mode 100644 nvim/lua/plugins/completion.lua create mode 100644 nvim/lua/plugins/plugins.lua create mode 100644 nvim/lua/plugins/themes.lua create mode 100644 nvim/stylua.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..51b4cfd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +local/ diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..2ab43d5 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,110 @@ +# set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" +set -g @plugin 'tmux-plugins/tpm' + +unbind C-b +set-option -g prefix C-x +bind-key C-x send-prefix +# split panes using | and - +unbind '"' +unbind % +bind | split-window -h +bind - split-window -v +# reload config file (change file location to your the tmux.conf you want to use) +bind r source-file ~/.tmux.conf +# # switch panes using Alt-arrow without prefix +# bind -n M-S-Left select-pane -L +# bind -n M-S-Right select-pane -R +# bind -n M-S-Up select-pane -U +# bind -n M-S-Down select-pane -D +bind -n C-g display-popup -E "tmux new-session -A -s scratch" + +#bind -n C-c display-popup -C "tmux new-session -A -s scratch" +# Enable mouse control (clickable windows, panes, resizable panes) +set -g mouse on +# don't rename windows automatically +set-option -g allow-rename off +# DESIGN TWEAKS + +# don't do anything when a 'bell' rings +set -g visual-activity off +set -g visual-bell off +set -g visual-silence off +setw -g monitor-activity off +set -g bell-action none + +# clock mode +setw -g clock-mode-colour colour1 + +# copy mode +setw -g mode-style 'fg=colour1 bg=colour18 bold' + +# pane borders +set -g pane-border-style 'fg=colour1' +set -g pane-active-border-style 'fg=colour3' +# statusbar + +set -g status-position bottom +set -g status-justify left +set -g status-style 'fg=colour1' +set -g status-left '' +set -g status-right '%Y-%m-%d %H:%M ' +set -g status-right-length 50 +set -g status-left-length 10 + +setw -g window-status-current-style 'fg=colour0 bg=colour1 bold' +setw -g window-status-current-format ' #I #W #F ' + +setw -g window-status-style 'fg=colour1 dim' +setw -g window-status-format ' #I #[fg=colour7]#W #[fg=colour1]#F ' + +setw -g window-status-bell-style 'fg=colour2 bg=colour1 bold' + +set -g message-style 'fg=colour2 bg=colour0 bold' +# messages +set -g message-style 'fg=colour2 bg=colour0 bold' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'catppuccin/tmux' # main branch +set -g @catppuccin_flavor 'mocha' # latte,frappe, macchiato or mocha +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin '27medkamal/tmux-session-wizard' +set -g @plugin 'jabirali/tmux-tilish' +set -g @session-wizard 'C-x' + +# fix clipboard in neovim +set-option -g set-clipboard on +bind C-c run "tmux save-buffer - | xclip -selection clipboard" +bind C-v run "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" +setw -g mode-keys vi +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip" + +# scrollback edit +set-option -g history-limit 20000 + +bind-key C-e run-shell "/home/omnissiah/git/config/scripts/tmux-edit-scrollback" + +# END scrollback edit +# set-environment -g PATH "/usr/local/bin:/bin:/usr/bin:/home/linuxbrew/.linuxbrew/bin" +# +run '~/.tmux/plugins/tpm/tpm' + + +## Navigator.nvim keybinds +version_pat='s/^tmux[^0-9]*([.0-9]+).*/\1/p' + +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" + + +bind-key -T copy-mode-vi C-h select-pane -L +bind-key -T copy-mode-vi C-j select-pane -D +bind-key -T copy-mode-vi C-k select-pane -U +bind-key -T copy-mode-vi C-l select-pane -R +# END Navigator.nvim keybinds + +bind -n M-h previous-window +bind -n M-l next-window diff --git a/nvim/.DS_Store b/nvim/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..53c654d0dbd8dc84e31ef55a9a7a7ea852a4f4f7 GIT binary patch literal 6148 zcmeHKOKTf35SDBwmN5k%5(qg7dNtIKVlcUE9QPi&r9HI8-R&BC$$Dk{h!4iFkXu9k zPj9{T)N@b%5&a3Bk;bi!+a6m}WDF9#r)K;L4xdg^&LXR+W z2o@0OLIGW{ATB_!OT(u>yLH X4M2}Da|jv`{t>V=aK#M#RR+ETiSA|f literal 0 HcmV?d00001 diff --git a/nvim/.gitignore b/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/nvim/.neoconf.json b/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/nvim/LICENSE b/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/nvim/README.md b/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/nvim/README.md @@ -0,0 +1,4 @@ +# 💤 LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/nvim/bookmarks.db.json b/nvim/bookmarks.db.json new file mode 100644 index 0000000..b89f347 --- /dev/null +++ b/nvim/bookmarks.db.json @@ -0,0 +1,20 @@ +{ + "bookmark_lists": [ + { + "bookmarks": [], + "id": "2024091613040340996507", + "is_active": true, + "name": "Default" + } + ], + "projects": [ + { + "name": "mercurius", + "path": "/Users/kacper.marzecki@schibsted.com/git/mercurius" + }, + { + "name": "tethys", + "path": "/Users/kacper.marzecki@schibsted.com/git/tethys" + } + ] +} diff --git a/nvim/bookmarks.db.json.backup b/nvim/bookmarks.db.json.backup new file mode 100644 index 0000000..0c371ff --- /dev/null +++ b/nvim/bookmarks.db.json.backup @@ -0,0 +1,32 @@ +{ + "bookmark_lists": [ + { + "bookmarks": [ + { + "content": " provider_name: \"aws\"", + "created_at": 1726484642, + "githash": "3f5c155", + "id": 1726484642, + "location": { + "col": 2, + "line": 74, + "path": "/Users/kacper.marzecki@schibsted.com/git/mercurius/lib/mercurius/hermes/jobs/send_ses_email.ex", + "project_name": "mercurius", + "relative_path": "lib/mercurius/hermes/jobs/send_ses_email.ex" + }, + "name": "send SES", + "visited_at": 1726484642 + } + ], + "id": "2024091613040340996507", + "is_active": true, + "name": "Default" + } + ], + "projects": [ + { + "name": "mercurius", + "path": "/Users/kacper.marzecki@schibsted.com/git/mercurius" + } + ] +} diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..b235b39 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,4 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") + +vim.cmd("colorscheme kanagawa-lotus") diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..13eb52e --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,77 @@ +{ + "LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" }, + "avante.nvim": { "branch": "main", "commit": "9c7a1a59ac85b81e6f0b3465980dddcd0e6a0926" }, + "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, + "blink.cmp": { "branch": "main", "commit": "dcda20d3aa345025699a920c45b0a0603551f41d" }, + "bookmarks.nvim": { "branch": "main", "commit": "0540d52ba64d0ec7677ec1ef14b3624c95a2aaba" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "codecompanion.nvim": { "branch": "main", "commit": "7d6eb1279762032d3f638e7f72dd49bd76bfdf48" }, + "conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" }, + "copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" }, + "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, + "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, + "flit.nvim": { "branch": "main", "commit": "1ef72de6a02458d31b10039372c8a15ab8989e0d" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "15d5cd9a74da7f8739030a5c411c046c70f66a60" }, + "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, + "gp.nvim": { "branch": "main", "commit": "2372d5323c6feaa2e9c19f7ccb537c615d878e18" }, + "grug-far.nvim": { "branch": "main", "commit": "f9a74468d909d3893eec01b39b17dae9a4fe308f" }, + "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, + "img-clip.nvim": { "branch": "main", "commit": "24c13df08e3fe66624bed5350a2a780f77f1f65b" }, + "inc-rename.nvim": { "branch": "main", "commit": "f9b9e5b9a75074810f40881b7e254b5bbeaf122e" }, + "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "leap.nvim": { "branch": "main", "commit": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe" }, + "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, + "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.ai": { "branch": "main", "commit": "6e01c0e5a15554852546fac9853960780ac52ed4" }, + "mini.comment": { "branch": "main", "commit": "264b8a63edd5a9a41d5361a1d52c13131c3c51a2" }, + "mini.diff": { "branch": "main", "commit": "bc3a7be30fd45ed4961ea90de1d9d04637cdeae6" }, + "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, + "mini.indentscope": { "branch": "main", "commit": "8ce41a77eed7f4121c83c67fda5e2e86af999e6d" }, + "mini.move": { "branch": "main", "commit": "c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d" }, + "mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" }, + "mini.pick": { "branch": "main", "commit": "12ea14f8e285d1bcc909116685fdbb129a89d546" }, + "mini.surround": { "branch": "main", "commit": "f90069c7441a5fb04c3de42eacf93e16b64dd3eb" }, + "neo-tree.nvim": { "branch": "main", "commit": "940063ec5c2c81f455d25dbc7e0b918774f5e924" }, + "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, + "note.nvim": { "branch": "main", "commit": "7b1089ef0b6f31daa6dc125e4f4d5b27d6e2b5b6" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, + "nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" }, + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, + "nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" }, + "nvim-spider": { "branch": "main", "commit": "9b9a1cf88a10790de69d3b0562d7d612f23561d5" }, + "nvim-treesitter": { "branch": "master", "commit": "38959800c2439c890e3238af559f0dc3be45e393" }, + "nvim-treesitter-context": { "branch": "master", "commit": "198720b4016af04c9590f375d714d5bf8afecc1a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "143856b1cee509a190cc8c17ddb0638002171235" }, + "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, + "outline.nvim": { "branch": "main", "commit": "ae473fb51b7b6086de0876328c81a63f9c3ecfef" }, + "overseer.nvim": { "branch": "master", "commit": "d95931e9e8cc4429819c8bbae395da00a6800d1e" }, + "oxocarbon.nvim": { "branch": "main", "commit": "004777819ba294423b638a35a75c9f0c7be758ed" }, + "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "render-markdown.nvim": { "branch": "main", "commit": "1a73fa4195316faec9e028911a122df9dfd7f9dd" }, + "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, + "sniprun": { "branch": "master", "commit": "151ada2c984aee1feb45c7e3c2abb19f597ecbd0" }, + "telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" }, + "themery.nvim": { "branch": "main", "commit": "bfa58f4b279d21cb515b28023e1b68ec908584b2" }, + "themify.nvim": { "branch": "main", "commit": "092ba515e4d0d96a91494ef9cbed7d0517b2bd80" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }, + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, + "vscode.nvim": { "branch": "main", "commit": "3faeb317dab9db5d2310b2dc6472632399ead88f" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "yanky.nvim": { "branch": "main", "commit": "80d9385dbebe7049fd1961d7909b835a58ce9dcc" }, + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } +} diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json new file mode 100644 index 0000000..bd4f8c9 --- /dev/null +++ b/nvim/lazyvim.json @@ -0,0 +1,10 @@ +{ + "extras": [ + "lazyvim.plugins.extras.ai.copilot" + ], + "install_version": 7, + "news": { + "NEWS.md": "10960" + }, + "version": 8 +} diff --git a/nvim/lua/.DS_Store b/nvim/lua/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5637061bedef38cc7892820f5f0bb546c0bccb20 GIT binary patch literal 6148 zcmeHKu};H447E!IK`b5FIPnJ+OUFQiKkqkBFR!<$&+J#9da-*>#+ZW6sHT$E zG{-tt^xQs4H*z}nJa*SI*t~yS=~@!6@6{akYOlwSuWX2mGvEvyEd$8eBH4wax6Xhw z;0$aTkozG(1#`njFLVhI53!W;#CsU;*P80LnJB1Ryrp+F5~D=}EZVGrh)8#am> zPHe>o+nd=c6pnAl{2{s%=ZfAs1I|F3ffIe~N&de(T>rO&{K*+`29AmW?iQnBh)=TI xntYt(+5jCxMZ~XB+=ieNQ!#uc6</dev/null") + local branch + if handle then + branch = handle:read("*a"):match("%S+") + handle:close() + end + + -- Extract the task number (e.g., HS-4798) from the branch name + local task_number = branch and branch:match("HS%-%d+") + + -- If a task number is found, insert the TODO comment + if task_number then + local todo_comment = "# TODO: " .. task_number + vim.api.nvim_put({ todo_comment }, "l", true, true) + else + print("Task number not found in branch name!") + end +end + +-- Keybind for inserting TODO comment +vim.api.nvim_set_keymap("n", "t", "lua insert_todo_comment()", { noremap = true, silent = true }) + +-- Function to open the notes file in a floating window +function open_notes() + local notes_file = "/Users/kacper.marzecki@schibsted.com/git/notes/todo.md" -- Path to your notes file + + -- -- Read the file content + -- local file_content = {} + -- for line in io.lines(vim.fn.expand(notes_file)) do + -- table.insert(file_content, line) + -- end + -- + -- -- Create a floating window + -- local buf = vim.api.nvim_create_buf(false, true) -- Create a buffer + -- vim.api.nvim_buf_set_lines(buf, 0, -1, false, file_content) -- Set buffer content + -- + -- Check if the file exists, create it if not + if vim.fn.filereadable(notes_file) == 0 then + vim.fn.writefile({}, notes_file) -- Create an empty file + end + + -- Create a buffer linked to the notes file + local buf = vim.fn.bufadd(notes_file) + vim.fn.bufload(buf) + + -- Configure floating window size and position + local width = math.floor(vim.o.columns * 0.8) -- 80% of the screen width + local height = math.floor(vim.o.lines * 0.8) -- 80% of the screen height + local row = math.floor((vim.o.lines - height) / 2) -- Center the window vertically + local col = math.floor((vim.o.columns - width) / 2) -- Center the window horizontally + + -- Create the window + local win = vim.api.nvim_open_win(buf, true, { + relative = "editor", + width = width, + height = height, + row = row, + col = col, + style = "minimal", + border = "rounded", + }) + + -- Enable saving and other standard buffer options + vim.api.nvim_buf_set_option(buf, "modifiable", true) + vim.api.nvim_buf_set_option(buf, "buftype", "") + vim.api.nvim_buf_set_option(buf, "filetype", "markdown") + -- vim.api.nvim_buf_set_option(buf, "fil", "text") + -- Scroll to the end of the file + local last_line = vim.api.nvim_buf_line_count(buf) + vim.api.nvim_win_set_cursor(win, { last_line, 0 }) + + -- Close the popup with 'q' + vim.api.nvim_buf_set_keymap( + buf, + "n", + "q", + "lua vim.api.nvim_win_close(" .. win .. ", true)", + { noremap = true, silent = true } + ) +end + +-- Keybind for opening the notes file in a floating window +vim.api.nvim_set_keymap("n", "n", "lua open_notes()", { noremap = true, silent = true }) + +-- Define the function to start the timer +function start_timer(duration) + local timer = vim.loop.new_timer() + timer:start( + duration * 60000, + 0, + vim.schedule_wrap(function() + vim.api.nvim_out_write("Time's up!\n") + + os.execute('osascript -e "display notification \\"Times up\\" with title \\"Timer"" ') + end) + ) +end + +-- -- Define the function to prompt the user for the desired time +-- function choose_timer() +-- local times = { 1, 3, 5, 10 } +-- local choices = table.concat(times, ", ") +-- local choice = vim.fn.input("Choose timer duration (minutes): [" .. choices .. "] ") +-- local duration = tonumber(choice) +-- if duration and vim.tbl_contains(times, duration) then +-- start_timer(duration) +-- else +-- vim.api.nvim_out_write("Invalid choice. Please choose from: " .. choices .. "\n") +-- end +-- end +-- +-- +-- Define the function to prompt the user for the desired time using fzf-lua +function choose_timer() + local times = { 1, 3, 5, 10 } + require("fzf-lua").fzf_exec(times, { + prompt = "Choose timer duration (minutes): ", + actions = { + ["default"] = function(selected) + local duration = tonumber(selected[1]) + if duration then + start_timer(duration) + else + vim.api.nvim_out_write("Invalid choice. Please choose a valid duration.\n") + end + end, + }, + }) +end + +-- Set the keybind to choose the timer duration +vim.api.nvim_set_keymap("n", "T", "lua choose_timer()", { noremap = true, silent = true }) +-- TODO APP MAPPINGS +vim.api.nvim_create_autocmd("BufReadPost", { + pattern = "/tmp/task_edit.txt", + callback = function() + if vim.fn.line("$") == 1 and vim.fn.getline(1) == "" then + vim.cmd("startinsert") + end + end, +}) + +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + if vim.fn.expand("%") == "/tmp/task_edit.txt" then + vim.api.nvim_buf_set_keymap(0, "n", "", ":wq", { noremap = true, silent = true }) + vim.api.nvim_buf_set_keymap(0, "i", "", ":wq", { noremap = true, silent = true }) + end + end, +}) +-- END TODO APP MAPPINGS diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..9031973 --- /dev/null +++ b/nvim/lua/config/keymaps.lua @@ -0,0 +1,87 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here +-- +-- +-- KEYMAPS SPIDER +vim.keymap.set({ "n", "o", "x" }, "w", "lua require('spider').motion('w')", { desc = "Spider-w" }) +vim.keymap.set({ "n", "o", "x" }, "e", "lua require('spider').motion('e')", { desc = "Spider-e" }) +vim.keymap.set({ "n", "o", "x" }, "b", "lua require('spider').motion('b')", { desc = "Spider-b" }) +vim.keymap.set({ "n", "o", "x" }, "C-D", "", { desc = "page down" }) +-- :SnipRun lua require’sniprun’.run() SnipRun +-- (normal node) lua require’sniprun’.run(‘n’) SnipRunOperator +-- :’<,’>SnipRun (visual mode) lua require’sniprun’.run(‘v’) SnipRun +-- :SnipInfo lua require’sniprun’.info() SnipInfo +-- :SnipReset lua require’sniprun’.reset() SnipReset +-- :SnipReplMemoryClean lua require’sniprun’.clear_repl() SnipReplMemoryClean +-- :SnipClose lua require’sniprun.display’.close_all() SnipClose +-- :SnipLive lua require’sniprun.live_mode’.toggle() SnipLive +-- vim.keymap.set({ "n", "x" }, "r", "SnipRun", { desc = "SnipRun" }) +-- vim.keymap.set({ "v" }, "r", "'<,'>SnipRun", { desc = "SnipRun v" }) + +vim.api.nvim_set_keymap("v", "r", "SnipRun", { silent = true }) +vim.api.nvim_set_keymap("n", "r", "SnipRun", { silent = true }) +vim.api.nvim_set_keymap("n", "f", "SnipRunOperator", { silent = true }) + +-- AI + +-- vim.keymap.set({ "n", "o", "x" }, "ac", "GpChatToggle split", { desc = "toggle GP chat" }) +-- vim.keymap.set({ "n", "o", "x" }, "aa", "GpAppend", { desc = "Add with Copilot" }) +-- vim.keymap.set("n", "ap", ":GpPrepend", { noremap = true, silent = true, desc = "Prepend with copilot" }) +-- vim.keymap.set({ "v" }, "ar", "'<,'>GpRewrite", { desc = "replace with Copilot" }) +local bm = require("bookmarks") +local map = vim.keymap.set +map("n", "mm", bm.bookmark_toggle, { desc = "Toggle bookmark" }) +map("n", "mi", bm.bookmark_ann, { desc = "Edit annotation" }) +map("n", "mc", bm.bookmark_clean, { desc = "Clean marks" }) +map("n", "mn", bm.bookmark_next, { desc = "Next mark" }) +map("n", "mp", bm.bookmark_prev, { desc = "Prev mark" }) +map("n", "ml", "Telescope bookmarks list", { desc = "List marks" }) +map("n", "mx", bm.bookmark_clear_all, { desc = "Clear all bookmarks" }) +map("n", "srf", function() + local file_path = vim.api.nvim_buf_get_name(0) + print(file_path) + require("grug-far").open({ + transient = true, + prefills = { + paths = file_path, + }, + }) +end, { desc = "Search n replace in file" }) +map("n", "ff", "FzfLua", { desc = "FZF commands" }) +-- map("n", "mm", bm.bookmark_toggle) -- add or remove bookmark at current line +-- map("n", "mi", bm.bookmark_ann) -- add or edit mark annotation at current line +-- map("n", "mc", bm.bookmark_clean) -- clean all marks in local buffer +-- map("n", "mn", bm.bookmark_next) -- jump to next mark in local buffer +-- map("n", "mp", bm.bookmark_prev) -- jump to previous mark in local buffer +-- map("n", "ml", "Telescope bookmarks list") -- show marked file list in quickfix window +-- map("n", "mx", bm.bookmark_clear_all) -- removes all bookmarks +-- -- floating terminal +-- map("n", "fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" }) +-- map("n", "ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" }) +-- map("n", "", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" }) +-- map("n", "", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" }) +-- +-- -- Terminal Mappings +-- map("t", "", "close", { desc = "Hide Terminal" }) +-- map("t", "", "close", { desc = "which_key_ignore" }) +map("n", "qw", "wq", { desc = "save & quit" }) + +local td_cli = require("toggleterm.terminal").Terminal:new({ + cmd = "node /home/omnissiah/git/td/dist/cli.js", + direction = "float", + close_on_exit = false, + hidden = true, + on_open = function(term) + vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) + vim.api.nvim_buf_set_keymap(term.bufnr, "t", "", ":close", { noremap = true, silent = true }) + vim.api.nvim_buf_set_keymap(term.bufnr, "t", "", "close", { noremap = true, silent = true }) + end, +}) +vim.keymap.set("t", "\\", function() + td_cli:toggle() +end, { desc = "Toggle TD CLI floating terminal" }) +vim.keymap.set("n", "\\", function() + td_cli:toggle() +end, { desc = "Toggle TD CLI floating terminal" }) +-- vim.keymap.set("t", "", "ToggleTerm", { noremap = true, silent = true }) diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..b982834 --- /dev/null +++ b/nvim/lua/config/lazy.lua @@ -0,0 +1,71 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- { import = "lazyvim.plugins.extras.ui.edgy" }, + { import = "lazyvim.plugins.extras.vscode" }, + { import = "lazyvim.plugins.extras.coding.yanky" }, + { import = "lazyvim.plugins.extras.coding.mini-comment" }, + { import = "lazyvim.plugins.extras.editor.fzf" }, + { import = "lazyvim.plugins.extras.editor.harpoon2" }, + { import = "lazyvim.plugins.extras.ui.mini-indentscope" }, + { import = "lazyvim.plugins.extras.ui.treesitter-context" }, + { import = "lazyvim.plugins.extras.lang.elixir" }, + { import = "lazyvim.plugins.extras.editor.inc-rename" }, + { import = "lazyvim.plugins.extras.editor.leap" }, + { import = "lazyvim.plugins.extras.editor.mini-diff" }, + { import = "lazyvim.plugins.extras.editor.mini-move" }, + { import = "lazyvim.plugins.extras.editor.navic" }, + { import = "lazyvim.plugins.extras.editor.outline" }, + { import = "lazyvim.plugins.extras.editor.overseer" }, + { import = "lazyvim.plugins.extras.coding.mini-surround" }, + -- { import = "lazyvim.plugins.extras.test.core" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua new file mode 100644 index 0000000..061b2fa --- /dev/null +++ b/nvim/lua/config/options.lua @@ -0,0 +1,5 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here + +vim.opt.laststatus = 3 diff --git a/nvim/lua/plugins/ai.lua b/nvim/lua/plugins/ai.lua new file mode 100644 index 0000000..3cba140 --- /dev/null +++ b/nvim/lua/plugins/ai.lua @@ -0,0 +1,10 @@ +return { + -- { + -- "olimorris/codecompanion.nvim", + -- dependencies = { + -- "nvim-lua/plenary.nvim", + -- "nvim-treesitter/nvim-treesitter", + -- }, + -- config = true, + -- }, +} diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..39bb031 --- /dev/null +++ b/nvim/lua/plugins/completion.lua @@ -0,0 +1,12 @@ +return { + { + "saghen/blink.cmp", + opts = { + sources = { + -- per_filetype = { + -- codecompanion = { "codecompanion" }, + -- }, + }, + }, + }, +} diff --git a/nvim/lua/plugins/plugins.lua b/nvim/lua/plugins/plugins.lua new file mode 100644 index 0000000..45909a3 --- /dev/null +++ b/nvim/lua/plugins/plugins.lua @@ -0,0 +1,448 @@ +local function masterBranch(dep) + return { + dep, + branch = "master", + } +end + +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + "heex", + "elixir", + }, + highlight = { enable = true }, + indent = { enable = true }, + incremental_selection = { + enable = true, + keymaps = { + node_incremental = "v", + node_decremental = "V", + }, + }, + }, + }, + { + "gsuuon/note.nvim", + lazy = false, + opts = { + -- opts.spaces are note workspace parent directories. + -- These directories contain a `notes` directory which will be created if missing. + -- `/notes` acts as the note root, so for space '~' the note root is `~/notes`. + -- Defaults to { '~' }. + spaces = { + "~/git", + }, + + -- Set keymap = false to disable keymapping + keymap = { + prefix = "n", + }, + }, + cmd = "Note", + ft = "note", + }, + -- { "nvim-neotest/nvim-nio" }, + { "nvim-lualine/lualine.nvim" }, + -- { + -- "nvim-neotest/neotest", + -- dependencies = { + -- "jfpedroza/neotest-elixir", + -- }, + -- opts = { + -- adapters = { + -- ["neotest-elixir"] = {}, + -- }, + -- }, + -- }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + -- disable to prevent elixir extra to install it automatically + elixirls = false, + }, + }, + }, + { "chrisgrieser/nvim-spider", lazy = true }, + -- { + -- "hrsh7th/nvim-cmp", + -- opts = { + -- sources = { + -- { name = "copilot", group_index = 2 }, + -- -- Other Sources + -- { name = "nvim_lsp", group_index = 2 }, + -- { name = "path", group_index = 2 }, + -- { name = "luasnip", group_index = 2 }, + -- }, + -- }, + -- }, + { + "ibhagwan/fzf-lua", + opts = { + buffers = { + actions = { + ["ctrl-w"] = { fn = require("fzf-lua.actions").buf_del, reload = true }, + }, + }, + }, + }, + { + "MagicDuck/grug-far.nvim", + opts = { headerMaxWidth = 80 }, + cmd = "GrugFar", + keys = { + { + "sr", + function() + local grug = require("grug-far") + local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") + grug.open({ + transient = true, + prefills = { + filesFilter = ext and ext ~= "" and "*." .. ext or nil, + }, + }) + end, + mode = { "n", "v" }, + desc = "Search and Replace", + }, + }, + }, + -- { + -- "garymjr/nvim-snippets", + -- opts = { + -- search_paths = { "/Users/kacper.marzecki@schibsted.com/.snippets" }, + -- }, + -- }, + { + "folke/snacks.nvim", + opts = { + -- dashboard = { enabled = false }, + -- scratch = { enabled = false }, + -- terminal = { enabled = false }, + scroll = { enabled = false }, + -- indent = { enabled = false }, + }, + }, + { + "rafamadriz/friendly-snippets", + enabled = false, + }, + { + "folke/zen-mode.nvim", + keys = { + { + "z", + "ZenMode", + desc = "Zen Mode", + }, + }, + opts = { + window = { + backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal + -- height and width can be: + -- * an absolute number of cells when > 1 + -- * a percentage of the width / height of the editor when <= 1 + -- * a function that returns the width or the height + width = 120, -- width of the Zen window + height = 1, -- height of the Zen window + -- by default, no options are changed for the Zen window + -- uncomment any of the options below, or add other vim.wo options you want to apply + options = { + -- signcolumn = "no", -- disable signcolumn + -- number = false, -- disable number column + -- relativenumber = false, -- disable relative numbers + -- cursorline = false, -- disable cursorline + -- cursorcolumn = false, -- disable cursor column + -- foldcolumn = "0", -- disable fold column + -- list = false, -- disable whitespace characters + }, + }, + plugins = { + -- disable some global vim options (vim.o...) + -- comment the lines to not apply the options + options = { + enabled = true, + ruler = false, -- disables the ruler text in the cmd line area + showcmd = false, -- disables the command in the last line of the screen + -- you may turn on/off statusline in zen mode by setting 'laststatus' + -- statusline will be shown only if 'laststatus' == 3 + laststatus = 0, -- turn off the statusline in zen mode + }, + twilight = { enabled = true }, -- enable to start Twilight when zen mode opens + gitsigns = { enabled = false }, -- disables git signs + tmux = { enabled = false }, -- disables the tmux statusline + todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled + -- this will change the font size on kitty when in zen mode + -- to make this work, you need to set the following kitty options: + -- - allow_remote_control socket-only + -- - listen_on unix:/tmp/kitty + kitty = { + enabled = false, + font = "+4", -- font size increment + }, + -- this will change the font size on alacritty when in zen mode + -- requires Alacritty Version 0.10.0 or higher + -- uses `alacritty msg` subcommand to change font size + alacritty = { + enabled = false, + font = "14", -- font size + }, + -- this will change the font size on wezterm when in zen mode + -- See alse also the Plugins/Wezterm section in this projects README + wezterm = { + enabled = false, + -- can be either an absolute font size or the number of incremental steps + font = "+4", -- (10% increase per step) + }, + }, + on_open = function(win) end, + on_close = function() end, + }, + }, + { + "nvim-telescope/telescope.nvim", + enabled = true, + opts = { + defaults = { + mappings = { + i = { + [""] = "which_key", + [""] = "move_selection_next", + [""] = "move_selection_previous", + }, + }, + }, + }, + keys = { + { + ",", + false, + }, + }, + }, + { + "tomasky/bookmarks.nvim", + dependencies = { "nvim-telescope/telescope.nvim" }, + config = function(_, opts) + require("bookmarks").setup(opts) + require("telescope").load_extension("bookmarks") + end, + }, + { + "gpanders/nvim-parinfer", + }, + { + "zaldih/themery.nvim", + lazy = false, + opts = { + themes = { + -- "nightfox", + -- "carbonfox", + -- "terafox", + -- "nordfox", + -- "duskfox", + -- "dawnfox", + -- "dayfox", + -- "blue", + -- "darkblue", + -- "blue", + -- "delek", + -- "desert", + -- "elflord", + -- "evening", + -- "industry", + -- "koehler", + -- "morning", + -- "murphy", + -- "pablo", + "peachpuff", + "kanagawa-wave", + "kanagawa-dragon", + "kanagawa-lotus", + -- "ron", + -- "shine", + -- "slate", + -- "torte", + -- "zellner", + "tokyonight", + "tokyonight-night", + "tokyonight-storm", + "tokyonight-day", + "tokyonight-moon", + "oxocarbon", + "vscode", + }, + }, + }, + { "EdenEast/nightfox.nvim", opts = { + colorblind = { + enable = true, + }, + } }, + { "catppuccin/nvim", name = "catppuccin" }, + { + "folke/tokyonight.nvim", + opts = { + transparent = true, + styles = { + sidebars = "transparent", + floats = "transparent", + }, + }, + }, + { + "michaelb/sniprun", + branch = "master", + build = "sh install.sh", + config = function() + require("sniprun").setup({ + repl_enable = { "Elixir_original", "elixir" }, + display = { + "TerminalWithCode", + }, + }) + end, + }, + -- { + -- "zbirenbaum/copilot.lua", + -- opts = { + -- filetypes = { + -- lua = true, + -- markdown = true, + -- javascript = true, + -- typescript = true, + -- elixir = true, + -- }, + -- }, + -- }, + { + "robitx/gp.nvim", + opts = { + providers = { + openai = { + endpoint = "https://api.openai.com/v1/chat/completions", + secret = { + "echo ", + "$OPENAI_API_KEY", + }, + }, + }, + }, + }, + { + "lmantw/themify.nvim", + + lazy = false, + priority = 999, + + opts = { + "folke/tokyonight.nvim", + "Yazeed1s/minimal.nvim", + masterBranch("sho-87/kanagawa-paper.nvim"), + masterBranch("ray-x/starry.nvim"), + masterBranch("sainnhe/everforest"), + "default", + }, + }, + { + "vhyrro/luarocks.nvim", + priority = 1000, + opts = { + luarocks_build_args = { + "--with-lua-include=/usr/include", + }, + }, + }, + -- { + -- "stevearc/oil.nvim", + -- ---@module 'oil' + -- ---@type oil.SetupOpts + -- opts = {}, + -- -- Optional dependencies + -- dependencies = { { "echasnovski/mini.icons", opts = {} } }, + -- -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons + -- -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + -- lazy = false, + -- }, + { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes. + opts = { + -- add any opts here + -- for example + provider = "openai", + copilot = { + -- endpoint = "https://api.githubcopilot.com/chat/completions", + model = "gpt-4o", + + endpoint = "https://api.openai.com/v1/chat/completions", + secret = "sk-proj-kIapr0impCMf3fjiH4lnT3BlbkFJHP6Lwi151WTSwvBY1fUK", + -- timeout = 30000, -- timeout in milliseconds + -- temperature = 0, -- adjust if needed + -- max_tokens = 4096, + -- reasoning_effort = "high" -- only supported for reasoning models (o1, etc.) + }, + }, + -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` + build = "make", + -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + --- The below dependencies are optional, + "echasnovski/mini.pick", -- for file_selector provider mini.pick + "nvim-telescope/telescope.nvim", -- for file_selector provider telescope + "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions + "ibhagwan/fzf-lua", -- for file_selector provider fzf + "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons + "zbirenbaum/copilot.lua", -- for providers='copilot' + { + -- support for image pasting + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, + }, + { + -- Make sure to set this up properly if you have lazy=true + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, + }, + { "akinsho/toggleterm.nvim", version = "*", config = true }, +} diff --git a/nvim/lua/plugins/themes.lua b/nvim/lua/plugins/themes.lua new file mode 100644 index 0000000..4872516 --- /dev/null +++ b/nvim/lua/plugins/themes.lua @@ -0,0 +1,17 @@ +return { + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, + { + "nyoom-engineering/oxocarbon.nvim", + -- Add in any other configuration; + -- event = foo, + -- config = bar + -- end, + }, + { "Mofiqul/vscode.nvim" }, + { "rebelot/kanagawa.nvim" }, +} diff --git a/nvim/stylua.toml b/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file diff --git a/readme.md b/readme.md index e69de29..b04ac3a 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1,5 @@ + link folders/files locally + +e.g. in ~/.config/ ln -s lazyvim ~/.git/configs/remote lazyvim +omnissiah@mars:~/git/configs$ mv ~/.tmux.conf ~/git/configs/.tmux.conf +omnissiah@mars:~/git/configs$ ln .tmux.conf ~/.tmux.conf