From 2dac9fa9a3c7bb30af3254d6022a7e6a0e5b8e61 Mon Sep 17 00:00:00 2001 From: Nikos Papadakis Date: Sun, 1 Jan 2023 16:16:21 +0200 Subject: [PATCH] initial commit --- .ignore | 1 + .luarc.json | 4 + .stowrc | 1 + LICENSE | 674 ++++++ README.md | 20 + fish/.config/fish/conf.d/fnm.fish | 4 + fish/.config/fish/conf.d/ls_colors.fish | 1 + fish/.config/fish/conf.d/starship.fish | 3 + fish/.config/fish/conf.d/zoxide.fish | 3 + fish/.config/fish/config.fish | 20 + fish/.config/fish/fish_variables | 43 + git/.config/git/config | 12 + kitty/.config/kitty/kitty.conf | 2019 +++++++++++++++++ nvim/.config/nvim/after/plugin/alpha-nvim.lua | 6 + nvim/.config/nvim/after/plugin/catppuccin.lua | 46 + nvim/.config/nvim/after/plugin/gitsigns.lua | 34 + .../nvim/after/plugin/indent-blankline.lua | 11 + nvim/.config/nvim/after/plugin/lspconfig.lua | 135 ++ nvim/.config/nvim/after/plugin/lualine.lua | 71 + .../nvim/after/plugin/nvim-autopairs.lua | 6 + nvim/.config/nvim/after/plugin/nvim-cmp.lua | 46 + nvim/.config/nvim/after/plugin/telescope.lua | 30 + nvim/.config/nvim/after/plugin/treesitter.lua | 65 + nvim/.config/nvim/init.lua | 21 + nvim/.config/nvim/lua/my/keymaps.lua | 60 + nvim/.config/nvim/lua/my/options.lua | 56 + nvim/.config/nvim/lua/my/plugins.lua | 47 + nvim/.config/nvim/lua/my/resize.lua | 22 + nvim/.config/nvim/lua/my/tab.lua | 80 + nvim/.config/nvim/lua/my/utils.lua | 31 + scripts/.local/bin/share | 88 + scripts/.local/bin/shot | 15 + starship/.config/starship.toml | 3 + stylua.toml | 3 + tmux/.config/tmux/tmux.conf | 54 + zsh/.zshrc | 98 + 36 files changed, 3833 insertions(+) create mode 100644 .ignore create mode 100644 .luarc.json create mode 100644 .stowrc create mode 100644 LICENSE create mode 100644 README.md create mode 100644 fish/.config/fish/conf.d/fnm.fish create mode 100644 fish/.config/fish/conf.d/ls_colors.fish create mode 100644 fish/.config/fish/conf.d/starship.fish create mode 100644 fish/.config/fish/conf.d/zoxide.fish create mode 100644 fish/.config/fish/config.fish create mode 100644 fish/.config/fish/fish_variables create mode 100644 git/.config/git/config create mode 100644 kitty/.config/kitty/kitty.conf create mode 100644 nvim/.config/nvim/after/plugin/alpha-nvim.lua create mode 100644 nvim/.config/nvim/after/plugin/catppuccin.lua create mode 100644 nvim/.config/nvim/after/plugin/gitsigns.lua create mode 100644 nvim/.config/nvim/after/plugin/indent-blankline.lua create mode 100644 nvim/.config/nvim/after/plugin/lspconfig.lua create mode 100644 nvim/.config/nvim/after/plugin/lualine.lua create mode 100644 nvim/.config/nvim/after/plugin/nvim-autopairs.lua create mode 100644 nvim/.config/nvim/after/plugin/nvim-cmp.lua create mode 100644 nvim/.config/nvim/after/plugin/telescope.lua create mode 100644 nvim/.config/nvim/after/plugin/treesitter.lua create mode 100644 nvim/.config/nvim/init.lua create mode 100644 nvim/.config/nvim/lua/my/keymaps.lua create mode 100644 nvim/.config/nvim/lua/my/options.lua create mode 100644 nvim/.config/nvim/lua/my/plugins.lua create mode 100644 nvim/.config/nvim/lua/my/resize.lua create mode 100644 nvim/.config/nvim/lua/my/tab.lua create mode 100644 nvim/.config/nvim/lua/my/utils.lua create mode 100755 scripts/.local/bin/share create mode 100755 scripts/.local/bin/shot create mode 100644 starship/.config/starship.toml create mode 100644 stylua.toml create mode 100644 tmux/.config/tmux/tmux.conf create mode 100644 zsh/.zshrc diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..7cde0a1 --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +!.config/ diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..e1b9d70 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/.stowrc b/.stowrc new file mode 100644 index 0000000..cfd7f3f --- /dev/null +++ b/.stowrc @@ -0,0 +1 @@ +target=~/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + 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..61e0987 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +### Configurations + +- [Neovim Nightly](https://github.com/neovim/neovim) +- [Kitty](https://github.com/kovidgoyal/kitty) +- [Fish Shell](https://github.com/fish-shell/fish-shell) +- [tmux](https://github.com/tmux/tmux) + +### Recommended +- [ripgrep (rg)](https://github.com/BurntSushi/ripgrep) +- [exa](https://github.com/ogham/exa) +- [zoxide](https://github.com/ajeetdsouza/zoxide) +- [starship](https://github.com/starship/starship) + +**Usage:** + +- Use [stow](https://www.gnu.org/software/stow/) to manage your symlinks. +- `git clone https://github.com/esprssoo/dotfiles.git && cd dotfiles` +- Run `stow {package}` to enable the configuration for any package you + like, where `{package}` is one of the directories in the git repository. +- Run `stow -D {package}` to disable the package. diff --git a/fish/.config/fish/conf.d/fnm.fish b/fish/.config/fish/conf.d/fnm.fish new file mode 100644 index 0000000..be8484c --- /dev/null +++ b/fish/.config/fish/conf.d/fnm.fish @@ -0,0 +1,4 @@ +if test -n (command -v fnm) + set PATH /home/nikos/.fnm $PATH + fnm env | source +end diff --git a/fish/.config/fish/conf.d/ls_colors.fish b/fish/.config/fish/conf.d/ls_colors.fish new file mode 100644 index 0000000..decc22d --- /dev/null +++ b/fish/.config/fish/conf.d/ls_colors.fish @@ -0,0 +1 @@ +setenv LS_COLORS '*.7z=38;5;40:*.WARC=38;5;40:*.a=38;5;40:*.arj=38;5;40:*.bz2=38;5;40:*.cpio=38;5;40:*.gz=38;5;40:*.lrz=38;5;40:*.lz=38;5;40:*.lzma=38;5;40:*.lzo=38;5;40:*.rar=38;5;40:*.s7z=38;5;40:*.sz=38;5;40:*.tar=38;5;40:*.tbz=38;5;40:*.tgz=38;5;40:*.warc=38;5;40:*.xz=38;5;40:*.z=38;5;40:*.zip=38;5;40:*.zipx=38;5;40:*.zoo=38;5;40:*.zpaq=38;5;40:*.zst=38;5;40:*.zstd=38;5;40:*.zz=38;5;40:*@.service=38;5;45:*AUTHORS=38;5;220;1:*CHANGES=38;5;220;1:*CONTRIBUTORS=38;5;220;1:*COPYING=38;5;220;1:*COPYRIGHT=38;5;220;1:*CodeResources=38;5;239:*Dockerfile=38;5;155:*HISTORY=38;5;220;1:*INSTALL=38;5;220;1:*LICENSE=38;5;220;1:*LS_COLORS=48;5;89;38;5;197;1;3;4;7:*MANIFEST=38;5;243:*Makefile=38;5;155:*NOTICE=38;5;220;1:*PATENTS=38;5;220;1:*PkgInfo=38;5;239:*README=38;5;220;1:*README.md=38;5;220;1:*README.rst=38;5;220;1:*VERSION=38;5;220;1:*authorized_keys=1:*cfg=1:*conf=1:*config=1:*core=38;5;241:*id_dsa=38;5;192;3:*id_ecdsa=38;5;192;3:*id_ed25519=38;5;192;3:*id_rsa=38;5;192;3:*known_hosts=1:*lock=38;5;248:*lockfile=38;5;248:*pm_to_blib=38;5;240:*rc=1:*.1p=38;5;7:*.32x=38;5;213:*.3g2=38;5;115:*.3ga=38;5;137;1:*.3gp=38;5;115:*.3p=38;5;7:*.82p=38;5;121:*.83p=38;5;121:*.8eu=38;5;121:*.8xe=38;5;121:*.8xp=38;5;121:*.A64=38;5;213:*.BAT=38;5;172:*.BUP=38;5;241:*.C=38;5;81:*.CFUserTextEncoding=38;5;239:*.DS_Store=38;5;239:*.F=38;5;81:*.F03=38;5;81:*.F08=38;5;81:*.F90=38;5;81:*.F95=38;5;81:*.H=38;5;110:*.IFO=38;5;114:*.JPG=38;5;97:*.M=38;5;110:*.MOV=38;5;114:*.PDF=38;5;141:*.PFA=38;5;66:*.PL=38;5;160:*.R=38;5;49:*.RData=38;5;178:*.Rproj=38;5;11:*.S=38;5;110:*.S3M=38;5;137;1:*.SKIP=38;5;244:*.TIFF=38;5;97:*.VOB=38;5;115;1:*.a00=38;5;213:*.a52=38;5;213:*.a64=38;5;213:*.a78=38;5;213:*.aac=38;5;137;1:*.accdb=38;5;60:*.accde=38;5;60:*.accdr=38;5;60:*.accdt=38;5;60:*.adf=38;5;213:*.adoc=38;5;184:*.afm=38;5;66:*.agda=38;5;81:*.agdai=38;5;110:*.ahk=38;5;41:*.ai=38;5;99:*.aiff=38;5;136;1:*.alac=38;5;136;1:*.allow=38;5;112:*.am=38;5;242:*.amr=38;5;137;1:*.ape=38;5;136;1:*.apk=38;5;215:*.application=38;5;116:*.aria2=38;5;241:*.asc=38;5;192;3:*.asciidoc=38;5;184:*.asf=38;5;115:*.asm=38;5;81:*.ass=38;5;117:*.atr=38;5;213:*.au=38;5;137;1:*.automount=38;5;45:*.avi=38;5;114:*.awk=38;5;172:*.bak=38;5;241:*.bash=38;5;172:*.bash_login=1:*.bash_logout=1:*.bash_profile=1:*.bat=38;5;172:*.bfe=38;5;192;3:*.bib=38;5;178:*.bin=38;5;124:*.bmp=38;5;97:*.bsp=38;5;215:*.c=38;5;81:*.c++=38;5;81:*.cab=38;5;215:*.caf=38;5;137;1:*.cap=38;5;29:*.car=38;5;57:*.cbr=38;5;141:*.cbz=38;5;141:*.cc=38;5;81:*.cda=38;5;136;1:*.cdi=38;5;213:*.cdr=38;5;97:*.chm=38;5;141:*.cl=38;5;81:*.clj=38;5;41:*.cljc=38;5;41:*.cljs=38;5;41:*.cljw=38;5;41:*.cnc=38;5;7:*.coffee=38;5;074;1:*.cp=38;5;81:*.cpp=38;5;81:*.cr=38;5;81:*.crx=38;5;215:*.cs=38;5;81:*.css=38;5;125;1:*.csv=38;5;78:*.ctp=38;5;81:*.cue=38;5;116:*.cxx=38;5;81:*.dart=38;5;51:*.dat=38;5;137;1:*.db=38;5;60:*.deb=38;5;215:*.def=38;5;7:*.deny=38;5;196:*.description=38;5;116:*.device=38;5;45:*.dhall=38;5;178:*.dicom=38;5;97:*.diff=48;5;197;38;5;232:*.directory=38;5;116:*.divx=38;5;114:*.djvu=38;5;141:*.dll=38;5;241:*.dmg=38;5;215:*.dmp=38;5;29:*.doc=38;5;111:*.dockerignore=38;5;240:*.docm=38;5;111;4:*.docx=38;5;111:*.drw=38;5;99:*.dtd=38;5;178:*.dts=38;5;137;1:*.dump=38;5;241:*.dwg=38;5;216:*.dylib=38;5;241:*.ear=38;5;215:*.el=38;5;81:*.elc=38;5;241:*.eln=38;5;241:*.eml=38;5;125;1:*.enc=38;5;192;3:*.entitlements=1:*.epf=1:*.eps=38;5;99:*.epsf=38;5;99:*.epub=38;5;141:*.err=38;5;160;1:*.error=38;5;160;1:*.etx=38;5;184:*.ex=38;5;7:*.example=38;5;7:*.f=38;5;81:*.f03=38;5;81:*.f08=38;5;81:*.f4v=38;5;115:*.f90=38;5;81:*.f95=38;5;81:*.fcm=38;5;137;1:*.feature=38;5;7:*.flac=38;5;136;1:*.flif=38;5;97:*.flv=38;5;115:*.fm2=38;5;213:*.fmp12=38;5;60:*.fnt=38;5;66:*.fon=38;5;66:*.for=38;5;81:*.fp7=38;5;60:*.ftn=38;5;81:*.fvd=38;5;124:*.fxml=38;5;178:*.gb=38;5;213:*.gba=38;5;213:*.gbc=38;5;213:*.gbr=38;5;7:*.gel=38;5;213:*.gemspec=38;5;41:*.ger=38;5;7:*.gg=38;5;213:*.ggl=38;5;213:*.gif=38;5;97:*.git=38;5;197:*.gitattributes=38;5;240:*.gitignore=38;5;240:*.gitmodules=38;5;240:*.go=38;5;81:*.gp3=38;5;115:*.gp4=38;5;115:*.gpg=38;5;192;3:*.gs=38;5;81:*.h=38;5;110:*.h++=38;5;110:*.hi=38;5;110:*.hidden-color-scheme=1:*.hidden-tmTheme=1:*.hin=38;5;242:*.hpp=38;5;110:*.hs=38;5;81:*.htm=38;5;125;1:*.html=38;5;125;1:*.hxx=38;5;110:*.icns=38;5;97:*.ico=38;5;97:*.ics=38;5;7:*.ii=38;5;110:*.img=38;5;124:*.iml=38;5;166:*.in=38;5;242:*.info=38;5;184:*.ini=1:*.ipa=38;5;215:*.ipk=38;5;213:*.ipynb=38;5;41:*.iso=38;5;124:*.j64=38;5;213:*.jad=38;5;215:*.jar=38;5;215:*.java=38;5;074;1:*.jhtm=38;5;125;1:*.jpeg=38;5;97:*.jpg=38;5;97:*.js=38;5;074;1:*.jsm=38;5;074;1:*.json=38;5;178:*.jsonl=38;5;178:*.jsonnet=38;5;178:*.jsp=38;5;074;1:*.kak=38;5;172:*.key=38;5;166:*.lagda=38;5;81:*.lagda.md=38;5;81:*.lagda.rst=38;5;81:*.lagda.tex=38;5;81:*.last-run=1:*.less=38;5;125;1:*.lhs=38;5;81:*.libsonnet=38;5;142:*.lisp=38;5;81:*.lnk=38;5;39:*.localized=38;5;239:*.localstorage=38;5;60:*.log=38;5;190:*.lua=38;5;81:*.m=38;5;110:*.m2v=38;5;114:*.m3u=38;5;116:*.m3u8=38;5;116:*.m4=38;5;242:*.m4a=38;5;137;1:*.m4v=38;5;114:*.map=38;5;7:*.markdown=38;5;184:*.md=38;5;184:*.md5=38;5;116:*.mdb=38;5;60:*.mde=38;5;60:*.mdump=38;5;241:*.merged-ca-bundle=1:*.mf=38;5;7:*.mfasl=38;5;7:*.mht=38;5;125;1:*.mi=38;5;7:*.mid=38;5;136;1:*.midi=38;5;136;1:*.mjs=38;5;074;1:*.mkd=38;5;184:*.mkv=38;5;114:*.mm=38;5;7:*.mobi=38;5;141:*.mod=38;5;137;1:*.moon=38;5;81:*.mount=38;5;45:*.mov=38;5;114:*.mp3=38;5;137;1:*.mp4=38;5;114:*.mp4a=38;5;137;1:*.mpeg=38;5;114:*.mpg=38;5;114:*.msg=38;5;178:*.msql=38;5;222:*.mtx=38;5;7:*.mustache=38;5;125;1:*.mysql=38;5;222:*.nc=38;5;60:*.ndjson=38;5;178:*.nds=38;5;213:*.nes=38;5;213:*.nfo=38;5;184:*.nib=38;5;57:*.nim=38;5;81:*.nimble=38;5;81:*.nix=38;5;155:*.nrg=38;5;124:*.nth=38;5;97:*.numbers=38;5;112:*.o=38;5;241:*.odb=38;5;111:*.odp=38;5;166:*.ods=38;5;112:*.odt=38;5;111:*.oga=38;5;137;1:*.ogg=38;5;137;1:*.ogm=38;5;114:*.ogv=38;5;115:*.old=38;5;242:*.opus=38;5;137;1:*.org=38;5;184:*.orig=38;5;241:*.otf=38;5;66:*.out=38;5;242:*.p12=38;5;192;3:*.p7s=38;5;192;3:*.pacnew=38;5;33:*.pages=38;5;111:*.pak=38;5;215:*.part=38;5;239:*.patch=48;5;197;38;5;232;1:*.path=38;5;45:*.pbxproj=1:*.pc=38;5;7:*.pcap=38;5;29:*.pcb=38;5;7:*.pcf=1:*.pcm=38;5;136;1:*.pdf=38;5;141:*.pem=38;5;192;3:*.pfa=38;5;66:*.pfb=38;5;66:*.pfm=38;5;66:*.pgn=38;5;178:*.pgp=38;5;192;3:*.pgsql=38;5;222:*.php=38;5;81:*.pi=38;5;7:*.pid=38;5;248:*.pk3=38;5;215:*.pl=38;5;208:*.plist=1:*.plt=38;5;7:*.ply=38;5;216:*.pm=38;5;203:*.png=38;5;97:*.pod=38;5;184:*.pot=38;5;7:*.pps=38;5;166:*.ppt=38;5;166:*.ppts=38;5;166:*.pptsm=38;5;166;4:*.pptx=38;5;166:*.pptxm=38;5;166;4:*.profile=1:*.properties=38;5;116:*.ps=38;5;99:*.psd=38;5;97:*.psf=1:*.pxd=38;5;97:*.pxm=38;5;97:*.py=38;5;41:*.pyc=38;5;240:*.qcow=38;5;124:*.r=38;5;49:*.r[0-9]{0,2}=38;5;239:*.rake=38;5;155:*.rb=38;5;41:*.rdata=38;5;178:*.rdf=38;5;7:*.rkt=38;5;81:*.rlib=38;5;241:*.rmvb=38;5;114:*.rnc=38;5;178:*.rng=38;5;178:*.rom=38;5;213:*.rpm=38;5;215:*.rs=38;5;81:*.rss=38;5;178:*.rst=38;5;184:*.rstheme=1:*.rtf=38;5;111:*.ru=38;5;7:*.s=38;5;110:*.s3m=38;5;137;1:*.sample=38;5;114:*.sass=38;5;125;1:*.sassc=38;5;244:*.sav=38;5;213:*.sc=38;5;41:*.scala=38;5;41:*.scan=38;5;242:*.sch=38;5;7:*.scm=38;5;7:*.scpt=38;5;219:*.scss=38;5;125;1:*.sed=38;5;172:*.service=38;5;45:*.sfv=38;5;116:*.sgml=38;5;178:*.sh=38;5;172:*.sid=38;5;137;1:*.sig=38;5;192;3:*.signature=38;5;192;3:*.sis=38;5;7:*.sms=38;5;213:*.snapshot=38;5;45:*.socket=38;5;45:*.sparseimage=38;5;124:*.spl=38;5;7:*.sql=38;5;222:*.sqlite=38;5;60:*.srt=38;5;117:*.ssa=38;5;117:*.st=38;5;213:*.stackdump=38;5;241:*.state=38;5;248:*.stderr=38;5;160;1:*.stl=38;5;216:*.storyboard=38;5;196:*.strings=1:*.sty=38;5;7:*.sub=38;5;117:*.sublime-build=1:*.sublime-commands=1:*.sublime-keymap=1:*.sublime-project=1:*.sublime-settings=1:*.sublime-snippet=1:*.sublime-workspace=1:*.sug=38;5;7:*.sup=38;5;117:*.svg=38;5;99:*.swap=38;5;45:*.swift=38;5;219:*.swo=38;5;244:*.swp=38;5;244:*.sx=38;5;81:*.t=38;5;114:*.target=38;5;45:*.tcc=38;5;110:*.tcl=38;5;64;1:*.tdy=38;5;7:*.tex=38;5;184:*.textile=38;5;184:*.tf=38;5;168:*.tfm=38;5;7:*.tfnt=38;5;7:*.tfstate=38;5;168:*.tfvars=38;5;168:*.tg=38;5;7:*.theme=38;5;116:*.tif=38;5;97:*.tiff=38;5;97:*.timer=38;5;45:*.tmTheme=1:*.tmp=38;5;244:*.toast=38;5;124:*.toml=38;5;178:*.torrent=38;5;116:*.ts=38;5;115:*.tsv=38;5;78:*.ttf=38;5;66:*.twig=38;5;81:*.txt=38;5;253:*.typelib=38;5;60:*.un~=38;5;241:*.urlview=38;5;116:*.user-ca-bundle=1:*.v=38;5;81:*.vala=38;5;81:*.vapi=38;5;81:*.vb=38;5;81:*.vba=38;5;81:*.vbs=38;5;81:*.vcard=38;5;7:*.vcd=38;5;124:*.vcf=38;5;7:*.vdf=38;5;215:*.vdi=38;5;124:*.vfd=38;5;124:*.vhd=38;5;124:*.vhdx=38;5;124:*.vim=38;5;172:*.viminfo=1:*.vmdk=38;5;124:*.vob=38;5;115;1:*.vpk=38;5;215:*.vtt=38;5;117:*.war=38;5;215:*.wav=38;5;136;1:*.webloc=38;5;116:*.webm=38;5;115:*.webp=38;5;97:*.wma=38;5;137;1:*.wmv=38;5;114:*.woff=38;5;66:*.woff2=38;5;66:*.wrl=38;5;216:*.wv=38;5;136;1:*.wvc=38;5;136;1:*.xcconfig=1:*.xcf=38;5;7:*.xcsettings=1:*.xcuserstate=1:*.xcworkspacedata=1:*.xib=38;5;208:*.xla=38;5;76:*.xln=38;5;7:*.xls=38;5;112:*.xlsx=38;5;112:*.xlsxm=38;5;112;4:*.xltm=38;5;73;4:*.xltx=38;5;73:*.xml=38;5;178:*.xpi=38;5;215:*.xpm=38;5;97:*.xsd=38;5;178:*.xsh=38;5;41:*.yaml=38;5;178:*.yml=38;5;178:*.z[0-9]{0,2}=38;5;239:*.zcompdump=38;5;241:*.zig=38;5;81:*.zlogin=1:*.zlogout=1:*.zprofile=1:*.zsh=38;5;172:*.zshenv=1:*.zwc=38;5;241:*.zx[0-9]{0,2}=38;5;239:bd=38;5;68:ca=38;5;17:cd=38;5;113;1:di=38;5;30:do=38;5;127:ex=38;5;208;1:pi=38;5;126:fi=0:ln=target:mh=38;5;222;1:no=0:or=48;5;196;38;5;232;1:ow=38;5;220;1:sg=48;5;3;38;5;0:su=38;5;220;1;3;100;1:so=38;5;197:st=38;5;86;48;5;234:tw=48;5;235;38;5;139;3:' diff --git a/fish/.config/fish/conf.d/starship.fish b/fish/.config/fish/conf.d/starship.fish new file mode 100644 index 0000000..2a462f6 --- /dev/null +++ b/fish/.config/fish/conf.d/starship.fish @@ -0,0 +1,3 @@ +if test -n (command -v starship) + starship init fish | source +end diff --git a/fish/.config/fish/conf.d/zoxide.fish b/fish/.config/fish/conf.d/zoxide.fish new file mode 100644 index 0000000..9fc72b7 --- /dev/null +++ b/fish/.config/fish/conf.d/zoxide.fish @@ -0,0 +1,3 @@ +if test -n (command -v zoxide) + zoxide init fish | source +end diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish new file mode 100644 index 0000000..2f4a21e --- /dev/null +++ b/fish/.config/fish/config.fish @@ -0,0 +1,20 @@ +set -U fish_greeting + +alias exa="exa --group-directories-first" +alias newkey="gpg-connect-agent \"scd serialno\" \"learn --force\" /bye" +[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" +abbr vim nvim +abbr ls exa +abbr ll exa -lh +abbr la exa -lha +abbr gs git status +abbr gc git commit +abbr gap git add -p + +# Keybinds +bind -k nul 'forward-char' + +# Environment variables +set -x -g RUSTUP_HOME $XDG_DATA_HOME/rustup +set -x -g CARGO_HOME $XDG_DATA_HOME/cargo +set -x -g PATH $CARGO_HOME/bin $RUSTUP_HOME/bin $HOME/.local/bin $PATH diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables new file mode 100644 index 0000000..03e6e5b --- /dev/null +++ b/fish/.config/fish/fish_variables @@ -0,0 +1,43 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR _fish_abbr_gap:git\x20add\x20\x2dp +SETUVAR _fish_abbr_gc:git\x20commit +SETUVAR _fish_abbr_gs:git\x20status +SETUVAR _fish_abbr_la:exa\x20\x2dlha +SETUVAR _fish_abbr_ll:exa\x20\x2dlh +SETUVAR _fish_abbr_ls:exa +SETUVAR _fish_abbr_vim:nvim +SETUVAR _fish_abbr_za:zoxide\x20add +SETUVAR _fish_abbr_zq:zoxide\x20query +SETUVAR _fish_abbr_zqi:zoxide\x20query\x20\x2di +SETUVAR _fish_abbr_zr:zoxide\x20remove +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..8471610 --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,12 @@ +[user] + email = nikos@papadakis.xyz + name = Nikos Papadakis + signingkey = 78871F9905ADFF02 +[pull] + rebase = true +[branch] + autosetuprebase = always +[gpg] + program = gpg2 +[commit] + gpgsign = true diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..926fdf1 --- /dev/null +++ b/kitty/.config/kitty/kitty.conf @@ -0,0 +1,2019 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family JetBrainsMono Nerd Font Mono +bold_font auto +italic_font auto +bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. To get a full list of supported fonts use the `kitty +#: +list-fonts` command. By default they are derived automatically, by +#: the OSes font system. When bold_font or bold_italic_font is set to +#: auto on macOS, the priority of bold fonts is semi-bold, bold, +#: heavy. Setting them manually is useful for font families that have +#: many weight variants like Book, Medium, Thick, etc. For example:: + +#: font_family Operator Mono Book +#: bold_font Operator Mono Medium +#: italic_font Operator Mono Book Italic +#: bold_italic_font Operator Mono Medium Italic + +font_size 12.0 + +#: Font size (in pts) + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the the string been LTR. For example, assuming the Hebrew word +#: ירושלים, selecting the character that on the screen appears to be ם +#: actually writes into the selection buffer the character י. kitty's +#: default behavior is useful in conjunction with a filter to reverse +#: the word order, however, if you wish to manipulate RTL glyphs, it +#: can be very challenging to work with, so this option is provided to +#: turn it off. Furthermore, this option can be used with the command +#: line program GNU FriBidi +#: to get BIDI +#: support, because it will force kitty to always treat the text as +#: LTR, which FriBidi expects for terminals. + +# adjust_line_height 0 +# adjust_column_width 0 + +#: Change the size of each character cell kitty renders. You can use +#: either numbers, which are interpreted as pixels or percentages +#: (number followed by %), which are interpreted as percentages of the +#: unmodified values. You can use negative pixels or percentages less +#: than 100% to reduce sizes (but this might cause rendering +#: artifacts). + +adjust_baseline 0 + +#: Adjust the vertical alignment of text (the height in the cell at +#: which text is positioned). You can use either numbers, which are +#: interpreted as pixels or a percentages (number followed by %), +#: which are interpreted as the percentage of the line height. A +#: positive value moves the baseline up, and a negative value moves +#: them down. The underline and strikethrough positions are adjusted +#: accordingly. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each unicode code +#: point is specified in the form U+. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. symbol_map itself can be specified multiple +#: times. Syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: setting you can force kitty to restrict the specified code points +#: to render in the specified number of cells (defaulting to one +#: cell). Syntax is:: + +#: narrow_symbols codepoints Optionally the number of cells + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features setting. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. This +#: is useful as some fonts might have features worthwhile in a +#: terminal. For example, Fira Code Retina includes a discretionary +#: feature, zero, which in that font changes the appearance of the +#: zero (0), to make it more easily distinguishable from Ø. Fira Code +#: Retina also includes other discretionary features known as +#: Stylistic Sets which have the tags ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: Harfbuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, these are read from the FontConfig database first and +#: then this, setting is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use kitty +list-fonts +#: --psnames: + +#: .. code-block:: sh + +#: $ kitty +list-fonts --psnames | grep Fira +#: Fira Code +#: Fira Code Bold (FiraCode-Bold) +#: Fira Code Light (FiraCode-Light) +#: Fira Code Medium (FiraCode-Medium) +#: Fira Code Regular (FiraCode-Regular) +#: Fira Code Retina (FiraCode-Retina) + +#: The part in brackets is the PostScript name. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero:: + +#: font_features FiraCode-Retina +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +box_drawing_scale 0.001, 1, 1.5, 2 + +#: Change the sizes of the lines used for the box drawing unicode +#: characters These values are in pts. They will be scaled by the +#: monitor DPI to arrive at a pixel value. There must be four values +#: corresponding to thin, normal, thick, and very thick lines. + +#: }}} + +#: Cursor customization {{{ + +cursor #cccccc + +#: Default cursor color. If set to the special value none the cursor +#: will be rendered with a "reverse video" effect. It's color will be +#: the color of the text in the cell it is over and the text will be +#: rendered with the background color of the cell. Note that if the +#: program running in the terminal sets a cursor color, this takes +#: precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. + +cursor_text_color #111111 + +#: Choose the color of text under the cursor. If you want it rendered +#: with the background color of the cell underneath instead, use the +#: special keyword: background. Note that if cursor is set to none +#: then this setting is ignored. + +cursor_shape block + +#: The cursor shape can be one of (block, beam, underline). Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape. Applications running in the terminal +#: can override it. In particular, +#: https://sw.kovidgoyal.net/kitty/shell-integration/ in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +cursor_beam_thickness 1.5 + +#: Defines the thickness of the beam cursor (in pts) + +cursor_underline_thickness 2.0 + +#: Defines the thickness of the underline cursor (in pts) + +cursor_blink_interval -1 + +#: The interval (in seconds) at which to blink the cursor. Set to zero +#: to disable blinking. Negative values mean use system default. Note +#: that numbers smaller than repaint_delay will be limited to +#: repaint_delay. + +cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +#: }}} + +#: Scrollback {{{ + +scrollback_lines 10000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +scrollback_pager_history_size 0 + +#: Separate scrollback history size, used only for browsing the +#: scrollback buffer (in MB). This separate buffer is not available +#: for interactive scrolling but will be piped to the pager program +#: when viewing scrollback buffer in a separate window. The current +#: implementation stores the data in UTF-8, so approximatively 10000 +#: lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +wheel_scroll_multiplier 5.0 + +#: Modify the amount scrolled by the mouse wheel. Note this is only +#: used for low precision scrolling devices, not for high precision +#: scrolling on platforms such as macOS and Wayland. Use negative +#: numbers to change scroll direction. See also +#: wheel_scroll_min_lines. + +wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +touch_scroll_multiplier 1.0 + +#: Modify the amount scrolled by a touchpad. Note this is only used +#: for high precision scrolling devices on platforms such as macOS and +#: Wayland. Use negative numbers to change scroll direction. + +#: }}} + +#: Mouse {{{ + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +url_color #0087bd +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed + +open_url_with default + +#: The program with which to open URLs that are clicked on. The +#: special value default means to use the operating system's default +#: URL handler (open on macOS and xdg-open on Linux). + +url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters legal in +#: URLs are allowed. + +copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, simply selecting text with the mouse will cause the text +#: to be copied to clipboard. Useful on platforms such as macOS that +#: do not have the concept of primary selections. You can instead +#: specify a name such as a1 to copy to a private kitty buffer +#: instead. Map a shortcut with the paste_from_buffer action to paste +#: from this private buffer. For example:: + +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +paste_actions quote-urls-at-prompt + +#: A comma separated list of actions to take when pasting text into +#: the terminal. Possibilities are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs https://sw.kovidgoyal.net/kitty/shell-integration/). +#: confirm: +#: Confirm the paste if bracketed paste mode is not active or there is more +#: a large amount of text being pasted. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. + +strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. always will always do it. + +select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the unicode database will be matched. + +click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around + +pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. Valid values are: arrow, beam and hand + +default_pointer_shape beam + +#: The default shape of the mouse pointer. Valid values are: arrow, +#: beam and hand + +pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. +#: Valid values are: arrow, beam and hand + +#: Mouse actions {{{ + +#: Mouse buttons can be remapped to perform arbitrary actions. The +#: syntax for doing so is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where ``button-name`` is one of ``left``, ``middle``, ``right`` or +#: ``b1 ... b8`` with added keyboard modifiers, for example: +#: ``ctrl+shift+left`` refers to holding the ctrl+shift keys while +#: clicking with the left mouse button. The number ``b1 ... b8`` can +#: be used to refer to upto eight buttons on a mouse. + +#: ``event-type`` is one ``press``, ``release``, ``doublepress``, +#: ``triplepress``, ``click`` and ``doubleclick``. ``modes`` +#: indicates whether the action is performed when the mouse is grabbed +#: by the program running in the terminal, or not. It can have one or +#: more or the values, ``grabbed,ungrabbed``. ``grabbed`` refers to +#: when the program running in the terminal has requested mouse +#: events. Note that the click and double click events have a delay of +#: click_interval to disambiguate from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap an action map it to ``no-op``. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed no-op + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +clear_all_mouse_actions no + +#: You can have kitty remove all mouse actions seen up to this point. +#: Useful, for instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell-integration to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with ctrl+shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +mouse_map left triplepress ungrabbed mouse_selection line + +#:: Select the entire line + +#: Select line from point + +mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line + +#: Extend the current selection + +mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +mouse_map shift+middle release ungrabbed,grabbed paste_selection +mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#:: Select the entire line + +#: Select line from point even when grabbed + +mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line + +#: Extend the current selection even when grabbed + +mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires https://sw.kovidgoyal.net/kitty/shell-integration/ to +#:: work + +#: }}} + +#: }}} + +#: Performance tuning {{{ + +repaint_delay 10 + +#: Delay (in milliseconds) between screen updates. Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS you have to either +#: set sync_to_monitor to no or use a monitor with a high refresh +#: rate. Also, to minimize latency when there is pending input to be +#: processed, repaint_delay is ignored. + +input_delay 3 + +#: Delay (in milliseconds) before input from the program running in +#: the terminal is processed. Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. + +sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing) +#: when scrolling. However, it limits the rendering speed to the +#: refresh rate of your monitor. With a very high speed mouse/high +#: keyboard repeat rate, you may notice some slight input latency. If +#: so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +enable_audio_bell yes + +#: Enable/disable the audio bell. Useful in environments that require +#: silence. + +visual_bell_duration 0.0 + +#: Visual bell duration. Flash the screen when a bell occurs for the +#: specified number of seconds. Set to zero to disable. + +visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on linux. + +bell_on_tab "🔔 " + +#: Some text or a unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y, true are converted +#: to the default bell symbol and no, n, false, none are converted to +#: the empty string. + +command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) + +#: }}} + +#: Window layout {{{ + +remember_window_size yes +initial_window_width 640 +initial_window_height 400 + +#: If enabled, the window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the https://sw.kovidgoyal.net/kitty/overview/#layouts. + +window_resize_step_cells 2 +window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the keyboard +#: (start_resizing_window). The cells value is used for horizontal +#: resizing and the lines value for vertical resizing. + +window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified the unit is assumed to +#: be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: minimum needed borders for inactive windows are drawn. That is only +#: the borders that separate the inactive window from a neighbor. Note +#: that setting a non-zero window margin overrides this and causes all +#: borders to be drawn. + +window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +single_window_margin_width -1 + +#: The window margin (in pts) to use when only a single window is +#: visible. Negative values will cause the value of +#: window_margin_width to be used instead. A single value sets all +#: four sides. Two values set the vertical and horizontal sides. Three +#: values set top, horizontal and bottom. Four values set top, right, +#: bottom and left. + +window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be on +#: only the bottom and right edges. + +active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +inactive_border_color #cccccc + +#: The color for the border of inactive windows + +bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred + +inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only can be used to only hide the titlebar. +#: Whether this works and exactly what effect it has depends on the +#: window manager/operating system. Note that the effects of changing +#: this setting when reloading config are undefined. + +window_logo_path none + +#: Path to a logo image. Must be in PNG format. Relative paths are +#: interpreted relative to the kitty config directory. The logo is +#: displayed in a corner of every kitty window. The position is +#: controlled by window_logo_position. Individual windows can be +#: configured to have different logos either using the launch function +#: or the remote-control facility. + +window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +resize_debounce_time 0.1 + +#: The time (in seconds) to wait before redrawing the screen when a +#: resize event is received. On platforms such as macOS, where the +#: operating system sends events corresponding to the start and end of +#: a resize, this number is ignored. + +resize_draw_strategy static + +#: Choose how kitty draws a window while a resize is in progress. A +#: value of static means draw the current window contents, mostly +#: unchanged. A value of scale means draw the current window contents +#: scaled. A value of blank means draw a blank window. A value of size +#: means show the window size in cells. + +resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with an +#: initial_window_width and initial_window_height in number of cells, +#: this option can be used to keep the margins as small as possible +#: when resizing the OS window. Note that this does not currently work +#: on Wayland. + +visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters to use for visual window selection (for +#: example for selecting a window to focus with focus_visible_window). +#: The value should be a series of unique numbers or alphabets, case +#: insensitive, from the set [0-9A-Z]. Specify your preference as a +#: string of characters. + +confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a Tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the Operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with https://sw.kovidgoyal.net/kitty/shell-integration/ +#: enabled, using negative values means windows sitting at a shell +#: prompt are not counted, only windows where some command is +#: currently running. Note that if you want confirmation when closing +#: individual windows, you can map the +#: https://sw.kovidgoyal.net/kitty/actions/#close-window-with- +#: confirmation action. + +#: }}} + +#: Tab bar {{{ + +tab_bar_edge bottom + +#: Which edge to show the tab bar on, top or bottom + +tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts) + +tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar and +#: the second number is the margin between the tab bar and the +#: contents of the current tab. + +tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color (see tab_fade) +#: slant +#: Tabs look like the tabs in a physical file +#: separator +#: Tabs are separated by a configurable separator (see tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators +#: (see tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion https://github.com/kovidgoyal/kitty/discussions/4447 +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create a +#: mapping for the https://sw.kovidgoyal.net/kitty/actions/#select-tab +#: action which presents you with a list of tabs and allows for easy +#: switching to a tab. + +tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, or right. + +tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown + +tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, or round. + +tab_activity_symbol none + +#: Some text or a unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces surround the text with quotes. See +#: tab_title_template for how this is rendered. + +tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}: +#: {title}. Useful if you have shortcuts mapped for goto_tab N. If you +#: prefer to see the index as a superscript, use {sup.index}. In +#: addition you can use {layout_name} for the current layout name, +#: {num_windows} for the number of windows in the tab and +#: {num_window_groups} for the number of window groups (not counting +#: overlay windows) in the tab. Note that formatting is done by +#: Python's string formatting machinery, so you can use, for instance, +#: {layout_name[:2].upper()} to show only the first two letters of the +#: layout name, upper-cased. If you want to style the text, you can +#: use styling directives, for example: +#: {fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}green +#: bg{fmt.bg.tab}. Similarly, for bold and italic: +#: {fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}. +#: Note that for backward compatibility, if {bell_symbol} or +#: {activity_symbol} are not present in the template, they are +#: prepended to it. + +active_tab_title_template none + +#: Template to use for active tabs, if not specified falls back to +#: tab_title_template. + +active_tab_foreground #000 +active_tab_background #eee +active_tab_font_style bold-italic +inactive_tab_foreground #444 +inactive_tab_background #999 +inactive_tab_font_style normal + +#: Tab bar colors and styles + +tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color. + +#: }}} + +#: Color scheme {{{ + +## name: Catppuccin-Macchiato +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CAD3F5 +background #24273A +selection_foreground #24273A +selection_background #F4DBD6 + +background_opacity 0.9 + +# Cursor colors +cursor #F4DBD6 +cursor_text_color #24273A + +# URL underline color when hovering with mouse +url_color #F4DBD6 + +# Kitty window border colors +active_border_color #B7BDF8 +inactive_border_color #6E738D +bell_border_color #EED49F + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #C6A0F6 +inactive_tab_foreground #CAD3F5 +inactive_tab_background #1E2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273A +mark1_background #B7BDF8 +mark2_foreground #24273A +mark2_background #C6A0F6 +mark3_foreground #24273A +mark3_background #7DC4E4 + +# The 16 terminal colors + +# black +color0 #494D64 +color8 #5B6078 + +# red +color1 #ED8796 +color9 #ED8796 + +# green +color2 #A6DA95 +color10 #A6DA95 + +# yellow +color3 #EED49F +color11 #EED49F + +# blue +color4 #8AADF4 +color12 #8AADF4 + +# magenta +color5 #F5BDE6 +color13 #F5BDE6 + +# cyan +color6 #8BD5CA +color14 #8BD5CA + +# white +color7 #B8C0E0 +color15 #A5ADCB + +#: }}} + +#: Advanced {{{ + +shell . + +#: The shell program to execute. The default value of . means to use +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. + +editor . + +#: The terminal editor (such as ``vim`` or ``nano``) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell (``$SHELL -l -i -c env``) to see if your +#: shell config files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (``vim``, ``emacs``, +#: etc) and take the first one that exists on your system. + +close_on_child_death no + +#: Close the window when the child process (shell) exits. If no (the +#: default), the terminal will remain open when the child exits as +#: long as there are still processes outputting to the terminal (for +#: example disowned or backgrounded processes). If yes, the window +#: will close as soon as the child process exits. Note that setting it +#: to yes means that any background processes still using the terminal +#: can fail silently because their stdout/stderr/stdin no longer work. + +allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over ssh +#: connections. You can chose to either allow any program running +#: within kitty to control it, with yes or only programs that connect +#: to the socket specified with the kitty --listen-on command line +#: option, if you use the value socket-only. The latter is useful if +#: you want to prevent programs running on a remote computer over ssh +#: from controlling kitty. Reloading the config will not affect this +#: setting. + +listen_on none + +#: Tell kitty to listen to the specified unix/tcp socket for remote +#: control connections. Note that this will apply to all kitty +#: instances. It can be overridden by the kitty --listen-on command +#: line flag. This option accepts only UNIX sockets, such as +#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment +#: variables are expanded. If {kitty_pid} is present then it is +#: replaced by the PID of the kitty process, otherwise the PID of the +#: kitty process is appended to the value, with a hyphen. This option +#: is ignored unless you also set allow_remote_control to enable +#: remote control. See the help for kitty --listen-on for more +#: details. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify environment variables to set in all child processes. Note +#: that environment variables are expanded recursively, so if you +#: use:: + +#: env MYVAR1=a +#: env MYVAR2=${MYVAR1}/${HOME}/b + +#: The value of MYVAR2 will be a//b. Using +#: VAR= will set it to the empty string and using just VAR will delete +#: the variable from the child process' environment. + +# watcher + +#: Path to python file which will be loaded for +#: https://sw.kovidgoyal.net/kitty/launch/#watchers. Can be specified +#: more than once to load multiple watchers. The watchers will be +#: added to every kitty window. Relative paths are resolved relative +#: to the kitty config directory. Note that reloading the config will +#: only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty looks to find programs to run. The default +#: search order is: First search the system wide PATH, then +#: ~/.local/bin and ~/bin. If still not found, the PATH defined in the +#: login shell after sourcing all its startup files is tried. Finally, +#: if present, the PATH in the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +update_check_interval 24 + +#: Periodically check if an update to kitty is available. If an update +#: is found a system notification is displayed informing you of the +#: available update. The default is to check every 24 hrs, set to zero +#: to disable. Update checking is only done by the official binary +#: builds. Distro packages or source builds do not do update checking. +#: Changing this option by reloading the config is not supported. + +startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session command line option for +#: individual instances. See +#: https://sw.kovidgoyal.net/kitty/overview/#startup-sessions in the +#: kitty documentation for details. Note that relative paths are +#: interpreted with respect to the kitty config directory. Environment +#: variables in the path are expanded. Changing this option by +#: reloading the config is not supported. + +clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: set of possible actions is: write-clipboard read-clipboard write- +#: primary read-primary read-clipboard-ask read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even one running on a remote +#: server via SSH can read your clipboard. See also +#: clipboard_max_size. + +clipboard_max_size 64 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. See also +#: clipboard_control. A value of zero means no size limit is applied. + +# file_transfer_confirmation_bypass + +#: A password, that can be supplied to the file transfer kitten to +#: skip the transfer confirmation prompt. This should only be used +#: when initiating transfers from trusted computers, over trusted +#: networks or encrypted transports, as it allows programs running on +#: the remote machine to read/write to the local filesystem, without +#: permission. + +allow_hyperlinks yes + +#: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click by with the mouse or the hints kitten +#: . The special value of ``ask`` means that kitty +#: will ask before opening the link when clicked. + +shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: ``disabled`` to turn off shell integration, completely. See +#: https://sw.kovidgoyal.net/kitty/shell-integration/ for details. + +term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on Stack Overflow +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +#: }}} + +#: OS specific tweaks {{{ + +wayland_titlebar_color system + +#: Change the color of the kitty window's titlebar on Wayland systems +#: with client side window decorations such as GNOME. A value of +#: system means to use the default system color, a value of background +#: means to use the background color of the currently active window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +macos_titlebar_color system + +#: Change the color of the kitty window's titlebar on macOS. A value +#: of system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. WARNING: +#: This option works by using a hack, as there is no proper Cocoa API +#: for it. It sets the background color of the entire window and makes +#: the titlebar transparent. As such it is incompatible with +#: background_opacity. If you want to use both, you are probably +#: better off just hiding the titlebar with hide_window_decorations. + +macos_option_as_alt no + +#: Use the Option key as an Alt key. With this set to no, kitty will +#: use the macOS native Option+Key = unicode character behavior. This +#: will break any Alt+Key keyboard shortcuts in your terminal +#: programs, but you can use the macOS unicode input technique. You +#: can use the values: left, right, or both to use only the left, +#: right or both Option keys as Alt, instead. Note that kitty itself +#: always treats Option the same as Alt. This means you cannot use +#: this setting to configure different kitty shortcuts for Option+Key +#: vs. `Alt+Key. Also, any kitty shortcuts using Option/Alt+Key will +#: take priority, so that any such key presses will not be passed to +#: terminal programs running inside kitty. Changing this setting by +#: reloading the config is not supported. + +macos_hide_from_tasks no + +#: Hide the kitty window from running tasks (⌘+Tab) on macOS. Changing +#: this setting by reloading the config is not supported. + +macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed. By +#: default, kitty will stay running, even with no open windows, as is +#: the expected behavior on macOS. + +macos_window_resizable yes + +#: Disable this if you want kitty top-level (OS) windows to not be +#: resizable on macOS. Changing this setting by reloading the config +#: will only affect newly created windows. + +macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes. For example, a value of +#: 0.75 will result in rendering that looks similar to sub-pixel +#: antialiasing at common font sizes. + +macos_traditional_fullscreen no + +#: Use the traditional full-screen transition, that is faster, but +#: less pretty. + +macos_show_window_title_in all + +#: Show or hide the window title in the macOS window or menu-bar. A +#: value of window will show the title of the currently active window +#: at the top of the macOS window. A value of menubar will show the +#: title of the currently active window in the macOS menu-bar, making +#: use of otherwise wasted space. all will show the title everywhere +#: and none hides the title in the window and the menu-bar. See +#: :opt`macos_menubar_title_max_length` for how to control the length +#: of the title in the menu bar. + +macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the global menubar. Values less than one mean there is no maximum. + +macos_custom_beam_cursor no + +#: Enable/disable custom mouse cursor for macOS that is easier to see +#: on both light and dark backgrounds. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this setting +#: by reloading the config is not supported. + +linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this setting by +#: reloading the config is not supported. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase unicode characters. +#: For example: ``a`` for the A key, ``[`` for the left square bracket +#: key, etc. For functional keys, such as ``Enter or Escape`` the +#: names are present at https://sw.kovidgoyal.net/kitty/keyboard- +#: protocol/#functional-key-definitions. For modifier keys, the names +#: are ctrl (control, ⌃), shift (⇧), alt (opt, option, ⌥), super (cmd, +#: command, ⌘). See also: GLFW mods +#: + +#: On Linux you can also use XKB key names to bind keys that are not +#: supported by GLFW. See XKB keys +#: for a list of key names. The name to use is the part +#: after the XKB_KEY_ prefix. Note that you can only use an XKB key +#: name for keys that are not known as GLFW keys. + +#: Finally, you can use raw system key codes to map keys, again only +#: for keys that are not known as GLFW keys. To see the system key +#: code for a key, start kitty with the kitty --debug-input option. +#: Then kitty will output some debug text for every key event. In that +#: text look for ``native_code`` the value of that becomes the key +#: name in the shortcut. For example: + +#: .. code-block:: none + +#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' + +#: Here, the key name for the A key is 0x61 and you can use it with:: + +#: map ctrl+0x61 something + +#: to map ctrl+a to something. + +#: You can use the special action no_op to unmap a keyboard shortcut +#: that is assigned in the default configuration:: + +#: map kitty_mod+space no_op + +#: If you would like kitty to completely ignore a key event, not even +#: sending it to the program running in the terminal, map it to +#: discard_event:: + +#: map kitty_mod+f1 discard_event + +#: You can combine multiple actions to be triggered by a single +#: shortcut, using the syntax below:: + +#: map key combine action1 action2 action3 ... + +#: For example:: + +#: map kitty_mod+e combine : new_window : next_layout + +#: this will create a new window and switch to the next available +#: layout + +#: You can use multi-key shortcuts using the syntax shown below:: + +#: map key1>key2>key3 action + +#: For example:: + +#: map ctrl+f>2 set_font_size 20 + +#: The full list of actions that can be mapped to key presses is +#: available here . + +kitty_mod ctrl+shift + +#: The value of kitty_mod is used as the modifier for all default +#: shortcuts, you can change it in your kitty.conf to change the +#: modifiers for all the default shortcuts. + +clear_all_shortcuts no + +#: You can have kitty remove all shortcut definitions seen up to this +#: point. Useful, for instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define aliases to avoid repeating the same options in multiple +#: mappings. Aliases can be defined for any action. Aliases are +#: expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above but, specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +map kitty_mod+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+c. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. + +#: Paste from clipboard + +map kitty_mod+v paste_from_clipboard + +#: Paste from selection + +map kitty_mod+s paste_from_selection +map shift+insert paste_from_selection + +#: Pass selection to program + +map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program using pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program, for +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +map kitty_mod+up scroll_line_up +map kitty_mod+k scroll_line_up +map opt+cmd+page_up scroll_line_up +map cmd+up scroll_line_up + +#: Scroll line down + +map kitty_mod+down scroll_line_down +map kitty_mod+j scroll_line_down +map opt+cmd+page_down scroll_line_down +map cmd+down scroll_line_down + +#: Scroll page up + +map kitty_mod+page_up scroll_page_up +map cmd+page_up scroll_page_up + +#: Scroll page down + +map kitty_mod+page_down scroll_page_down +map cmd+page_down scroll_page_down + +#: Scroll to top + +map kitty_mod+home scroll_home +map cmd+home scroll_home + +#: Scroll to bottom + +map kitty_mod+end scroll_end +map cmd+end scroll_end + +#: Scroll to previous shell prompt + +map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of zero for scroll_to_prompt to scroll to the +#:: last jumped to or the last clicked position. Requires +#:: https://sw.kovidgoyal.net/kitty/shell-integration/ to work. + +#: Scroll to next shell prompt + +map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen + history buffer +#:: as STDIN to an arbitrary program using the ``launch`` function. +#:: For example, the following opens the scrollback buffer in less in +#:: an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch. + +#: Browse output of the last shell command in pager + +map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch function. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires https://sw.kovidgoyal.net/kitty/shell-integration/ to +#:: work. + +#: }}} + +#: Window management {{{ + +#: New window + +map kitty_mod+enter new_window +map cmd+enter new_window + +#:: You can open a new window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility by prefixing the command line +#:: with @. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor some_program +#:: map ctrl+f launch --location=first some_program + +#:: For more details, see launch. + +#: New OS window + +map kitty_mod+n new_os_window +map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top level OS +#:: kitty window. In particular you can use new_os_window_with_cwd to +#:: open a window with the current working directory. + +#: Close window + +map kitty_mod+w close_window +map shift+cmd+d close_window + +#: Next window + +map kitty_mod+] next_window + +#: Previous window + +map kitty_mod+[ previous_window + +#: Move window forward + +map kitty_mod+f move_window_forward + +#: Move window backward + +map kitty_mod+b move_window_backward + +#: Move window to top + +map kitty_mod+` move_window_to_top + +#: Start resizing window + +map kitty_mod+r start_resizing_window +map cmd+r start_resizing_window + +#: First window + +map kitty_mod+1 first_window +map cmd+1 first_window + +#: Second window + +map kitty_mod+2 second_window +map cmd+2 second_window + +#: Third window + +map kitty_mod+3 third_window +map cmd+3 third_window + +#: Fourth window + +map kitty_mod+4 fourth_window +map cmd+4 fourth_window + +#: Fifth window + +map kitty_mod+5 fifth_window +map cmd+5 fifth_window + +#: Sixth window + +map kitty_mod+6 sixth_window +map cmd+6 sixth_window + +#: Seventh window + +map kitty_mod+7 seventh_window +map cmd+7 seventh_window + +#: Eight window + +map kitty_mod+8 eighth_window +map cmd+8 eighth_window + +#: Ninth window + +map kitty_mod+9 ninth_window +map cmd+9 ninth_window + +#: Tenth window + +map kitty_mod+0 tenth_window + +#: Visually select focus window + +map kitty_mod+f7 focus_visible_window + +#: Visually swap window with another + +map kitty_mod+f8 swap_with_window + +#: }}} + +#: Tab management {{{ + +#: Next tab + +map kitty_mod+right next_tab +map shift+cmd+] next_tab +map ctrl+tab next_tab + +#: Previous tab + +map kitty_mod+left previous_tab +map shift+cmd+[ previous_tab +map ctrl+shift+tab previous_tab + +#: New tab + +map kitty_mod+t new_tab +map cmd+t new_tab + +#: Close tab + +map kitty_mod+q close_tab +map cmd+w close_tab + +#: Close OS window + +map shift+cmd+w close_os_window + +#: Move tab forward + +map kitty_mod+. move_tab_forward + +#: Move tab backward + +map kitty_mod+, move_tab_backward + +#: Set tab title + +map kitty_mod+alt+t set_tab_title +map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, and any number larger than the last tab being the last tab:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and use +#: new_tab_with_cwd. Finally, if you want the new tab to open next to +#: the current tab rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle layout function that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+plus change_font_size all +2.0 +map kitty_mod+kp_add change_font_size all +2.0 +map cmd+plus change_font_size all +2.0 +map cmd+equal change_font_size all +2.0 +map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+kp_subtract change_font_size all -2.0 +map cmd+minus change_font_size all -2.0 +map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +map kitty_mod+backspace change_font_size all 0 +map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert selected line + +map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Use for +#:: the output of things like: ls -1 + +#: Insert selected word + +map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses sha1 hashes to identify +#:: commits + +#: Open the selected file at the selected line + +map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: vim at the specified line number. + +#: Open the selected hyperlink + +map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by ls --hyperlink=auto). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see kittens/hints. +#: }}} + +#: Miscellaneous {{{ + +#: Toggle fullscreen + +map kitty_mod+f11 toggle_fullscreen +map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: Unicode input + +map kitty_mod+u kitten unicode_input +map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +map kitty_mod+f2 edit_config_file +map cmd+, edit_config_file + +#: Open the kitty command shell + +map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window/tab/overlay/os_window to +#:: control kitty using commands. + +#: Increase background opacity + +map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +map kitty_mod+delete clear_terminal reset active +map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything up to the line with the cursor +#:: map f1 clear_terminal to_cursor active + +#:: If you want to operate on all windows instead of just the current +#:: one, use all instead of active. + +#:: It is also possible to remap Ctrl+L to both scroll the current +#:: screen contents into the scrollback buffer and clear the screen, +#:: instead of just clearing the screen, for example, for ZSH add the +#:: following to ~/.zshrc: + +#:: .. code-block:: sh + +#:: scroll-and-clear-screen() { +#:: printf '\n%.0s' {1..$LINES} +#:: zle clear-screen +#:: } +#:: zle -N scroll-and-clear-screen +#:: bindkey '^l' scroll-and-clear-screen + +#: Clear up to cursor line + +map cmd+k clear_terminal to_cursor active + +#: Reload kitty.conf + +map kitty_mod+f5 load_config_file +map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of settings cannot be dynamically +#:: changed and require a full restart of kitty. You can also map a +#:: keybinding to load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all setting from the original kitty.conf are discarded, +#:: in other words the new conf settings *replace* the old ones. + +#: Debug kitty configuration + +map kitty_mod+f6 debug_config +map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the ctrl+alt+a key +#:: combination. The text to be sent is a python string literal so +#:: you can use escapes like \x1b to send control codes or \u21fb to +#:: send unicode characters (or you can just input the unicode +#:: characters directly as UTF-8 text). The first argument to +#:: send_text is the keyboard modes in which to activate the +#:: shortcut. The possible values are normal or application or kitty +#:: or a comma separated combination of them. The special keyword +#:: all means all modes. The modes normal and application refer to +#:: the DECCKM cursor key mode for terminals, and kitty refers to the +#:: special kitty extended keyboard protocol. + +#:: Another example, that outputs a word and then moves the cursor to +#:: the start of the line (same as pressing the Home key):: + +#:: map ctrl+alt+a send_text normal Word\x1b[H +#:: map ctrl+alt+a send_text application Word\x1bOH + +#: }}} + +#: }}} diff --git a/nvim/.config/nvim/after/plugin/alpha-nvim.lua b/nvim/.config/nvim/after/plugin/alpha-nvim.lua new file mode 100644 index 0000000..2a01f03 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/alpha-nvim.lua @@ -0,0 +1,6 @@ +local ok, alpha = pcall(require, "alpha") +if not ok then + return +end + +alpha.setup(require("alpha.themes.startify").config) diff --git a/nvim/.config/nvim/after/plugin/catppuccin.lua b/nvim/.config/nvim/after/plugin/catppuccin.lua new file mode 100644 index 0000000..9b4610d --- /dev/null +++ b/nvim/.config/nvim/after/plugin/catppuccin.lua @@ -0,0 +1,46 @@ +local ok, catppuccin = pcall(require, "catppuccin") +if not ok then + return +end + +vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha + +catppuccin.setup { + compile = { + enabled = true, + path = vim.fn.stdpath "cache" .. "/catppuccin", + }, + dim_inactive = { + enabled = true, + shade = "dark", + percentage = 0.15, + }, + integrations = { + cmp = true, + gitsigns = true, + notify = true, + indent_blankline = { + enabled = true, + colored_indent_levels = false, + }, + native_lsp = { + enabled = true, + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + }, + }, + telescope = true, + treesitter = true, + }, +} + +vim.cmd [[colorscheme catppuccin ]] diff --git a/nvim/.config/nvim/after/plugin/gitsigns.lua b/nvim/.config/nvim/after/plugin/gitsigns.lua new file mode 100644 index 0000000..cb739ff --- /dev/null +++ b/nvim/.config/nvim/after/plugin/gitsigns.lua @@ -0,0 +1,34 @@ +local ok, gs = pcall(require, "gitsigns") +if not ok then + return +end + +gs.setup { + current_line_blame = true, + current_line_blame_opts = { + delay = 300, + }, + on_attach = function(bufnr) + local nmap = require("my.utils").nmap + + nmap("]c", function() + if vim.wo.diff then + return "]c" + end + vim.schedule(function() + gs.next_hunk() + end) + return "" + end, "next hunk", bufnr) + + nmap("[c", function() + if vim.wo.diff then + return "[c" + end + vim.schedule(function() + gs.prev_hunk() + end) + return "" + end, "previous hunk", bufnr) + end, +} diff --git a/nvim/.config/nvim/after/plugin/indent-blankline.lua b/nvim/.config/nvim/after/plugin/indent-blankline.lua new file mode 100644 index 0000000..bbeb915 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/indent-blankline.lua @@ -0,0 +1,11 @@ +local ok, indent_blankline = pcall(require, "indent_blankline") +if not ok then + return +end + +indent_blankline.setup { + char = "▏", + show_current_context = true, + buftype_exclude = { "help" }, + filetype_exclude = { "alpha", "startify", "packer", "NvimTree" }, +} diff --git a/nvim/.config/nvim/after/plugin/lspconfig.lua b/nvim/.config/nvim/after/plugin/lspconfig.lua new file mode 100644 index 0000000..6074d1c --- /dev/null +++ b/nvim/.config/nvim/after/plugin/lspconfig.lua @@ -0,0 +1,135 @@ +local ok, lspconfig = pcall(require, "lspconfig") + +if not ok then + return +end + +local nmap = require("my.utils").nmap + +local border = { + { "┌", "FloatBorder" }, + { "─", "FloatBorder" }, + { "┐", "FloatBorder" }, + { "│", "FloatBorder" }, + { "┘", "FloatBorder" }, + { "─", "FloatBorder" }, + { "└", "FloatBorder" }, + { "│", "FloatBorder" }, +} + +local handlers = { + ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }), + ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }), +} + +local capabilities = {} + +local has_cmp, cmp_lsp = pcall(require, "cmp_nvim_lsp") +if has_cmp then + capabilities = cmp_lsp.default_capabilities() +end + +local has_lsp_status, lsp_status = pcall(require, "lsp_status") +if has_lsp_status then + capabilities = vim.tbl_extend("keep", capabilities, lsp_status.capabilities) +end + +local format_augroup = setmetatable({}, { + __index = function(self, id) + local group = vim.api.nvim_create_augroup(string.format("lsp-format-%s", id), { clear = true }) + rawset(self, id, group) + return group + end, +}) + +local on_attach = function(client, bufnr) + nmap("K", vim.lsp.buf.hover, "LSP hover", bufnr) + nmap("", vim.lsp.buf.definition, "Go to definition", bufnr) + nmap("r", vim.lsp.buf.rename, "Rename", bufnr) + nmap("cf", vim.lsp.buf.format, "Format document", bufnr) + nmap("ca", vim.lsp.buf.code_action, "Code actions", bufnr) + nmap("ci", vim.lsp.buf.implementation, "Go to implementation", bufnr) + nmap("D", vim.lsp.buf.type_definition, "Go to type definition", bufnr) + nmap("gr", "Telescope lsp_references", "View references", bufnr) + + vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") + + -- Highlight on cursor hold + if client.server_capabilities.documentHighlightProvider then + vim.api.nvim_create_autocmd({ "CursorHold" }, { + callback = vim.lsp.buf.document_highlight, + buffer = bufnr, + }) + vim.api.nvim_create_autocmd({ "CursorHoldI" }, { + callback = vim.lsp.buf.signature_help, + buffer = bufnr, + }) + vim.api.nvim_create_autocmd({ "CursorMoved" }, { + callback = vim.lsp.buf.clear_references, + buffer = bufnr, + }) + end + + -- Format on save + if client.server_capabilities.documentFormattingProvider then + vim.api.nvim_create_autocmd({ "BufWritePre" }, { + group = format_augroup[client.id], + callback = function() + vim.lsp.buf.format { async = false } + end, + }) + end + + if has_lsp_status then + lsp_status.on_attach(client) + end +end + +local servers = { + gopls = {}, + phpactor = {}, + pylsp = {}, + rust_analyzer = { + assist = { + importGranularity = "module", + importPrefix = "self", + }, + cargo = { + loadOutDirsFromCheck = true, + }, + procMacro = { + enable = true, + }, + }, + sumneko_lua = { + settings = { + Lua = { + runtime = { + version = "LuaJIT", + }, + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + telemetry = { + enable = false, + }, + }, + }, + }, + svelte = {}, + -- tailwindcss = { + -- root_dir = lspconfig.util.root_pattern("tailwind.config.js", "tailwind.config.ts", "tailwind.config.cjs"), + -- }, + tsserver = {}, +} + +for lsp, settings in pairs(servers) do + lspconfig[lsp].setup(vim.tbl_extend("force", { + on_attach = on_attach, + capabilities = capabilities, + handlers = handlers, + }, settings)) +end diff --git a/nvim/.config/nvim/after/plugin/lualine.lua b/nvim/.config/nvim/after/plugin/lualine.lua new file mode 100644 index 0000000..8f3153b --- /dev/null +++ b/nvim/.config/nvim/after/plugin/lualine.lua @@ -0,0 +1,71 @@ +local ok, lualine = pcall(require, "lualine") +if not ok then + return +end + +local function diff_source() + local gitsigns = vim.b.gitsigns_status_dict + if gitsigns then + return { + added = gitsigns.added, + modified = gitsigns.changed, + removed = gitsigns.removed, + } + end +end + +local has_lsp_status, lsp_status = pcall(require, "lsp-status") +if has_lsp_status then + lsp_status.register_progress() +end + +lualine.setup { + options = { + theme = "auto", + globalstatus = true, + }, + sections = { + lualine_b = { + { "branch" }, + { + "diff", + source = diff_source, + }, + }, + lualine_c = { + { + "filetype", + colored = true, + icon_only = true, + separator = "", + }, + { "filename" }, + { + function() + if has_lsp_status then + return lsp_status.status() + end + end, + }, + { + function() + return vim.fn.search([[\s\+$]], "nw") ~= 0 and "trailing" or "" + end, + color = "WarningMsg", + }, + }, + lualine_x = { + { "encoding" }, + { "fileformat" }, + { + function() + if vim.bo.expandtab then + return "Space " .. vim.bo.shiftwidth + else + return "Tab " .. vim.bo.shiftwidth + end + end, + }, + }, + }, +} diff --git a/nvim/.config/nvim/after/plugin/nvim-autopairs.lua b/nvim/.config/nvim/after/plugin/nvim-autopairs.lua new file mode 100644 index 0000000..b19f5f8 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/nvim-autopairs.lua @@ -0,0 +1,6 @@ +local ok, autopairs = pcall(require, "nvim-autopairs") +if not ok then + return +end + +autopairs.setup {} diff --git a/nvim/.config/nvim/after/plugin/nvim-cmp.lua b/nvim/.config/nvim/after/plugin/nvim-cmp.lua new file mode 100644 index 0000000..22b25d3 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/nvim-cmp.lua @@ -0,0 +1,46 @@ +local ok, cmp = pcall(require, "cmp") +if not ok then + return +end + +local lspkind = require "lspkind" + +cmp.setup { + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert { + [""] = cmp.mapping(cmp.mapping.scroll_docs(4, { "i", "c" })), + [""] = cmp.mapping(cmp.mapping.scroll_docs(-4, { "i", "c" })), + [""] = cmp.mapping(cmp.mapping.complete {}, { "i", "c" }), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { select = true }, + }, + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + }, { + { name = "buffer" }, + { name = "path" }, + }), + formatting = { + format = lspkind.cmp_format(), + }, +} + +cmp.setup.cmdline({ "/", "?" }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = "buffer" }, + }, +}) + +cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), +}) diff --git a/nvim/.config/nvim/after/plugin/telescope.lua b/nvim/.config/nvim/after/plugin/telescope.lua new file mode 100644 index 0000000..0b8310f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/telescope.lua @@ -0,0 +1,30 @@ +local _, telescope = pcall(require, "telescope") +local ok, builtin = pcall(require, "telescope.builtin") +if not ok then + return +end + +local nmap = require("my.utils").nmap + +telescope.setup {} + +local function project_or_files() + local opts = { show_untracked = true } + local ok = pcall(builtin.git_files, opts) + if not ok then + builtin.fd(opts) + end +end + +local function dotfiles() + builtin.git_files { + shorten_path = true, + prompt_title = " ~ dotfiles ~ ", + cwd = vim.env.DOTFILES_DIRECTORY, + } +end + +nmap("", project_or_files, "Find project files") +nmap("fn", dotfiles, "Dotfiles") +nmap("fg", builtin.live_grep, "Live grep") +nmap("gs", builtin.git_status, "Git status") diff --git a/nvim/.config/nvim/after/plugin/treesitter.lua b/nvim/.config/nvim/after/plugin/treesitter.lua new file mode 100644 index 0000000..4df109c --- /dev/null +++ b/nvim/.config/nvim/after/plugin/treesitter.lua @@ -0,0 +1,65 @@ +local ok, treesitter = pcall(require, "nvim-treesitter.configs") +if not ok then + return +end + +treesitter.setup { + ensure_installed = { + "c", + "css", + "go", + "javascript", + "json", + "lua", + "markdown", + "php", + "python", + "rust", + "svelte", + "tsx", + "typescript", + "yaml", + }, + highlight = { + enable = true, + }, + textobjects = { + select = { + enable = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + + ["ia"] = "@parameter.inner", + }, + }, + swap = { + enable = true, + swap_next = { + ["@"] = "@parameter.inner", + }, + }, + move = { + enable = true, + goto_next_start = { + ["]]"] = "@function.outer", + }, + goto_next_end = { + ["]["] = "@function.outer", + }, + goto_previous_start = { + ["[["] = "@function.outer", + }, + goto_previous_end = { + ["[]"] = "@function.outer", + }, + }, + }, + playground = { + enable = true, + keybindings = { + update = "R", + toggle_query_editor = "o", + }, + }, +} diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..f6c8ddc --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,21 @@ +--[[ + +Neovim Configuration +Configuration Home: https://github.com/esprssoo/dotfiles + +--]] + +vim.g.mapleader = " " +vim.g.netrw_banner = 0 + +require "my.plugins" +require "my.options" +require "my.keymaps" + +vim.api.nvim_create_autocmd("TextYankPost", { + group = vim.api.nvim_create_augroup("HighlightYank", {}), + pattern = "*", + callback = function() + vim.highlight.on_yank() + end, +}) diff --git a/nvim/.config/nvim/lua/my/keymaps.lua b/nvim/.config/nvim/lua/my/keymaps.lua new file mode 100644 index 0000000..e84af81 --- /dev/null +++ b/nvim/.config/nvim/lua/my/keymaps.lua @@ -0,0 +1,60 @@ +local resize = require("my.resize").resize +local utils = require "my.utils" +local nmap, imap, vmap = utils.nmap, utils.imap, utils.vmap + +-- Window splits +nmap("", function() + utils.winmove "j" +end) +nmap("", function() + utils.winmove "k" +end) +nmap("", function() + utils.winmove "l" +end) +nmap("", function() + utils.winmove "h" +end) +nmap("", vim.cmd.quit) + +-- Resize splits +nmap("", function() + resize(false, -2) +end) +nmap("", function() + resize(false, 2) +end) +nmap("", function() + resize(true, -2) +end) +nmap("", function() + resize(true, 2) +end) + +-- Easy move lines +nmap("", ":m+==") +nmap("", ":m-2==") +vmap("", ":m '>+1gv=gv") +vmap("", ":m '<-2gv=gv") + +nmap("", vim.cmd.nohl) +nmap("", "") +-- nmap("n", "windo set nu! relativenumber!") +-- nmap("t", "windo set expandtab!") +-- nmap(".", "w") +-- nmap("S", require("my.nodesplit").split) +nmap("[d", vim.diagnostic.goto_prev, "previous diagnostic") +nmap("]d", vim.diagnostic.goto_next, "next diagnostic") +nmap("q", vim.diagnostic.setqflist, "set diagnostic to quickfix list") +-- nmap("", utils.reload, "reload configuration") +nmap("[t", vim.cmd.tabp, "previous tab") +nmap("]t", vim.cmd.tabn, "next tab") + +imap("", require("my.tab").forwards) +imap("", require("my.tab").backwards) +imap("", "O") +imap("jk", "") + +vmap("p", '"_dP') +vmap(">", ">gv") +vmap("<", "