Merge branch 'lazy'

This commit is contained in:
Tyler Hallada 2023-12-01 15:28:11 -05:00
commit 2aac3866d7
93 changed files with 1479 additions and 1962 deletions

198
.luarc.json Normal file
View File

@ -0,0 +1,198 @@
{
"workspace.library": [
"/home/thallada/.local/share/nvim/site/pack/packer/start/neodev.nvim/types/nightly",
"/home/linuxbrew/.linuxbrew/Cellar/neovim/HEAD-b2e8c0d/share/nvim/runtime/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/opt/copilot.lua/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/opt/crates.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/opt/nvim-code-action-menu/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/Comment.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/alpha-nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/auto-session/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/bufferline.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cellular-automaton.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-buffer/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-cmdline/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-git/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-path/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-vsnip/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/copilot-cmp/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/diffview.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/fidget.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/git-conflict.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gitsigns.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/goto-preview/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gruvbox.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gui-font-resize.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/impatient.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/kanagawa.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/leap.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/lspkind.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/lualine.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/mason.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neoai.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neodev.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neotest/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neotest-rust/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nui.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/null-ls.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/numb.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-autopairs/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-cmp/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap-ui/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lastplace/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lightbulb/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lspconfig/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-pqf/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-surround/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-pairs/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-web-devicons/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/octo.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/oil.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/oxocarbon.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/packer.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/plenary.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/rest.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/rust-tools.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/session-lens/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-emoji.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-env.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-github.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-project.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-ui-select.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/toggleterm.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/tokyonight.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/treesj/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/trouble.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/true-zen.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/typescript.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-startuptime/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/which-key.nvim/lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/winshift.nvim/lua",
"/home/thallada/.config/nvim",
"/home/thallada/.local/share/nvim/site",
"/home/thallada/.local/share/nvim/site/pack/packer/start/Comment.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/alpha-nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/auto-session",
"/home/thallada/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cellular-automaton.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-buffer",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-git",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-path",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
"/home/thallada/.local/share/nvim/site/pack/packer/start/copilot-cmp",
"/home/thallada/.local/share/nvim/site/pack/packer/start/diffview.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/fidget.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/friendly-snippets",
"/home/thallada/.local/share/nvim/site/pack/packer/start/git-conflict.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/goto-preview",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gruvbox.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/gui-font-resize.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/impatient.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/kanagawa.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/leap.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/lualine.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/mason.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neoai.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neodev.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neotest",
"/home/thallada/.local/share/nvim/site/pack/packer/start/neotest-rust",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nui.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/numb.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-cmp",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lastplace",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-pqf",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-surround",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-pairs",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring",
"/home/thallada/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
"/home/thallada/.local/share/nvim/site/pack/packer/start/octo.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/oil.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/oxocarbon.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/packer.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/papercolor-theme",
"/home/thallada/.local/share/nvim/site/pack/packer/start/plenary.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/rest.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/session-lens",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-emoji.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-env.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-github.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-project.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-symbols.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope-ui-select.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/telescope.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/treesj",
"/home/thallada/.local/share/nvim/site/pack/packer/start/trouble.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/true-zen.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/typescript.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-eunuch",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-fugitive",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-just",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-mundo",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-repeat",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-sleuth",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-startuptime",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-unimpaired",
"/home/thallada/.local/share/nvim/site/pack/packer/start/vim-vsnip",
"/home/thallada/.local/share/nvim/site/pack/packer/start/which-key.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/winshift.nvim",
"/home/thallada/.local/share/nvim/site/pack/packer/start/zig.vim",
"/home/linuxbrew/.linuxbrew/Cellar/neovim/HEAD-b2e8c0d/share/nvim/runtime",
"/home/linuxbrew/.linuxbrew/Cellar/neovim/HEAD-b2e8c0d/share/nvim/runtime/pack/dist/opt/matchit",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-buffer/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-cmdline/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-path/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/cmp-vsnip/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/octo.nvim/after",
"/home/thallada/.local/share/nvim/site/pack/packer/start/rest.nvim/after",
"/home/thallada/.config/nvim/after",
"/home/thallada/.config/nvim/lua",
"${3rd}/luassert/library",
"${3rd}/luv/library"
],
"diagnostics.globals": [
"vim"
]
}

201
LICENSE Normal file
View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# 💤 LazyVim
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.

View File

@ -1,16 +0,0 @@
-- local colors = require("gruvbox.palette").get_base_colors({}, "dark", "hard");
--
-- function FixGruvbox()
-- vim.api.nvim_set_hl(0, 'DiffviewDiffAddAsDelete', { bg = "#431313" })
-- vim.api.nvim_set_hl(0, 'DiffDelete', { bg = "none", fg = colors.dark2 })
-- vim.api.nvim_set_hl(0, 'DiffviewDiffDelete', { bg = "none", fg = colors.dark2 })
-- vim.api.nvim_set_hl(0, 'DiffAdd', { bg = "#142a03" })
-- vim.api.nvim_set_hl(0, 'DiffChange', { bg = "#3B3307" })
-- vim.api.nvim_set_hl(0, 'DiffText', { bg = "#4D520D" })
-- end
-- FixGruvbox()
--
-- vim.api.nvim_create_autocmd(
-- "ColorScheme",
-- { pattern = { "gruvbox" }, callback = FixGruvbox }
-- )

View File

@ -1 +0,0 @@
vim.opt.textwidth = 80

View File

@ -1,24 +1,2 @@
-- Dependencies needed for this config:
-- ripgrep - https://github.com/BurntSushi/ripgrep
-- fd - https://github.com/sharkdp/fd
-- git - https://git-scm.com/
-- bat - https://github.com/sharkdp/bat
-- disables netrw
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1
-- speed up loading Lua modules
if pcall(require, 'impatient') then
require('impatient')
else
print('Failed to load impatient.')
end
-- require('plenary.reload').reload_module('plugins')
require('install-plugins')
-- require('plenary.reload').reload_module('user.settings')
-- require('plenary.reload').reload_module('user.keymaps')
require('user.settings')
require('user.keymaps')
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

116
lazy-lock.json Normal file
View File

@ -0,0 +1,116 @@
{
"LazyVim": { "branch": "main", "commit": "68ff818a5bb7549f90b05e412b76fe448f605ffb" },
"LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" },
"SchemaStore.nvim": { "branch": "main", "commit": "54a4ea14b70cd3fc9db8217bb4ac9e1f78bfa390" },
"aerial.nvim": { "branch": "master", "commit": "88764566f96bf900a64b3dcd6d178cfb69b1c8ce" },
"bufferline.nvim": { "branch": "main", "commit": "9e8d2f695dd50ab6821a6a53a840c32d2067a78a" },
"catppuccin": { "branch": "main", "commit": "a2107df4379d66e72a36a89792603151cebec1bf" },
"clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" },
"cmake-tools.nvim": { "branch": "master", "commit": "4b965b5785776b6d258d57ce8fb7efa1a8170a7b" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "eddd6431370814caacec1d1e3c7d6d95d41b133d" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"copilot.lua": { "branch": "master", "commit": "73047082d72fcfdde1f73b7f17ad495cffcbafaa" },
"crates.nvim": { "branch": "main", "commit": "406295abeb7eedae3bcee3f0db690ada605c629c" },
"dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" },
"dial.nvim": { "branch": "master", "commit": "019bbe9daea397c93a99adc747f8f071379fee5c" },
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
"dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"fold-preview.nvim": { "branch": "main", "commit": "b7920cb0aba2b48a6b679bff45f98c3ebc0f0b89" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitsigns.nvim": { "branch": "main", "commit": "175e74f87d3d2e4d20952d390af5f2a794f5ed7e" },
"goto-preview": { "branch": "main", "commit": "16ec236fabb40b2cebfe283b1d701338886462db" },
"gruvbox.nvim": { "branch": "main", "commit": "517b012757fbe7a4d6e507baf5cc75837e62734f" },
"gui-font-resize.nvim": { "branch": "main", "commit": "ece6e5dfdb3caf7567681dbea80a37d838f60447" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"inc-rename.nvim": { "branch": "main", "commit": "14922a84777702244a499b43134b9d04e640cbcd" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
"keymap-amend.nvim": { "branch": "master", "commit": "b8bf9d820878d5497fdd11d6de55dea82872d98e" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lsp_lines.nvim": { "branch": "main", "commit": "cf2306dd332e34a3e91075b40bdd4f6db824b2ee" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "41674c9d50f23cfa3e11f0ca964eb9100c2a8922" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "5b4db7c0d6873436b42bcda0ba7cd4efa9206745" },
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
"mini.ai": { "branch": "main", "commit": "4a2e387b121352dfb478f440c9a5313a9d97006c" },
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
"mini.files": { "branch": "main", "commit": "3f8af5f9e4bbedbacbade760531464c0d679490d" },
"mini.hipatterns": { "branch": "main", "commit": "581ae9cab55fea530fecd3930925f4ef1c7703af" },
"mini.indentscope": { "branch": "main", "commit": "c8fdafa7bf603d758986a27eb546c55a5c73b1a3" },
"mini.pairs": { "branch": "main", "commit": "71f117fd57f930da6ef4126b24f594dd398bac26" },
"mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" },
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
"neodev.nvim": { "branch": "main", "commit": "e375edf6cf574639dc4b88cdfa306e4588987202" },
"neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
"neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" },
"neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" },
"neotest-rspec": { "branch": "main", "commit": "8630acad9e84b8267646bc8712a4365af7a12f2b" },
"neotest-rust": { "branch": "main", "commit": "46428d9013023f516a61274a78b0cee87fb7e8bc" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "257dccc43b4badc735978f0791d216f7d665b75a" },
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-dap": { "branch": "master", "commit": "e154fdb6d70b3765d71f296e718b29d8b7026a63" },
"nvim-dap-python": { "branch": "master", "commit": "e0be843877e7ae756ef1ee7a441ca0b9e1677da9" },
"nvim-dap-ruby": { "branch": "main", "commit": "fc15c7d50e557379e13f3a825bc58adcc7323cc3" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-jdtls": { "branch": "master", "commit": "44403b2ef6c6285cfd9a3b4fa9a0d746ddae4b45" },
"nvim-lint": { "branch": "master", "commit": "3a7c15331a57ba40a56f00f29173700af853fa03" },
"nvim-lspconfig": { "branch": "master", "commit": "39546f730bdff8eccf7cec344cfce694f19ac908" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-pqf": { "branch": "main", "commit": "ba0e291cb5c0249838132e197dac082777bdc7d6" },
"nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" },
"nvim-treesitter": { "branch": "master", "commit": "582a92ee120532a603b75239f40cba06b9a5ec07" },
"nvim-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "b8ff464f2afc2000f6c72fa331a8fc090cb46b39" },
"nvim-ufo": { "branch": "main", "commit": "c1e75fb93a5413c73221e23d549cc9f208d592fb" },
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
"oil.nvim": { "branch": "master", "commit": "e89a8f8adeef2dfab851fd056d38ee7afc97c249" },
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
"plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
"ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
"telescope-emoji.nvim": { "branch": "master", "commit": "86248d97be84a1ce83f0541500ef9edc99ea2aa1" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
"telescope.nvim": { "branch": "master", "commit": "84c5a71d825b6687a55aed6f41e98b92fd8e5454" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
"toggle-lsp-diagnostics.nvim": { "branch": "main", "commit": "4fbfb51e3902d17613be0bc03035ce26b9a8d05d" },
"toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" },
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
"tree-sitter-just": { "branch": "main", "commit": "4e5f5f3ff37b12a1bbf664eb3966b3019e924594" },
"treesj": { "branch": "main", "commit": "1d6e89f4790aa04eaae38fa9460a3ee191961c96" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" },
"venv-selector.nvim": { "branch": "main", "commit": "c259dacb20a00fb84ec6006e9a24b4085b27120a" },
"vim-eunuch": { "branch": "master", "commit": "67f3dd32b4dcd1c427085f42ff5f29c7adc645c6" },
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
"vim-just": { "branch": "main", "commit": "fda7259fc3b16af1d16e467c1482aac3bcc4df9a" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" },
"vimtex": { "branch": "master", "commit": "3913284202709251c7e94d1ba0efb5d51fbd7357" },
"wezterm-types": { "branch": "main", "commit": "49f66ce40002f0ef881440c10f8854b02bb67c3f" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"yanky.nvim": { "branch": "main", "commit": "6bb9ffd3cad4c9876bda54e19d0659de28a4f84f" }
}

32
lazyvim.json Normal file
View File

@ -0,0 +1,32 @@
{
"extras": [
"lazyvim.plugins.extras.coding.copilot",
"lazyvim.plugins.extras.coding.yanky",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.editor.aerial",
"lazyvim.plugins.extras.editor.mini-files",
"lazyvim.plugins.extras.formatting.black",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.clangd",
"lazyvim.plugins.extras.lang.cmake",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.java",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.ruby",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.terraform",
"lazyvim.plugins.extras.lang.tex",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.linting.eslint",
"lazyvim.plugins.extras.test.core",
"lazyvim.plugins.extras.util.mini-hipatterns",
"lazyvim.plugins.extras.util.project"
],
"news": {
"NEWS.md": "2123"
},
"version": 2
}

3
lua/config/autocmds.lua Normal file
View File

@ -0,0 +1,3 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here

12
lua/config/keymaps.lua Normal file
View File

@ -0,0 +1,12 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local Util = require("lazyvim.util")
vim.keymap.set("n", "<leader>H", function()
Util.terminal({ "clx" })
end, { desc = "Toggle clx (console HackerNews) floating terminal" })
vim.keymap.set("n", "<leader>D", function()
Util.terminal({ "lazydocker" }, { esc_esc = false, ctrl_hjkl = false })
end, { desc = "Toggle lazydocker (console Docker Desktop) floating terminal" })

46
lua/config/lazy.lua Normal file
View File

@ -0,0 +1,46 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

12
lua/config/options.lua Normal file
View File

@ -0,0 +1,12 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.guifont = "Berkeley Mono Variable:h13"
-- idk if it does anything cause I have to set it in the nvim-cmp settings too
vim.opt.completeopt = "menu,menuone,noinsert,noselect"
-- Window decorations
vim.opt.title = true
vim.opt.titlestring = "%{substitute(getcwd(),$HOME,'~','')} - Neovide"

View File

@ -1,499 +0,0 @@
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
-- https://github.com/wbthomason/packer.nvim/issues/202
require('packer').init({
max_jobs = 50
})
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'lewis6991/impatient.nvim'
use 'nvim-lua/plenary.nvim'
use {
'neovim/nvim-lspconfig',
requires = {
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'hrsh7th/cmp-nvim-lsp',
},
config = function()
require('plugins.lsp')
end,
}
use {
'j-hui/fidget.nvim',
tag = 'legacy',
config = function()
require('plugins.fidget-nvim')
end,
}
use {
"folke/neodev.nvim",
config = function()
require('plugins.neodev-nvim')
end,
}
use {
'hrsh7th/nvim-cmp',
requires = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
},
config = function()
require('plugins.nvim-cmp')
end,
}
use {
'Saecki/crates.nvim',
event = { "BufRead Cargo.toml" },
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('plugins.crates-nvim')
end,
}
use {
'petertriho/cmp-git',
requires = 'nvim-lua/plenary.nvim',
}
use {
'rmagatti/goto-preview',
config = function()
require('plugins.goto-preview-nvim')
end,
}
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/vim-vsnip'
use 'rafamadriz/friendly-snippets'
use {
'folke/trouble.nvim',
config = function()
require('plugins.trouble-nvim')
end,
}
use {
'mfussenegger/nvim-dap',
config = function()
require('plugins.nvim-dap')
end,
}
use {
'theHamsta/nvim-dap-virtual-text',
config = function()
require('plugins.nvim-dap-virtual-text')
end,
}
use {
'rcarriga/nvim-dap-ui',
requires = {
'mfussenegger/nvim-dap',
},
config = function()
require('plugins.nvim-dap-ui')
end,
}
use {
'kosayoda/nvim-lightbulb',
requires = 'antoinemadec/FixCursorHold.nvim',
config = function()
require('plugins.nvim-lightbulb')
end,
}
use {
'weilbith/nvim-code-action-menu',
cmd = 'CodeActionMenu',
}
use 'onsails/lspkind.nvim'
use {
'nvim-treesitter/nvim-treesitter',
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
config = function()
require('plugins.nvim-treesitter')
end,
}
use {
'nvim-treesitter/nvim-treesitter-textobjects',
requires = {
'nvim-treesitter/nvim-treesitter',
},
}
use {
'theHamsta/nvim-treesitter-pairs',
requires = {
'nvim-treesitter/nvim-treesitter',
},
}
use {
'windwp/nvim-ts-autotag',
requires = {
'nvim-treesitter/nvim-treesitter',
},
}
use {
'windwp/nvim-autopairs',
config = function()
require('plugins.nvim-autopairs')
end,
}
use {
'nvim-treesitter/nvim-treesitter-refactor',
requires = {
'nvim-treesitter/nvim-treesitter',
},
}
use {
'JoosepAlviste/nvim-ts-context-commentstring',
requires = {
'nvim-treesitter/nvim-treesitter',
},
}
use {
'numToStr/Comment.nvim',
requires = {
'nvim-treesitter/nvim-treesitter',
},
config = function()
require('plugins.comment-nvim')
end,
}
use {
'nvim-treesitter/nvim-treesitter-context',
requires = {
'nvim-treesitter/nvim-treesitter',
},
config = function()
require('plugins.nvim-treesitter-context')
end,
}
use {
'nvim-telescope/telescope.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('plugins.telescope')
end,
}
use {
'nvim-telescope/telescope-fzf-native.nvim',
run = 'make',
requires = {
'nvim-telescope/telescope.nvim',
},
}
use {
'nvim-telescope/telescope-symbols.nvim',
requires = {
'nvim-telescope/telescope.nvim',
},
}
use {
'nvim-telescope/telescope-github.nvim',
requires = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
},
}
use {
'LinArcX/telescope-env.nvim',
requires = {
'nvim-telescope/telescope.nvim',
},
}
use {
'xiyaowong/telescope-emoji.nvim',
requires = {
'nvim-telescope/telescope.nvim',
},
}
use 'nvim-telescope/telescope-ui-select.nvim'
use 'nvim-telescope/telescope-project.nvim'
use 'NLKNguyen/papercolor-theme'
use {
'akinsho/toggleterm.nvim',
tag = '*',
config = function()
require('plugins.toggleterm-nvim')
end,
}
use {
'ethanholz/nvim-lastplace',
config = function()
require('plugins.lastplace-nvim')
end,
}
use {
'nacro90/numb.nvim',
config = function()
require('plugins.numb-nvim')
end,
}
use {
'tpope/vim-fugitive',
config = function()
require('plugins.fugitive')
end,
}
use 'tpope/vim-rhubarb'
use {
'lewis6991/gitsigns.nvim',
config = function()
require('plugins.gitsigns')
end,
}
use {
'sindrets/diffview.nvim',
requires = 'nvim-lua/plenary.nvim',
config = function()
require('plugins.diffview')
end,
}
use 'kyazdani42/nvim-web-devicons'
use {
'pwntester/octo.nvim',
requires = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
'kyazdani42/nvim-web-devicons',
},
config = function()
require('plugins.octo-nvim')
end
}
use {
'stevearc/oil.nvim',
requires = {
'nvim-tree/nvim-web-devicons',
},
config = function()
require('plugins.oil-nvim')
end,
}
use {
'kylechui/nvim-surround',
config = function()
require('plugins.surround-nvim')
end,
}
use {
'ggandor/leap.nvim',
requires = 'tpope/vim-repeat',
config = function()
require('plugins.leap-nvim')
end,
}
use 'dstein64/vim-startuptime'
use {
'nvim-neotest/neotest',
requires = {
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
'antoinemadec/FixCursorHold.nvim',
},
config = function()
require('plugins.neotest')
end,
}
use 'rouge8/neotest-rust'
use {
'simrat39/rust-tools.nvim',
requires = {
'hrsh7th/nvim-cmp',
},
config = function()
require('plugins.rust-tools-nvim')
end,
}
use {
'jose-elias-alvarez/typescript.nvim',
config = function()
require('plugins.typescript-nvim')
end,
}
use {
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
config = function()
require('plugins.copilot')
end,
}
use {
'zbirenbaum/copilot-cmp',
requires = {
'hrsh7th/nvim-cmp',
'zbirenbaum/copilot.lua',
},
config = function ()
require('plugins.copilot-cmp')
end
}
-- use 'github/copilot.vim'
use { "MunifTanjim/nui.nvim" }
use {
"Bryley/neoai.nvim",
require = { "MunifTanjim/nui.nvim" },
config = function()
require('plugins.neoai-nvim')
end
}
use 'ziglang/zig.vim'
use {
'akinsho/bufferline.nvim',
tag = "v3.*",
requires = 'kyazdani42/nvim-web-devicons',
config = function()
require('plugins.bufferline-nvim')
end,
}
use {
'nvim-lualine/lualine.nvim',
requires = {
'kyazdani42/nvim-web-devicons',
opt = true
},
config = function()
require('plugins.lualine-nvim')
end,
}
use 'tpope/vim-unimpaired'
use 'tpope/vim-repeat'
use 'tpope/vim-eunuch'
use 'tpope/vim-sleuth'
use {
'simnalamburt/vim-mundo',
config = function()
require('plugins.vim-mundo')
end,
}
use {
'lukas-reineke/indent-blankline.nvim',
config = function()
require('plugins.indent-blankline-nvim')
end,
}
use {
'ktunprasert/gui-font-resize.nvim',
config = function()
require('plugins.gui-font-resize-nvim')
end,
}
use {
'jose-elias-alvarez/null-ls.nvim',
config = function()
require('plugins.null-ls-nvim')
end,
requires = { 'nvim-lua/plenary.nvim' },
}
use {
'rmagatti/auto-session',
config = function()
require('plugins.auto-session')
end
}
use {
'rmagatti/session-lens',
requires = {'rmagatti/auto-session', 'nvim-telescope/telescope.nvim'},
config = function()
require('plugins.session-lens')
end
}
use {
'Pocco81/true-zen.nvim',
config = function()
require('plugins.true-zen-nvim')
end
}
use {
'sindrets/winshift.nvim',
config = function()
require('plugins.winshift-nvim')
end,
}
use {
'NTBBloodbath/rest.nvim',
requires = { 'nvim-lua/plenary.nvim' },
config = function()
require('plugins.rest-nvim')
end,
}
use {
'norcalli/nvim-colorizer.lua',
config = function()
require('plugins.nvim-colorizer')
end,
}
use {
'folke/which-key.nvim',
config = function()
require('plugins.which-key-nvim')
end
}
use {
'ellisonleao/gruvbox.nvim',
config = function()
require('plugins.gruvbox')
end,
}
use 'eandrju/cellular-automaton.nvim'
use 'nyoom-engineering/oxocarbon.nvim'
use 'folke/tokyonight.nvim'
use {
'rebelot/kanagawa.nvim',
config = function()
require('plugins.kanagawa-nvim')
end,
}
use {
'lifepillar/pgsql.vim',
ft = { 'sql' },
config = function()
require('plugins.pgsql-vim')
end,
}
use 'NoahTheDuke/vim-just'
use {
'yorickpeterse/nvim-pqf',
config = function()
require('plugins.nvim-pqf')
end,
}
use {
'akinsho/git-conflict.nvim',
config = function()
require('plugins.git-conflict-nvim')
end,
}
use {
'Wansmer/treesj',
requires = { 'nvim-treesitter' },
config = function()
require('plugins.treesj')
end,
}
use {
'goolord/alpha-nvim',
requires = { 'nvim-tree/nvim-web-devicons' },
config = function ()
require'alpha'.setup(require'alpha.themes.startify'.config)
end
}
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
end)

View File

@ -1 +0,0 @@
require('alpha').setup(require('alpha.themes.startify').config)

View File

@ -1,7 +0,0 @@
vim.o.sessionoptions='blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal'
require('auto-session').setup({
log_level = 'error',
auto_session_suppress_dirs = { '~/', '~/workspace', '~/Downloads', '/'},
auto_session_enable_last_session = false,
})

View File

@ -1,7 +0,0 @@
vim.opt.termguicolors = true
require('bufferline').setup({
options = {
mode = 'tabs',
diagnostics = 'nvim_lsp',
},
})

View File

@ -0,0 +1,8 @@
return {
"akinsho/bufferline.nvim",
opts = {
options = {
mode = "tabs",
},
},
}

View File

@ -0,0 +1,8 @@
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
}

View File

@ -1,69 +0,0 @@
require("Comment").setup({
---Add a space b/w comment and the line
---@type boolean|fun():boolean
padding = true,
---Whether the cursor should stay at its position
---NOTE: This only affects NORMAL mode mappings and doesn't work with dot-repeat
---@type boolean
sticky = true,
---Lines to be ignored while comment/uncomment.
---Could be a regex string or a function that returns a regex string.
---Example: Use '^$' to ignore empty lines
---@type string|fun():string
ignore = nil,
---LHS of toggle mappings in NORMAL + VISUAL mode
---@type table
toggler = {
---Line-comment toggle keymap
line = "gcc",
---Block-comment toggle keymap
block = "gbc",
},
---LHS of operator-pending mappings in NORMAL + VISUAL mode
---@type table
opleader = {
---Line-comment keymap
line = "gc",
---Block-comment keymap
block = "gb",
},
---LHS of extra mappings
---@type table
extra = {
---Add comment on the line above
above = "gcO",
---Add comment on the line below
below = "gco",
---Add comment at the end of line
eol = "gcA",
},
---Create basic (operator-pending) and extended mappings for NORMAL + VISUAL mode
---NOTE: If `mappings = false` then the plugin won't create any mappings
---@type boolean|table
mappings = {
---Operator-pending mapping
---Includes `gcc`, `gbc`, `gc[count]{motion}` and `gb[count]{motion}`
---NOTE: These mappings can be changed individually by `opleader` and `toggler` config
basic = true,
---Extra mapping
---Includes `gco`, `gcO`, `gcA`
extra = true,
---Extended mapping
---Includes `g>`, `g<`, `g>[count]{motion}` and `g<[count]{motion}`
extended = false,
},
---Pre-hook, called before commenting the line
---@type fun(ctx: CommentCtx):string
pre_hook = nil,
---Post-hook, called after commenting is done
---@type fun(ctx: CommentCtx)
post_hook = nil,
})

View File

@ -1,3 +0,0 @@
local cmp = require('copilot_cmp')
cmp.setup()

View File

@ -1,4 +0,0 @@
require('copilot').setup({
suggestion = { enabled = false },
panel = { enabled = false },
});

View File

@ -1,23 +0,0 @@
local crates = require('crates')
local opts = { silent = true }
crates.setup()
vim.keymap.set('n', '<leader>ct', crates.toggle, { silent = true, desc = "Rust [C]rate [T]oggle" })
vim.keymap.set('n', '<leader>cr', crates.reload, { silent = true, desc = "Rust [C]rate [R]eload"})
vim.keymap.set('n', '<leader>cv', crates.show_versions_popup, { silent = true, desc = "Rust [C]rate show [V]ersions" })
vim.keymap.set('n', '<leader>cf', crates.show_features_popup, { silent = true, desc = "Rust [C]rate show [F]eatures" })
vim.keymap.set('n', '<leader>cd', crates.show_dependencies_popup, { silent = true, desc = "Rust [C]rate show [D]ependencies" })
vim.keymap.set('n', '<leader>cu', crates.update_crate, { silent = true, desc = "Rust [C]rate [U]pdate (to newest compatible version)" })
vim.keymap.set('v', '<leader>cu', crates.update_crates, { silent = true, desc = "Rust [C]rates [U]pdate (to newest compatible versions)" })
vim.keymap.set('n', '<leader>ca', crates.update_all_crates, { silent = true, desc = "Rust [C]rates update [A]ll (to newest compatible versions)" })
vim.keymap.set('n', '<leader>cU', crates.upgrade_crate, { silent = true, desc = "Rust [C]rate [U]pgrade" })
vim.keymap.set('v', '<leader>cU', crates.upgrade_crates, { silent = true, desc = "Rust [C]rates [U]pgrade" })
vim.keymap.set('n', '<leader>cA', crates.upgrade_all_crates, { silent = true, desc = "Rust [C]rates upgrade [A]ll" })
vim.keymap.set('n', '<leader>cH', crates.open_homepage, { silent = true, desc = "Rust [C]rate open [H]omepage" })
vim.keymap.set('n', '<leader>cR', crates.open_repository, { silent = true, desc = "Rust [C]rate open [R]epository" })
vim.keymap.set('n', '<leader>cD', crates.open_documentation, { silent = true, desc = "Rust [C]rate open [D]ocumentation" })
vim.keymap.set('n', '<leader>cC', crates.open_crates_io, { silent = true, desc = "Rust [C]rate open [C]rates.io" })

35
lua/plugins/dial.lua Normal file
View File

@ -0,0 +1,35 @@
-- better increase/descrease
return {
"monaqa/dial.nvim",
keys = {
{
"<C-a>",
function()
return require("dial.map").inc_normal()
end,
expr = true,
desc = "Increment",
},
{
"<C-x>",
function()
return require("dial.map").dec_normal()
end,
expr = true,
desc = "Decrement",
},
},
config = function()
local augend = require("dial.augend")
require("dial.config").augends:register_group({
default = {
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.date.alias["%Y/%m/%d"],
augend.constant.alias.bool,
augend.semver.alias.semver,
augend.constant.new({ elements = { "let", "const" } }),
},
})
end,
}

View File

@ -1,21 +1,24 @@
local actions = require("diffview.actions")
require("diffview").setup({
enhanced_diff_hl = true,
keymaps = {
view = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
file_panel = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
file_history_panel = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
}
})
vim.keymap.set('v', '<leader>gl', [[<Cmd>'<,'>DiffviewFileHistory<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it [L]og of selected lines" })
vim.keymap.set('n', '<leader>gL', [[<Cmd>DiffviewFileHistory<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it [L]og of current branch" })
vim.keymap.set('n', '<leader>gl', [[<Cmd>DiffviewFileHistory %<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it [L]og of current file history" })
vim.keymap.set('n', '<leader>gd', [[<Cmd>DiffviewOpen<CR>]], { noremap = false, silent = true, desc = "[G]it [D]iff current file against index" })
return {
"sindrets/diffview.nvim",
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles" },
opts = {
enhanced_diff_hl = true,
keymaps = {
view = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
file_panel = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
file_history_panel = {
["gq"] = "<Cmd>DiffviewClose<CR>",
},
},
},
keys = {
{ "v", "<leader>gl", "<cmd>'<,'>DiffviewFileHistory<cr>", desc = "Toggle git log of selected lines" },
{ "<leader>gL", "<cmd>DiffviewFileHistory<cr>", desc = "Toggle git log of current branch" },
{ "<leader>gl", "<cmd>DiffviewFileHistory %<cr>", desc = "Toggle git log of current file history" },
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Git diff current file against the index" },
},
}

265
lua/plugins/example.lua Normal file
View File

@ -0,0 +1,265 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- add symbols-outline
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
config = true,
},
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add telescope-fzf-native
{
"telescope.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
config = function()
require("telescope").load_extension("fzf")
end,
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, "😄")
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
-- Use <tab> for completion and snippets (supertab)
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
{
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
},
-- then: setup supertab in cmp
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
}

View File

@ -1 +0,0 @@
require('fidget').setup()

63
lua/plugins/folding.lua Normal file
View File

@ -0,0 +1,63 @@
return {
-- add folding range to capabilities
{
"neovim/nvim-lspconfig",
opts = {
capabilities = {
textDocument = {
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
},
},
},
},
},
-- add nvim-ufo
{
"kevinhwang91/nvim-ufo",
dependencies = {
"kevinhwang91/promise-async",
-- This looks awful, so leaving it disabled
-- {
-- "luukvbaal/statuscol.nvim",
-- config = function()
-- local builtin = require("statuscol.builtin")
-- require("statuscol").setup({
-- relculright = true,
-- segments = {
-- { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
-- { text = { "%s" }, click = "v:lua.ScSa" },
-- { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
-- },
-- })
-- end,
-- },
},
event = "BufReadPost",
opts = {
provider_selector = function()
return { "treesitter", "indent" }
end,
},
init = function()
vim.o.foldcolumn = "1" -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
vim.keymap.set("n", "zR", function()
require("ufo").openAllFolds()
end)
vim.keymap.set("n", "zM", function()
require("ufo").closeAllFolds()
end)
end,
},
-- Folding preview, by default h and l keys are used.
-- On first press of h key, when cursor is on a closed fold, the preview will be shown.
-- On second press the preview will be closed and fold will be opened.
-- When preview is opened, the l key will close it and open fold. In all other cases these keys will work as usual.
{ "anuvyklack/fold-preview.nvim", dependencies = "anuvyklack/keymap-amend.nvim", config = true },
}

View File

@ -1,11 +1,37 @@
vim.keymap.set('n', '<leader>gx', [[<Cmd>G<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it status window" })
vim.keymap.set('n', '<leader>gs', [[<Cmd>Git<CR>]], { noremap = false, silent = true, desc = "Toggle [G]it [S]tatus window" })
vim.keymap.set('n', '<leader>gfd', [[<Cmd>Gdiffsplit<CR>]], { noremap = false, silent = true, desc = "[G]it [D]iff current file against index with [F]ugitive" })
vim.keymap.set('n', '<leader>gc', [[<Cmd>Git commit<CR>]], { noremap = false, silent = true, desc = "[G]it [C]ommit" })
vim.keymap.set('n', '<leader>gb', [[<Cmd>Git blame -C<CR>]], { noremap = false, silent = true, desc = "[G]it [B]lame" })
vim.keymap.set('n', '<leader>gp', [[<Cmd>Git push<CR>]], { noremap = false, silent = true, desc = "[G]it [P]ush" })
vim.keymap.set('n', '<leader>gf', [[<Cmd>Git push --force<CR>]], { noremap = false, silent = true, desc = "[G]it [F]orce push" })
vim.keymap.set('n', '<leader>gu', [[<Cmd>Git pull<CR>]], { noremap = false, silent = true, desc = "[G]it p[U]ll" })
vim.keymap.set('n', '<leader>gh', [[<Cmd>Git diff --cached<CR>]], { noremap = false, silent = true, desc = "[G]it diff current staged changes" })
vim.keymap.set('n', '<leader>go', [[<Cmd>GBrowse<CR>]], { noremap = false, silent = true, desc = "[B]rowse [G]it URL for fugitive object under cursor" })
vim.keymap.set('v', '<leader>go', [[<Cmd>'<,'>GBrowse<CR>]], { noremap = false, silent = true, desc = "[B]rowse [G]it URL for selected lines" })
return {
"tpope/vim-fugitive",
dependencies = {
"tpope/vim-rhubarb",
},
keys = {
{ "<leader>gx", [[<Cmd>G<CR>]], desc = "Toggle [G]it status window" },
{ "<leader>gs", [[<Cmd>Git<CR>]], desc = "Toggle [G]it [S]tatus window" },
{
"<leader>gfd",
[[<Cmd>Gdiffsplit<CR>]],
desc = "[G]it [D]iff current file against index with [F]ugitive",
},
{ "<leader>gc", [[<Cmd>Git commit<CR>]], desc = "[G]it [C]ommit" },
{ "<leader>gb", [[<Cmd>Git blame -C<CR>]], desc = "[G]it [B]lame" },
{ "<leader>gp", [[<Cmd>Git push<CR>]], desc = "[G]it [P]ush" },
{ "<leader>gf", [[<Cmd>Git push --force<CR>]], desc = "[G]it [F]orce push" },
{ "<leader>gu", [[<Cmd>Git pull<CR>]], desc = "[G]it p[U]ll" },
{
"<leader>gh",
[[<Cmd>Git diff --cached<CR>]],
desc = "[G]it diff current staged changes",
},
{
"<leader>go",
"<cmd>GBrowse<CR>",
desc = "[B]rowse [G]it URL for fugitive object under cursor",
},
{
"<leader>go",
":'<,'>GBrowse<CR>",
mode = "v",
desc = "[B]rowse [G]it URL for selected lines",
silent = true,
},
},
}

View File

@ -1 +0,0 @@
require('git-conflict').setup()

View File

@ -1,41 +0,0 @@
require('gitsigns').setup({
update_debounce = 500,
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, { expr = true, desc = "Jump to next git hunk [C]hange" })
map('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, { expr = true, desc = "Jump to previous git hunk [C]hange" })
-- Actions
map({ 'n', 'v' }, '<leader>hs', ':Gitsigns stage_hunk<CR>', { desc = "[S]tage git [H]unk" })
map({ 'n', 'v' }, '<leader>hr', ':Gitsigns reset_hunk<CR>', { desc = "[R]eset git [H]unk" })
map('n', '<leader>hS', gs.stage_buffer, { desc = "[S]tage git buffer" })
map('n', '<leader>hu', gs.undo_stage_hunk, { desc = "[U]ndo git [H]unk" })
map('n', '<leader>hR', gs.reset_buffer, { desc = "[R]eset git buffer" })
map('n', '<leader>hp', gs.preview_hunk, { desc = "[P]review git [H]unk" })
map('n', '<leader>hb', function() gs.blame_line { full = true } end, { desc = "Git [B]lame line" })
map('n', '<leader>tb', gs.toggle_current_line_blame, { desc = "[T]oggle current line git [B]lame" })
map('n', '<leader>hd', gs.diffthis, { desc = "Git [D]iff current file with index" })
map('n', '<leader>hD', function() gs.diffthis('~') end, { desc = "Git [D]iff current file with last commit" })
map('n', '<leader>td', gs.toggle_deleted, { desc = "[T]oggle showing [D]eleted git hunks" })
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', { desc = "Select git [H]unk under cursor" })
end
})

View File

@ -1,5 +0,0 @@
require('goto-preview').setup({
default_mappings = true,
-- resizing_mappings = true,
opacity = 90,
})

View File

@ -0,0 +1,8 @@
return {
"rmagatti/goto-preview",
config = function()
require("goto-preview").setup({
default_mappings = true,
})
end,
}

View File

@ -1,38 +1,22 @@
require("gruvbox").setup({
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
comments = true,
operators = false,
folds = true,
return {
"ellisonleao/gruvbox.nvim",
opts = {
contrast = "hard",
palette_overrides = {
dark0_hard = "#131516",
dark1 = "#242424",
},
dim_inactive = true,
overrides = {
GruvboxAquaSign = { bg = "NONE" },
GruvboxBlueSign = { bg = "NONE" },
GruvboxGreenSign = { bg = "NONE" },
GruvboxOrangeSign = { bg = "NONE" },
GruvboxPurpleSign = { bg = "NONE" },
GruvboxRedSign = { bg = "NONE" },
GruvboxYellowSign = { bg = "NONE" },
SignColumn = { bg = "NONE" },
FoldColumn = { bg = "NONE" },
},
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "hard", -- can be "hard" or "soft"
dim_inactive = true,
transparent_mode = false,
palette_overrides = {
dark0_hard = '#131516',
dark1 = '#242424',
},
overrides = {
Pmenu = { bg = '#222222'},
GruvboxAquaSign = { bg = "NONE" },
GruvboxBlueSign = { bg = "NONE" },
GruvboxGreenSign = { bg = "NONE" },
GruvboxOrangeSign = { bg = "NONE" },
GruvboxPurpleSign = { bg = "NONE" },
GruvboxRedSign = { bg = "NONE" },
GruvboxYellowSign = { bg = "NONE" },
SignColumn = { bg = "NONE" },
Search = { fg = "#E1A416" },
IncSearch = { fg = "#E56700" },
}
})
vim.o.background = "dark"
}

View File

@ -1,8 +0,0 @@
require('gui-font-resize').setup({
default_size = 11.0, -- absolute size it will fallback to when :GUIFontSizeSet is not specified
change_by = 1, -- step value that will inc/dec the fontsize by
})
vim.keymap.set('n', '<D-Up>', [[<Cmd>GUIFontSizeUp<CR>]], { noremap = true, silent = true, desc = "Increase font size" })
vim.keymap.set('n', '<D-Down>', [[<Cmd>GUIFontSizeDown<CR>]], { noremap = true, silent = true, desc = "Decrease font size" })
vim.keymap.set('n', '<D-0>', [[<Cmd>set guifont=Berkeley Mono Variable:h12 | GUIFontSizeSet<CR>]], { noremap = true, silent = true, desc = "Set font family and size to default" })

View File

@ -0,0 +1,18 @@
return {
"ktunprasert/gui-font-resize.nvim",
config = function()
require("gui-font-resize").setup({
default_size = 13.0,
change_by = 1,
})
end,
keys = {
{ "<D-Up>", "<Cmd>GUIFontSizeUp<CR>", desc = "Increase font size" },
{ "<D-Down>", "<Cmd>GUIFontSizeDown<CR>", desc = "Decrease font size" },
{
"<D-0>",
"<Cmd>set guifont=Berkeley\\ Mono\\ Variable:h13 | GUIFontSizeSet<CR>",
desc = "Set font family and size to default",
},
},
}

View File

@ -0,0 +1,8 @@
return {
"smjonas/inc-rename.nvim",
cmd = "IncRename",
config = true,
keys = {
{ "<leader>rn", ":IncRename ", desc = "Incremental Rename" },
},
}

View File

@ -1,6 +0,0 @@
require("ibl").setup({
scope = {
show_start = false,
show_end = false,
}
})

5
lua/plugins/just.lua Normal file
View File

@ -0,0 +1,5 @@
return {
"NoahTheDuke/vim-just",
event = { "BufReadPre", "BufNewFile" },
ft = { "\\cjustfile", "*.just", ".justfile" },
}

View File

@ -1 +0,0 @@
require('kanagawa').setup()

View File

@ -1,5 +0,0 @@
require('nvim-lastplace').setup({
lastplace_ignore_buftype = { 'quickfix', 'nofile', 'nowrite', 'help' },
lastplace_ignore_filetype = { 'gitcommit', 'gitrebase', 'svn', 'hgcommit' },
lastplace_open_folds = true,
})

View File

@ -1 +0,0 @@
require('leap').add_default_mappings()

54
lua/plugins/lsp-lines.lua Normal file
View File

@ -0,0 +1,54 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
{
"WhoIsSethDaniel/toggle-lsp-diagnostics.nvim",
config = function()
require("toggle_lsp_diagnostics").init({ virtual_text = false })
end,
},
{
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
config = function()
require("lsp_lines").setup()
end,
keys = {
{
"<leader>xv",
function()
require("lsp_lines").toggle()
require("toggle_lsp_diagnostics").toggle_virtual_text()
end,
desc = "Toggle lsp_lines diagnostics",
},
{
"<leader>xy",
function()
if vim.diagnostic.config().virtual_text then
require("toggle_lsp_diagnostics").toggle_virtual_text()
else
require("lsp_lines").toggle()
end
end,
desc = "Toggle diagnostics virtual display",
},
{
"<leader>xz",
function()
if not vim.diagnostic.config().virtual_text then
require("lsp_lines").toggle()
end
require("toggle_lsp_diagnostics").toggle_diagnostics()
end,
desc = "Toggle all diagnostics",
},
},
},
},
opts = {
diagnostics = {
virtual_text = false,
virtual_lines = true,
},
},
}

View File

@ -1,111 +0,0 @@
require('mason').setup({
max_concurrent_installers = 10,
})
require('mason-lspconfig').setup({
automatic_installation = true,
})
local on_attach = require('plugins.lsp.on_attach')
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap=true, silent=true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
require('lspconfig')['pyright'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
-- Setup by typescript.nvim automatically
-- require('lspconfig')['tsserver'].setup({
-- on_attach = on_attach,
-- flags = lsp_flags,
-- })
require('lspconfig')['jsonls'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['eslint'].setup({
on_attach = on_attach,
flags = lsp_flags,
-- root_dir = require('lspconfig').util.find_git_ancestor,
})
require('lspconfig')['html'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['cssls'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
-- Setup by rust-tools automatically
-- require('lspconfig')['rust_analyzer'].setup({
-- on_attach = on_attach,
-- flags = lsp_flags,
-- -- Server-specific settings...
-- settings = {
-- ['rust-analyzer'] = {}
-- }
-- })
require('lspconfig')['lua_ls'].setup({
on_attach = on_attach,
flags = lsp_flags,
settings = {
Lua = {
completion = {
callSnippet = "Replace"
},
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file('', true),
},
},
},
})
require('lspconfig')['bashls'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['marksman'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['sqlls'].setup({
on_attach = function(client, bufn)
on_attach(client, bufn)
require('sqlls').on_attach(client, bufn)
end,
flags = lsp_flags,
})
require('lspconfig')['taplo'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['zls'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['terraformls'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = {"*.tf", "*.tfvars"},
callback = function()
vim.lsp.buf.format()
end,
})

View File

@ -1,77 +0,0 @@
-- From: https://github.com/Saecki/crates.nvim
local function show_documentation()
local filetype = vim.bo.filetype
if vim.tbl_contains({ 'vim','help' }, filetype) then
vim.cmd('h '..vim.fn.expand('<cword>'))
elseif vim.tbl_contains({ 'man' }, filetype) then
vim.cmd('Man '..vim.fn.expand('<cword>'))
elseif vim.fn.expand('%:t') == 'Cargo.toml' and require('crates').popup_available() then
require('crates').show_popup()
else
vim.lsp.buf.hover()
end
end
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
-- thallada: NOTE: copied also in lsp/init.lua since I can't figure out how to import it here
local on_attach = function(_, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'K', show_documentation, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<M-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>a', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('v', '<leader>a', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>F', function() vim.lsp.buf.format { async = true } end, bufopts)
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
-- vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
-- vim.keymap.set('n', 'gW', vim.lsp.buf.workspace_symbol, bufopts)
-- vim.keymap.set('n', 'g0', vim.lsp.buf.document_symbol, bufopts)
vim.keymap.set(
'n',
'gr',
[[<Cmd>lua require('telescope.builtin').lsp_references()<CR>]],
{ noremap = true, silent = true }
)
vim.keymap.set(
'n',
'gd',
[[<Cmd>lua require('telescope.builtin').lsp_definitions()<CR>]],
{ noremap = true, silent = true }
)
vim.keymap.set(
'n',
'<leader>D',
[[<Cmd>lua require('telescope.builtin').lsp_type_definitions()<CR>]],
{ noremap = true, silent = true }
)
vim.keymap.set(
'n',
'gW',
[[<Cmd>lua require('telescope.builtin').lsp_dynamic_workspace_symbols()<CR>]],
{ noremap = true, silent = true }
)
vim.keymap.set(
'n',
'g0',
[[<Cmd>lua require('telescope.builtin').lsp_document_symbols()<CR>]],
{ noremap = true, silent = true }
)
end
return on_attach

View File

@ -1,24 +0,0 @@
require('lualine').setup({
sections = {
lualine_c = {
require('auto-session.lib').current_session_name,
{
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path
},
},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { {
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 1 -- 0 = just filename, 1 = relative path, 2 = absolute path
} },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
})

22
lua/plugins/lualine.lua Normal file
View File

@ -0,0 +1,22 @@
return {
"nvim-lualine/lualine.nvim",
opts = {
options = {
globalstatus = false,
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {
{
"filename",
file_status = true, -- displays file status (readonly status, modified status)
path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path
},
},
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
},
}

7
lua/plugins/luasnip.lua Normal file
View File

@ -0,0 +1,7 @@
-- Disable <tab> and <s-tab> behavior in luasnip for supertab: https://www.lazyvim.org/configuration/recipes#supertab
return {
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
}

View File

@ -0,0 +1,11 @@
return {
"echasnovski/mini.indentscope",
opts = {
draw = {
-- Speed up distracting animation
animation = function()
return 1
end,
},
},
}

9
lua/plugins/neo-tree.lua Normal file
View File

@ -0,0 +1,9 @@
return {
"nvim-neo-tree/neo-tree.nvim",
opts = {
source_selector = {
winbar = true,
statusline = false,
},
},
}

View File

@ -1,12 +0,0 @@
require('neoai').setup()
vim.keymap.set('n', '<leader>ai', '<cmd>NeoAI<cr>',
{ silent = true, noremap = true, desc = "Toggle Neo[AI]" }
)
vim.keymap.set('n', '<leader>ac', '<cmd>NeoAIContext<cr>',
{ silent = true, noremap = true, desc = "Toggle Neo[A]i with [C]ontext of current buffer" }
)
-- Can't get this to work :/
-- vim.keymap.set('x', '<leader>ai', [[<cmd>'<,'>NeoAIContext<cr>]],
-- { silent = true, noremap = true, desc = "Toggle Neo[AI] with context of selected text" }
-- )

View File

@ -1 +0,0 @@
require('neodev').setup({})

18
lua/plugins/neogen.lua Normal file
View File

@ -0,0 +1,18 @@
return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
config = true,
-- Uncomment next line if you want to follow only stable versions
-- version = "*"
opts = {
snippet_engine = "luasnip",
},
keys = {
{ "<leader>nf", "<cmd>lua require('neogen').generate()<CR>", desc = "Generate Neogen function annotation" },
{
"<leader>nc",
"<cmd>lua require('neogen').generate({ type = 'class' })<CR>",
desc = "Generate Neogen class annotation",
},
},
}

View File

@ -1,17 +0,0 @@
local neotest = require('neotest')
neotest.setup({
adapters = {
require('neotest-rust'),
},
})
vim.keymap.set("n", "<leader>t", function() neotest.run.run() end, { desc = "Run neo[T]ests under cursor"})
vim.keymap.set("n", "<leader>tf", function() neotest.run.run(vim.fn.expand('%')) end, { desc = "Run neo[T]ests in current file" })
vim.keymap.set("n", "<leader>tt", function() neotest.run.run({ strategy = 'dap' }) end, { desc = "Run neo[T]ests in DAP debugging mode" })
vim.keymap.set("n", "<leader>ta", function() neotest.run.attach() end, { desc = "[A]ttach to neo[T]est process" })
vim.keymap.set("n", "<leader>to", function() neotest.output.open({ enter = true }) end, { desc = "[O]pen neo[T]ests summary window" })
vim.keymap.set("n", "<leader>ts", function() neotest.summary.toggle() end, { desc = "Toggle neo[T]est [S]ummary window"})
vim.diagnostic.config({
neotest = true,
}, vim.api.nvim_create_namespace('neotest'))

View File

@ -1,84 +0,0 @@
local null_ls = require("null-ls")
-- From: https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Formatting-on-save
local async_formatting = function(bufnr)
bufnr = bufnr or vim.api.nvim_get_current_buf()
vim.lsp.buf_request(
bufnr,
"textDocument/formatting",
vim.lsp.util.make_formatting_params({}),
function(err, res, ctx)
if err then
local err_msg = type(err) == "string" and err or err.message
-- you can modify the log message / level (or ignore it completely)
vim.notify("formatting: " .. err_msg, vim.log.levels.WARN)
return
end
-- don't apply results if buffer is unloaded or has been modified
if not vim.api.nvim_buf_is_loaded(bufnr) or vim.api.nvim_buf_get_option(bufnr, "modified") then
return
end
if res then
local client = vim.lsp.get_client_by_id(ctx.client_id)
vim.lsp.util.apply_text_edits(res, bufnr, client and client.offset_encoding or "utf-16")
vim.api.nvim_buf_call(bufnr, function()
vim.cmd("silent noautocmd update")
end)
end
end
)
end
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
null_ls.setup({
-- thallada: broken
-- on_attach = function(client, bufnr)
-- if client.supports_method("textDocument/formatting") then
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
-- vim.api.nvim_create_autocmd("BufWritePost", {
-- group = augroup,
-- buffer = bufnr,
-- callback = function()
-- async_formatting(bufnr)
-- end,
-- })
-- end
-- end,
sources = {
-- Linter
-- null_ls.builtins.diagnostics.eslint_d,
-- null_ls.builtins.diagnostics.prettierd,
null_ls.builtins.diagnostics.jsonlint,
null_ls.builtins.diagnostics.markdownlint,
null_ls.builtins.diagnostics.stylelint,
null_ls.builtins.diagnostics.tidy,
-- Somehow breaks tsx syntax highlighting in new buffers... wtf???
-- Issue made here: https://github.com/jose-elias-alvarez/null-ls.nvim/issues/1527
null_ls.builtins.diagnostics.todo_comments,
null_ls.builtins.diagnostics.tsc,
null_ls.builtins.diagnostics.fish,
null_ls.builtins.diagnostics.codespell,
-- Formatter
null_ls.builtins.formatting.eslint_d,
null_ls.builtins.formatting.markdownlint,
null_ls.builtins.formatting.prettierd,
null_ls.builtins.formatting.sqlfluff.with({
extra_args = { "--dialect", "postgres" },
}),
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.tidy,
null_ls.builtins.formatting.taplo,
-- Refactoring
null_ls.builtins.code_actions.refactoring,
-- Shells
-- Git
null_ls.builtins.code_actions.gitsigns,
-- Plugins
require('typescript.extensions.null-ls.code-actions'),
},
})

View File

@ -1,6 +0,0 @@
require("numb").setup({
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true, -- Enable 'cursorline' for the window while peeking
number_only = false, -- Peek only when the command is only a number instead of when it starts with a number
centered_peeking = true, -- Peeked line will be centered relative to window
})

11
lua/plugins/numb.lua Normal file
View File

@ -0,0 +1,11 @@
return {
"nacro90/numb.nvim",
config = function()
require("numb").setup({
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true, -- Enable 'cursorline' for the window while peeking
number_only = false, -- Peek only when the command is only a number instead of when it starts with a number
centered_peeking = true, -- Peeked line will be centered releative to window
})
end,
}

View File

@ -1,28 +0,0 @@
local npairs = require("nvim-autopairs")
local Rule = require('nvim-autopairs.rule')
local cmp = require('cmp')
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
npairs.setup({
check_ts = true,
ts_config = {
lua = {'string'},-- it will not add a pair on that treesitter node
javascript = {'template_string'},
java = false,-- don't check treesitter on java
}
})
local ts_conds = require('nvim-autopairs.ts-conds')
-- press % => %% only while inside a comment or string
npairs.add_rules({
Rule("%", "%", "lua")
:with_pair(ts_conds.is_ts_node({'string','comment'})),
Rule("$", "$", "lua")
:with_pair(ts_conds.is_not_ts_node({'function'}))
})
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)

View File

@ -1,144 +1,83 @@
local cmp = require('cmp')
local lspkind = require('lspkind')
local has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_text(0, line-1, 0, line-1, col, {})[1]:match("^%s*$") == nil
end
cmp.setup({
experimental = { ghost_text = true },
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn['vsnip#anonymous'](args.body) -- For `vsnip` users.
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() and has_words_before() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "copilot", priority = 100, group_index = 1 },
{
name = 'nvim_lsp_signature_help',
priority = 90,
group_index = 2,
},
{
name = 'nvim_lsp',
priority = 90,
group_index = 2,
},
{
name = 'buffer',
priority = 80,
group_index = 3,
},
{
name = 'path',
priority = 80,
group_index = 3,
},
{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}),
sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
require("copilot_cmp.comparators").score,
-- Below is the default comparitor list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,function(...) return require('cmp_buffer'):compare_locality(...) end,
}
},
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text',
maxwidth = 50,
ellipsis_char = '',
-- symbol_map = { Copilot = '🤖' },
})
}
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline', keyword_pattern=[=[[^[:blank:]\!]*]=], keyword_length=3 }
})
})
-- Add additional capabilities supported by nvim-cmp
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local servers = { 'pyright', 'tsserver', 'html', 'cssls' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
-- on_attach = my_custom_on_attach,
capabilities = capabilities,
})
end
-- Configure nvim-cmp with "supertab"-like behavior for LuaSnip integration: https://www.lazyvim.org/configuration/recipes#supertab
-- Also, prevent autocomplete from automatically selecting the first item in the list on <CR>, and instead require the user to press <Tab> to select the first item.
return {
capabilities,
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-calc",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-cmdline",
"petertriho/cmp-git",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
-- This bit is for preventing auto-completion auto-triggering from copilot-cmp:
-- https://github.com/zbirenbaum/copilot-cmp?tab=readme-ov-file#tab-completion-configuration-highly-recommended
if cmp.visible() and has_words_before() then
-- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
})
-- Do not auto-select the first auto-complete item, require a <Tab> to select the first item.
opts.completion.completeopt = "menu,menuone,noinsert,noselect"
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, {
{ name = "emoji" },
{ name = "git" },
{ name = "calc" },
}))
-- `/` cmdline setup.
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
-- `:` cmdline setup.
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" },
},
},
}),
})
end,
}

View File

@ -1 +0,0 @@
require('colorizer').setup()

View File

@ -1 +0,0 @@
require('dapui').setup()

View File

@ -1 +0,0 @@
require('nvim-dap-virtual-text').setup()

View File

@ -1,27 +0,0 @@
-- thallada: this is setup in rust-tools
local dap = require('dap')
-- dap.adapters.codelldb = {
-- type = 'server',
-- port = '${port}',
-- executable = {
-- command = '/home/thallada/vscode-lldb/extension/adapter/codelldb',
-- args = { '--port', '${port}'}
-- }
-- }
-- dap.configurations.rust = {
-- {
-- name = "Launch file",
-- type = "codelldb",
-- request = "launch",
-- program = function()
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
-- end,
-- cwd = '${workspaceFolder}',
-- stopOnEntry = true,
-- },
-- }
vim.keymap.set('n', '<leader>b', [[<Cmd>lua require('dap').toggle_breakpoint()<CR>]], { desc = "Toggle DAP [B]reakpoint"})
vim.keymap.set('n', '<leader>be', [[<Cmd>lua require('dap').set_exception_breakpoints()<CR>]], { desc = "Toggle DAP [B]reak on [E]xceptions" })
vim.keymap.set('n', '<leader>bc', [[<Cmd>lua require('dap').clear_breakpoints()<CR>]], { desc = "[C]lear DAP [B]reakpoints" })
vim.keymap.set('n', '<leader>bo', [[<Cmd>lua require('dapui').toggle()<CR>]], { desc = "Toggle nvim dapui" })

View File

@ -1 +0,0 @@
require('nvim-lightbulb').setup({ autocmd = { enabled = true } })

View File

@ -1 +0,0 @@
require('pqf').setup()

View File

@ -1,5 +0,0 @@
require('treesitter-context').setup{
enable = true,
max_lines = 0,
min_window_height = 10,
}

View File

@ -1,105 +0,0 @@
require('nvim-treesitter.configs').setup {
ensure_installed = 'all',
ignore_install = { 'phpdoc' },
sync_install = false,
auto_install = true,
highlight = {
enable = true,
disable = { 'sql' }, -- since pgsql.vim is currently better at highlighting
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<c-space>",
node_incremental = "<c-space>",
scope_incremental = "<c-s>",
node_decremental = "<c-backspace>",
},
},
indent = {
enable = true
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
-- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
}
}
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
},
},
autotag = {
enable = true,
},
refactor = {
highlight_definitions = {
enable = true,
clear_on_cursor_move = true,
},
smart_rename = {
enable = true,
keymaps = {
smart_rename = 'grr',
},
},
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
pairs = {
enable = true,
disable = {},
highlight_pair_events = {}, -- e.g. {"CursorMoved"}, -- when to highlight the pairs, use {} to deactivate highlighting
highlight_self = false, -- whether to highlight also the part of the pair under cursor (or only the partner)
goto_right_end = false, -- whether to go to the end of the right partner or the beginning
fallback_cmd_normal = "call matchit#Match_wrapper('',1,'n')", -- What command to issue when we can't find a pair (e.g. "normal! %")
keymaps = {
goto_partner = "<leader>%",
delete_balanced = "X",
},
delete_balanced = {
only_on_first_char = false, -- whether to trigger balanced delete when on first character of a pair
fallback_cmd_normal = nil, -- fallback command when no pair found, can be nil
longest_partner = false, -- whether to delete the longest or the shortest pair when multiple found.
-- E.g. whether to delete the angle bracket or whole tag in <pair> </pair>
}
},
}

View File

@ -1,4 +0,0 @@
require('octo').setup()
-- Doesn't work, need to set this in settings too
vim.api.nvim_set_hl(0, 'OctoEditable', { bg = '#313131' })

View File

@ -1,3 +0,0 @@
require("oil").setup()
vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })

8
lua/plugins/oil.lua Normal file
View File

@ -0,0 +1,8 @@
return {
"stevearc/oil.nvim",
opts = {},
dependencies = { "nvim-tree/nvim-web-devicons" },
keys = {
{ "-", "<cmd>Oil<cr>", { desc = "Open parent directory in current buffer" } },
},
}

View File

@ -1 +0,0 @@
vim.g.sql_type_default = 'pgsql';

6
lua/plugins/pqf.lua Normal file
View File

@ -0,0 +1,6 @@
return {
"yorickpeterse/nvim-pqf",
config = function()
require("pqf").setup()
end,
}

View File

@ -1,7 +0,0 @@
require('rest-nvim').setup({
skip_ssl_verification = true,
})
vim.keymap.set('n', '<leader>rd', [[<Plug>RestNvim]], { noremap = false, silent = true, desc = "Run rest.nvim under cursor" })
vim.keymap.set('n', '<leader>ry', [[<Plug>RestNvimPreview]], { noremap = false, silent = true, desc = "Show cURL command for rest.nvim under cursor"})
vim.keymap.set('n', '<leader>ri', [[<Plug>RestNvimLast]], { noremap = false, silent = true })

View File

@ -1,51 +0,0 @@
local rt = require('rust-tools')
local lsp_on_attach = require('plugins.lsp.on_attach')
local nvim_cmp_capabilities = require('plugins.nvim-cmp').capabilities
local extension_path = vim.env.HOME .. '/vscode-lldb/extension/'
local codelldb_path = extension_path .. 'adapter/codelldb'
local liblldb_path = extension_path .. 'lldb/lib/liblldb.so'
rt.setup({
tools = {
runnables = {
use_telescope = true
},
},
server = {
capabilities = nvim_cmp_capabilities,
on_attach = function(client, bufnr)
lsp_on_attach(client, bufnr)
vim.keymap.set('n', '<C-space>', rt.hover_actions.hover_actions, { buffer = bufnr, desc = "Show hover actions under cursor" })
-- Code action groups
vim.keymap.set('n', '<leader>a', rt.code_action_group.code_action_group, { buffer = bufnr, desc = "Show code actions under cursor" })
vim.keymap.set('n', '<leader>rc', rt.open_cargo_toml.open_cargo_toml, { buffer = bufnr, desc = "Open Cargo.toml for current project" })
vim.keymap.set('n', '<leader>rp', rt.parent_module.parent_module, { buffer = bufnr, desc = "Go to parent Rust module" })
vim.keymap.set('n', '<leader>rm', rt.expand_macro.expand_macro, { buffer = bufnr, desc = "Expand Rust macro" })
end,
settings = {
-- to enable rust-analyzer settings visit:
-- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc
['rust-analyzer'] = {
-- enable clippy on save
checkOnSave = {
command = 'clippy'
},
}
},
},
dap = {
adapter = require('rust-tools.dap').get_codelldb_adapter(
codelldb_path,
liblldb_path
)
}
})
vim.api.nvim_create_autocmd('BufRead', {
group = vim.api.nvim_create_augroup('CmpSourceCargo', { clear = true }),
pattern = 'Cargo.toml',
callback = function()
require('cmp').setup.buffer({ sources = { { name = 'crates' } } })
end,
})

View File

@ -1 +0,0 @@
require('session-lens').setup()

13
lua/plugins/ssr.lua Normal file
View File

@ -0,0 +1,13 @@
return {
"cshuaimin/ssr.nvim",
keys = {
{
"<leader>sR",
function()
require("ssr").open()
end,
mode = { "n", "x" },
desc = "Structural Replace",
},
},
}

View File

@ -1 +0,0 @@
require("nvim-surround").setup({})

View File

@ -1,175 +1,37 @@
local trouble = require('trouble.providers.telescope')
local telescope = require('telescope')
telescope.setup {
defaults = {
mappings = {
i = {
['<c-t>'] = trouble.open_with_trouble,
['<c-h>'] = 'which_key',
},
n = {
['<c-t>'] = trouble.open_with_trouble,
['<c-h>'] = 'which_key',
},
return {
"telescope.nvim",
dependencies = {
{
"debugloop/telescope-undo.nvim",
keys = { { "<leader>U", "<cmd>Telescope undo<cr>" } },
config = function()
require("telescope").load_extension("undo")
end,
},
{
"xiyaowong/telescope-emoji.nvim",
keys = { { "<leader>fj", "<cmd>Telescope emoji<cr>" } },
config = function()
require("telescope").load_extension("undo")
end,
},
},
keys = {
{
"<leader>fp",
function()
require("telescope.builtin").find_files({
cwd = require("lazy.core.config").options.root,
})
end,
desc = "Find Plugin File",
},
{
"<leader>8",
function()
require("telescope.bultin").grep_string()
end,
desc = "Search word under cursor",
},
},
extensions = {
project = {
theme = 'dropdown',
}
}
}
require('telescope').load_extension('fzf')
require('telescope').load_extension('gh')
require('telescope').load_extension('env')
require('telescope').load_extension('emoji')
require('telescope').load_extension('ui-select')
require('telescope').load_extension('project')
require('telescope').load_extension('session-lens')
vim.keymap.set(
'n',
'<leader>fgf',
[[<Cmd>lua require('telescope.builtin').git_files({ show_untracked = true })<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [G]it [F]iles" }
)
vim.keymap.set(
'n',
'<leader>f.',
[[<Cmd>lua require('telescope.builtin').git_files({ no_ignore = true })<CR>]],
{ noremap = true, silent = true, desc = "[F]ind ALL git files including ignored [.]" }
)
vim.keymap.set(
'n',
'_',
[[<Cmd>lua require('telescope.builtin').live_grep()<CR>]],
{ noremap = true, silent = true, desc = "Search by live grep" }
)
vim.keymap.set(
'n',
'<leader>_',
[[<Cmd>lua require('telescope.builtin').live_grep({ search_dirs = { vim.fn.expand('%:p:h') } })<CR>]],
{ noremap = true, silent = true, desc = "Search by live grep in current (present) working directory" }
)
vim.keymap.set(
'n',
'<leader>8',
[[<Cmd>lua require('telescope.builtin').grep_string()<CR>]],
{ noremap = true, silent = true, desc = "Search by grep" }
)
vim.keymap.set(
'n',
'<leader>3',
[[<Cmd>lua require('telescope.builtin').grep_string()<CR>]],
{ noremap = true, silent = true, desc = "Search by grep" }
)
vim.keymap.set(
"n",
"<leader>fd",
[[<Cmd>lua require('telescope.builtin').find_files({cwd=require('telescope.utils').buffer_dir()})<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [D]irectories" }
)
vim.keymap.set(
'n',
'<leader>fb',
[[<Cmd>lua require('telescope.builtin').buffers()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [B]uffers" }
)
vim.keymap.set(
'n',
'<leader>fh',
[[<Cmd>lua require('telescope.builtin').help_tags()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [T]ags" }
)
vim.keymap.set(
'n',
'<leader>ft',
[[<Cmd>lua require('telescope.builtin').treesitter()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [T]reesitter objects" }
)
vim.keymap.set(
'n',
'<leader>fr',
[[<Cmd>lua require('telescope.builtin').resume()<CR>]],
{ noremap = true, silent = true, desc = "[R]esume last [F]ind" }
)
vim.keymap.set(
'n',
'<leader>fs',
[[<Cmd>lua require('telescope.builtin').spell_suggest()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [S]pelling suggestion" }
)
vim.keymap.set(
'n',
'<Leader>fgc',
[[<Cmd>lua require('telescope.builtin').git_commits()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [G]it [C]ommits" }
)
vim.keymap.set(
"n",
'<Leader>fga',
[[<Cmd>lua require('telescope.builtin').git_bcommits()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [G]it commits for current buffer" }
)
vim.keymap.set(
'n',
'<Leader>fgb',
[[<Cmd>lua require('telescope.builtin').git_branches()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [G]it [B]ranches" }
)
vim.keymap.set(
'n',
'<Leader>fe',
[[<Cmd>Telescope emoji<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [E]moji" }
)
vim.keymap.set(
'n',
'<Leader>f"',
[[<Cmd>lua require('telescope.builtin').registers()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind registers [\"]" }
)
vim.keymap.set(
'n',
'<Leader>fm',
[[<Cmd>lua require('telescope.builtin').keymaps()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind key [M]appings" }
)
vim.keymap.set(
'n',
'<Leader><tab>',
[[<Cmd>lua require('telescope.builtin').find_files()<CR>]],
{ noremap = true, silent = true, desc = "find files shortcut" }
)
vim.keymap.set(
'n',
'<Leader>ff',
[[<Cmd>lua require('telescope.builtin').find_files()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [F]iles" }
)
vim.keymap.set(
'n',
'<Leader>fi',
[[<Cmd>lua require('telescope.builtin').builtin()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind telescope f[i]nders" }
)
vim.keymap.set(
'n',
'<Leader>fl',
[[<Cmd>lua require('telescope.builtin').reloader()<CR>]],
{ noremap = true, silent = true, desc = "[F]ind [L]ua module to reload" }
)
vim.keymap.set(
'n',
'<C-p>',
[[<Cmd>lua require('telescope').extensions.project.project({ display_type = 'full' })<CR>]],
{ noremap = true, silent = true, desc = "Find projects" }
)
vim.keymap.set(
'n',
'<leader>`',
[[<Cmd>lua require('session-lens').search_session()<CR>]],
{ noremap = true, silent = true, desc = "Find sessions" }
)

View File

@ -1,60 +0,0 @@
require("toggleterm").setup({
direction = "horizontal",
open_mapping = [[<C-\>]],
hide_numbers = true,
-- shell = 'fish',
})
vim.keymap.set('n', [[<M-=>]], [[<Cmd>ToggleTerm direction=float<CR>]], { desc = "Toggle terminal in floating window" })
vim.keymap.set('n', [[<M-\>]], [[<Cmd>ToggleTerm direction=horizontal<CR>]], { desc = "Toggle terminal in horizontal bottom window" })
-- tmux muscle-memory for fullscreening nvim window
-- replaced with true-zen.nvim
-- vim.keymap.set('n', [[<C-a>z]], [[<Cmd>ToggleTermToggleAll<CR>]])
-- vim.keymap.set('t', [[<C-a>z]], [[<Cmd>tab split<CR>]])
vim.keymap.set('t', '<Esc>', [[<C-\><C-n>]], { desc = "Escape terminal mode" })
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd h<CR>]], { desc = "Move focus down one window" })
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], { desc = "Move focus up one window" })
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], { desc = "Move focus left one window" })
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], { desc = "Move focus right one window" })
-- vim.keymap.set('n', '<F12>', [[<Cmd>ToggleTerm<CR>]], { noremap = true, silent = true })
-- vim.keymap.set('t', '<F12>', [[<Cmd>ToggleTerm<CR>]], { noremap = true, silent = true })
-- Custom gitui terminal
local Terminal = require('toggleterm.terminal').Terminal
local gitui = Terminal:new({
cmd = 'gitui',
direction = 'float',
float_opts = {
border = "curved",
width = function() return math.ceil(vim.o.columns * 0.8) end,
height = function() return math.ceil(vim.o.lines * 0.8) end,
winblend = 3,
},
hidden = true,
})
function _gitui_toggle()
gitui:toggle()
end
vim.keymap.set('n', '<leader>G', '<cmd>lua _gitui_toggle()<CR>', { noremap = true, silent = true, desc = "Toggle gitui floating terminal" })
-- Custom clx commandline hacker news terminal
local clx = Terminal:new({
cmd = 'clx',
direction = 'float',
float_opts = {
border = "curved",
width = function() return math.ceil(vim.o.columns * 0.8) end,
height = function() return math.ceil(vim.o.lines * 0.8) end,
winblend = 3,
},
hidden = true,
})
function _clx_toggle()
clx:toggle()
end
vim.keymap.set('n', '<leader>H', '<cmd>lua _clx_toggle()<CR>', { noremap = true, silent = true, desc = "Toggle clx (console HackerNews) floating terminal" })

View File

@ -0,0 +1,42 @@
return {
"akinsho/toggleterm.nvim",
version = "*",
opts = {
direction = "horizontal",
open_mapping = [[<C-\>]],
hide_numbers = true,
},
cmd = {
"ToggleTerm",
"TermExec",
"ToggleTermSendCurrentLine",
"ToggleTermSendVisualLines",
"ToggleTermSendVisualSelection",
"ToggleTermOpenAll",
"ToggleTermCloseAll",
"ToggleTermToggleAll",
},
keys = {
[[<C-\>]],
{ "<M-=>", [[<Cmd>ToggleTerm direction=float<CR>]], desc = "Toggle terminal in floating window" },
{
"<M->",
[[<Cmd>ToggleTerm direction=horizontal<CR>]],
desc = "Toggle terminal in horizontal bottom window",
},
-- tmux muscle-memory for fullscreening nvim window
-- replaced with true-zen.nvim
-- vim.keymap.set('n', [[<C-a>z]], [[<Cmd>ToggleTermToggleAll<CR>]])
-- vim.keymap.set('t', [[<C-a>z]], [[<Cmd>tab split<CR>]])
{ "<Esc>", [[<C-\><C-n>]], mode = "t", desc = "Escape terminal mode" },
{ "<C-j>", [[<Cmd>wincmd h<CR>]], mode = "t", desc = "Move focus down one window" },
{ "<C-h>", [[<Cmd>wincmd h<CR>]], mode = "t", desc = "Move focus left one window" },
{ "<C-k>", [[<Cmd>wincmd k<CR>]], mode = "t", desc = "Move focus up one window" },
{ "<C-l>", [[<Cmd>wincmd l<CR>]], mode = "t", desc = "Move focus right one window" },
{ [[<C-\>]], [[<Cmd>ToggleTerm<CR>]] },
{ "<F12>", [[<Cmd>ToggleTerm<CR>]] },
{ "<F12>", [[<Cmd>ToggleTerm<CR>]], mode = "t" },
-- { "<leader>H", "<cmd>lua _clx_toggle()<CR>", { desc = "Toggle clx (console HackerNews) floating terminal" } },
-- { "<leader>G", "<cmd>lua _gitui_toggle()<CR>", { desc = "Toggle gitui floating terminal" } },
},
}

6
lua/plugins/tpope.lua Normal file
View File

@ -0,0 +1,6 @@
return {
"tpope/vim-unimpaired",
"tpope/vim-repeat",
"tpope/vim-eunuch",
"tpope/vim-sleuth",
}

View File

@ -0,0 +1,6 @@
return {
"IndianBoy42/tree-sitter-just",
config = function()
require("tree-sitter-just").setup({})
end,
}

View File

@ -1 +1,7 @@
require('treesj').setup()
return {
"Wansmer/treesj",
keys = {
{ "J", "<cmd>TSJToggle<cr>", desc = "Join Toggle" },
},
opts = { use_default_keymaps = false, max_join_length = 150 },
}

View File

@ -1,18 +0,0 @@
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble buffer diagnostics" }
)
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble workspace diagnostics" }
)
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble document diagnostics" }
)
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble diagnostics in loclist" }
)
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble diagnostics in quickfix" }
)
vim.keymap.set('n', 'gR', '<cmd>TroubleToggle lsp_references<cr>',
{ silent = true, noremap = true, desc = "Toggle trouble LSP [R]eferences under cursor" }
)

View File

@ -1,10 +0,0 @@
require('true-zen').setup()
vim.keymap.set('n', '<leader>zn', [[<Cmd>:TZNarrow<CR>]], { noremap = true, silent = true, desc = "[Z]oom [N]arrow current line" })
vim.keymap.set('v', '<leader>zn', [[<Cmd>:'<,'>TZNarrow<CR>]], { noremap = true, silent = true, desc = "[Z]oom [N]arrow selected lines" })
vim.keymap.set('n', '<leader>zf', [[<Cmd>:TZFocus<CR>]], { noremap = true, silent = true, desc = "[Z]oom [N]arrow current buffer in new tab" })
vim.keymap.set('n', '<leader>zm', [[<Cmd>:TZMinimalist<CR>]], { noremap = true, silent = true, desc = "[Z] Toggle minimalist nvim UI mode" })
vim.keymap.set('n', '<leader>za', [[<Cmd>:TZAtaraxis<CR>]], { noremap = true, silent = true, desc = "[Z]oom [A]taraxis current buffer minimalist mode" })
-- tmux muscle-memory for fullscreening nvim window
vim.keymap.set('n', [[<C-a>z]], [[<Cmd>:TZFocus<CR>]], { desc = "Toggle [Z]oom current buffer in new tab" })
vim.keymap.set('t', [[<C-a>z]], [[<Cmd>:TZFocus<CR>]], { desc = "Toggle [Z]oom current terminal buffer in new tab" })

14
lua/plugins/true-zen.lua Normal file
View File

@ -0,0 +1,14 @@
return {
"Pocco81/true-zen.nvim",
cmd = { "TZNarrow", "TZFocus", "TZMinimalist", "TZAtaraxis" },
keys = {
{ "<leader>zn", [[<Cmd>:TZNarrow<CR>]], desc = "[Z]oom [N]arrow current line" },
{ "<leader>zn", [[<Cmd>:'<,'>TZNarrow<CR>]], mode = "v", desc = "[Z]oom [N]arrow selected lines" },
{ "<leader>zf", [[<Cmd>:TZFocus<CR>]], desc = "[Z]oom [N]arrow current buffer in new tab" },
{ "<leader>zm", [[<Cmd>:TZMinimalist<CR>]], desc = "[Z] Toggle minimalist nvim UI mode" },
{ "<leader>za", [[<Cmd>:TZAtaraxis<CR>]], desc = "[Z]oom [A]taraxis current buffer minimalist mode" },
-- tmux memory for fullscreening nvim window
{ [[<C-a>z]], [[<Cmd>:TZFocus<CR>]], desc = "Toggle [Z]oom current buffer in new tab" },
{ [[<C-a>z]], [[<Cmd>:TZFocus<CR>]], mode = "t", desc = "Toggle [Z]oom current terminal buffer in new tab" },
},
}

View File

@ -1,32 +0,0 @@
local on_attach = require('plugins.lsp.on_attach')
require('typescript').setup({
server = { -- pass options to lspconfig's setup method
on_attach = on_attach,
root_dir = require('lspconfig').util.find_git_ancestor,
settings = {
javascript = {
inlayHints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all';
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = true,
},
},
typescript = {
inlayHints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all';
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = true,
},
},
},
},
})

View File

@ -1 +0,0 @@
vim.keymap.set('n', '<leader>u', [[<Cmd>MundoToggle<CR>]], { noremap = true, silent = true, desc = "Toggle [U]ndo UI"})

View File

@ -0,0 +1 @@
return { "justinsgithub/wezterm-types" }

View File

@ -1 +0,0 @@
require('which-key').setup()

View File

@ -1,11 +0,0 @@
require('winshift').setup()
vim.keymap.set('n', '<C-W><C-M>', [[<Cmd>WinShift<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-W>m', [[<Cmd>WinShift<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-W>X', [[<Cmd>WinShift swap<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-M-H>', [[<Cmd>WinShift left<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-M-J>', [[<Cmd>WinShift down<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-M-K>', [[<Cmd>WinShift up<CR>]], { noremap = true, silent = true })
vim.keymap.set('n', '<C-M-L>', [[<Cmd>WinShift right<CR>]], { noremap = true, silent = true })

View File

@ -1,44 +0,0 @@
-- Pasting with Control-V because of muscle-memory
vim.keymap.set('n', '<C-v>', '"+p')
vim.keymap.set('n', '<C-s-v>', '"+p')
vim.keymap.set('i', '<C-v>', '<C-r>*')
vim.keymap.set('i', '<C-s-v>', '<C-r>*')
vim.keymap.set('t', '<C-v>', '<C-\\><C-n>"+pi')
vim.keymap.set('t', '<C-s-v>', '<C-\\><C-n>"+pi')
-- Faster window navigation
vim.keymap.set('n', '<C-j>', '<C-w>j')
vim.keymap.set('n', '<C-k>', '<C-w>k')
vim.keymap.set('n', '<C-h>', '<C-w>h')
vim.keymap.set('n', '<C-l>', '<C-w>l')
vim.keymap.set('n', '<leader>,', ':noh<CR>', { silent = true, desc = "Clear highlighting" })
vim.keymap.set('n', '<leader>v', [[<Cmd>:e ~/.config/nvim/init.lua<CR>]], { silent = true, desc = "Open [V]im config" })
-- URL handling (since I disabled netrw)
-- source: https://sbulav.github.io/vim/neovim-opening-urls/
if vim.fn.has('mac') == 1 then
vim.keymap.set('n', '<D-v>', '"+p')
vim.keymap.set('n', '<D-s-v>', '"+p')
vim.keymap.set('i', '<D-v>', '<C-r>*')
vim.keymap.set('i', '<D-s-v>', '<C-r>*')
vim.keymap.set('t', '<D-v>', '<C-\\><C-n>"+pi')
vim.keymap.set('t', '<D-s-v>', '<C-\\><C-n>"+pi')
vim.keymap.set('', 'gx', [[<Cmd>call jobstart(['open', expand('<cfile>')], { 'detach': v:true })<CR>]], { noremap = true, silent = true })
elseif vim.fn.has("unix") == 1 then
vim.keymap.set('', 'gx', [[<Cmd>call jobstart(['xdg-open', expand('<cfile>')], { 'detach': v:true })<CR>]], { noremap = true, silent = true })
else
vim.keymap.set[''].gx = {[[<Cmd>lua print("Error: gx is not supported on this OS!")<CR>]]}
end
-- this is needed here since it doesn't work in plugins/sqls.lua for some reason
-- sqls is dead now apparently :(
-- vim.keymap.set('n', '<leader>s', [[<CMD>SqlsExecuteQuery<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor" })
-- vim.keymap.set('n', '<leader>S', [[<CMD>SqlsExecuteQueryVertical<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor in vertical split" })
-- vim.keymap.set('x', '<leader>s', [[<Plug>(sqls-execute-query)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query" })
-- vim.keymap.set('x', '<leader>S', [[<Plug>(sqls-execute-query-vertical)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query in vertical split" })
vim.keymap.set("n", "<leader>bo", "<cmd>%bd|e#<cr>", { desc = "Close all buffers but the current one" }) -- https://stackoverflow.com/a/42071865/516188
vim.g.neovide_input_macos_alt_is_meta = true

View File

@ -1,108 +0,0 @@
-- Nubmer column
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.signcolumn = 'yes' -- remove jitter
-- Wrapping / indenting
vim.opt.wrap = true
vim.opt.breakindent = true
vim.opt.tabstop = 2
vim.opt.softtabstop=2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.smarttab = true
vim.opt.textwidth = 120
vim.opt.colorcolumn = '+1'
-- Search
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.incsearch = true
vim.opt.hlsearch = true
-- Scrolling
vim.opt.scrolloff = 3
vim.opt.sidescrolloff = 15
vim.opt.sidescroll = 1
-- Mouse
vim.opt.mouse = 'a'
-- Window decorations
vim.opt.title = true
vim.opt.titlestring="%{substitute(getcwd(),$HOME,'~','')} - Neovide"
-- Leader
vim.g.mapleader = ' '
-- Fonts
vim.opt.guifont = 'Berkeley Mono Variable:h12'
-- Swap / backup / undo
vim.opt.undofile = true
-- Shell (may speed up nvim)
vim.opt.shell = '/bin/bash'
-- Rendering
vim.opt.lazyredraw = true
-- Folding
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = vim.call('nvim_treesitter#foldexpr')
-- Completion settings
-- " Set completeopt to have a better completion experience
-- " :help completeopt
-- " menuone: popup even 'hen there's only one match
-- " noinsert: Do not insert text until a selection is made
-- " noselect: Do not select, force user to select one from the menu
vim.opt.completeopt = 'menuone,noinsert,noselect'
-- Avoid showing extra messages when using completion
vim.o.shortmess = vim.o.shortmess .. 'c'
-- Python
vim.g.python3_host_prog = vim.fn.has('macunix') and '/opt/homebrew/bin/python3' or '/usr/bin/python3'
--Shell
vim.opt.shell = 'fish'
-- Format options
vim.cmd([[set formatoptions+=wantrqlc]])
-- Neovide settings
vim.g.neovide_scroll_animation_length = 0.3 -- default: 0.3
vim.g.neovide_cursor_animation_length = 0.06
vim.g.neovide_cursor_trail_size = 0.2 -- default: 0.8
vim.api.nvim_set_hl(0, 'OctoEditable', { bg = '#313131' })
-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = '*',
})
vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, {
command = 'set filetype=ruby',
pattern = {'Podfile', 'Fastfile', 'Matchfile', 'Pluginfile', 'Appfile', 'Deliverfile'},
})
vim.opt.fillchars:append { diff = "" }
vim.api.nvim_command([[colorscheme gruvbox]])
vim.api.nvim_create_user_command(
'Browse',
function (opts)
vim.fn.system { 'open', opts.fargs[1] }
end,
{ nargs = 1 }
)

3
stylua.toml Normal file
View File

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120