refesh directory tree
This commit is contained in:
8
.config/nvim/.gitignore
vendored
Normal file
8
.config/nvim/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
15
.config/nvim/.neoconf.json
Normal file
15
.config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
201
.config/nvim/LICENSE
Normal file
201
.config/nvim/LICENSE
Normal file
@@ -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.
|
||||
4
.config/nvim/README.md
Normal file
4
.config/nvim/README.md
Normal file
@@ -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.
|
||||
2
.config/nvim/init.lua
Normal file
2
.config/nvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
91
.config/nvim/lazy-lock.json
Normal file
91
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LazyVim": { "branch": "main", "commit": "7c7c196a78e936a1bc4cf28e7908e9bd96d75607" },
|
||||
"LuaSnip": { "branch": "master", "commit": "8d7aa7a7b7c0875e4878d1d2590924bc1c229305" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "ed65feb5b8026d7c6b1981cfe9d97402342d344d" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
||||
"catppuccin": { "branch": "main", "commit": "65bf0b16f57a3db70d6a93ac68882dd9a31d0565" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"code_runner.nvim": { "branch": "main", "commit": "dcedccbf969a0f3bc00db446172b4966e83101dd" },
|
||||
"conform.nvim": { "branch": "master", "commit": "6a28c90082a67f62a323ab90d988e000a718a8c7" },
|
||||
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||
"fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" },
|
||||
"gh-actions.nvim": { "branch": "main", "commit": "0948753856ce7c915c936cfad5e73ef5dcdc5b23" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "190c03d54e8976491e6e49acb97087bf4182b079" },
|
||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" },
|
||||
"mini.files": { "branch": "main", "commit": "6abe854f1410fc6aec69897a78b1db994c32d9c6" },
|
||||
"mini.hipatterns": { "branch": "main", "commit": "797cbdc893cdcc2f0fbc05a23b4dae238a1fb0ae" },
|
||||
"mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" },
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "001f43f50d9589d837cec59004fd92486ab06870" },
|
||||
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
|
||||
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
|
||||
"neotest-mocha": { "branch": "main", "commit": "8239023d299a692784176f202f6a4a5e0a698ad2" },
|
||||
"neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" },
|
||||
"neotest-rust": { "branch": "main", "commit": "f2e0b3713d3559ce33be9aa32ace3a6051ec5593" },
|
||||
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
|
||||
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "dcc8cd4efdcb29275681a3c95786a816330dbca6" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" },
|
||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "52638640ae309cacdaff785fdbb854437bd1ee5c" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "54617a18f4cf46f0c2f6d024fa6feb7515fe036d" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f9e9370a6f710148f4a3f3f4f23d5349c85c2888" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "a2a334900d3643de585ac5c6140b03403454124f" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||
"one-small-step-for-vimkind": { "branch": "main", "commit": "ad065ad2c814249cfb9e344ce5b2b35d36fbc09f" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "53ed6854e0bba64d467c58e87084dcf8b1c22d36" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "e1f9464d9e1addeccb170eb7968471966965f5a3" },
|
||||
"tailwind-tools.nvim": { "branch": "master", "commit": "89e560705ecd49607c63c277935c5264bb770d57" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" },
|
||||
"telescope-terraform-doc.nvim": { "branch": "main", "commit": "28efe1f3cb2ed4c83fa69000ae8afd2f85d62826" },
|
||||
"telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "2e1daa1d164ad8cc3e99b44ca68e990888a66038" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
|
||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
||||
"vim-test": { "branch": "master", "commit": "b0661402277de193a374ae241f0742898cbcb319" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" },
|
||||
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
|
||||
}
|
||||
9
.config/nvim/lazyvim.json
Normal file
9
.config/nvim/lazyvim.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "6520"
|
||||
},
|
||||
"version": 6
|
||||
}
|
||||
54
.config/nvim/lua/config/autocmds.lua
Normal file
54
.config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
local function find_python_executable()
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/bin/python", true, true)
|
||||
local executable_path = table.concat(paths, ", ")
|
||||
if executable_path ~= "" then
|
||||
vim.api.nvim_echo({ { "Using path for python: " .. executable_path, "None" } }, false, {})
|
||||
return executable_path
|
||||
end
|
||||
elseif vim.fn.filereadable(".venv/bin/python") == 1 then
|
||||
local executable_path = vim.fn.expand(".venv/bin/python")
|
||||
vim.api.nvim_echo({ { "Using path for python: " .. executable_path, "None" } }, false, {})
|
||||
return executable_path
|
||||
end
|
||||
vim.api.nvim_echo({ { "No python executable found (see autocmds.lua)", "WarningMsg" } }, false, {})
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "python" },
|
||||
callback = function()
|
||||
vim.g.python3_host_prog = find_python_executable() -- python executable
|
||||
vim.opt_local.colorcolumn = "72,88" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4 -- Number of spaces tabs count for
|
||||
vim.opt_local.shiftwidth = 4 -- Size of an indent
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "rust" },
|
||||
callback = function()
|
||||
vim.opt_local.colorcolumn = "79" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4 -- Number of spaces tabs count for
|
||||
vim.opt_local.shiftwidth = 4 -- Size of an indent
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "typescript",
|
||||
callback = function()
|
||||
vim.opt_local.colorcolumn = "79" -- Ruler at column number
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.shiftwidth = 4
|
||||
end,
|
||||
})
|
||||
-- see lint.lua
|
||||
-- vim.api.nvim_create_autocmd({ "InsertLeave", "BufWritePost" }, {
|
||||
-- callback = function()
|
||||
-- require("lint").try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
22
.config/nvim/lua/config/keymaps.lua
Normal file
22
.config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
local keys = require("lazy.core.handler").handlers.keys
|
||||
---@cast keys LazyKeysHandler
|
||||
-- do not create the keymap if a lazy keys handler exists
|
||||
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
|
||||
opts = opts or {}
|
||||
opts.silent = opts.silent ~= false
|
||||
if opts.remap and not vim.g.vscode then
|
||||
opts.remap = nil
|
||||
end
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
end
|
||||
|
||||
map("n", "<leader>bo", "<cmd>%bd|e#<cr>", { desc = "Close all buffers but the current one" })
|
||||
62
.config/nvim/lua/config/lazy.lua
Normal file
62
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
-- "git"
|
||||
vim.fn.system({"git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.terraform" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.test.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||
-- { import = "lazyvim.plugins.extras.coding.copilot" }, -- see ai.lua instead
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.vscode" },
|
||||
{ import = "lazyvim.plugins.extras.editor.mini-files" },
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{ import = "lazyvim.plugins.extras.lsp.none-ls" },
|
||||
{ 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 = { "catppuccin" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
8
.config/nvim/lua/config/options.lua
Normal file
8
.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Docs: https://www.lazyvim.org/configuration/general
|
||||
-- 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.listchars = "tab:▸ ,trail:·,nbsp:␣,extends:❯,precedes:❮" -- show symbols for whitespace
|
||||
vim.opt.relativenumber = false -- relative line numbers
|
||||
vim.opt.scrolloff = 10 -- keep 20 lines above and below the cursor
|
||||
180
.config/nvim/lua/plugins/ai.lua
Normal file
180
.config/nvim/lua/plugins/ai.lua
Normal file
@@ -0,0 +1,180 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local icons = require("lazyvim.config").icons
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
globalstatus = true,
|
||||
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
warn = icons.diagnostics.Warn,
|
||||
info = icons.diagnostics.Info,
|
||||
hint = icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "filename", path = 1, symbols = { modified = " ", readonly = "", unnamed = "" } },
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("nvim-navic").get_location() end,
|
||||
cond = function() return package.loaded["nvim-navic"] and require("nvim-navic").is_available() end,
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("noice").api.status.command.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||
color = Util.ui.fg("Statement"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("noice").api.status.mode.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||
color = Util.ui.fg("Constant"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
color = Util.ui.fg("Debug"),
|
||||
},
|
||||
{
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = Util.ui.fg("Special"),
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.git.added,
|
||||
modified = icons.git.modified,
|
||||
removed = icons.git.removed,
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
lualine_z = {
|
||||
function()
|
||||
return " " .. os.date("%R")
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = { "neo-tree", "lazy" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- custom config which piggybacks on the copilot extras in lazy.lua.
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
enabled = false,
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = true,
|
||||
auto_refresh = true,
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
accept = false, -- disable built-in keymapping
|
||||
},
|
||||
})
|
||||
|
||||
-- hide copilot suggestions when cmp menu is open
|
||||
-- to prevent odd behavior/garbled up suggestions
|
||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
if cmp_status_ok then
|
||||
cmp.event:on("menu_opened", function()
|
||||
vim.b.copilot_suggestion_hidden = true
|
||||
end)
|
||||
|
||||
cmp.event:on("menu_closed", function()
|
||||
vim.b.copilot_suggestion_hidden = false
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
{
|
||||
"jellydn/CopilotChat.nvim",
|
||||
enabled = false,
|
||||
dependencies = { "zbirenbaum/copilot.lua" }, -- Or { "github/copilot.vim" }
|
||||
opts = {
|
||||
mode = "split", -- newbuffer or split , default: newbuffer
|
||||
debug = false, -- Enable or disable debug mode, the log file will be in ~/.local/state/nvim/CopilotChat.nvim.log
|
||||
},
|
||||
build = function()
|
||||
vim.defer_fn(function()
|
||||
vim.cmd("UpdateRemotePlugins")
|
||||
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
|
||||
end, 3000)
|
||||
end,
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>cce", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" },
|
||||
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- copilot status in lualine
|
||||
-- this is taken from the copilot lazyvim extras at:
|
||||
-- https://www.lazyvim.org/plugins/extras/coding.copilot
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
enabled = false,
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
local Util = require("lazyvim.util").ui
|
||||
local colors = {
|
||||
[""] = Util.fg("Special"),
|
||||
["Normal"] = Util.fg("Special"),
|
||||
["Warning"] = Util.fg("DiagnosticError"),
|
||||
["InProgress"] = Util.fg("DiagnosticWarn"),
|
||||
}
|
||||
table.insert(opts.sections.lualine_x, 2, {
|
||||
function()
|
||||
local icon = require("lazyvim.config").icons.kinds.Copilot
|
||||
local status = require("copilot.api").status.data
|
||||
return icon .. (status.message or "")
|
||||
end,
|
||||
cond = function()
|
||||
local ok, clients = pcall(vim.lsp.get_active_clients, { name = "copilot", bufnr = 0 })
|
||||
return ok and #clients > 0
|
||||
end,
|
||||
color = function()
|
||||
if not package.loaded["copilot"] then
|
||||
return
|
||||
end
|
||||
local status = require("copilot.api").status.data
|
||||
return colors[status.status] or colors[""]
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
7
.config/nvim/lua/plugins/autopairs.lua
Normal file
7
.config/nvim/lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
enable_check_bracket_line = true,
|
||||
},
|
||||
}
|
||||
52
.config/nvim/lua/plugins/cmp.lua
Normal file
52
.config/nvim/lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
return {
|
||||
|
||||
-- nvim-cmp configuration so to not preselect completion and require tab to select
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
opts = nil,
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<CR>"] = vim.NIL,
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })
|
||||
elseif require("copilot.suggestion").is_visible() then
|
||||
require("copilot.suggestion").accept()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
opts.preselect = cmp.PreselectMode.None
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
}
|
||||
17
.config/nvim/lua/plugins/code_runner.lua
Normal file
17
.config/nvim/lua/plugins/code_runner.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
config = function()
|
||||
require("code_runner").setup({
|
||||
focus = false,
|
||||
|
||||
filetype = {
|
||||
go = {
|
||||
"go run",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = { { "<leader>rf", "<cmd>RunFile term<cr>", desc = "Run file" } },
|
||||
},
|
||||
}
|
||||
45
.config/nvim/lua/plugins/colorscheme.lua
Normal file
45
.config/nvim/lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
return {
|
||||
|
||||
-- NOTE: also see treesitter.lua for languages with improved syntax highlighting
|
||||
|
||||
-- NOTE: colorschemes already installed in LazyVim: https://www.lazyvim.org/plugins/colorscheme
|
||||
|
||||
-- set the colorscheme
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
-- lazy = false,
|
||||
opts = {
|
||||
-- colorscheme = "tokyonight-storm",
|
||||
-- colorscheme = "tokyonight-night",
|
||||
-- colorscheme = "tokyonight-moon",
|
||||
-- colorscheme = "tokyonight-day",
|
||||
colorscheme = "catppuccin",
|
||||
-- colorscheme = "catppuccin-macchiato",
|
||||
-- colorscheme = "catppuccin-mocha",
|
||||
-- colorscheme = "catppuccin-frappe",
|
||||
-- colorscheme = "catppuccin-latte",
|
||||
},
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
-- lazy = false,
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
flavor = "mocha",
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
neogit = true,
|
||||
nvimtree = true,
|
||||
indent_blankline = true,
|
||||
dashboard = true,
|
||||
which_key = true,
|
||||
mini = true,
|
||||
harpoon = true,
|
||||
notify = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
4
.config/nvim/lua/plugins/dashboard.lua
Normal file
4
.config/nvim/lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
|
||||
{ "goolord/alpha-nvim", enabled = true },
|
||||
}
|
||||
66
.config/nvim/lua/plugins/debug.lua
Normal file
66
.config/nvim/lua/plugins/debug.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
-- See https://www.lazyvim.org/plugins/extras/dap.core
|
||||
-- and test.lua for keymaps
|
||||
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"debugpy",
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
ft = { "python" },
|
||||
config = function()
|
||||
local dap_python = require("dap-python")
|
||||
|
||||
local function find_debugpy_python_path()
|
||||
-- Return the path to the debugpy python executable if it is
|
||||
-- installed in $VIRTUAL_ENV, otherwise get it from Mason
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/debugpy", true, true)
|
||||
if table.concat(paths, ", ") ~= "" then
|
||||
return vim.env.VIRTUAL_ENV .. "/bin/python"
|
||||
end
|
||||
end
|
||||
|
||||
local mason_registry = require("mason-registry")
|
||||
local path = mason_registry.get_package("debugpy"):get_install_path() .. "/venv/bin/python"
|
||||
return path
|
||||
end
|
||||
|
||||
local dap_python_path = find_debugpy_python_path()
|
||||
vim.api.nvim_echo({ { "Using path for dap-python: " .. dap_python_path, "None" } }, false, {})
|
||||
|
||||
dap_python.setup(dap_python_path)
|
||||
end,
|
||||
},
|
||||
|
||||
-- extend Go extras setup from lazy.lua, with DAP capability
|
||||
-- also see https://github.com/LazyVim/LazyVim/pull/1115
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
dependencies = {
|
||||
{ "mfussenegger/nvim-dap" },
|
||||
},
|
||||
ft = { "go" },
|
||||
config = true,
|
||||
keys = {
|
||||
-- workaround, as nvim-dap-go does not have a DAP strategy set up for neotest
|
||||
-- see https://github.com/nvim-neotest/neotest-go/issues/12
|
||||
{ "<leader>tg", "<cmd>lua require('dap-go').debug_test()<CR>", desc = "Debug Nearest (Go)" },
|
||||
},
|
||||
},
|
||||
}
|
||||
267
.config/nvim/lua/plugins/example.lua
Normal file
267
.config/nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,267 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"help",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- 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,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
24
.config/nvim/lua/plugins/filetree.lua
Normal file
24
.config/nvim/lua/plugins/filetree.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
|
||||
-- change neo-tree confi
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
},
|
||||
|
||||
-- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
position = "right",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
59
.config/nvim/lua/plugins/format.lua
Normal file
59
.config/nvim/lua/plugins/format.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"black",
|
||||
|
||||
-- lua
|
||||
"stylua",
|
||||
|
||||
-- shell
|
||||
"shfmt",
|
||||
|
||||
-- yaml
|
||||
"yamlfix",
|
||||
"yamlfmt",
|
||||
|
||||
-- rust
|
||||
-- rustfmt via rustup
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mhartington/formatter.nvim",
|
||||
enabled = false, -- let's see what happens with null-ls and LazyVim
|
||||
config = function()
|
||||
local formatter = require("formatter")
|
||||
formatter.setup({
|
||||
filetype = {
|
||||
lua = {
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
},
|
||||
python = {
|
||||
require("formatter.filetypes.python").black,
|
||||
},
|
||||
sh = {
|
||||
require("formatter.filetypes.sh").shfmt,
|
||||
},
|
||||
yaml = {
|
||||
require("formatter.filetypes.yaml").yamlfix,
|
||||
require("formatter.filetypes.yaml").yamlfmt,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {}, -- this is equalent to setup({}) function
|
||||
}
|
||||
77
.config/nvim/lua/plugins/git.lua
Normal file
77
.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- vim.opt.fillchars = "diff:╱"
|
||||
vim.opt.fillchars = "diff:░"
|
||||
|
||||
require("diffview").setup({
|
||||
enhanced_diff_hl = true, -- See ':h diffview-config-enhanced_diff_hl'
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
-- use [c and [c to navigate diffs (vim built in), see :h jumpto-diffs
|
||||
-- use ]x and [x to navigate conflicts
|
||||
{ "<leader>gdc", ":DiffviewOpen origin/main...HEAD", desc = "Compare commits" },
|
||||
{ "<leader>gdd", ":DiffviewClose<CR>", desc = "Close Diffview tab" },
|
||||
{ "<leader>gdh", ":DiffviewFileHistory %<CR>", desc = "File history" },
|
||||
{ "<leader>gdH", ":DiffviewFileHistory<CR>", desc = "Repo history" },
|
||||
{ "<leader>gdm", ":DiffviewOpen<CR>", desc = "Solve merge conflicts" },
|
||||
{ "<leader>gdo", ":DiffviewOpen main", desc = "DiffviewOpen" },
|
||||
{ "<leader>gdp", ":DiffviewOpen origin/main...HEAD --imply-local", desc = "Review current PR" },
|
||||
{
|
||||
"<leader>gdP",
|
||||
":DiffviewFileHistory --range=origin/main...HEAD --right-only --no-merges",
|
||||
desc = "Review current PR (per commit)",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"f-person/git-blame.nvim",
|
||||
keys = {
|
||||
-- toggle needs to be called twice; https://github.com/f-person/git-blame.nvim/issues/16
|
||||
{ "<leader>gbe", ":GitBlameEnable<CR>", desc = "Blame line (enable)" },
|
||||
{ "<leader>gbd", ":GitBlameDisable<CR>", desc = "Blame line (disable)" },
|
||||
{ "<leader>gbs", ":GitBlameCopySHA<CR>", desc = "Copy SHA" },
|
||||
{ "<leader>gbc", ":GitBlameCopyCommitURL<CR>", desc = "Copy commit URL" },
|
||||
{ "<leader>gbf", ":GitBlameCopyFileURL<CR>", desc = "Copy file URL" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
|
||||
{
|
||||
"topaxi/gh-actions.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim" },
|
||||
build = "make",
|
||||
cmd = "GhActions",
|
||||
keys = {
|
||||
{ "<leader>ga", "<cmd>GhActions<cr>", desc = "Open Github Actions" },
|
||||
},
|
||||
-- optional, you can also install and use `yq` instead.
|
||||
config = function(_, opts)
|
||||
require("gh-actions").setup(opts)
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
22
.config/nvim/lua/plugins/harpoon.lua
Normal file
22
.config/nvim/lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>hh", ":lua require('harpoon.ui').toggle_quick_menu()<CR>", desc = "Harpoon menu" },
|
||||
-- { "<leader>ht", ":Telescope harpoon marks<CR>", desc = "Telescope menu" },
|
||||
|
||||
{ "<leader>ha", ":lua require('harpoon.mark').add_file()<CR>", desc = "Add file as marked" },
|
||||
{ "<leader>hn", ":lua require('harpoon.ui').nav_next()<CR>", desc = "Next file" },
|
||||
{ "<leader>hp", ":lua require('harpoon.ui').nav_prev()<CR>", desc = "Previous file" },
|
||||
{ "<leader>ht", ":lua require('harpoon.term').gotoTerminal(1)<CR>", desc = "Terminal" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("harpoon")
|
||||
end,
|
||||
},
|
||||
}
|
||||
50
.config/nvim/lua/plugins/lint.lua
Normal file
50
.config/nvim/lua/plugins/lint.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"mypy",
|
||||
|
||||
-- lua
|
||||
"luacheck",
|
||||
|
||||
-- shell
|
||||
"shellcheck",
|
||||
|
||||
-- yaml
|
||||
"yamllint",
|
||||
|
||||
-- sql
|
||||
"sqlfluff",
|
||||
|
||||
-- markdown
|
||||
"vale",
|
||||
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
-- NOTE: autocmd is required, see autocmds.lua
|
||||
"mfussenegger/nvim-lint",
|
||||
enabled = false, -- let's see what happens with null-ls and LazyVim
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
python = { "mypy" },
|
||||
lua = { "luacheck" },
|
||||
yaml = { "yamllint" },
|
||||
sh = { "shellcheck" },
|
||||
sql = { "sqlfluff" },
|
||||
markdown = { "vale" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
114
.config/nvim/lua/plugins/lsp.lua
Normal file
114
.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,114 @@
|
||||
-- https://www.lazyvim.org/plugins/lsp
|
||||
|
||||
return {
|
||||
|
||||
-- change mason config
|
||||
-- note: don't forget to update treesitter for languages
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
opts = function(_, opts)
|
||||
local ensure_installed = {
|
||||
-- python
|
||||
"ruff-lsp",
|
||||
"pyright",
|
||||
|
||||
-- lua
|
||||
"lua-language-server",
|
||||
|
||||
-- shell
|
||||
"bash-language-server",
|
||||
|
||||
-- docker
|
||||
"dockerfile-language-server",
|
||||
|
||||
-- rust
|
||||
"rust-analyzer",
|
||||
|
||||
--svelte
|
||||
"svelte-language-server",
|
||||
|
||||
-- vue
|
||||
"vue-language-server",
|
||||
|
||||
-- php
|
||||
"intelephense",
|
||||
-- see lazy.lua for LazyVim extras
|
||||
}
|
||||
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ensure_installed)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = { "mason.nvim" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = function(_, opts)
|
||||
local null_ls = require("null-ls")
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
local code_actions = null_ls.builtins.code_actions
|
||||
|
||||
-- null_ls.setup({
|
||||
-- debug = false, -- Turn on debug for :NullLsLog
|
||||
-- -- diagnostics_format = "#{m} #{s}[#{c}]",
|
||||
-- })
|
||||
|
||||
local function prefer_bin_from_venv(executable_name)
|
||||
-- Return the path to the executable if $VIRTUAL_ENV is set and the binary exists somewhere beneath the $VIRTUAL_ENV path, otherwise get it from Mason
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
local paths = vim.fn.glob(vim.env.VIRTUAL_ENV .. "/**/bin/" .. executable_name, true, true)
|
||||
local executable_path = table.concat(paths, ", ")
|
||||
if executable_path ~= "" then
|
||||
-- vim.api.nvim_echo(
|
||||
-- { { "Using path for " .. executable_name .. ": " .. executable_path, "None" } },
|
||||
-- false,
|
||||
-- {}
|
||||
-- )
|
||||
return executable_path
|
||||
end
|
||||
end
|
||||
|
||||
local mason_registry = require("mason-registry")
|
||||
local mason_path = mason_registry.get_package(executable_name):get_install_path()
|
||||
.. "/venv/bin/"
|
||||
.. executable_name
|
||||
-- vim.api.nvim_echo({ { "Using Mason for " .. executable_name .. ": " .. mason_path, "None" } }, false, {})
|
||||
return mason_path
|
||||
end
|
||||
|
||||
local sources = {
|
||||
-- list of supported sources:
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md
|
||||
|
||||
diagnostics.mypy.with({
|
||||
filetypes = { "python" },
|
||||
command = prefer_bin_from_venv("mypy"),
|
||||
}),
|
||||
formatting.black.with({
|
||||
filetypes = { "python" },
|
||||
command = prefer_bin_from_venv("black"),
|
||||
}),
|
||||
|
||||
-- installed via Mason
|
||||
formatting.stylua.with({
|
||||
extra_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||
}),
|
||||
formatting.shfmt,
|
||||
formatting.yamlfix, -- requires python
|
||||
formatting.prettierd,
|
||||
diagnostics.yamllint,
|
||||
diagnostics.sqlfluff.with({
|
||||
extra_args = { "--dialect", "postgres" },
|
||||
}),
|
||||
code_actions.gitsigns,
|
||||
}
|
||||
|
||||
-- extend opts.sources
|
||||
for _, source in ipairs(sources) do
|
||||
table.insert(opts.sources, source)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
9
.config/nvim/lua/plugins/markdown.lua
Normal file
9
.config/nvim/lua/plugins/markdown.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
ft = "markdown",
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
},
|
||||
}
|
||||
10
.config/nvim/lua/plugins/neo-tree.lua
Normal file
10
.config/nvim/lua/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
32
.config/nvim/lua/plugins/projects.lua
Normal file
32
.config/nvim/lua/plugins/projects.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
|
||||
{
|
||||
|
||||
"ahmedkhalf/project.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("project_nvim").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
--
|
||||
-- All the patterns used to detect root dir, when **"pattern"** is in
|
||||
-- detection_methods
|
||||
patterns = {
|
||||
".git",
|
||||
"_darcs",
|
||||
".hg",
|
||||
".bzr",
|
||||
".svn",
|
||||
"Makefile",
|
||||
"package.json",
|
||||
"pyproject.toml",
|
||||
"poetry.lock",
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("projects")
|
||||
end,
|
||||
},
|
||||
}
|
||||
19
.config/nvim/lua/plugins/refactoring.lua
Normal file
19
.config/nvim/lua/plugins/refactoring.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
config = function()
|
||||
require("refactoring").setup()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cR",
|
||||
":lua require('refactoring').select_refactor()<CR>",
|
||||
mode = "v",
|
||||
desc = "Refactor",
|
||||
},
|
||||
},
|
||||
}
|
||||
5
.config/nvim/lua/plugins/tabs.lua
Normal file
5
.config/nvim/lua/plugins/tabs.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
|
||||
-- disable tabs
|
||||
{ "akinsho/bufferline.nvim", enabled = false },
|
||||
}
|
||||
5
.config/nvim/lua/plugins/tailwind.lua
Normal file
5
.config/nvim/lua/plugins/tailwind.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- tailwind-tools.lua
|
||||
return {
|
||||
"luckasRanarison/tailwind-tools.nvim",
|
||||
opts = {}, -- your configuration
|
||||
}
|
||||
63
.config/nvim/lua/plugins/telescope.lua
Normal file
63
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
return {
|
||||
|
||||
-- change telescope config
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
defaults = {
|
||||
file_ignore_patterns = { "^.git/", "^node_modules/", "^poetry.lock" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
{
|
||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
-- Uses ripgrep args (rg) for live_grep
|
||||
-- Command examples:
|
||||
-- -i "Data" # case insensitive
|
||||
-- -g "!*.md" # ignore md files
|
||||
-- -w # whole word
|
||||
-- -e # regex
|
||||
-- see 'man rg' for more
|
||||
require("telescope").load_extension("live_grep_args")
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>/",
|
||||
":lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>",
|
||||
desc = "Live Grep (Args)",
|
||||
},
|
||||
},
|
||||
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
pickers = {
|
||||
live_grep = {
|
||||
additional_args = function()
|
||||
return { "--hidden" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://www.lazyvim.org/configuration/recipes#add-telescope-fzf-native
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
}
|
||||
64
.config/nvim/lua/plugins/test.lua
Normal file
64
.config/nvim/lua/plugins/test.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
{ "antoinemadec/FixCursorHold.nvim" },
|
||||
{ "folke/neodev.nvim" },
|
||||
|
||||
-- adapters
|
||||
{ "nvim-neotest/neotest-vim-test" },
|
||||
{ "nvim-neotest/neotest-python" },
|
||||
{ "rouge8/neotest-rust" },
|
||||
{ "nvim-neotest/neotest-go" },
|
||||
{ "adrigzr/neotest-mocha" },
|
||||
{ "vim-test/vim-test" },
|
||||
},
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<leader>tS",
|
||||
":lua require('neotest').run.run({ suite = true })<CR>",
|
||||
desc = "Run all tests in suite",
|
||||
},
|
||||
},
|
||||
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-python"] = {
|
||||
-- https://github.com/nvim-neotest/neotest-python
|
||||
runner = "pytest",
|
||||
args = { "--log-level", "INFO", "--color", "yes", "-vv", "-s" },
|
||||
-- dap = { justMyCode = false },
|
||||
},
|
||||
["neotest-go"] = {
|
||||
-- see lazy.lua
|
||||
},
|
||||
-- ["neotest-rust"] = {
|
||||
-- -- see lazy.lua
|
||||
-- -- https://github.com/rouge8/neotest-rust
|
||||
-- --
|
||||
-- -- requires nextest, which can be installed via "cargo binstall":
|
||||
-- -- https://github.com/cargo-bins/cargo-binstall
|
||||
-- -- https://nexte.st/book/pre-built-binaries.html
|
||||
-- },
|
||||
["neotest-mocha"] = {
|
||||
-- https://github.com/adrigzr/neotest-mocha
|
||||
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
|
||||
command = "npm test --",
|
||||
env = { CI = true },
|
||||
cwd = function(_) -- skipped arg is path
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
["neotest-vim-test"] = {
|
||||
-- https://github.com/nvim-neotest/neotest-vim-test
|
||||
ignore_file_types = { "python", "vim", "lua", "rust", "go" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
45
.config/nvim/lua/plugins/tmux.lua
Normal file
45
.config/nvim/lua/plugins/tmux.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
return {
|
||||
-- {
|
||||
-- "numToStr/Navigator.nvim",
|
||||
-- config = true,
|
||||
-- keys = {
|
||||
-- { "<C-h>", "<cmd>NavigatorLeft<cr>", desc = "Move left" },
|
||||
-- { "<C-l", "<cmd>NavigatorRight<cr>", desc = "Move right" },
|
||||
-- { "<C-j>", "<cmd>NavigatorDown<cr>", desc = "Move down" },
|
||||
-- { "<C-k>", "<cmd>NavigatorUp<cr>", desc = "Move up" },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "alexghergh/nvim-tmux-navigation",
|
||||
-- config = function()
|
||||
-- require("nvim-tmux-navigation").setup({
|
||||
-- disable_when_zoomed = true, -- defaults to false
|
||||
-- keybindings = {
|
||||
-- left = "<C-h>",
|
||||
-- down = "<C-j>",
|
||||
-- up = "<C-k>",
|
||||
-- right = "<C-l>",
|
||||
-- last_active = "<C-\\>",
|
||||
-- next = "<C-Space>",
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
},
|
||||
}
|
||||
59
.config/nvim/lua/plugins/treesitter.lua
Normal file
59
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
return {
|
||||
|
||||
-- add more treesitter parsers, used for e.g. theming and other plugins
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"comment",
|
||||
"css",
|
||||
"diff",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"go",
|
||||
"gomod",
|
||||
"html",
|
||||
"http",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"proto",
|
||||
"python",
|
||||
"query",
|
||||
"graphql",
|
||||
"regex",
|
||||
"rst",
|
||||
"rust",
|
||||
"scss",
|
||||
"svelte",
|
||||
"swift",
|
||||
"sql",
|
||||
"terraform",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
}
|
||||
9
.config/nvim/lua/plugins/undotree.lua
Normal file
9
.config/nvim/lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{
|
||||
"mbbill/undotree",
|
||||
cmd = "UndotreeToggle",
|
||||
keys = {
|
||||
{ "<leader>fu", "<cmd>UndotreeToggle<cr>", desc = "Undo tree" },
|
||||
},
|
||||
},
|
||||
}
|
||||
50
.config/nvim/lua/plugins/vue.lua
Normal file
50
.config/nvim/lua/plugins/vue.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local lsp_conficts, _ = pcall(vim.api.nvim_get_autocmds, { group = "LspAttach_conflicts" })
|
||||
if not lsp_conficts then
|
||||
vim.api.nvim_create_augroup("LspAttach_conflicts", {})
|
||||
end
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = "LspAttach_conflicts",
|
||||
desc = "prevent tsserver and volar competing",
|
||||
callback = function(args)
|
||||
if not (args.data and args.data.client_id) then
|
||||
return
|
||||
end
|
||||
local active_clients = vim.lsp.get_active_clients()
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
-- prevent tsserver and volar competing
|
||||
-- if client.name == "volar" or require("lspconfig").util.root_pattern("nuxt.config.ts")(vim.fn.getcwd()) then
|
||||
-- OR
|
||||
if client.name == "volar" then
|
||||
for _, client_ in pairs(active_clients) do
|
||||
-- stop tsserver if volar is already active
|
||||
if client_.name == "tsserver" then
|
||||
client_.stop()
|
||||
end
|
||||
end
|
||||
elseif client.name == "tsserver" then
|
||||
for _, client_ in pairs(active_clients) do
|
||||
-- prevent tsserver from starting if volar is already active
|
||||
if client_.name == "volar" then
|
||||
client.stop()
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
volar = {
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"typescript",
|
||||
"vue",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{},
|
||||
}
|
||||
25
.config/nvim/lua/plugins/which-key.lua
Normal file
25
.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
-- Modify which-key keys
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = function()
|
||||
require("which-key").register({
|
||||
["<leader>t"] = {
|
||||
name = "+test",
|
||||
},
|
||||
["<leader>gb"] = {
|
||||
name = "+blame",
|
||||
},
|
||||
["<leader>gd"] = {
|
||||
name = "+diffview",
|
||||
},
|
||||
["<leader>h"] = {
|
||||
name = "+harpoon",
|
||||
},
|
||||
["<leader>r"] = {
|
||||
name = "+run",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
4
.config/nvim/lua/plugins/zen.lua
Normal file
4
.config/nvim/lua/plugins/zen.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
|
||||
{ "folke/zen-mode.nvim" },
|
||||
}
|
||||
3
.config/nvim/stylua.toml
Normal file
3
.config/nvim/stylua.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
Reference in New Issue
Block a user