diff --git a/.DS_Store b/.DS_Store
index e31f303..4c889e0 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e5ac84e..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-docs
-ginit.vim
-lua/packer_compiled.lua
-lua/user
-plugin
-ftplugin
-spell
diff --git a/.luacheckrc b/.luacheckrc
deleted file mode 100644
index 809581e..0000000
--- a/.luacheckrc
+++ /dev/null
@@ -1,21 +0,0 @@
--- Global objects
-globals = {
- "PACKER_BOOTSTRAP",
- "astronvim",
- "astronvim_installation",
- "vim",
- "bit",
- "C",
- "packer_plugins",
-}
-
--- Rerun tests only if their modification time changed
-cache = true
-
--- Don't report unused self arguments of methods
-self = false
-
-ignore = {
- "631", -- max_line_length
- "212/_.*", -- unused argument, for vars with "_" prefix
-}
diff --git a/.stylua.toml b/.stylua.toml
deleted file mode 100644
index bfcffff..0000000
--- a/.stylua.toml
+++ /dev/null
@@ -1,7 +0,0 @@
-column_width = 120
-line_endings = "Unix"
-indent_type = "Spaces"
-indent_width = 2
-quote_style = "AutoPreferDouble"
-call_parentheses = "None"
-collapse_simple_statement = "Always"
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index f288702..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..aa3823b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+### ThePrimeagen's init.lua
+Prerequisite: install [ripgrep](https://github.com/BurntSushi/ripgrep).
+
+[The full video of me setting up this repo](https://www.youtube.com/watch?v=w7i4amO_zaE)
+
+For anyone that is interested in my vimrc, i will have a commit log below
+documenting each one of my commits (easy to C-f the change you want to know
+about though i would just suggest `git log -S`).
+
+### Change Log
+* [33eee9ad](https://github.com/ThePrimeagen/init.lua/commit/33eee9ad0c035a92137d99dae06a2396be4c892e) initial commits
+* [cb210006](https://github.com/ThePrimeagen/init.lua/commit/cb210006356b4b613b71c345cb2b02eefa961fc0) netrw, autogroups for yank highlighting, and auto remove whitespace
+* [c8c0bf4a](https://github.com/ThePrimeagen/init.lua/commit/c8c0bf4aeacd0bd77136d9c5ee490680515a106b) zenmode. i really like this plugin
+* [81c770d2](https://github.com/ThePrimeagen/init.lua/commit/81c770d2d2e32e59916b39c7f5babbc8560f7a82) copilot testing
+* [4a96e645](https://github.com/ThePrimeagen/init.lua/commit/4a96e6457b0a0241ca7361ce62177aa6b9a33a38) fugitive mappings for push and pull
+* [a3bad06a](https://github.com/ThePrimeagen/init.lua/commit/a3bad06a4681c322538d609aa1c0bd18880f77c6) disabled eslint. driving me crazy
+
+
diff --git a/after/plugin/colors.lua b/after/plugin/colors.lua
new file mode 100644
index 0000000..fe97b1b
--- /dev/null
+++ b/after/plugin/colors.lua
@@ -0,0 +1,14 @@
+require('rose-pine').setup({
+ disable_background = true
+})
+
+function ColorMyPencils(color)
+ color = color or "rose-pine"
+ vim.cmd.colorscheme(color)
+
+ vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
+ vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
+
+end
+
+ColorMyPencils()
diff --git a/after/plugin/fugitive.lua b/after/plugin/fugitive.lua
new file mode 100644
index 0000000..41f0512
--- /dev/null
+++ b/after/plugin/fugitive.lua
@@ -0,0 +1,29 @@
+vim.keymap.set("n", "gs", vim.cmd.Git)
+
+local ThePrimeagen_Fugitive = vim.api.nvim_create_augroup("ThePrimeagen_Fugitive", {})
+
+local autocmd = vim.api.nvim_create_autocmd
+autocmd("BufWinEnter", {
+ group = ThePrimeagen_Fugitive,
+ pattern = "*",
+ callback = function()
+ if vim.bo.ft ~= "fugitive" then
+ return
+ end
+
+ local bufnr = vim.api.nvim_get_current_buf()
+ local opts = {buffer = bufnr, remap = false}
+ vim.keymap.set("n", "p", function()
+ vim.cmd.Git('push')
+ end, opts)
+
+ -- rebase always
+ vim.keymap.set("n", "P", function()
+ vim.cmd.Git({'pull', '--rebase'})
+ end, opts)
+
+ -- NOTE: It allows me to easily set the branch i am pushing and any tracking
+ -- needed if i did not set the branch up correctly
+ vim.keymap.set("n", "t", ":Git push -u origin ", opts);
+ end,
+})
diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua
new file mode 100644
index 0000000..4a6ba87
--- /dev/null
+++ b/after/plugin/harpoon.lua
@@ -0,0 +1,12 @@
+local mark = require("harpoon.mark")
+local ui = require("harpoon.ui")
+
+vim.keymap.set("n", "a", mark.add_file)
+vim.keymap.set("n", "", ui.toggle_quick_menu)
+
+vim.keymap.set("n", "", function() ui.nav_file(1) end)
+vim.keymap.set("n", "", function() ui.nav_file(2) end)
+vim.keymap.set("n", "", function() ui.nav_file(3) end)
+vim.keymap.set("n", "", function() ui.nav_file(4) end)
+
+
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
new file mode 100644
index 0000000..85cc34e
--- /dev/null
+++ b/after/plugin/lsp.lua
@@ -0,0 +1,69 @@
+local lsp = require("lsp-zero")
+
+lsp.preset("recommended")
+
+lsp.ensure_installed({
+ 'tsserver',
+ 'sumneko_lua',
+ 'rust_analyzer',
+})
+
+-- Fix Undefined global 'vim'
+lsp.configure('sumneko_lua', {
+ settings = {
+ Lua = {
+ diagnostics = {
+ globals = { 'vim' }
+ }
+ }
+ }
+})
+
+
+local cmp = require('cmp')
+local cmp_select = {behavior = cmp.SelectBehavior.Select}
+local cmp_mappings = lsp.defaults.cmp_mappings({
+ [''] = cmp.mapping.select_prev_item(cmp_select),
+ [''] = cmp.mapping.select_next_item(cmp_select),
+ [''] = cmp.mapping.confirm({ select = true }),
+ [""] = cmp.mapping.complete(),
+})
+
+cmp_mappings[''] = nil
+cmp_mappings[''] = nil
+
+lsp.setup_nvim_cmp({
+ mapping = cmp_mappings
+})
+
+lsp.set_preferences({
+ suggest_lsp_servers = false,
+ sign_icons = {
+ error = 'E',
+ warn = 'W',
+ hint = 'H',
+ info = 'I'
+ }
+})
+
+lsp.on_attach(function(client, bufnr)
+ local opts = {buffer = bufnr, remap = false}
+
+ vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
+ vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
+ vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts)
+ vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts)
+ vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
+ vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
+ vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts)
+ vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts)
+ vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts)
+ vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts)
+end)
+
+lsp.setup()
+
+vim.diagnostic.config({
+ virtual_text = true
+})
+
diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua
new file mode 100644
index 0000000..8d46c7c
--- /dev/null
+++ b/after/plugin/telescope.lua
@@ -0,0 +1,7 @@
+local builtin = require('telescope.builtin')
+vim.keymap.set('n', 'pf', builtin.find_files, {})
+vim.keymap.set('n', '', builtin.git_files, {})
+vim.keymap.set('n', 'ps', function()
+ builtin.grep_string({ search = vim.fn.input("Grep > ") })
+end)
+
diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua
new file mode 100644
index 0000000..9d5d923
--- /dev/null
+++ b/after/plugin/treesitter.lua
@@ -0,0 +1,23 @@
+require'nvim-treesitter.configs'.setup {
+ -- A list of parser names, or "all"
+ ensure_installed = { "help", "javascript", "typescript", "c", "lua", "rust" },
+
+ -- Install parsers synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+ -- Automatically install missing parsers when entering buffer
+ -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
+ auto_install = true,
+
+ highlight = {
+ -- `false` will disable the whole extension
+ enable = true,
+
+ -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
+ -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
+ -- Using this option may slow down your editor, and you may see some duplicate highlights.
+ -- Instead of true it can also be a list of languages
+ additional_vim_regex_highlighting = false,
+ },
+}
+
diff --git a/after/plugin/undotree.lua b/after/plugin/undotree.lua
new file mode 100644
index 0000000..97bb7ab
--- /dev/null
+++ b/after/plugin/undotree.lua
@@ -0,0 +1,2 @@
+vim.keymap.set("n", "u", vim.cmd.UndotreeToggle)
+
diff --git a/after/plugin/zenmode.lua b/after/plugin/zenmode.lua
new file mode 100644
index 0000000..24cad46
--- /dev/null
+++ b/after/plugin/zenmode.lua
@@ -0,0 +1,15 @@
+require("zen-mode").setup {
+ window = {
+ width = 90,
+ options = {
+ number = true,
+ relativenumber = true,
+ }
+ },
+}
+
+vim.keymap.set("n", "zz", function()
+ require("zen-mode").toggle()
+ vim.wo.wrap = false
+ ColorMyPencils()
+end)
diff --git a/colors/default_theme.lua b/colors/default_theme.lua
deleted file mode 100644
index c6fe0a2..0000000
--- a/colors/default_theme.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-vim.g.colors_name = "default_theme"
-
-package.loaded["default_theme"] = nil
-package.loaded["default_theme.base"] = nil
-package.loaded["default_theme.treesitter"] = nil
-package.loaded["default_theme.lsp"] = nil
-package.loaded["default_theme.others"] = nil
-
-require "default_theme"
diff --git a/config.ld b/config.ld
deleted file mode 100644
index 0bb9d28..0000000
--- a/config.ld
+++ /dev/null
@@ -1,10 +0,0 @@
-project='AstroNvim'
-title='AstroNvim API'
-description='Documentation of AstroNvim\'s core API'
-format = 'markdown'
-file='lua'
-dir='docs'
-no_space_before_args=true
-examples = {
- 'lua/user_example/init.lua'
-}
diff --git a/dev b/dev
new file mode 100755
index 0000000..6f51fbc
--- /dev/null
+++ b/dev
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+rm -rf ~/.config/nvim
+ln -s $(pwd) ~/.config/nvim
+
diff --git a/init.lua b/init.lua
index 2bf8f14..a39d9f1 100644
--- a/init.lua
+++ b/init.lua
@@ -1,21 +1,2 @@
-local impatient_ok, impatient = pcall(require, "impatient")
-if impatient_ok then impatient.enable_profile() end
+require("theprimeagen")
-for _, source in ipairs {
- "core.utils",
- "core.options",
- "core.bootstrap",
- "core.diagnostics",
- "core.autocmds",
- "core.mappings",
- "configs.which-key-register",
-} do
- local status_ok, fault = pcall(require, source)
- if not status_ok then vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault) end
-end
-
-astronvim.conditional_func(astronvim.user_plugin_opts("polish", nil, false))
-
-if vim.fn.has "nvim-0.8" ~= 1 or vim.version().prerelease then
- vim.schedule(function() astronvim.notify("Unsupported Neovim Version! Please check the requirements", "error") end)
-end
diff --git a/lua/configs/Comment.lua b/lua/configs/Comment.lua
deleted file mode 100644
index 6521d72..0000000
--- a/lua/configs/Comment.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local utils = require "Comment.utils"
-require("Comment").setup(astronvim.user_plugin_opts("plugins.Comment", {
- pre_hook = function(ctx)
- local location = nil
- if ctx.ctype == utils.ctype.blockwise then
- location = require("ts_context_commentstring.utils").get_cursor_location()
- elseif ctx.cmotion == utils.cmotion.v or ctx.cmotion == utils.cmotion.V then
- location = require("ts_context_commentstring.utils").get_visual_start_location()
- end
-
- return require("ts_context_commentstring.internal").calculate_commentstring {
- key = ctx.ctype == utils.ctype.linewise and "__default" or "__multiline",
- location = location,
- }
- end,
-}))
diff --git a/lua/configs/aerial.lua b/lua/configs/aerial.lua
deleted file mode 100644
index d4c7310..0000000
--- a/lua/configs/aerial.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-require("aerial").setup(astronvim.user_plugin_opts("plugins.aerial", {
- attach_mode = "global",
- backends = { "lsp", "treesitter", "markdown", "man" },
- layout = {
- min_width = 28,
- },
- show_guides = true,
- filter_kind = false,
- guides = {
- mid_item = "├ ",
- last_item = "└ ",
- nested_top = "│ ",
- whitespace = " ",
- },
- keymaps = {
- ["[y"] = "actions.prev",
- ["]y"] = "actions.next",
- ["[Y"] = "actions.prev_up",
- ["]Y"] = "actions.next_up",
- ["{"] = false,
- ["}"] = false,
- ["[["] = false,
- ["]]"] = false,
- },
-}))
diff --git a/lua/configs/alpha.lua b/lua/configs/alpha.lua
deleted file mode 100644
index 933dd6b..0000000
--- a/lua/configs/alpha.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-require("alpha").setup(astronvim.user_plugin_opts("plugins.alpha", {
- layout = {
- { type = "padding", val = vim.fn.max { 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) } },
- {
- type = "text",
- val = astronvim.user_plugin_opts("header", {
- " █████ ███████ ████████ ██████ ██████",
- "██ ██ ██ ██ ██ ██ ██ ██",
- "███████ ███████ ██ ██████ ██ ██",
- "██ ██ ██ ██ ██ ██ ██ ██",
- "██ ██ ███████ ██ ██ ██ ██████",
- " ",
- " ███ ██ ██ ██ ██ ███ ███",
- " ████ ██ ██ ██ ██ ████ ████",
- " ██ ██ ██ ██ ██ ██ ██ ████ ██",
- " ██ ██ ██ ██ ██ ██ ██ ██ ██",
- " ██ ████ ████ ██ ██ ██",
- }, false),
- opts = { position = "center", hl = "DashboardHeader" },
- },
- { type = "padding", val = 5 },
- {
- type = "group",
- val = {
- astronvim.alpha_button("LDR f f", " Find File "),
- astronvim.alpha_button("LDR f o", " Recents "),
- astronvim.alpha_button("LDR f w", " Find Word "),
- astronvim.alpha_button("LDR f n", " New File "),
- astronvim.alpha_button("LDR f m", " Bookmarks "),
- astronvim.alpha_button("LDR S l", " Last Session "),
- },
- opts = { spacing = 1 },
- },
- },
- opts = { noautocmd = true },
-}))
diff --git a/lua/configs/autopairs.lua b/lua/configs/autopairs.lua
deleted file mode 100644
index fb9e086..0000000
--- a/lua/configs/autopairs.lua
+++ /dev/null
@@ -1,28 +0,0 @@
-local npairs = require "nvim-autopairs"
-npairs.setup(astronvim.user_plugin_opts("plugins.nvim-autopairs", {
- check_ts = true,
- ts_config = { java = false },
- fast_wrap = {
- map = "",
- chars = { "{", "[", "(", '"', "'" },
- pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
- offset = 0,
- end_key = "$",
- keys = "qwertyuiopzxcvbnmasdfghjkl",
- check_comma = true,
- highlight = "PmenuSel",
- highlight_grey = "LineNr",
- },
-}))
-
-if not vim.g.autopairs_enabled then npairs.disable() end
-
-local rules = astronvim.user_plugin_opts("nvim-autopairs").add_rules
-if vim.tbl_contains({ "function", "table" }, type(rules)) then
- npairs.add_rules(type(rules) == "function" and rules(npairs) or rules)
-end
-
-local cmp_status_ok, cmp = pcall(require, "cmp")
-if cmp_status_ok then
- cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done { tex = false })
-end
diff --git a/lua/configs/better_escape.lua b/lua/configs/better_escape.lua
deleted file mode 100644
index d6afb22..0000000
--- a/lua/configs/better_escape.lua
+++ /dev/null
@@ -1 +0,0 @@
-require("better_escape").setup(astronvim.user_plugin_opts "plugins.better_escape")
diff --git a/lua/configs/bufferline.lua b/lua/configs/bufferline.lua
deleted file mode 100644
index 96626de..0000000
--- a/lua/configs/bufferline.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-local close_func = function(bufnum)
- local bufdelete_avail, bufdelete = pcall(require, "bufdelete")
- if bufdelete_avail then
- bufdelete.bufdelete(bufnum, true)
- else
- vim.cmd.bdelete { args = { bufnum }, bang = true }
- end
-end
-require("bufferline").setup(astronvim.user_plugin_opts("plugins.bufferline", {
- options = {
- offsets = {
- { filetype = "NvimTree", text = "", padding = 1 },
- { filetype = "neo-tree", text = "", padding = 1 },
- { filetype = "Outline", text = "", padding = 1 },
- },
- buffer_close_icon = astronvim.get_icon "BufferClose",
- modified_icon = astronvim.get_icon "FileModified",
- close_icon = astronvim.get_icon "NeovimClose",
- close_command = close_func,
- right_mouse_command = close_func,
- max_name_length = 14,
- max_prefix_length = 13,
- tab_size = 20,
- separator_style = "thin",
- },
-}))
-local highlights = require "bufferline.highlights"
-vim.api.nvim_create_autocmd("User", {
- pattern = "AstroColorScheme",
- group = "BufferlineCmds",
- desc = "Bufferline apply colors after astronvim colorscheme change",
- callback = function()
- highlights.reset_icon_hl_cache()
- highlights.set_all(require("bufferline.config").update_highlights())
- end,
-})
diff --git a/lua/configs/cmp.lua b/lua/configs/cmp.lua
deleted file mode 100644
index 8255531..0000000
--- a/lua/configs/cmp.lua
+++ /dev/null
@@ -1,92 +0,0 @@
-local cmp = require "cmp"
-local snip_status_ok, luasnip = pcall(require, "luasnip")
-local lspkind_status_ok, lspkind = pcall(require, "lspkind")
-if not snip_status_ok then return end
-local setup = cmp.setup
-local border_opts =
- { border = "single", winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None" }
-
-local function has_words_before()
- 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
-
-setup(astronvim.user_plugin_opts("plugins.cmp", {
- enabled = function()
- if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
- return vim.g.cmp_enabled
- end,
- preselect = cmp.PreselectMode.None,
- formatting = {
- fields = { "kind", "abbr", "menu" },
- format = lspkind_status_ok and lspkind.cmp_format(astronvim.lspkind) or nil,
- },
- snippet = {
- expand = function(args) luasnip.lsp_expand(args.body) end,
- },
- duplicates = {
- nvim_lsp = 1,
- luasnip = 1,
- cmp_tabnine = 1,
- buffer = 1,
- path = 1,
- },
- confirm_opts = {
- behavior = cmp.ConfirmBehavior.Replace,
- select = false,
- },
- window = {
- completion = cmp.config.window.bordered(border_opts),
- documentation = cmp.config.window.bordered(border_opts),
- },
- mapping = {
- [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Select },
- [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Select },
- [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
- [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
- [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
- [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
- [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
- [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
- [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
- [""] = cmp.config.disable,
- [""] = cmp.mapping {
- i = cmp.mapping.abort(),
- c = cmp.mapping.close(),
- },
- [""] = cmp.mapping.confirm { select = false },
- [""] = cmp.mapping(function(fallback)
- if cmp.visible() then
- cmp.select_next_item()
- elseif luasnip.expandable() then
- luasnip.expand()
- elseif luasnip.expand_or_jumpable() then
- luasnip.expand_or_jump()
- elseif has_words_before() then
- cmp.complete()
- else
- fallback()
- end
- end, {
- "i",
- "s",
- }),
- [""] = 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",
- }),
- },
-}))
-for setup_opt, setup_table in pairs(astronvim.user_plugin_opts("cmp.setup", {})) do
- for pattern, options in pairs(setup_table) do
- setup[setup_opt](pattern, options)
- end
-end
diff --git a/lua/configs/colorizer.lua b/lua/configs/colorizer.lua
deleted file mode 100644
index 004e89e..0000000
--- a/lua/configs/colorizer.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-require("colorizer").setup(
- astronvim.user_plugin_opts("plugins.colorizer", { user_default_options = { names = false } })
-)
diff --git a/lua/configs/dap.lua b/lua/configs/dap.lua
deleted file mode 100644
index def9731..0000000
--- a/lua/configs/dap.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local dap = require "dap"
-dap.adapters = astronvim.user_plugin_opts("dap.adapters", dap.adapters)
-dap.configurations = astronvim.user_plugin_opts("dap.configurations", dap.configurations)
diff --git a/lua/configs/dapui.lua b/lua/configs/dapui.lua
deleted file mode 100644
index 144017e..0000000
--- a/lua/configs/dapui.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-local dap, dapui = require "dap", require "dapui"
-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
-dapui.setup(astronvim.user_plugin_opts("plugins.dapui", { floating = { border = "rounded" } }))
diff --git a/lua/configs/dressing.lua b/lua/configs/dressing.lua
deleted file mode 100644
index 837f51b..0000000
--- a/lua/configs/dressing.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-require("dressing").setup(astronvim.user_plugin_opts("plugins.dressing", {
- input = {
- default_prompt = "➤ ",
- win_options = { winhighlight = "Normal:Normal,NormalNC:Normal" },
- },
- select = {
- backend = { "telescope", "builtin" },
- builtin = { win_options = { winhighlight = "Normal:Normal,NormalNC:Normal" } },
- },
-}))
diff --git a/lua/configs/gitsigns.lua b/lua/configs/gitsigns.lua
deleted file mode 100644
index 92ca456..0000000
--- a/lua/configs/gitsigns.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-require("gitsigns").setup(astronvim.user_plugin_opts("plugins.gitsigns", {
- signs = {
- add = { text = "▎" },
- change = { text = "▎" },
- delete = { text = "▎" },
- topdelete = { text = "契" },
- changedelete = { text = "▎" },
- untracked = { text = "▎" },
- },
-}))
diff --git a/lua/configs/heirline.lua b/lua/configs/heirline.lua
deleted file mode 100644
index f5cddb0..0000000
--- a/lua/configs/heirline.lua
+++ /dev/null
@@ -1,309 +0,0 @@
-local heirline = require "heirline"
-if not astronvim.status then return end
-local C = require "default_theme.colors"
-
-local function setup_colors()
- local Normal = astronvim.get_hlgroup("Normal", { fg = C.fg, bg = C.bg })
- local Comment = astronvim.get_hlgroup("Comment", { fg = C.grey_2, bg = C.bg })
- local Error = astronvim.get_hlgroup("Error", { fg = C.red, bg = C.bg })
- local StatusLine = astronvim.get_hlgroup("StatusLine", { fg = C.fg, bg = C.grey_4 })
- local TabLine = astronvim.get_hlgroup("TabLine", { fg = C.grey, bg = C.none })
- local TabLineSel = astronvim.get_hlgroup("TabLineSel", { fg = C.fg, bg = C.none })
- local WinBar = astronvim.get_hlgroup("WinBar", { fg = C.grey_2, bg = C.bg })
- local WinBarNC = astronvim.get_hlgroup("WinBarNC", { fg = C.grey, bg = C.bg })
- local Conditional = astronvim.get_hlgroup("Conditional", { fg = C.purple_1, bg = C.grey_4 })
- local String = astronvim.get_hlgroup("String", { fg = C.green, bg = C.grey_4 })
- local TypeDef = astronvim.get_hlgroup("TypeDef", { fg = C.yellow, bg = C.grey_4 })
- local GitSignsAdd = astronvim.get_hlgroup("GitSignsAdd", { fg = C.green, bg = C.grey_4 })
- local GitSignsChange = astronvim.get_hlgroup("GitSignsChange", { fg = C.orange_1, bg = C.grey_4 })
- local GitSignsDelete = astronvim.get_hlgroup("GitSignsDelete", { fg = C.red_1, bg = C.grey_4 })
- local DiagnosticError = astronvim.get_hlgroup("DiagnosticError", { fg = C.red_1, bg = C.grey_4 })
- local DiagnosticWarn = astronvim.get_hlgroup("DiagnosticWarn", { fg = C.orange_1, bg = C.grey_4 })
- local DiagnosticInfo = astronvim.get_hlgroup("DiagnosticInfo", { fg = C.white_2, bg = C.grey_4 })
- local DiagnosticHint = astronvim.get_hlgroup("DiagnosticHint", { fg = C.yellow_1, bg = C.grey_4 })
- local HeirlineInactive = astronvim.get_hlgroup("HeirlineInactive", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("inactive", C.grey_7)
- local HeirlineNormal = astronvim.get_hlgroup("HeirlineNormal", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("normal", C.blue)
- local HeirlineInsert = astronvim.get_hlgroup("HeirlineInsert", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("insert", C.green)
- local HeirlineVisual = astronvim.get_hlgroup("HeirlineVisual", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("visual", C.purple)
- local HeirlineReplace = astronvim.get_hlgroup("HeirlineReplace", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("replace", C.red_1)
- local HeirlineCommand = astronvim.get_hlgroup("HeirlineCommand", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("command", C.yellow_1)
- local HeirlineTerminal = astronvim.get_hlgroup("HeirlineTerminal", { fg = nil }).fg
- or astronvim.status.hl.lualine_mode("inactive", HeirlineInsert)
-
- local colors = astronvim.user_plugin_opts("heirline.colors", {
- close_fg = Error.fg,
- fg = StatusLine.fg,
- bg = StatusLine.bg,
- section_fg = StatusLine.fg,
- section_bg = StatusLine.bg,
- git_branch_fg = Conditional.fg,
- mode_fg = StatusLine.bg,
- treesitter_fg = String.fg,
- scrollbar = TypeDef.fg,
- git_added = GitSignsAdd.fg,
- git_changed = GitSignsChange.fg,
- git_removed = GitSignsDelete.fg,
- diag_ERROR = DiagnosticError.fg,
- diag_WARN = DiagnosticWarn.fg,
- diag_INFO = DiagnosticInfo.fg,
- diag_HINT = DiagnosticHint.fg,
- winbar_fg = WinBar.fg,
- winbar_bg = WinBar.bg,
- winbarnc_fg = WinBarNC.fg,
- winbarnc_bg = WinBarNC.bg,
- tabline_bg = StatusLine.bg,
- tabline_fg = StatusLine.bg,
- buffer_fg = Comment.fg,
- buffer_path_fg = WinBarNC.fg,
- buffer_close_fg = Comment.fg,
- buffer_bg = StatusLine.bg,
- buffer_active_fg = Normal.fg,
- buffer_active_path_fg = WinBarNC.fg,
- buffer_active_close_fg = Error.fg,
- buffer_active_bg = Normal.bg,
- buffer_visible_fg = Normal.fg,
- buffer_visible_path_fg = WinBarNC.fg,
- buffer_visible_close_fg = Error.fg,
- buffer_visible_bg = Normal.bg,
- buffer_overflow_fg = Comment.fg,
- buffer_overflow_bg = StatusLine.bg,
- buffer_picker_fg = Error.fg,
- tab_close_fg = Error.fg,
- tab_close_bg = StatusLine.bg,
- tab_fg = TabLine.fg,
- tab_bg = TabLine.bg,
- tab_active_fg = TabLineSel.fg,
- tab_active_bg = TabLineSel.bg,
- inactive = HeirlineInactive,
- normal = HeirlineNormal,
- insert = HeirlineInsert,
- visual = HeirlineVisual,
- replace = HeirlineReplace,
- command = HeirlineCommand,
- terminal = HeirlineTerminal,
- })
-
- for _, section in ipairs {
- "git_branch",
- "file_info",
- "git_diff",
- "diagnostics",
- "lsp",
- "macro_recording",
- "mode",
- "cmd_info",
- "treesitter",
- "nav",
- } do
- if not colors[section .. "_bg"] then colors[section .. "_bg"] = colors["section_bg"] end
- if not colors[section .. "_fg"] then colors[section .. "_fg"] = colors["section_fg"] end
- end
- return colors
-end
-
---- a submodule of heirline specific functions and aliases
-astronvim.status.heirline = {}
-
---- A helper function to get the type a tab or buffer is
--- @param self the self table from a heirline component function
--- @param prefix the prefix of the type, either "tab" or "buffer" (Default: "buffer")
--- @return the string of prefix with the type (i.e. "_active" or "_visible")
-function astronvim.status.heirline.tab_type(self, prefix)
- local tab_type = ""
- if self.is_active then
- tab_type = "_active"
- elseif self.is_visible then
- tab_type = "_visible"
- end
- return (prefix or "buffer") .. tab_type
-end
-
---- Make a list of buffers, rendering each buffer with the provided component
----@param component table
----@return table
-astronvim.status.heirline.make_buflist = function(component)
- local overflow_hl = astronvim.status.hl.get_attributes("buffer_overflow", true)
- return require("heirline.utils").make_buflist(
- astronvim.status.utils.surround(
- "tab",
- function(self)
- return {
- main = astronvim.status.heirline.tab_type(self) .. "_bg",
- left = "tabline_bg",
- right = "tabline_bg",
- }
- end,
- { -- bufferlist
- init = function(self) self.tab_type = astronvim.status.heirline.tab_type(self) end,
- on_click = { -- add clickable component to each buffer
- callback = function(_, minwid) vim.api.nvim_win_set_buf(0, minwid) end,
- minwid = function(self) return self.bufnr end,
- name = "heirline_tabline_buffer_callback",
- },
- { -- add buffer picker functionality to each buffer
- condition = function(self) return self._show_picker end,
- update = false,
- init = function(self)
- local bufname = astronvim.status.provider.filename { fallback = "empty_file" }(self)
- local label = bufname:sub(1, 1)
- local i = 2
- while label ~= " " and self._picker_labels[label] do
- if i > #bufname then break end
- label = bufname:sub(i, i)
- i = i + 1
- end
- self._picker_labels[label] = self.bufnr
- self.label = label
- end,
- provider = function(self)
- return astronvim.status.provider.str { str = self.label, padding = { left = 1, right = 1 } }
- end,
- hl = astronvim.status.hl.get_attributes "buffer_picker",
- },
- component, -- create buffer component
- },
- false -- disable surrounding
- ),
- { provider = astronvim.get_icon "ArrowLeft" .. " ", hl = overflow_hl },
- { provider = astronvim.get_icon "ArrowRight" .. " ", hl = overflow_hl },
- function() return vim.t.bufs end, -- use astronvim bufs variable
- false -- disable internal caching
- )
-end
-
---- Alias to require("heirline.utils").make_tablist
-astronvim.status.heirline.make_tablist = require("heirline.utils").make_tablist
-
---- Run the buffer picker and execute the callback function on the selected buffer
--- @param callback function with a single parameter of the buffer number
-function astronvim.status.heirline.buffer_picker(callback)
- local tabline = require("heirline").tabline
- local buflist = tabline and tabline._buflist[1]
- if buflist then
- local prev_showtabline = vim.opt.showtabline
- buflist._picker_labels = {}
- buflist._show_picker = true
- vim.opt.showtabline = 2
- vim.cmd.redrawtabline()
- local char = vim.fn.getcharstr()
- local bufnr = buflist._picker_labels[char]
- if bufnr then callback(bufnr) end
- buflist._show_picker = false
- vim.opt.showtabline = prev_showtabline
- vim.cmd.redrawtabline()
- end
-end
-
-heirline.load_colors(setup_colors())
-local heirline_opts = astronvim.user_plugin_opts("plugins.heirline", {
- { -- statusline
- hl = { fg = "fg", bg = "bg" },
- astronvim.status.component.mode(),
- astronvim.status.component.git_branch(),
- -- TODO: REMOVE THIS WITH v3
- astronvim.status.component.file_info(
- (astronvim.is_available "bufferline.nvim" or vim.g.heirline_bufferline)
- and { filetype = {}, filename = false, file_modified = false }
- or nil
- ),
- -- astronvim.status.component.file_info { filetype = {}, filename = false, file_modified = false },
- astronvim.status.component.git_diff(),
- astronvim.status.component.diagnostics(),
- astronvim.status.component.fill(),
- astronvim.status.component.cmd_info(),
- astronvim.status.component.fill(),
- astronvim.status.component.lsp(),
- astronvim.status.component.treesitter(),
- astronvim.status.component.nav(),
- astronvim.status.component.mode { surround = { separator = "right" } },
- },
- { -- winbar
- static = {
- disabled = {
- buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
- filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
- },
- },
- init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end,
- fallthrough = false,
- {
- condition = function(self)
- return vim.opt.diff:get() or astronvim.status.condition.buffer_matches(self.disabled or {})
- end,
- init = function() vim.opt_local.winbar = nil end,
- },
- astronvim.status.component.file_info {
- condition = function() return not astronvim.status.condition.is_active() end,
- unique_path = {},
- file_icon = { hl = astronvim.status.hl.file_icon "winbar" },
- file_modified = false,
- file_read_only = false,
- hl = astronvim.status.hl.get_attributes("winbarnc", true),
- surround = false,
- update = "BufEnter",
- },
- astronvim.status.component.breadcrumbs { hl = astronvim.status.hl.get_attributes("winbar", true) },
- },
- vim.g.heirline_bufferline -- TODO v3: remove this option and make bufferline default
- and { -- bufferline
- { -- file tree padding
- condition = function(self)
- self.winid = vim.api.nvim_tabpage_list_wins(0)[1]
- return astronvim.status.condition.buffer_matches(
- { filetype = { "neo%-tree", "NvimTree" } },
- vim.api.nvim_win_get_buf(self.winid)
- )
- end,
- provider = function(self) return string.rep(" ", vim.api.nvim_win_get_width(self.winid)) end,
- hl = { bg = "tabline_bg" },
- },
- astronvim.status.heirline.make_buflist(astronvim.status.component.tabline_file_info()), -- component for each buffer tab
- astronvim.status.component.fill { hl = { bg = "tabline_bg" } }, -- fill the rest of the tabline with background color
- { -- tab list
- condition = function() return #vim.api.nvim_list_tabpages() >= 2 end, -- only show tabs if there are more than one
- astronvim.status.heirline.make_tablist { -- component for each tab
- provider = astronvim.status.provider.tabnr(),
- hl = function(self)
- return astronvim.status.hl.get_attributes(astronvim.status.heirline.tab_type(self, "tab"), true)
- end,
- },
- { -- close button for current tab
- provider = astronvim.status.provider.close_button { kind = "TabClose", padding = { left = 1, right = 1 } },
- hl = astronvim.status.hl.get_attributes("tab_close", true),
- on_click = { callback = astronvim.close_tab, name = "heirline_tabline_close_tab_callback" },
- },
- },
- }
- or nil,
-})
-heirline.setup(heirline_opts[1], heirline_opts[2], heirline_opts[3])
-
-local augroup = vim.api.nvim_create_augroup("Heirline", { clear = true })
-vim.api.nvim_create_autocmd("User", {
- pattern = "AstroColorScheme",
- group = augroup,
- desc = "Refresh heirline colors",
- callback = function() require("heirline.utils").on_colorscheme(setup_colors()) end,
-})
-vim.api.nvim_create_autocmd("User", {
- pattern = "HeirlineInitWinbar",
- group = augroup,
- desc = "Disable winbar for some filetypes",
- callback = function()
- if
- vim.opt.diff:get()
- or astronvim.status.condition.buffer_matches(require("heirline").winbar.disabled or {
- buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
- filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
- }) -- TODO v3: remove the default fallback here
- then
- vim.opt_local.winbar = nil
- end
- end,
-})
diff --git a/lua/configs/indent-line.lua b/lua/configs/indent-line.lua
deleted file mode 100644
index 0adb603..0000000
--- a/lua/configs/indent-line.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-require("indent_blankline").setup(astronvim.user_plugin_opts("plugins.indent_blankline", {
- buftype_exclude = {
- "nofile",
- "terminal",
- },
- filetype_exclude = {
- "help",
- "startify",
- "aerial",
- "alpha",
- "dashboard",
- "packer",
- "neogitstatus",
- "NvimTree",
- "neo-tree",
- "Trouble",
- },
- context_patterns = {
- "class",
- "return",
- "function",
- "method",
- "^if",
- "^while",
- "jsx_element",
- "^for",
- "^object",
- "^table",
- "block",
- "arguments",
- "if_statement",
- "else_clause",
- "jsx_element",
- "jsx_self_closing_element",
- "try_statement",
- "catch_clause",
- "import_statement",
- "operation_type",
- },
- show_trailing_blankline_indent = false,
- use_treesitter = true,
- char = "▏",
- context_char = "▏",
- show_current_context = true,
-}))
diff --git a/lua/configs/indent-o-matic.lua b/lua/configs/indent-o-matic.lua
deleted file mode 100644
index 490ca08..0000000
--- a/lua/configs/indent-o-matic.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local indent_o_matic = require "indent-o-matic"
-indent_o_matic.setup(astronvim.user_plugin_opts "plugins.indent-o-matic")
-indent_o_matic.detect()
diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua
deleted file mode 100644
index 96bf7ab..0000000
--- a/lua/configs/lspconfig.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-if vim.g.lsp_handlers_enabled then
- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
-end
-local setup_servers = function()
- vim.tbl_map(astronvim.lsp.setup, astronvim.user_plugin_opts "lsp.servers")
- vim.cmd "silent! do FileType"
-end
-if astronvim.is_available "mason-lspconfig.nvim" then
- vim.api.nvim_create_autocmd("User", { pattern = "AstroLspSetup", once = true, callback = setup_servers })
-else
- setup_servers()
-end
diff --git a/lua/configs/lspkind.lua b/lua/configs/lspkind.lua
deleted file mode 100644
index 6f13763..0000000
--- a/lua/configs/lspkind.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-astronvim.lspkind = astronvim.user_plugin_opts("plugins.lspkind", {
- mode = "symbol",
- symbol_map = {
- NONE = "",
- Array = "",
- Boolean = "⊨",
- Class = "",
- Constructor = "",
- Key = "",
- Namespace = "",
- Null = "NULL",
- Number = "#",
- Object = "⦿",
- Package = "",
- Property = "",
- Reference = "",
- Snippet = "",
- String = "𝓐",
- TypeParameter = "",
- Unit = "",
- },
-})
-require("lspkind").init(astronvim.lspkind)
diff --git a/lua/configs/luasnip.lua b/lua/configs/luasnip.lua
deleted file mode 100644
index 5ee7d14..0000000
--- a/lua/configs/luasnip.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-local user_settings = astronvim.user_plugin_opts "luasnip"
-local luasnip = require "luasnip"
-if user_settings.config then luasnip.config.setup(user_settings.config) end
-for _, load_type in ipairs { "vscode", "snipmate", "lua" } do
- local loader = require("luasnip.loaders.from_" .. load_type)
- loader.lazy_load()
- -- TODO: DEPRECATE _snippet_paths option in next major version release
- local paths = user_settings[load_type .. "_snippet_paths"]
- if paths then loader.lazy_load { paths = paths } end
- local loader_settings = user_settings[load_type]
- if loader_settings then loader.lazy_load(loader_settings) end
-end
-if type(user_settings.filetype_extend) == "table" then
- for filetype, snippets in pairs(user_settings.filetype_extend) do
- luasnip.filetype_extend(filetype, snippets)
- end
-end
diff --git a/lua/configs/mason-lspconfig.lua b/lua/configs/mason-lspconfig.lua
deleted file mode 100644
index 8fb1efd..0000000
--- a/lua/configs/mason-lspconfig.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-local mason_lspconfig = require "mason-lspconfig"
-mason_lspconfig.setup(astronvim.user_plugin_opts "plugins.mason-lspconfig")
-mason_lspconfig.setup_handlers(
- astronvim.user_plugin_opts("mason-lspconfig.setup_handlers", { function(server) astronvim.lsp.setup(server) end })
-)
-astronvim.event "LspSetup"
diff --git a/lua/configs/mason-null-ls.lua b/lua/configs/mason-null-ls.lua
deleted file mode 100644
index fe398de..0000000
--- a/lua/configs/mason-null-ls.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local mason_null_ls = require "mason-null-ls"
-mason_null_ls.setup(astronvim.user_plugin_opts("plugins.mason-null-ls", { automatic_setup = true }))
-mason_null_ls.setup_handlers(astronvim.user_plugin_opts("mason-null-ls.setup_handlers", {}))
diff --git a/lua/configs/mason-nvim-dap.lua b/lua/configs/mason-nvim-dap.lua
deleted file mode 100644
index c7c60a8..0000000
--- a/lua/configs/mason-nvim-dap.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local mason_nvim_dap = require "mason-nvim-dap"
-mason_nvim_dap.setup(astronvim.user_plugin_opts("plugins.mason-nvim-dap", { automatic_setup = true }))
-mason_nvim_dap.setup_handlers(astronvim.user_plugin_opts("mason-nvim-dap.setup_handlers", {}))
diff --git a/lua/configs/mason.lua b/lua/configs/mason.lua
deleted file mode 100644
index f5b3fca..0000000
--- a/lua/configs/mason.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-require("mason").setup(astronvim.user_plugin_opts("plugins.mason", {
- ui = {
- icons = {
- package_installed = "✓",
- package_uninstalled = "✗",
- package_pending = "⟳",
- },
- },
-}))
-
-local cmd = vim.api.nvim_create_user_command
-cmd("MasonUpdateAll", function() astronvim.mason.update_all() end, { desc = "Update Mason Packages" })
-cmd("MasonUpdate", function(opts) astronvim.mason.update(opts.args) end, { nargs = 1, desc = "Update Mason Package" })
diff --git a/lua/configs/neo-tree.lua b/lua/configs/neo-tree.lua
deleted file mode 100644
index e35655e..0000000
--- a/lua/configs/neo-tree.lua
+++ /dev/null
@@ -1,67 +0,0 @@
-require("neo-tree").setup(astronvim.user_plugin_opts("plugins.neo-tree", {
- close_if_last_window = true,
- enable_diagnostics = false,
- source_selector = {
- winbar = true,
- content_layout = "center",
- tab_labels = {
- filesystem = astronvim.get_icon "FolderClosed" .. " File",
- buffers = astronvim.get_icon "DefaultFile" .. " Bufs",
- git_status = astronvim.get_icon "Git" .. " Git",
- diagnostics = astronvim.get_icon "Diagnostic" .. " Diagnostic",
- },
- },
- default_component_configs = {
- indent = { padding = 0 },
- icon = {
- folder_closed = astronvim.get_icon "FolderClosed",
- folder_open = astronvim.get_icon "FolderOpen",
- folder_empty = astronvim.get_icon "FolderEmpty",
- default = astronvim.get_icon "DefaultFile",
- },
- git_status = {
- symbols = {
- added = astronvim.get_icon "GitAdd",
- deleted = astronvim.get_icon "GitDelete",
- modified = astronvim.get_icon "GitChange",
- renamed = astronvim.get_icon "GitRenamed",
- untracked = astronvim.get_icon "GitUntracked",
- ignored = astronvim.get_icon "GitIgnored",
- unstaged = astronvim.get_icon "GitUnstaged",
- staged = astronvim.get_icon "GitStaged",
- conflict = astronvim.get_icon "GitConflict",
- },
- },
- },
- window = {
- width = 30,
- mappings = {
- [""] = false, -- disable space until we figure out which-key disabling
- o = "open",
- H = "prev_source",
- L = "next_source",
- },
- },
- filesystem = {
- filtered_items = {
- visible = true,
- hide_dotfiles = false,
- hide_gitignored = false,
- },
- follow_current_file = true,
- hijack_netrw_behavior = "open_current",
- use_libuv_file_watcher = true,
- window = {
- mappings = {
- O = "system_open",
- h = "toggle_hidden",
- },
- },
- commands = {
- system_open = function(state) astronvim.system_open(state.tree:get_node():get_id()) end,
- },
- },
- event_handlers = {
- { event = "neo_tree_buffer_enter", handler = function(_) vim.opt_local.signcolumn = "auto" end },
- },
-}))
diff --git a/lua/configs/notify.lua b/lua/configs/notify.lua
deleted file mode 100644
index a4388fb..0000000
--- a/lua/configs/notify.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local notify = require "notify"
-notify.setup(astronvim.user_plugin_opts("plugins.notify", { stages = "fade" }))
-vim.notify = notify
diff --git a/lua/configs/null-ls.lua b/lua/configs/null-ls.lua
deleted file mode 100644
index e1eca3b..0000000
--- a/lua/configs/null-ls.lua
+++ /dev/null
@@ -1 +0,0 @@
-require("null-ls").setup(astronvim.user_plugin_opts("plugins.null-ls", { on_attach = astronvim.lsp.on_attach }))
diff --git a/lua/configs/nvim-web-devicons.lua b/lua/configs/nvim-web-devicons.lua
deleted file mode 100644
index 54f4615..0000000
--- a/lua/configs/nvim-web-devicons.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-require("nvim-web-devicons").set_default_icon(astronvim.get_icon "DefaultFile", "#6d8086", "66")
-require("nvim-web-devicons").set_icon(astronvim.user_plugin_opts("plugins.nvim-web-devicons", {
- deb = { icon = "", name = "Deb" },
- lock = { icon = "", name = "Lock" },
- mp3 = { icon = "", name = "Mp3" },
- mp4 = { icon = "", name = "Mp4" },
- out = { icon = "", name = "Out" },
- ["robots.txt"] = { icon = "ﮧ", name = "Robots" },
- ttf = { icon = "", name = "TrueTypeFont" },
- rpm = { icon = "", name = "Rpm" },
- woff = { icon = "", name = "WebOpenFontFormat" },
- woff2 = { icon = "", name = "WebOpenFontFormat2" },
- xz = { icon = "", name = "Xz" },
- zip = { icon = "", name = "Zip" },
-}))
diff --git a/lua/configs/server-settings/jsonls.lua b/lua/configs/server-settings/jsonls.lua
deleted file mode 100644
index 98da93b..0000000
--- a/lua/configs/server-settings/jsonls.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-return {
- settings = {
- json = {
- schemas = require("schemastore").json.schemas(),
- validate = { enable = true },
- },
- },
-}
diff --git a/lua/configs/server-settings/sumneko_lua.lua b/lua/configs/server-settings/sumneko_lua.lua
deleted file mode 100644
index 378f7c3..0000000
--- a/lua/configs/server-settings/sumneko_lua.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-return {
- settings = {
- Lua = {
- telemetry = { enable = false },
- runtime = { version = "LuaJIT" },
- diagnostics = { globals = { "vim", "astronvim", "astronvim_installation", "packer_plugins", "bit" } },
- workspace = {
- library = {
- vim.fn.expand "$VIMRUNTIME/lua",
- astronvim.install.home .. "/lua",
- astronvim.install.config .. "/lua",
- },
- },
- },
- },
-}
diff --git a/lua/configs/session_manager.lua b/lua/configs/session_manager.lua
deleted file mode 100644
index 409a1dd..0000000
--- a/lua/configs/session_manager.lua
+++ /dev/null
@@ -1 +0,0 @@
-require("session_manager").setup(astronvim.user_plugin_opts "plugins.session_manager")
diff --git a/lua/configs/smart-splits.lua b/lua/configs/smart-splits.lua
deleted file mode 100644
index f43f7ac..0000000
--- a/lua/configs/smart-splits.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-require("smart-splits").setup(astronvim.user_plugin_opts("plugins.smart-splits", {
- ignored_filetypes = {
- "nofile",
- "quickfix",
- "qf",
- "prompt",
- },
- ignored_buftypes = { "nofile" },
-}))
diff --git a/lua/configs/telescope.lua b/lua/configs/telescope.lua
deleted file mode 100644
index 3fdcc55..0000000
--- a/lua/configs/telescope.lua
+++ /dev/null
@@ -1,39 +0,0 @@
-local telescope = require "telescope"
-local actions = require "telescope.actions"
-
-telescope.setup(astronvim.user_plugin_opts("plugins.telescope", {
- defaults = {
- file_ignore_patterns = { "node_modules" },
-
- prompt_prefix = string.format("%s ", astronvim.get_icon "Search"),
- selection_caret = string.format("%s ", astronvim.get_icon "Selected"),
- path_display = { "truncate" },
- sorting_strategy = "ascending",
- layout_config = {
- horizontal = {
- prompt_position = "top",
- preview_width = 0.55,
- results_width = 0.8,
- },
- vertical = {
- mirror = false,
- },
- width = 0.87,
- height = 0.80,
- preview_cutoff = 120,
- },
-
- mappings = {
- i = {
- -- [""] = actions.cycle_history_next,
- -- [""] = actions.cycle_history_prev,
- [""] = actions.move_selection_next,
- [""] = actions.move_selection_previous,
- },
- n = { ["q"] = actions.close },
- },
- },
-}))
-
-astronvim.conditional_func(telescope.load_extension, pcall(require, "notify"), "notify")
-astronvim.conditional_func(telescope.load_extension, pcall(require, "aerial"), "aerial")
diff --git a/lua/configs/toggleterm.lua b/lua/configs/toggleterm.lua
deleted file mode 100644
index 8fb1444..0000000
--- a/lua/configs/toggleterm.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-require("toggleterm").setup(astronvim.user_plugin_opts("plugins.toggleterm", {
- size = 10,
- open_mapping = [[]],
- shading_factor = 2,
- direction = "float",
- float_opts = {
- border = "curved",
- highlights = {
- border = "Normal",
- background = "Normal",
- },
- },
-}))
diff --git a/lua/configs/treesitter.lua b/lua/configs/treesitter.lua
deleted file mode 100644
index bf024f9..0000000
--- a/lua/configs/treesitter.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-require("nvim-treesitter.configs").setup(astronvim.user_plugin_opts("plugins.treesitter", {
- highlight = {
- enable = true,
- additional_vim_regex_highlighting = false,
- },
- context_commentstring = {
- enable = true,
- enable_autocmd = false,
- },
- rainbow = {
- enable = true,
- disable = { "html" },
- extended_mode = false,
- max_file_lines = nil,
- },
- autotag = { enable = true },
- incremental_selection = { enable = true },
- indent = { enable = false },
-}))
diff --git a/lua/configs/which-key-register.lua b/lua/configs/which-key-register.lua
deleted file mode 100644
index e5d38b7..0000000
--- a/lua/configs/which-key-register.lua
+++ /dev/null
@@ -1,55 +0,0 @@
-local is_available = astronvim.is_available
-local user_plugin_opts = astronvim.user_plugin_opts
-local mappings = {
- n = {
- [""] = {
- f = { name = "File" },
- p = { name = "Packages" },
- l = { name = "LSP" },
- u = { name = "UI" },
- },
- },
-}
-
-local extra_sections = {
- b = "Buffers",
- D = "Debugger",
- g = "Git",
- s = "Search",
- S = "Session",
- t = "Terminal",
-}
-
-local function init_table(mode, prefix, idx)
- if not mappings[mode][prefix][idx] then mappings[mode][prefix][idx] = { name = extra_sections[idx] } end
-end
-
--- TODO v3: remove vim.g.heirline_bufferline check
-if is_available "heirline.nvim" and vim.g.heirline_bufferline then init_table("n", "", "b") end
-
-if is_available "neovim-session-manager" then init_table("n", "", "S") end
-
-if is_available "gitsigns.nvim" then init_table("n", "", "g") end
-
-if is_available "toggleterm.nvim" then
- init_table("n", "", "g")
- init_table("n", "", "t")
-end
-
-if is_available "telescope.nvim" then
- init_table("n", "", "s")
- init_table("n", "", "g")
-end
-
-if is_available "nvim-dap" then init_table("n", "", "D") end
-
-if is_available "Comment.nvim" then
- for _, mode in ipairs { "n", "v" } do
- if not mappings[mode] then mappings[mode] = {} end
- if not mappings[mode].g then mappings[mode].g = {} end
- mappings[mode].g.c = "Comment toggle linewise"
- mappings[mode].g.b = "Comment toggle blockwise"
- end
-end
-
-astronvim.which_key_register(user_plugin_opts("which-key.register", mappings))
diff --git a/lua/configs/which-key.lua b/lua/configs/which-key.lua
deleted file mode 100644
index b2061c0..0000000
--- a/lua/configs/which-key.lua
+++ /dev/null
@@ -1,11 +0,0 @@
-require("which-key").setup(astronvim.user_plugin_opts("plugins.which-key", {
- plugins = {
- spelling = { enabled = true },
- presets = { operators = false },
- },
- window = {
- border = "rounded",
- padding = { 2, 2, 2, 2 },
- },
- disable = { filetypes = { "TelescopePrompt" } },
-}))
diff --git a/lua/configs/window-picker.lua b/lua/configs/window-picker.lua
deleted file mode 100644
index b8df293..0000000
--- a/lua/configs/window-picker.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-local colors = require "default_theme.colors"
-require("window-picker").setup(
- astronvim.user_plugin_opts("plugins.window-picker", { use_winbar = "smart", other_win_hl_color = colors.grey_4 })
-)
diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua
deleted file mode 100644
index 1e4ba05..0000000
--- a/lua/core/autocmds.lua
+++ /dev/null
@@ -1,213 +0,0 @@
-local is_available = astronvim.is_available
-local user_plugin_opts = astronvim.user_plugin_opts
-local namespace = vim.api.nvim_create_namespace
-local cmd = vim.api.nvim_create_autocmd
-local augroup = vim.api.nvim_create_augroup
-local create_command = vim.api.nvim_create_user_command
-
-vim.on_key(function(char)
- if vim.fn.mode() == "n" then
- local new_hlsearch = vim.tbl_contains({ "", "n", "N", "*", "#", "?", "/" }, vim.fn.keytrans(char))
- if vim.opt.hlsearch:get() ~= new_hlsearch then vim.opt.hlsearch = new_hlsearch end
- end
-end, namespace "auto_hlsearch")
-
-if vim.g.heirline_bufferline then
- local bufferline_group = augroup("bufferline", { clear = true })
- cmd({ "BufAdd", "BufEnter" }, {
- desc = "Update buffers when adding new buffers",
- group = bufferline_group,
- callback = function(args)
- if not vim.t.bufs then vim.t.bufs = {} end
- local bufs = vim.t.bufs
- if not vim.tbl_contains(bufs, args.buf) then
- table.insert(bufs, args.buf)
- vim.t.bufs = bufs
- end
- vim.t.bufs = vim.tbl_filter(astronvim.is_valid_buffer, vim.t.bufs)
- end,
- })
- cmd("BufDelete", {
- desc = "Update buffers when deleting buffers",
- group = bufferline_group,
- callback = function(args)
- for _, tab in ipairs(vim.api.nvim_list_tabpages()) do
- local bufs = vim.t[tab].bufs
- if bufs then
- for i, bufnr in ipairs(bufs) do
- if bufnr == args.buf then
- table.remove(bufs, i)
- vim.t[tab].bufs = bufs
- break
- end
- end
- end
- end
- vim.t.bufs = vim.tbl_filter(astronvim.is_valid_buffer, vim.t.bufs)
- vim.cmd.redrawtabline()
- end,
- })
-end
-
-cmd({ "VimEnter", "FileType", "BufEnter", "WinEnter" }, {
- desc = "URL Highlighting",
- group = augroup("highlighturl", { clear = true }),
- pattern = "*",
- callback = function() astronvim.set_url_match() end,
-})
-
-cmd("TextYankPost", {
- desc = "Highlight yanked text",
- group = augroup("highlightyank", { clear = true }),
- pattern = "*",
- callback = function() vim.highlight.on_yank() end,
-})
-
-cmd("FileType", {
- desc = "Unlist quickfist buffers",
- group = augroup("unlist_quickfist", { clear = true }),
- pattern = "qf",
- callback = function() vim.opt_local.buflisted = false end,
-})
-
-cmd("BufEnter", {
- desc = "Quit AstroNvim if more than one window is open and only sidebar windows are list",
- group = augroup("auto_quit", { clear = true }),
- callback = function()
- local wins = vim.api.nvim_tabpage_list_wins(0)
- -- Both neo-tree and aerial will auto-quit if there is only a single window left
- if #wins <= 1 then return end
- local sidebar_fts = { aerial = true, ["neo-tree"] = true }
- for _, winid in ipairs(wins) do
- if vim.api.nvim_win_is_valid(winid) then
- local bufnr = vim.api.nvim_win_get_buf(winid)
- local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype")
- -- If any visible windows are not sidebars, early return
- if not sidebar_fts[filetype] then
- return
- -- If the visible window is a sidebar
- else
- -- only count filetypes once, so remove a found sidebar from the detection
- sidebar_fts[filetype] = nil
- end
- end
- end
- if #vim.api.nvim_list_tabpages() > 1 then
- vim.cmd.tabclose()
- else
- vim.cmd.qall()
- end
- end,
-})
-
-if is_available "alpha-nvim" then
- local group_name = augroup("alpha_settings", { clear = true })
- cmd("User", {
- desc = "Disable status and tablines for alpha",
- group = group_name,
- pattern = "AlphaReady",
- callback = function()
- local prev_showtabline = vim.opt.showtabline
- local prev_status = vim.opt.laststatus
- vim.opt.laststatus = 0
- vim.opt.showtabline = 0
- vim.opt_local.winbar = nil
- cmd("BufUnload", {
- pattern = "",
- callback = function()
- vim.opt.laststatus = prev_status
- vim.opt.showtabline = prev_showtabline
- end,
- })
- end,
- })
- cmd("VimEnter", {
- desc = "Start Alpha when vim is opened with no arguments",
- group = group_name,
- callback = function()
- local should_skip = false
- if vim.fn.argc() > 0 or vim.fn.line2byte "$" ~= -1 or not vim.o.modifiable then
- should_skip = true
- else
- for _, arg in pairs(vim.v.argv) do
- if arg == "-b" or arg == "-c" or vim.startswith(arg, "+") or arg == "-S" then
- should_skip = true
- break
- end
- end
- end
- if not should_skip then
- if is_available "bufferline.nvim" then pcall(require, "bufferline") end -- TODO v3: remove this line
- require("alpha").start(true)
- end
- end,
- })
-end
-
-if is_available "neo-tree.nvim" then
- cmd("BufEnter", {
- desc = "Open Neo-Tree on startup with directory",
- group = augroup("neotree_start", { clear = true }),
- callback = function()
- local stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(0))
- if stats and stats.type == "directory" then require("neo-tree.setup.netrw").hijack() end
- end,
- })
-end
-
-if is_available "nvim-dap-ui" then
- vim.api.nvim_create_autocmd("FileType", {
- desc = "Make q close dap floating windows",
- group = vim.api.nvim_create_augroup("dapui", { clear = true }),
- pattern = "dap-float",
- callback = function() vim.keymap.set("n", "q", "close!") end,
- })
-end
-
-cmd({ "VimEnter", "ColorScheme" }, {
- desc = "Load custom highlights from user configuration",
- group = augroup("astronvim_highlights", { clear = true }),
- callback = function()
- if vim.g.colors_name then
- for _, module in ipairs { "init", vim.g.colors_name } do
- for group, spec in pairs(user_plugin_opts("highlights." .. module)) do
- vim.api.nvim_set_hl(0, group, spec)
- end
- end
- end
- astronvim.event "ColorScheme"
- end,
-})
-
-vim.api.nvim_create_autocmd("BufRead", {
- group = vim.api.nvim_create_augroup("git_plugin_lazy_load", { clear = true }),
- callback = function()
- vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse")
- if vim.v.shell_error == 0 then
- vim.api.nvim_del_augroup_by_name "git_plugin_lazy_load"
- local packer = require "packer"
- vim.tbl_map(function(plugin) packer.loader(plugin) end, astronvim.git_plugins)
- end
- end,
-})
-vim.api.nvim_create_autocmd({ "BufRead", "BufWinEnter", "BufNewFile" }, {
- group = vim.api.nvim_create_augroup("file_plugin_lazy_load", { clear = true }),
- callback = function(args)
- if not (vim.fn.expand "%" == "" or vim.api.nvim_buf_get_option(args.buf, "buftype") == "nofile") then
- vim.api.nvim_del_augroup_by_name "file_plugin_lazy_load"
- local packer = require "packer"
- vim.tbl_map(function(plugin) packer.loader(plugin) end, astronvim.file_plugins)
- end
- end,
-})
-
-create_command(
- "AstroUpdatePackages",
- function() astronvim.updater.update_packages() end,
- { desc = "Update Packer and Mason" }
-)
-create_command("AstroUpdate", function() astronvim.updater.update() end, { desc = "Update AstroNvim" })
-create_command("AstroReload", function() astronvim.updater.reload() end, { desc = "Reload AstroNvim" })
-create_command("AstroVersion", function() astronvim.updater.version() end, { desc = "Check AstroNvim Version" })
-create_command("AstroChangelog", function() astronvim.updater.changelog() end, { desc = "Check AstroNvim Changelog" })
-create_command("ToggleHighlightURL", function() astronvim.ui.toggle_url_match() end, { desc = "Toggle URL Highlights" })
diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua
deleted file mode 100644
index 48839f8..0000000
--- a/lua/core/bootstrap.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-astronvim.initialize_packer()
-
-local colorscheme = astronvim.user_plugin_opts("colorscheme", nil, false)
-vim.cmd.colorscheme(vim.tbl_contains(vim.fn.getcompletion("", "color"), colorscheme) and colorscheme or "default_theme")
diff --git a/lua/core/diagnostics.lua b/lua/core/diagnostics.lua
deleted file mode 100644
index c214098..0000000
--- a/lua/core/diagnostics.lua
+++ /dev/null
@@ -1,43 +0,0 @@
-local signs = {
- { name = "DiagnosticSignError", text = astronvim.get_icon "DiagnosticError" },
- { name = "DiagnosticSignWarn", text = astronvim.get_icon "DiagnosticWarn" },
- { name = "DiagnosticSignHint", text = astronvim.get_icon "DiagnosticHint" },
- { name = "DiagnosticSignInfo", text = astronvim.get_icon "DiagnosticInfo" },
- { name = "DiagnosticSignError", text = astronvim.get_icon "DiagnosticError" },
- { name = "DapStopped", text = astronvim.get_icon "DapStopped", texthl = "DiagnosticWarn" },
- { name = "DapBreakpoint", text = astronvim.get_icon "DapBreakpoint", texthl = "DiagnosticInfo" },
- { name = "DapBreakpointRejected", text = astronvim.get_icon "DapBreakpointRejected", texthl = "DiagnosticError" },
- { name = "DapBreakpointCondition", text = astronvim.get_icon "DapBreakpointCondition", texthl = "DiagnosticInfo" },
- { name = "DapLogPoint", text = astronvim.get_icon "DapLogPoint", texthl = "DiagnosticInfo" },
-}
-
-for _, sign in ipairs(signs) do
- if not sign.texthl then sign.texthl = sign.name end
- vim.fn.sign_define(sign.name, sign)
-end
-
-astronvim.lsp.diagnostics = {
- off = {
- underline = false,
- virtual_text = false,
- signs = false,
- update_in_insert = false,
- },
- on = astronvim.user_plugin_opts("diagnostics", {
- virtual_text = true,
- signs = { active = signs },
- update_in_insert = true,
- underline = true,
- severity_sort = true,
- float = {
- focused = false,
- style = "minimal",
- border = "rounded",
- source = "always",
- header = "",
- prefix = "",
- },
- }),
-}
-
-vim.diagnostic.config(astronvim.lsp.diagnostics[vim.g.diagnostics_enabled and "on" or "off"])
diff --git a/lua/core/icons/nerd_font.lua b/lua/core/icons/nerd_font.lua
deleted file mode 100644
index b083a06..0000000
--- a/lua/core/icons/nerd_font.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-return {
- ActiveLSP = "",
- ActiveTS = "綠",
- ArrowLeft = "",
- ArrowRight = "",
- BufferClose = "",
- DapBreakpoint = "",
- DapBreakpointCondition = "",
- DapBreakpointRejected = "",
- DapLogPoint = ".>",
- DapStopped = "",
- DefaultFile = "",
- Diagnostic = "裂",
- DiagnosticError = "",
- DiagnosticHint = "",
- DiagnosticInfo = "",
- DiagnosticWarn = "",
- Ellipsis = "…",
- FileModified = "",
- FileReadOnly = "",
- FolderClosed = "",
- FolderEmpty = "",
- FolderOpen = "",
- Git = "",
- GitAdd = "",
- GitBranch = "",
- GitChange = "",
- GitConflict = "",
- GitDelete = "",
- GitIgnored = "◌",
- GitRenamed = "➜",
- GitStaged = "✓",
- GitUnstaged = "✗",
- GitUntracked = "★",
- LSPLoaded = "",
- LSPLoading1 = "",
- LSPLoading2 = "",
- LSPLoading3 = "",
- MacroRecording = "",
- NeovimClose = "", -- TODO v3: remove this icon
- Paste = "",
- Search = "",
- Selected = "❯",
- Spellcheck = "暈",
- TabClose = "",
-}
diff --git a/lua/core/icons/text.lua b/lua/core/icons/text.lua
deleted file mode 100644
index bc79218..0000000
--- a/lua/core/icons/text.lua
+++ /dev/null
@@ -1,38 +0,0 @@
-return {
- ActiveLSP = "LSP:",
- ArrowLeft = "<",
- ArrowRight = ">",
- BufferClose = "x",
- DapBreakpoint = "B",
- DapBreakpointCondition = "C",
- DapBreakpointRejected = "R",
- DapLogPoint = "L",
- DapStopped = ">",
- DefaultFile = "[F]",
- DiagnosticError = "X",
- DiagnosticHint = "?",
- DiagnosticInfo = "i",
- DiagnosticWarn = "!",
- Ellipsis = "...",
- FileModified = "*",
- FileReadOnly = "[lock]",
- FolderClosed = "[D]",
- FolderEmpty = "[E]",
- FolderOpen = "[O]",
- GitAdd = "[+]",
- GitChange = "[/]",
- GitConflict = "[!]",
- GitDelete = "[-]",
- GitIgnored = "[I]",
- GitRenamed = "[R]",
- GitStaged = "[S]",
- GitUnstaged = "[U]",
- GitUntracked = "[?]",
- MacroRecording = "Recording:",
- NeovimClose = "X", -- TODO v3: remove this icon
- Paste = "[PASTE]",
- Search = "?",
- Selected = "*",
- Spellcheck = "[SPELL]",
- TabClose = "X",
-}
diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua
deleted file mode 100644
index 21e6695..0000000
--- a/lua/core/mappings.lua
+++ /dev/null
@@ -1,317 +0,0 @@
-local is_available = astronvim.is_available
-
-local maps = { i = {}, n = {}, v = {}, t = {} }
-
--- Normal --
--- Standard Operations
-maps.n["w"] = { "w", desc = "Save" }
-maps.n["q"] = { "q", desc = "Quit" }
-maps.n["h"] = { "nohlsearch", desc = "No Highlight" } -- TODO: REMOVE IN v3
-maps.n["fn"] = { "enew", desc = "New File" }
-maps.n["gx"] = { function() astronvim.system_open() end, desc = "Open the file under cursor with system app" }
-maps.n[""] = { "w!", desc = "Force write" }
-maps.n[""] = { "q!", desc = "Force quit" }
-maps.n["Q"] = ""
-maps.n["|"] = { "vsplit", desc = "Vertical Split" }
-maps.n["\\"] = { "split", desc = "Horizontal Split" }
-
--- Packer
-maps.n["pc"] = { "PackerCompile", desc = "Packer Compile" }
-maps.n["pi"] = { "PackerInstall", desc = "Packer Install" }
-maps.n["ps"] = { "PackerSync", desc = "Packer Sync" }
-maps.n["pS"] = { "PackerStatus", desc = "Packer Status" }
-maps.n["pu"] = { "PackerUpdate", desc = "Packer Update" }
-
--- AstroNvim
-maps.n["pa"] = { "AstroUpdatePackages", desc = "Update Packer and Mason" }
-maps.n["pA"] = { "AstroUpdate", desc = "AstroNvim Update" }
-maps.n["pv"] = { "AstroVersion", desc = "AstroNvim Version" }
-maps.n["pl"] = { "AstroChangelog", desc = "AstroNvim Changelog" }
-
--- Alpha
-if is_available "alpha-nvim" then
- maps.n["d"] = { function() require("alpha").start() end, desc = "Alpha Dashboard" }
-end
-
-if vim.g.heirline_bufferline then
- -- Manage Buffers
- maps.n["c"] = { function() astronvim.close_buf(0) end, desc = "Close buffer" }
- maps.n["C"] = { function() astronvim.close_buf(0, true) end, desc = "Force close buffer" }
- maps.n[""] = { function() astronvim.nav_buf(vim.v.count > 0 and vim.v.count or 1) end, desc = "Next buffer" }
- maps.n[""] =
- { function() astronvim.nav_buf(-(vim.v.count > 0 and vim.v.count or 1)) end, desc = "Previous buffer" }
- maps.n[">b"] =
- { function() astronvim.move_buf(vim.v.count > 0 and vim.v.count or 1) end, desc = "Move buffer tab right" }
- maps.n[" 0 and vim.v.count or 1)) end, desc = "Move buffer tab left" }
-
- maps.n["bb"] = {
- function()
- astronvim.status.heirline.buffer_picker(function(bufnr) vim.api.nvim_win_set_buf(0, bufnr) end)
- end,
- desc = "Select buffer from tabline",
- }
- maps.n["bd"] = {
- function()
- astronvim.status.heirline.buffer_picker(function(bufnr) astronvim.close_buf(bufnr) end)
- end,
- desc = "Delete buffer from tabline",
- }
- maps.n["b\\"] = {
- function()
- astronvim.status.heirline.buffer_picker(function(bufnr)
- vim.cmd.split()
- vim.api.nvim_win_set_buf(0, bufnr)
- end)
- end,
- desc = "Horizontal split buffer from tabline",
- }
- maps.n["b|"] = {
- function()
- astronvim.status.heirline.buffer_picker(function(bufnr)
- vim.cmd.vsplit()
- vim.api.nvim_win_set_buf(0, bufnr)
- end)
- end,
- desc = "Vertical split buffer from tabline",
- }
-else -- TODO v3: remove this else block
- -- Bufdelete
- if is_available "bufdelete.nvim" then
- maps.n["c"] = { function() require("bufdelete").bufdelete(0, false) end, desc = "Close buffer" }
- maps.n["C"] = { function() require("bufdelete").bufdelete(0, true) end, desc = "Force close buffer" }
- else
- maps.n["c"] = { "bdelete", desc = "Close buffer" }
- maps.n["C"] = { "bdelete!", desc = "Force close buffer" }
- end
-
- -- Navigate buffers
- if is_available "bufferline.nvim" then
- maps.n[""] = { "BufferLineCycleNext", desc = "Next buffer tab" }
- maps.n[""] = { "BufferLineCyclePrev", desc = "Previous buffer tab" }
- maps.n[">b"] = { "BufferLineMoveNext", desc = "Move buffer tab right" }
- maps.n["BufferLineMovePrev", desc = "Move buffer tab left" }
- else
- maps.n[""] = { "bnext", desc = "Next buffer" }
- maps.n[""] = { "bprevious", desc = "Previous buffer" }
- end
-end
-
--- Navigate tabs
-maps.n["]t"] = { function() vim.cmd.tabnext() end, desc = "Next tab" }
-maps.n["[t"] = { function() vim.cmd.tabprevious() end, desc = "Previous tab" }
-
--- Comment
-if is_available "Comment.nvim" then
- maps.n["/"] = { function() require("Comment.api").toggle.linewise.current() end, desc = "Comment line" }
- maps.v["/"] = {
- "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())",
- desc = "Toggle comment line",
- }
-end
-
--- GitSigns
-if is_available "gitsigns.nvim" then
- maps.n["gj"] = { function() require("gitsigns").next_hunk() end, desc = "Next Git hunk" }
- maps.n["gk"] = { function() require("gitsigns").prev_hunk() end, desc = "Previous Git hunk" }
- maps.n["gl"] = { function() require("gitsigns").blame_line() end, desc = "View Git blame" }
- maps.n["gp"] = { function() require("gitsigns").preview_hunk() end, desc = "Preview Git hunk" }
- maps.n["gh"] = { function() require("gitsigns").reset_hunk() end, desc = "Reset Git hunk" }
- maps.n["gr"] = { function() require("gitsigns").reset_buffer() end, desc = "Reset Git buffer" }
- maps.n["gs"] = { function() require("gitsigns").stage_hunk() end, desc = "Stage Git hunk" }
- maps.n["gu"] = { function() require("gitsigns").undo_stage_hunk() end, desc = "Unstage Git hunk" }
- maps.n["gd"] = { function() require("gitsigns").diffthis() end, desc = "View Git diff" }
-end
-
--- NeoTree
-if is_available "neo-tree.nvim" then
- maps.n["e"] = { "Neotree toggle", desc = "Toggle Explorer" }
- maps.n["o"] = { "Neotree focus", desc = "Focus Explorer" }
-end
-
--- Session Manager
-if is_available "neovim-session-manager" then
- maps.n["Sl"] = { "SessionManager! load_last_session", desc = "Load last session" }
- maps.n["Ss"] = { "SessionManager! save_current_session", desc = "Save this session" }
- maps.n["Sd"] = { "SessionManager! delete_session", desc = "Delete session" }
- maps.n["Sf"] = { "SessionManager! load_session", desc = "Search sessions" }
- maps.n["S."] =
- { "SessionManager! load_current_dir_session", desc = "Load current directory session" }
-end
-
--- Package Manager
-if is_available "mason.nvim" then
- maps.n["pI"] = { "Mason", desc = "Mason Installer" }
- maps.n["pU"] = { "MasonUpdateAll", desc = "Mason Update" }
-end
-
--- Smart Splits
-if is_available "smart-splits.nvim" then
- -- Better window navigation
- maps.n[""] = { function() require("smart-splits").move_cursor_left() end, desc = "Move to left split" }
- maps.n[""] = { function() require("smart-splits").move_cursor_down() end, desc = "Move to below split" }
- maps.n[""] = { function() require("smart-splits").move_cursor_up() end, desc = "Move to above split" }
- maps.n[""] = { function() require("smart-splits").move_cursor_right() end, desc = "Move to right split" }
-
- -- Resize with arrows
- maps.n[""] = { function() require("smart-splits").resize_up() end, desc = "Resize split up" }
- maps.n[""] = { function() require("smart-splits").resize_down() end, desc = "Resize split down" }
- maps.n[""] = { function() require("smart-splits").resize_left() end, desc = "Resize split left" }
- maps.n[""] = { function() require("smart-splits").resize_right() end, desc = "Resize split right" }
-else
- maps.n[""] = { "h", desc = "Move to left split" }
- maps.n[""] = { "j", desc = "Move to below split" }
- maps.n[""] = { "k", desc = "Move to above split" }
- maps.n[""] = { "l", desc = "Move to right split" }
- maps.n[""] = { "resize -2", desc = "Resize split up" }
- maps.n[""] = { "resize +2", desc = "Resize split down" }
- maps.n[""] = { "vertical resize -2", desc = "Resize split left" }
- maps.n[""] = { "vertical resize +2", desc = "Resize split right" }
-end
-
--- SymbolsOutline
-if is_available "aerial.nvim" then
- maps.n["lS"] = { function() require("aerial").toggle() end, desc = "Symbols outline" }
-end
-
--- Telescope
-if is_available "telescope.nvim" then
- maps.n["fw"] = { function() require("telescope.builtin").live_grep() end, desc = "Search words" }
- maps.n["fW"] = {
- function()
- require("telescope.builtin").live_grep {
- additional_args = function(args) return vim.list_extend(args, { "--hidden", "--no-ignore" }) end,
- }
- end,
- desc = "Search words in all files",
- }
- maps.n["gt"] = { function() require("telescope.builtin").git_status() end, desc = "Git status" }
- maps.n["gb"] = { function() require("telescope.builtin").git_branches() end, desc = "Git branches" }
- maps.n["gc"] = { function() require("telescope.builtin").git_commits() end, desc = "Git commits" }
- maps.n["ff"] = { function() require("telescope.builtin").find_files() end, desc = "Search files" }
- maps.n["fF"] = {
- function() require("telescope.builtin").find_files { hidden = true, no_ignore = true } end,
- desc = "Search all files",
- }
- maps.n["fb"] = { function() require("telescope.builtin").buffers() end, desc = "Search buffers" }
- maps.n["fh"] = { function() require("telescope.builtin").help_tags() end, desc = "Search help" }
- maps.n["fm"] = { function() require("telescope.builtin").marks() end, desc = "Search marks" }
- maps.n["fo"] = { function() require("telescope.builtin").oldfiles() end, desc = "Search history" }
- maps.n["fc"] =
- { function() require("telescope.builtin").grep_string() end, desc = "Search for word under cursor" }
- maps.n["sb"] = { function() require("telescope.builtin").git_branches() end, desc = "Git branches" }
- maps.n["sh"] = { function() require("telescope.builtin").help_tags() end, desc = "Search help" }
- maps.n["sm"] = { function() require("telescope.builtin").man_pages() end, desc = "Search man" }
- maps.n["sr"] = { function() require("telescope.builtin").registers() end, desc = "Search registers" }
- maps.n["sk"] = { function() require("telescope.builtin").keymaps() end, desc = "Search keymaps" }
- maps.n["sc"] = { function() require("telescope.builtin").commands() end, desc = "Search commands" }
- if astronvim.is_available "nvim-notify" then
- maps.n["sn"] =
- { function() require("telescope").extensions.notify.notify() end, desc = "Search notifications" }
- end
- maps.n["ls"] = {
- function()
- local aerial_avail, _ = pcall(require, "aerial")
- if aerial_avail then
- require("telescope").extensions.aerial.aerial()
- else
- require("telescope.builtin").lsp_document_symbols()
- end
- end,
- desc = "Search symbols",
- }
- maps.n["lD"] = { function() require("telescope.builtin").diagnostics() end, desc = "Search diagnostics" }
-end
-
--- Terminal
-if is_available "toggleterm.nvim" then
- local toggle_term_cmd = astronvim.toggle_term_cmd
- if vim.fn.executable "lazygit" == 1 then
- maps.n["gg"] = { function() toggle_term_cmd "lazygit" end, desc = "ToggleTerm lazygit" }
- maps.n["tl"] = { function() toggle_term_cmd "lazygit" end, desc = "ToggleTerm lazygit" }
- end
- if vim.fn.executable "node" == 1 then
- maps.n["tn"] = { function() toggle_term_cmd "node" end, desc = "ToggleTerm node" }
- end
- if vim.fn.executable "gdu" == 1 then
- maps.n["tu"] = { function() toggle_term_cmd "gdu" end, desc = "ToggleTerm gdu" }
- end
- if vim.fn.executable "btm" == 1 then
- maps.n["tt"] = { function() toggle_term_cmd "btm" end, desc = "ToggleTerm btm" }
- end
- if vim.fn.executable "python" == 1 then
- maps.n["tp"] = { function() toggle_term_cmd "python" end, desc = "ToggleTerm python" }
- end
- maps.n["tf"] = { "ToggleTerm direction=float", desc = "ToggleTerm float" }
- maps.n["th"] = { "ToggleTerm size=10 direction=horizontal