From 9725324dbf300540444372979f7134a3e7f526af Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Mon, 29 Jul 2024 05:04:34 -0500 Subject: [PATCH] move to lazyvim --- .config/nvim/.gitignore | 8 + .config/nvim/.neoconf.json | 15 ++ .config/nvim/.stylua.toml | 6 - .config/nvim/LICENSE | 201 ++++++++++++++++++ .config/nvim/README.md | 4 + .config/nvim/init.lua | 41 +--- .config/nvim/lazy-lock.json | 53 +++++ .config/nvim/lazyvim.json | 9 + .config/nvim/lua/chadrc.lua | 9 - .config/nvim/lua/config/autocmds.lua | 3 + .../lua/{mappings.lua => config/keymaps.lua} | 7 +- .config/nvim/lua/config/lazy.lua | 53 +++++ .../lua/{configs => config}/lspconfig.lua | 24 +-- .config/nvim/lua/config/options.lua | 3 + .config/nvim/lua/configs/conform.lua | 18 -- .config/nvim/lua/configs/lazy.lua | 47 ---- .config/nvim/lua/configs/treesitter.lua | 11 - .config/nvim/lua/options.lua | 8 - .config/nvim/lua/plugins/example.lua | 24 +++ .config/nvim/lua/plugins/init.lua | 164 -------------- .config/nvim/lua/plugins/neotree.lua | 12 ++ .config/nvim/lua/plugins/nvchad.lua | 37 ++++ .config/nvim/lua/plugins/obsidian.lua | 19 -- .config/nvim/lua/plugins/tmux.lua | 143 +++++++++++++ .config/nvim/stylua.toml | 3 + .ideavimrc | 5 +- .zshrc | 3 + 27 files changed, 592 insertions(+), 338 deletions(-) create mode 100644 .config/nvim/.gitignore create mode 100644 .config/nvim/.neoconf.json delete mode 100644 .config/nvim/.stylua.toml create mode 100644 .config/nvim/LICENSE create mode 100644 .config/nvim/README.md create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lazyvim.json delete mode 100644 .config/nvim/lua/chadrc.lua create mode 100644 .config/nvim/lua/config/autocmds.lua rename .config/nvim/lua/{mappings.lua => config/keymaps.lua} (87%) create mode 100644 .config/nvim/lua/config/lazy.lua rename .config/nvim/lua/{configs => config}/lspconfig.lua (71%) create mode 100644 .config/nvim/lua/config/options.lua delete mode 100644 .config/nvim/lua/configs/conform.lua delete mode 100644 .config/nvim/lua/configs/lazy.lua delete mode 100644 .config/nvim/lua/configs/treesitter.lua delete mode 100644 .config/nvim/lua/options.lua create mode 100644 .config/nvim/lua/plugins/example.lua delete mode 100644 .config/nvim/lua/plugins/init.lua create mode 100644 .config/nvim/lua/plugins/neotree.lua create mode 100644 .config/nvim/lua/plugins/nvchad.lua delete mode 100644 .config/nvim/lua/plugins/obsidian.lua create mode 100644 .config/nvim/lua/plugins/tmux.lua create mode 100644 .config/nvim/stylua.toml diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/.config/nvim/.neoconf.json b/.config/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/.config/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/.config/nvim/.stylua.toml b/.config/nvim/.stylua.toml deleted file mode 100644 index ecb6dca..0000000 --- a/.config/nvim/.stylua.toml +++ /dev/null @@ -1,6 +0,0 @@ -column_width = 120 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "None" diff --git a/.config/nvim/LICENSE b/.config/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/.config/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/.config/nvim/README.md b/.config/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/.config/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/.config/nvim/init.lua b/.config/nvim/init.lua index 1152335..2514f9e 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,39 +1,2 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" -vim.g.mapleader = " " - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.loop.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - config = function() - require "options" - end, - }, - - { import = "plugins" }, -}, lazy_config) - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "nvchad.autocmds" - -vim.schedule(function() - require "mappings" -end) +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..aff710a --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,53 @@ +{ + "LazyVim": { "branch": "main", "commit": "12818a6cb499456f4903c5d8e68af43753ebc869" }, + "SchemaStore.nvim": { "branch": "main", "commit": "6eb8cee613518fb065d23a81d01eeb42365d59c1" }, + "bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, + "catppuccin": { "branch": "main", "commit": "10eda02ea4faa7d1f94e77a3410a4ae91c25c5f5" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, + "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, + "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, + "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, + "gitsigns.nvim": { "branch": "main", "commit": "f074844b60f9e151970fbcdbeb8a2cd52b6ef25a" }, + "gopher.nvim": { "branch": "main", "commit": "f55c15ada8e02398000c04a96ef44d986cd01051" }, + "grug-far.nvim": { "branch": "main", "commit": "16091184639ca7f2c76734e3a8641d388aebc4e7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "ba9c2f0b93deb48d0a99ae0e8d8dd36f7cc286d6" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.ai": { "branch": "main", "commit": "45587078f323eaf41b9f701bbc04f8d1ab008979" }, + "mini.icons": { "branch": "main", "commit": "842e51b660c6843662e07506c06812b4ae0e2adb" }, + "mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" }, + "neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" }, + "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, + "nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" }, + "nvim-dap-go": { "branch": "main", "commit": "605911fa0899882b05a8e4369ab12739620494af" }, + "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, + "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, + "nvim-lspconfig": { "branch": "master", "commit": "f95d371c1a274f60392edfd8ea5121b42dca736e" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, + "nvim-treesitter": { "branch": "master", "commit": "2d5133f67429f82547ea5fad33a0b1e7d4f78a1c" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, + "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, + "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "powershell.nvim": { "branch": "main", "commit": "471c8ac474b12bd9f617f9bea40e7c05004462f0" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "master", "commit": "10b8a82b042caf50b78e619d92caf0910211973d" }, + "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" }, + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, + "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } +} diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json new file mode 100644 index 0000000..8e6b0ec --- /dev/null +++ b/.config/nvim/lazyvim.json @@ -0,0 +1,9 @@ +{ + "extras": [ + + ], + "news": { + "NEWS.md": "6520" + }, + "version": 6 +} \ No newline at end of file diff --git a/.config/nvim/lua/chadrc.lua b/.config/nvim/lua/chadrc.lua deleted file mode 100644 index 6a2f17c..0000000 --- a/.config/nvim/lua/chadrc.lua +++ /dev/null @@ -1,9 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua - ----@type ChadrcConfig -local M = {} - - M.ui = {theme = 'catppuccin'} - -return M diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..27e9e06 --- /dev/null +++ b/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,3 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/config/keymaps.lua similarity index 87% rename from .config/nvim/lua/mappings.lua rename to .config/nvim/lua/config/keymaps.lua index fa5a61d..ed859d2 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -1,4 +1,7 @@ -require "nvchad.mappings" +-- 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 +-- local map = vim.keymap.set @@ -24,7 +27,7 @@ map("", "dso", " DapStepOver ", { desc = "Step Over" }) map("", "dsi", " DapStepInto ", { desc = "Step Into" }) map("", "dst", " DapStepOut ", { desc = "Step Out" }) map("", "dus", function() - local widgets = require "dap.ui.widgets" + local widgets = require("dap.ui.widgets") local sidebar = widgets.sidebar(widgets.scopes) sidebar.open() end, { desc = "Open debugging Window" }) diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..d73bfa1 --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,53 @@ +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/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/.config/nvim/lua/configs/lspconfig.lua b/.config/nvim/lua/config/lspconfig.lua similarity index 71% rename from .config/nvim/lua/configs/lspconfig.lua rename to .config/nvim/lua/config/lspconfig.lua index dcfad76..e8bb785 100644 --- a/.config/nvim/lua/configs/lspconfig.lua +++ b/.config/nvim/lua/config/lspconfig.lua @@ -1,9 +1,9 @@ -local on_attach = require("nvchad.configs.lspconfig").on_attach -local on_init = require("nvchad.configs.lspconfig").on_init -local capabilities = require("nvchad.configs.lspconfig").capabilities +--local on_attach = require("nvchad.configs.lspconfig").on_attach +--local on_init = require("nvchad.configs.lspconfig").on_init +--local capabilities = require("nvchad.configs.lspconfig").capabilities local lspconfig = require("lspconfig") -local util = require "lspconfig/util" +local util = require("lspconfig/util") --local servers = { "html", "cssls" } -- lsps with default config @@ -16,16 +16,16 @@ local util = require "lspconfig/util" --end -- typescript -lspconfig.tsserver.setup { +lspconfig.tsserver.setup({ on_attach = on_attach, on_init = on_init, capabilities = capabilities, -} +}) -lspconfig.gopls.setup { +lspconfig.gopls.setup({ on_attach = on_attach, capabilities = capabilities, - cmd = {"gopls"}, + cmd = { "gopls" }, filetypes = { "go", "gomod", "gowork", "gotmpl" }, root_dir = util.root_pattern("go.work", "go.mod", ".git"), settings = { @@ -37,12 +37,12 @@ lspconfig.gopls.setup { }, }, }, -} +}) lspconfig.pyright.setup({ on_attach = on_attach, capabilities = capabilities, - filetypes = {"python"}, + filetypes = { "python" }, }) lspconfig.powershell_es.setup({ @@ -56,6 +56,6 @@ omnisharp_bin = vim.fn.stdpath("data") .. "/mason/packages/omnisharp/omnisharp" lspconfig.omnisharp.setup({ on_attach = on_attach, capabilities = capabilities, - filetypes = { "cs"}, - cmd = { omnisharp_bin, "--languageserver" , "--hostPID", tostring(pid) } + filetypes = { "cs" }, + cmd = { omnisharp_bin, "--languageserver", "--hostPID", tostring(pid) }, }) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..3ea1454 --- /dev/null +++ b/.config/nvim/lua/config/options.lua @@ -0,0 +1,3 @@ +-- 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 diff --git a/.config/nvim/lua/configs/conform.lua b/.config/nvim/lua/configs/conform.lua deleted file mode 100644 index 03b5c2f..0000000 --- a/.config/nvim/lua/configs/conform.lua +++ /dev/null @@ -1,18 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - css = { "prettier" }, - html = { "prettier" }, - }, - - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, -} - -require("conform").setup(options) - ---stylua ---lua-language-server ---prettier \ No newline at end of file diff --git a/.config/nvim/lua/configs/lazy.lua b/.config/nvim/lua/configs/lazy.lua deleted file mode 100644 index cd170bd..0000000 --- a/.config/nvim/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/.config/nvim/lua/configs/treesitter.lua b/.config/nvim/lua/configs/treesitter.lua deleted file mode 100644 index eee9d58..0000000 --- a/.config/nvim/lua/configs/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -local parser_config = require("nvim-treesitter.parsers").get_parser_configs() -parser_config.powershell_es = { - install_info = { - url = "/home/user/.local/share/tree-sitter-PowerShell", - files = { "src/parser.c" }, - generate_requires_npm = false, - requires_generate_from_grammar = false, - }, - filetype = "ps1", -} -return parser_config diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua deleted file mode 100644 index 5026bcb..0000000 --- a/.config/nvim/lua/options.lua +++ /dev/null @@ -1,8 +0,0 @@ -require "nvchad.options" - -vim.opt.guicursor = "" - -vim.opt.nu = true -vim.opt.relativenumber = true -vim.api.nvim_set_option("clipboard", "unnamedplus") -vim.opt_local.conceallevel = 2 diff --git a/.config/nvim/lua/plugins/example.lua b/.config/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..e15b0b1 --- /dev/null +++ b/.config/nvim/lua/plugins/example.lua @@ -0,0 +1,24 @@ +return { + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, "😄") + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, +} diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua deleted file mode 100644 index 213baba..0000000 --- a/.config/nvim/lua/plugins/init.lua +++ /dev/null @@ -1,164 +0,0 @@ -local Ollama_url = (os.getenv "OLLAMA_TOKEN") and "https://" .. os.getenv "OLLAMA_TOKEN" .. "@ollama.durp.info" - or "https://localhost:11347" -return { - { - "stevearc/conform.nvim", - event = "BufWritePre", - config = function() - require "configs.conform" - end, - }, - { - "christoomey/vim-tmux-navigator", - lazy = false, - }, - { - "williamboman/mason.nvim", - opts = { - ensure_installed = { - "gopls", - "rust-analyzer", - "pyright", - "mypy", - "ruff", - "black", - "debugpy", - "powershell-editor-services", - "bash-language-server", - "eslint-lsp", - "js-debug-adapter", - "prettier", - "typescript-language-server", - }, - }, - }, - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "lua", - "javascript", - "typescript", - "tsx", - "go", - "terraform", - "c_sharp", - "bash", - }, - }, - }, - { - "neovim/nvim-lspconfig", - config = function() - require("nvchad.configs.lspconfig").defaults() - require "configs.lspconfig" - end, - }, - { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup() - end, - }, - { - "tpope/vim-fugitive", - }, - { - "nvim-tree/nvim-tree.lua", - opts = { - filters = { - enable = false, - }, - }, - }, - { - "TheLeoP/powershell.nvim", - opts = { - bundle_path = vim.fn.stdpath "data" .. "/man/packages/powershell-editor-services", - }, - }, - { - "olexsmir/gopher.nvim", - ft = "go", - config = function(_, opts) - require("gopher").setup(opts) - end, - build = function() - vim.cmd [[silent! GoInstallDeps]] - end, - }, - { - "dreamsofcode-io/nvim-dap-go", - ft = "go", - dependencies = { - "mfussenegger/nvim-dap", - "rcarriga/nvim-dap-ui", - }, - config = function(_, opts) - require("dap-go").setup(opts) - end, - }, - { - "mfussenegger/nvim-dap", - }, - { - "nvim-neotest/nvim-nio", - }, - { - "rcarriga/nvim-dap-ui", - dependencies = "mfussenegger/nvim-dap", - config = function() - local dap = require "dap" - local dapui = require "dapui" - dapui.setup() - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open() - end - dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close() - end - dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close() - end - end, - }, - -- { - -- "m4xshen/hardtime.nvim", - -- dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, - -- opts = {}, - -- lazy = false, - -- }, - { - "nomnivore/ollama.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - lazy = false, - -- All the user commands added by the plugin - cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" }, - - keys = { - -- Sample keybind for prompt menu. Note that the is important for selections to work properly. - { - "oo", - ":lua require('ollama').prompt()", - desc = "ollama prompt", - mode = { "n", "v" }, - }, - - -- Sample keybind for direct prompting. Note that the is important for selections to work properly. - { - "oG", - ":lua require('ollama').prompt('Generate_Code')", - desc = "ollama Generate Code", - mode = { "n", "v" }, - }, - }, - - ---@type Ollama.Config - opts = { - model = "llama3.1:latest", - url = Ollama_url, - }, - }, -} diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim/lua/plugins/neotree.lua new file mode 100644 index 0000000..19d1032 --- /dev/null +++ b/.config/nvim/lua/plugins/neotree.lua @@ -0,0 +1,12 @@ +return { + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + filesystem = { + filtered_items = { + hide_dotfiles = false, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/nvchad.lua b/.config/nvim/lua/plugins/nvchad.lua new file mode 100644 index 0000000..37130ca --- /dev/null +++ b/.config/nvim/lua/plugins/nvchad.lua @@ -0,0 +1,37 @@ +return { + { + "dreamsofcode-io/nvim-dap-go", + ft = "go", + dependencies = { + "mfussenegger/nvim-dap", + "rcarriga/nvim-dap-ui", + }, + config = function(_, opts) + require("dap-go").setup(opts) + end, + }, + { + "mfussenegger/nvim-dap", + }, + { + "nvim-neotest/nvim-nio", + }, + { + "rcarriga/nvim-dap-ui", + dependencies = "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") + local dapui = require("dapui") + dapui.setup() + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() + end + end, + }, +} diff --git a/.config/nvim/lua/plugins/obsidian.lua b/.config/nvim/lua/plugins/obsidian.lua deleted file mode 100644 index f1dd316..0000000 --- a/.config/nvim/lua/plugins/obsidian.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - { - "epwalsh/obsidian.nvim", - version = "*", - lazy = true, - ft = "markdown", - dependencies = { - "nvim-lua/plenary.nvim", - }, - opts = { - workspaces = { - { - name = "vault", - path = "~/Documents/obsidian", - }, - }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/tmux.lua b/.config/nvim/lua/plugins/tmux.lua new file mode 100644 index 0000000..6ebf80e --- /dev/null +++ b/.config/nvim/lua/plugins/tmux.lua @@ -0,0 +1,143 @@ +return { + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "gopls", + "rust-analyzer", + "pyright", + "mypy", + "ruff", + "black", + "debugpy", + "powershell-editor-services", + "bash-language-server", + "eslint-lsp", + "js-debug-adapter", + "prettier", + "typescript-language-server", + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + "go", + "terraform", + "c_sharp", + "bash", + }, + }, + }, + { + "christoomey/vim-tmux-navigator", + lazy = false, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "catppuccin-mocha", + }, + }, + { + "catppuccin/nvim", + lazy = false, + name = "catppuccin", + opts = {}, + }, + { + "folke/trouble.nvim", + opts = { use_diagnostic_signs = true }, + }, + { + "nvim-telescope/telescope.nvim", + keys = { + { + "fp", + function() + require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) + end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + servers = { + pyright = { + filetypes = { "python" }, + }, + gopls = { + cmd = { "gopls" }, + filetypes = { "go", "gomod", "gowork", "gotmpl" }, + --root_dir = util.root_pattern("go.work", "go.mod", ".git"), + settings = { + gopls = { + completeUnimported = true, + usePlaceholders = true, + analyses = { + unusedparams = true, + }, + }, + }, + }, + tsserver = {}, + powershell_es = { + bundle_path = vim.fn.stdpath("data") .. "/mason/packages/powershell-editor-services", + }, + }, + }, + }, + { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup() + end, + }, + { + "TheLeoP/powershell.nvim", + opts = { + bundle_path = vim.fn.stdpath("data") .. "/man/packages/powershell-editor-services", + }, + }, + { + "olexsmir/gopher.nvim", + ft = "go", + config = function(_, opts) + require("gopher").setup(opts) + end, + build = function() + vim.cmd([[silent! GoInstallDeps]]) + end, + }, +} diff --git a/.config/nvim/stylua.toml b/.config/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/.config/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/.ideavimrc b/.ideavimrc index 27ba5ec..c2873aa 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -34,14 +34,13 @@ let g:NERDTreeMapJumpParent='h' let mapleader=' ' -noremap lr :action ExtractMethod " Manage Projects noremap s :action ManageRecentProjects " Tab Navigation -noremap :action NextTab -noremap :action PreviousTab +noremap :action NextTab +noremap :action PreviousTab " Pane Navigation sethandler a:vim diff --git a/.zshrc b/.zshrc index fa369fd..5d141ae 100644 --- a/.zshrc +++ b/.zshrc @@ -31,6 +31,9 @@ alias docker='podman' alias sudo='sudo ' alias grep='rg' alias connectvpn='sudo openvpn ~/Documents/openvpn/openvpn.ovpn' +alias gc='git commit -a' +alias gd='git diff' +alias gp='git push' if command -v tmux &> /dev/null && [[ "$TERMINAL_EMULATOR" == "JetBrains-JediTerm" ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then cwd=$(pwd)