diff --git a/sources/nvim/.gitignore b/sources/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/sources/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/sources/nvim/.neoconf.json b/sources/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/sources/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/sources/nvim/LICENSE b/sources/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/sources/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sources/nvim/README.md b/sources/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/sources/nvim/README.md @@ -0,0 +1,4 @@ +# ๐Ÿ’ค LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/sources/nvim/init.lua b/sources/nvim/init.lua index 0d214c1..2514f9e 100644 --- a/sources/nvim/init.lua +++ b/sources/nvim/init.lua @@ -1,4 +1,2 @@ -require("settings.options") -require("settings.keymap") -require("settings.autocommands") -require("settings.lazy") +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/sources/nvim/lua/config/autocmds.lua b/sources/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..4221e75 --- /dev/null +++ b/sources/nvim/lua/config/autocmds.lua @@ -0,0 +1,8 @@ +-- 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 +-- with `vim.api.nvim_create_autocmd` +-- +-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) +-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") diff --git a/sources/nvim/lua/config/keymaps.lua b/sources/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..2c134f7 --- /dev/null +++ b/sources/nvim/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- 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 diff --git a/sources/nvim/lua/config/lazy.lua b/sources/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..25fef35 --- /dev/null +++ b/sources/nvim/lua/config/lazy.lua @@ -0,0 +1,67 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import extras + { import = "lazyvim.plugins.extras.lang.go" }, + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.docker" }, + { import = "lazyvim.plugins.extras.lang.git" }, + { import = "lazyvim.plugins.extras.lang.json" }, + { import = "lazyvim.plugins.extras.lang.markdown" }, + { import = "lazyvim.plugins.extras.lang.php" }, + { import = "lazyvim.plugins.extras.lang.sql" }, + { import = "lazyvim.plugins.extras.lang.yaml" }, + { import = "lazyvim.plugins.extras.linting.eslint" }, + { import = "lazyvim.plugins.extras.ui.mini-animate" }, + { import = "lazyvim.plugins.extras.coding.mini-comment" }, + { import = "lazyvim.plugins.extras.coding.mini-surround" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/sources/nvim/lua/config/options.lua b/sources/nvim/lua/config/options.lua new file mode 100644 index 0000000..3ea1454 --- /dev/null +++ b/sources/nvim/lua/config/options.lua @@ -0,0 +1,3 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here diff --git a/sources/nvim/lua/plugins/example.lua b/sources/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..17f53d6 --- /dev/null +++ b/sources/nvim/lua/plugins/example.lua @@ -0,0 +1,197 @@ +-- 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 }, + + -- 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 + { + "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 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").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "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 + 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, { + function() + return "๐Ÿ˜„" + end, + }) + 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", + }, + }, + }, +} diff --git a/sources/nvim/lua/settings/autocommands.lua b/sources/nvim/lua/settings/autocommands.lua deleted file mode 100644 index 55ff669..0000000 --- a/sources/nvim/lua/settings/autocommands.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.api.nvim_create_autocmd("FileType", { - pattern = "php", - callback = function() - vim.bo.tabstop = 4 - vim.bo.softtabstop = 4 - vim.bo.shiftwidth = 4 - vim.bo.expandtab = true - end, -}) diff --git a/sources/nvim/lua/settings/keymap.lua b/sources/nvim/lua/settings/keymap.lua deleted file mode 100644 index 9bda706..0000000 --- a/sources/nvim/lua/settings/keymap.lua +++ /dev/null @@ -1,37 +0,0 @@ -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -local options = { - noremap = true, - silent = true -} - --- Move the current line down one line in normal mode -vim.keymap.set('n', '', ":move .+1==", options) - --- Move the current line up one line in normal mode -vim.keymap.set('n', '', ":move .-2==", options) - --- Move the character under the cursor one character forward in normal mode -vim.keymap.set('n', '', "xp", options) - --- Move the character under the cursor one character backward in normal mode -vim.keymap.set('n', '', "xhP", options) - --- Move the current range down one line in visual-line mode -vim.keymap.set('x', '', ":move '>+1gv=gv", options) - --- Move the current range up one line in visual-line mode -vim.keymap.set('x', '', ":move '<-2gv=gv", options) - --- Move the current line down one line in insert mode -vim.keymap.set('i', '', ":move .+1==gi", options) - --- Move the current line up one line in insert mode -vim.keymap.set('i', '', ":move .-2==gi", options) - --- Move the character under the cursor one character forward in insert mode -vim.keymap.set('i', '', "lxpi", options) - --- Move the character under the cursor one character backward in insert mode -vim.keymap.set('i', '', "lxhPi", options) diff --git a/sources/nvim/lua/settings/lazy/init.lua b/sources/nvim/lua/settings/lazy/init.lua deleted file mode 100644 index f64a791..0000000 --- a/sources/nvim/lua/settings/lazy/init.lua +++ /dev/null @@ -1,16 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end - -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup("settings.lazy.plugins") diff --git a/sources/nvim/lua/settings/lazy/plugins/barbar.lua b/sources/nvim/lua/settings/lazy/plugins/barbar.lua deleted file mode 100644 index 829aba5..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/barbar.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - "romgrk/barbar.nvim", - event = "BufNew", - dependencies = { - "lewis6991/gitsigns.nvim", - "nvim-tree/nvim-web-devicons", - }, - init = function() - vim.g.barbar_auto_setup = false - - local map = vim.api.nvim_set_keymap - local opts = { noremap = true, silent = true } - - map("n", "", "BufferPrevious", opts) - map("n", "", "BufferNext", opts) - map("n", "", "BufferMovePrevious", opts) - map("n", ">", "BufferMoveNext", opts) - map("n", "", "BufferGoto 1", opts) - map("n", "", "BufferGoto 2", opts) - map("n", "", "BufferGoto 3", opts) - map("n", "", "BufferGoto 4", opts) - map("n", "", "BufferGoto 5", opts) - map("n", "", "BufferGoto 6", opts) - map("n", "", "BufferGoto 7", opts) - map("n", "", "BufferGoto 8", opts) - map("n", "", "BufferGoto 9", opts) - map("n", "", "BufferLast", opts) - map("n", "", "BufferPin", opts) - map("n", "", "BufferClose", opts) - map("n", "", "BufferPick", opts) - end, - opts = {}, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/barbecue.lua b/sources/nvim/lua/settings/lazy/plugins/barbecue.lua deleted file mode 100644 index 16a93ef..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/barbecue.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "utilyre/barbecue.nvim", - name = "barbecue", - event = "BufEnter", - dependencies = { - "SmiteshP/nvim-navic", - "nvim-tree/nvim-web-devicons", - "folke/tokyonight.nvim", - }, - opts = { - theme = "tokyonight", - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/cloak.lua b/sources/nvim/lua/settings/lazy/plugins/cloak.lua deleted file mode 100644 index 0584059..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/cloak.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - "laytan/cloak.nvim", - config = function() - require("cloak").setup({ - enabled = true, - cloak_character = "ยท", - -- The applied highlight group (colors) on the cloaking, see `:h highlight`. - highlight_group = "Comment", - -- Applies the length of the replacement characters for all matched - -- patterns, defaults to the length of the matched pattern. - cloak_length = nil, -- Provide a number if you want to hide the true length of the value. - -- Wether it should try every pattern to find the best fit or stop after the first. - try_all_patterns = true, - patterns = { - { - -- Match any file starting with '.env'. - -- This can be a table to match multiple file patterns. - file_pattern = { - ".env*", - ".npmrc" - }, - -- Match an equals sign and any character after it. - -- This can also be a table of patterns to cloak, - -- example: cloak_pattern = { ':.+', '-.+' } for yaml files. - cloak_pattern = { - "=.+", - ":.+" - }, - -- A function, table or string to generate the replacement. - -- The actual replacement will contain the 'cloak_character' - -- where it doesn't cover the original text. - -- If left emtpy the legacy behavior of keeping the first character is retained. - replace = nil, - }, - }, - }) - - require("which-key").add({ - { "c", "Cloak", }, - { "ct", ":CloakToggle", desc = "Toggle" }, - { "cd", ":CloakDisable", desc = "Disable" }, - { "ce", ":CloakEnable", desc = "Enable" }, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/comment.lua b/sources/nvim/lua/settings/lazy/plugins/comment.lua deleted file mode 100644 index 15f038f..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/comment.lua +++ /dev/null @@ -1,46 +0,0 @@ -return { - "numToStr/Comment.nvim", - opts = { - ---Add a space b/w comment and the line - padding = true, - ---Whether the cursor should stay at its position - sticky = true, - ---Lines to be ignored while (un)comment - ignore = nil, - ---LHS of toggle mappings in NORMAL mode - toggler = { - ---Line-comment toggle keymap - line = "gcc", - ---Block-comment toggle keymap - block = "gbc", - }, - ---LHS of operator-pending mappings in NORMAL and VISUAL mode - opleader = { - ---Line-comment keymap - line = "gc", - ---Block-comment keymap - block = "gb", - }, - ---LHS of extra mappings - 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", - }, - ---Enable keybindings - ---NOTE: If given `false` then the plugin won't create any mappings - mappings = { - ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}` - basic = true, - ---Extra mapping; `gco`, `gcO`, `gcA` - extra = true, - }, - ---Function to call before (un)comment - pre_hook = nil, - ---Function to call after (un)comment - post_hook = nil, - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/conform.lua b/sources/nvim/lua/settings/lazy/plugins/conform.lua deleted file mode 100644 index fb89339..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/conform.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - "stevearc/conform.nvim", - init = function() - local whichKey = require("which-key") - local conform = require("conform") - - whichKey.add({ - { "f", group = "Format" }, - { - "ff", - function() - local currentFileBufferNumber = vim.fn.bufnr("%") - conform.format({ bufnr = currentFileBufferNumber }) - end, - desc = "Current File", - }, - }) - end, - config = function() - local conform = require("conform") - - conform.setup({ - formatters_by_ft = { - lua = { "stylua" }, - javascript = { "eslint_d" }, - php = { "phpcbf" }, - elm = { "elm_format" }, - fish = { "fish_indent" }, - }, - }) - - conform.formatters.phpcbf = { - prepend_args = { - "--standard=PSR12", - }, - } - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/dressing.lua b/sources/nvim/lua/settings/lazy/plugins/dressing.lua deleted file mode 100644 index 9ab15aa..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/dressing.lua +++ /dev/null @@ -1,168 +0,0 @@ -return { - "stevearc/dressing.nvim", - event = "VeryLazy", - opts = { - input = { - -- Set to false to disable the vim.ui.input implementation - enabled = true, - - -- Default prompt string - default_prompt = "Input:", - - -- Can be 'left', 'right', or 'center' - title_pos = "left", - - -- When true, will close the modal - insert_only = true, - - -- When true, input will start in insert mode. - start_in_insert = true, - - -- These are passed to nvim_open_win - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "cursor", - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - prefer_width = 40, - width = nil, - -- min_width and max_width can be a list of mixed types. - -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" - max_width = { 140, 0.9 }, - min_width = { 20, 0.2 }, - - buf_options = {}, - win_options = { - -- Window transparency (0-100) - winblend = 10, - -- Disable line wrapping - wrap = false, - -- Indicator for when text exceeds window - list = true, - listchars = "precedes:โ€ฆ,extends:โ€ฆ", - -- Increase this for more context when text scrolls off the window - sidescrolloff = 0, - }, - - -- Set to `false` to disable - mappings = { - n = { - [""] = "Close", - [""] = "Confirm", - }, - i = { - [""] = "Close", - [""] = "Confirm", - [""] = "HistoryPrev", - [""] = "HistoryNext", - }, - }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - - -- see :help dressing_get_config - get_config = nil, - }, - select = { - -- Set to false to disable the vim.ui.select implementation - enabled = true, - - -- Priority list of preferred vim.select implementations - backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, - - -- Trim trailing `:` from prompt - trim_prompt = true, - - -- Options for telescope selector - -- These are passed into the telescope picker directly. Can be used like: - -- telescope = require('telescope.themes').get_ivy({...}) - telescope = nil, - - -- Options for fzf selector - fzf = { - window = { - width = 0.5, - height = 0.4, - }, - }, - - -- Options for fzf-lua - fzf_lua = { - -- winopts = { - -- height = 0.5, - -- width = 0.5, - -- }, - }, - - -- Options for nui Menu - nui = { - position = "50%", - size = nil, - relative = "editor", - border = { - style = "rounded", - }, - buf_options = { - swapfile = false, - filetype = "DressingSelect", - }, - win_options = { - winblend = 10, - }, - max_width = 80, - max_height = 40, - min_width = 40, - min_height = 10, - }, - - -- Options for built-in selector - builtin = { - -- These are passed to nvim_open_win - border = "rounded", - -- 'editor' and 'win' will default to being centered - relative = "editor", - - buf_options = {}, - win_options = { - -- Window transparency (0-100) - winblend = 10, - cursorline = true, - cursorlineopt = "both", - }, - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- the min_ and max_ options can be a list of mixed types. - -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" - width = nil, - max_width = { 140, 0.8 }, - min_width = { 40, 0.2 }, - height = nil, - max_height = 0.9, - min_height = { 10, 0.2 }, - - -- Set to `false` to disable - mappings = { - [""] = "Close", - [""] = "Close", - [""] = "Confirm", - }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf - end, - }, - - -- Used to override format_item. See :help dressing-format - format_item_override = {}, - - -- see :help dressing_get_config - get_config = nil, - }, - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/icon-picker.lua b/sources/nvim/lua/settings/lazy/plugins/icon-picker.lua deleted file mode 100644 index ed37bf8..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/icon-picker.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "ziontee113/icon-picker.nvim", - event = "VeryLazy", - config = function() - local iconPicker = require("icon-picker") - local whichKey = require("which-key") - - iconPicker.setup({ - disable_legacy_commands = true - }) - - whichKey.add({ - { "i", group = "Icon" }, - { "ie", function() vim.cmd("IconPickerInsert emoji") end, group = "Emoji" }, - { "is", function() vim.cmd("IconPickerInsert symbols") end, group = "Symbol" }, - { "in", function() vim.cmd("IconPickerInsert nerd_font") end, group = "Nerd Font Symbol" }, - }) - end -} diff --git a/sources/nvim/lua/settings/lazy/plugins/link-visitor.lua b/sources/nvim/lua/settings/lazy/plugins/link-visitor.lua deleted file mode 100644 index dbc2738..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/link-visitor.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "xiyaowong/link-visitor.nvim", - event = "BufEnter", - opts = { - open_cmd = nil, - silent = true, - skip_confirmation = true, - border = "rounded", - }, - config = function() - local whichKey = require("which-key") - local linkVisitor = require("link-visitor"); - - whichKey.add({ - { "v", group = "Link", }, - { "vv", function() linkVisitor.visit() end, }, - { "vl", function() linkVisitor.link_under_cursor() end, }, - { "vn", function() linkVisitor.link_near_cursor() end, }, - { "vN", function() linkVisitor.link_nearest() end, }, - }) - end -} diff --git a/sources/nvim/lua/settings/lazy/plugins/lsp-colors.lua b/sources/nvim/lua/settings/lazy/plugins/lsp-colors.lua deleted file mode 100644 index 80c6339..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/lsp-colors.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "folke/lsp-colors.nvim", - dependencies = { - "neovim/nvim-lspconfig", - }, - opts = { - Error = "#db4b4b", - Warning = "#e0af68", - Information = "#0db9d7", - Hint = "#10B981", - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/lspkind.lua b/sources/nvim/lua/settings/lazy/plugins/lspkind.lua deleted file mode 100644 index f31e825..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/lspkind.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - "onsails/lspkind.nvim", - config = function() - require('lspkind').init({ - mode = 'symbol_text', - preset = 'codicons', - symbol_map = { - Text = "๓ฐ‰ฟ", - Method = "๓ฐ†ง", - Function = "๓ฐŠ•", - Constructor = "๏ฃ", - Field = "๓ฐœข", - Variable = "๓ฐ€ซ", - Class = "๓ฐ ฑ", - Interface = "๏ƒจ", - Module = "๏’‡", - Property = "๓ฐœข", - Unit = "๓ฐ‘ญ", - Value = "๓ฐŽ ", - Enum = "๏…", - Keyword = "๓ฐŒ‹", - Snippet = "๏‘", - Color = "๓ฐ˜", - File = "๓ฐˆ™", - Reference = "๓ฐˆ‡", - Folder = "๓ฐ‰‹", - EnumMember = "๏…", - Constant = "๓ฐฟ", - Struct = "๓ฐ™…", - Event = "๏ƒง", - Operator = "๓ฐ†•", - TypeParameter = "", - }, - }) - end -} diff --git a/sources/nvim/lua/settings/lazy/plugins/lualine.lua b/sources/nvim/lua/settings/lazy/plugins/lualine.lua deleted file mode 100644 index fc5cc76..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/lualine.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - dependencies = { - "nvim-tree/nvim-web-devicons" - }, - opts = { - options = { - icons_enabled = true, - theme = "tokyonight", - component_separators = { left = "๎‚ฑ", right = "๎‚ณ" }, - section_separators = { left = "๎‚ฐ", right = "๎‚ฒ" }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename" }, - lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_y = { "progress" }, - lualine_z = { "location" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = { "location" }, - lualine_y = {}, - lualine_z = {}, - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {}, - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/mason-lspconfig.lua b/sources/nvim/lua/settings/lazy/plugins/mason-lspconfig.lua deleted file mode 100644 index c589f39..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/mason-lspconfig.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - "williamboman/mason-lspconfig.nvim", - dependencies = { - "williamboman/mason.nvim", - }, - opts = { - automatic_instalation = true, - ensure_installed = { - "angularls", - "ansiblels", - "bashls", - "biome", - "cssls", - "denols", - "docker_compose_language_service", - "dockerls", - "elmls", - "emmet_language_server", - "eslint", - "gopls", - "graphql", - "html", - "intelephense", - "jsonls", - "lua_ls", - "marksman", - "nginx_language_server", - "prismals", - "rust_analyzer", - "sqlls", - "svelte", - "templ", - "ts_ls", - "vuels", - "yamlls", - }, - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/mason-tool-installer.lua b/sources/nvim/lua/settings/lazy/plugins/mason-tool-installer.lua deleted file mode 100644 index b3f3274..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/mason-tool-installer.lua +++ /dev/null @@ -1,27 +0,0 @@ -return { - "WhoIsSethDaniel/mason-tool-installer.nvim", - dependencies = { - "williamboman/mason.nvim", - }, - opts = { - ensure_installed = { - "stylua", - "luacheck", - "stylelint", - "shellcheck", - "rustfmt", - "jq", - "jsonlint", - "htmlbeautifier", - "eslint", - "markdownlint", - "yamllint", - "ansible-lint", - "eslint_d", - "phpcbf", - "phpcs", - }, - auto_update = true, - run_on_start = true, - } -} diff --git a/sources/nvim/lua/settings/lazy/plugins/mason.lua b/sources/nvim/lua/settings/lazy/plugins/mason.lua deleted file mode 100644 index b23f053..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/mason.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "williamboman/mason.nvim", - opts = {} -} diff --git a/sources/nvim/lua/settings/lazy/plugins/neogit.lua b/sources/nvim/lua/settings/lazy/plugins/neogit.lua deleted file mode 100644 index 6d3d38f..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/neogit.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - "NeogitOrg/neogit", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", -- required - "nvim-telescope/telescope.nvim", -- optional - "sindrets/diffview.nvim", -- optional - "ibhagwan/fzf-lua", -- optional - }, - config = function() - local whichKey = require("which-key") - local neogit = require("neogit") - - neogit.setup({}) - - whichKey.add({ - { "g", group = "Neogit", }, - { "go", function() neogit.open() end, }, - }) - end -} diff --git a/sources/nvim/lua/settings/lazy/plugins/neoscroll.lua b/sources/nvim/lua/settings/lazy/plugins/neoscroll.lua deleted file mode 100644 index ebe7ea6..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/neoscroll.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "karb94/neoscroll.nvim", - event = "BufEnter", - opts = {}, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/noice.lua b/sources/nvim/lua/settings/lazy/plugins/noice.lua deleted file mode 100644 index dd8a60e..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/noice.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - "folke/noice.nvim", - event = "VeryLazy", - opts = { - lsp = { - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - }, - dependencies = { - "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", - } -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvim-autopairs.lua b/sources/nvim/lua/settings/lazy/plugins/nvim-autopairs.lua deleted file mode 100644 index bfa4ac4..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvim-autopairs.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "windwp/nvim-autopairs", - event = "InsertEnter", - opts = {}, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvim-lint.lua b/sources/nvim/lua/settings/lazy/plugins/nvim-lint.lua deleted file mode 100644 index c321f5c..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvim-lint.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - "mfussenegger/nvim-lint", - dependencies = { - "WhoIsSethDaniel/mason-tool-installer.nvim", - }, - event = { "BufReadPre", "BufWritePost" }, - init = function() - local lint = require("lint") - - vim.api.nvim_create_autocmd({ "BufWritePost" }, { - callback = function() - lint.try_lint() - end - }) - end, - config = function() - local lint = require("lint") - local phpcs = lint.linters.phpcs - - phpcs.args = { - "-q", - -- <- Add a new parameter here - "--standard=PSR12", - "--report=json", - "-", - } - - lint.linters_by_ft = { - lua = { "luacheck" }, - javascript = { "eslint" }, - typescript = { "eslint" }, - javascriptreact = { "eslint" }, - typescriptreact = { "eslint" }, - vue = { "eslint" }, - sh = { "shellcheck" }, - fish = { "fish" }, - json = { "jsonlint" }, - markdown = { "markdownlint" }, - php = { "php", "phpcs", "phpstan" }, - css = { "stylelint" }, - yaml = { "yamllint" }, - } - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvim-lspconfig.lua b/sources/nvim/lua/settings/lazy/plugins/nvim-lspconfig.lua deleted file mode 100644 index 367db74..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvim-lspconfig.lua +++ /dev/null @@ -1,80 +0,0 @@ -return { - "neovim/nvim-lspconfig", - event = "VeryLazy", - dependencies = { - "williamboman/mason-lspconfig.nvim", - "hrsh7th/nvim-cmp", - "folke/neodev.nvim" - }, - config = function() - local capabilities = require("cmp_nvim_lsp").default_capabilities() - local whichKey = require("which-key") - local signs = { Error = "๓ฐ…š ", Warn = "๓ฐ€ช ", Hint = "๓ฐŒถ ", Info = "๏‘‰ " } - - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - end - - local on_attach = function(_, buffer) - whichKey.add({ - { "l", group = "LSP" }, - { "lb", group = "LSP Buffer" }, - { "lbD", function() vim.lsp.buf.declaration() end, buffer = 1, desc = "Go to symbol declaration" }, - { "lbR", function() vim.lsp.buf.references() end, buffer = 1, desc = "Go to symbol references" }, - { "lbc", function() vim.lsp.buf.code_action() end, buffer = 1, desc = "LSP code action" }, - { "lbd", function() vim.lsp.buf.definition() end, buffer = 1, desc = "Go to symbol definition" }, - { "lbf", function() vim.lsp.buf.format() end, buffer = 1, desc = "Format file" }, - { "lbh", function() vim.lsp.buf.hover() end, buffer = 1, desc = "Hover symbol documentation" }, - { "lbi", function() vim.lsp.buf.implementation() end, buffer = 1, desc = "Go to symbol implementation" }, - { "lbr", function() vim.lsp.buf.rename() end, buffer = 1, desc = "Rename symbol" }, - { "lbs", function() vim.lsp.buf.signature_help() end, buffer = 1, desc = "Go to symbol signature" }, - { "lbt", function() vim.lsp.buf.type_definition() end, buffer = 1, desc = "Go to symbol type definition" }, - { "ld", group = "LSP Diagnostic" }, - { "ldn", function() vim.diagnostic.goto_next() end, desc = "Next LSP diagnostic" }, - { "ldo", function() vim.diagnostic.open_float() end, desc = "Open LSP diagnostic" }, - { "ldp", function() vim.diagnostic.goto_prev() end, desc = "Previous LSP diagnostic" }, - }) - end - - -- Needed in order to get more completion in Lua files for Vim/Neovim - require("neodev").setup() - - local languageServers = { - "angularls", - "ansiblels", - "bashls", - "biome", - "cssls", - --"denols", - "docker_compose_language_service", - "dockerls", - "elmls", - "emmet_language_server", - "eslint", - "gopls", - "graphql", - "html", - "intelephense", - "jsonls", - "lua_ls", - "marksman", - "nginx_language_server", - "prismals", - "rust_analyzer", - "sqlls", - "svelte", - "templ", - "ts_ls", - "vuels", - "yamlls", - } - - for _, languageServerName in pairs(languageServers) do - vim.lsp.config(languageServerName, { - capabilities = capabilities, - on_attach = on_attach - }) - end - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvim-notify.lua b/sources/nvim/lua/settings/lazy/plugins/nvim-notify.lua deleted file mode 100644 index bfe3c97..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvim-notify.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - "rcarriga/nvim-notify", - event = "VeryLazy", - config = function() - local notify = require("notify") - - vim.notify = notify - - require("notify.config").setup({ - enabled = false, - stages = "fade_in_slide_out", - timeout = 5000, - background_colour = "#1e222a", - icons = { - ERROR = "๏—", - WARN = "๏ช", - INFO = "๏š", - DEBUG = "๏†ˆ", - TRACE = "โœŽ", - }, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvim-treesitter.lua b/sources/nvim/lua/settings/lazy/plugins/nvim-treesitter.lua deleted file mode 100644 index 58c07d3..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvim-treesitter.lua +++ /dev/null @@ -1,139 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - event = "VeryLazy", - config = function() - require("nvim-treesitter.configs").setup({ - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { - "bash", - "c", - "css", - "csv", - "dockerfile", - "elm", - "fish", - "javascript", - "jsdoc", - "json", - "lua", - "norg", - "markdown", - "markdown_inline", - "php", - "prisma", - "query", - "regex", - "rust", - "scss", - "sql", - "ssh_config", - "svelte", - "toml", - "tsx", - "twig", - "typescript", - "vim", - "vimdoc", - "vue", - "xml", - "yaml", - }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = true, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally - auto_install = true, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - indent = { - enable = true, - }, - - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on "syntax" being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - -- Configure text objects - textobjects = { - -- Text objects for selections like inside word (iw) or inside html tag (it) - select = { - -- Enable text objects selection - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - -- Keymaps to use for using the following selection text objects - keymaps = { - -- The whole function - ["af"] = { query = "@function.outer", desc = "Select the whole function" }, - -- Inside a function - ["if"] = { query = "@function.inner", desc = "Select inside a function" }, - -- Inside an assignment - ["i="] = { query = "@assignment.inner", desc = "Select inside of a statement" }, - -- Left-hand-side of a statement - ["l="] = { query = "@assignment.lhs", desc = "Select left-hand-side of a statement" }, - -- Right-hand-side of a statement - ["r="] = { query = "@assignment.rhs", desc = "Select right-hand-side of a statement" }, - -- The whole statement - ["a="] = { query = "@assignment.outer", desc = "Select the whole statement" }, - -- Inside of an attribute - ["ia"] = { query = "@attribute.inner", desc = "Select inside of an attribute" }, - -- The whole attribute - ["aa"] = { query = "@attribute.outer", desc = "Select the whole attribute" }, - -- Inside of a block - ["ib"] = { query = "@block.inner", desc = "Select inside a block" }, - -- The whole block - ["ab"] = { query = "@block.outer", desc = "Select the whole block" }, - -- Inside of a class - ["ic"] = { query = "@class.inner", desc = "Select inside of a class" }, - -- The whole class - ["ac"] = { query = "@class.outer", desc = "Select the whole class" }, - -- Inside a comment - ["iC"] = { query = "@comment.inner", desc = "Select inside of a comment" }, - -- The whole comment - ["aC"] = { query = "@comment.outer", desc = "Select the whole comment" }, - -- Inside of a conditional statement - ["ii"] = { query = "@conditional.inner", desc = "Select inside of a conditional statement" }, - -- The whole conditional statement - ["ai"] = { query = "@conditional.outer", desc = "Select the whole conditional statement" }, - -- Inside a loop - ["il"] = { query = "@loop.inner", desc = "Select inside a loop" }, - -- The whole a loop - ["al"] = { query = "@loop.outer", desc = "Select the whole loop" }, - -- Inside a number - ["in"] = { query = "@number.inner", desc = "Select inside a number" }, - -- Inside a number - ["an"] = { query = "@number.inner", desc = "Select the whole number" }, - -- Inside a parameter - ["ip"] = { query = "@parameter.inner", desc = "Select inside a parameter" }, - -- The whole parameter - ["ap"] = { query = "@parameter.outer", desc = "Select the whole parameter" }, - -- Inside of a regex - ["ir"] = { query = "@regex.inner", desc = "Select inside of a regex" }, - -- The whole regex - ["ar"] = { query = "@regex.outer", desc = "Select the whole regex" }, - -- Inside of a return statement - ["iR"] = { query = "@return.inner", desc = "Select inside of a return statement" }, - -- The whole return statement - ["aR"] = { query = "@return.outer", desc = "Select the whole return statement" }, - }, - -- Select surrounding white spaces as well as the selected text object - include_surrounding_whitespace = true, - }, - }, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvimcmp.lua b/sources/nvim/lua/settings/lazy/plugins/nvimcmp.lua deleted file mode 100644 index 2b670e0..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvimcmp.lua +++ /dev/null @@ -1,70 +0,0 @@ -return { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip' - }, - event = "InsertEnter", - config = function() - local cmp = require("cmp") - - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = "nvim_lsp", group_index = 2 }, - { name = "path", group_index = 2 }, - { name = 'luasnip' }, - }, { - { name = "buffer" }, - }), - }) - - -- Set configuration for specific filetype. - cmp.setup.filetype("gitcommit", { - sources = cmp.config.sources({ - { name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). - }, { - { 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" }, - }), - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/nvimtree.lua b/sources/nvim/lua/settings/lazy/plugins/nvimtree.lua deleted file mode 100644 index 257a234..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/nvimtree.lua +++ /dev/null @@ -1,175 +0,0 @@ -local function use_nvim_tree_width(options) - if type(options) ~= "table" then - return - end - - ---@type number - local offset = options.offset - - ---@type number - local initial_width = options.initial_width - - local initial_width_type = type(initial_width) - - local on_width_updated = options.on_width_updated - - if type(on_width_updated) ~= "function" then - on_width_updated = function() end - end - - if type(offset) ~= "number" then - offset = 10 - end - - if initial_width_type ~= "number" and initial_width_type ~= "table" then - initial_width = 30 - end - - ---@type number|table - local previous_width = initial_width - - if initial_width_type ~= "number" then - previous_width = 30 - end - - ---@type number|table - local width = initial_width - - local function get_width() - return width - end - - local function increment_width() - if type(width) == "table" then - width = previous_width - end - - local new_width = width + offset - - previous_width = new_width - width = new_width - - on_width_updated(new_width) - end - - local function decrement_width() - if type(width) == "table" then - width = previous_width - end - - local new_width = width - offset - - previous_width = new_width - width = new_width - - on_width_updated(new_width) - end - - local function dynamic_width() - width = {} - on_width_updated(width) - end - - return get_width, increment_width, decrement_width, dynamic_width -end - -return { - "nvim-tree/nvim-tree.lua", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - vim.g.loaded_netrw = 1 - vim.g.loaded_netrwPlugin = 1 - vim.opt.termguicolors = true - - local nvimTreeApi = require("nvim-tree.api") - - local get_width, increment_width, decrement_width, dynamic_width = use_nvim_tree_width({ - offset = 5, - initial_width = 30, - on_width_updated = function(width) - vim.cmd.NvimTreeResize(width) - end - }) - - local function on_nvim_tree_attach(buffer) - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = buffer, noremap = true, silent = true, nowait = true } - end - - -- default mappings - nvimTreeApi.config.mappings.default_on_attach(buffer) - - -- custom mappings - vim.keymap.set('n', 'l', nvimTreeApi.node.open.edit, opts('Open file/directory')) - vim.keymap.set('n', 'h', nvimTreeApi.node.navigate.parent_close, opts('Help')) - end - - require("nvim-tree").setup({ - on_attach = on_nvim_tree_attach, - auto_reload_on_write = true, - sort_by = "case_sensitive", - filters = { - dotfiles = false, - }, - notify = { - -- Notifies everything from the INFO severity to ERROR - threshold = vim.log.levels.INFO, - -- Notifies only the relative path instead of the absolute - absolute_path = false, - }, - -- Move to the first letter of each folder/files instead of the beginning of the line - hijack_cursor = true, - -- Disable completely netrw, just in case - disable_netrw = true, - -- Reload the tree whenever a buffer is opened - reload_on_bufenter = true, - -- Allows using vim.ui.select for various operation instead of the defaut implementation - select_prompts = true, - view = { - -- dynamically get the width of the tree - width = get_width, - -- Always open the tree on the left side of the screen - side = "left", - -- Never display the number line for the tree - number = false, - }, - renderer = { - -- Never add trailing slashes for folders name - add_trailing = false, - -- Never group directories in the tree for those that only have one child node - group_empty = false, - -- Never highlight any files in a special way - special_files = {}, - -- Highlight files that have diagnostics - highlight_diagnostics = true - }, - update_focused_file = { - -- Focus the file in the tree whenever it is focused in the editor - enable = true - }, - diagnostics = { - -- Enable diagnostics for the tree - enable = true, - -- Show diagnostics for the parent folder of the incriminated file - show_on_dirs = true - } - }) - - local whichKey = require("which-key") - - whichKey.add({ - { "n", group = "NvimTree" }, - { "nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" }, - { "nf", function() nvimTreeApi.tree.focus() end, desc = "Focus" }, - { "ne", function() nvimTreeApi.tree.expand_all() end, desc = "Expand All" }, - { "nc", function() nvimTreeApi.tree.collapse_all() end, desc = "Collapse All" }, - { "nw", group = "Width" }, - { "nwi", increment_width, desc = "Increase" }, - { "nwd", decrement_width, desc = "Decrease" }, - { "nwa", dynamic_width, desc = "Decrease" }, - { "nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" }, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/telescope.lua b/sources/nvim/lua/settings/lazy/plugins/telescope.lua deleted file mode 100644 index 0645eba..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/telescope.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - config = function() - local telescope = require("telescope") - local telescopeBuiltin = require("telescope.builtin") - - telescope.setup({}) - - local whichKey = require("which-key") - - whichKey.add({ - { "t", group = "Telescope" }, - { "th", function() telescopeBuiltin.help_tags() end, desc = "Help Tags" }, - { "tt", function() telescopeBuiltin.treesitter() end, desc = "Treesitter" }, - { "tf", function() telescopeBuiltin.find_files() end, desc = "Files" }, - { "tw", function() telescopeBuiltin.live_grep() end, desc = "Words" }, - { "tc", function() telescopeBuiltin.colorscheme() end, desc = "Colorscheme" }, - { "tg", function() telescopeBuiltin.git_files() end, desc = "Colorscheme" }, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/tokyonight.lua b/sources/nvim/lua/settings/lazy/plugins/tokyonight.lua deleted file mode 100644 index ab478b3..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/tokyonight.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - init = function() - vim.cmd.colorscheme("tokyonight") - end, - opts = { - style = "storm", - transparent = false, - light_style = "day", - terminal_colors = true, - }, - }, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/vim-illuminate.lua b/sources/nvim/lua/settings/lazy/plugins/vim-illuminate.lua deleted file mode 100644 index e0f32b6..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/vim-illuminate.lua +++ /dev/null @@ -1,52 +0,0 @@ -return { - "RRethy/vim-illuminate", - event = "BufEnter", - config = function() - require("illuminate").configure({ - -- providers: provider used to get references in the buffer, ordered by priority - providers = { - "lsp", - "treesitter", - "regex", - }, - -- delay: delay in milliseconds - delay = 100, - -- filetype_overrides: filetype specific overrides. - -- The keys are strings to represent the filetype while the values are tables that - -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist - filetype_overrides = {}, - -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist - filetypes_denylist = { - "dirvish", - "fugitive", - }, - -- filetypes_allowlist: filetypes to illuminate, this is overriden by filetypes_denylist - filetypes_allowlist = {}, - -- modes_denylist: modes to not illuminate, this overrides modes_allowlist - -- See `:help mode()` for possible values - modes_denylist = {}, - -- modes_allowlist: modes to illuminate, this is overriden by modes_denylist - -- See `:help mode()` for possible values - modes_allowlist = {}, - -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist - -- Only applies to the 'regex' provider - -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') - providers_regex_syntax_denylist = {}, - -- providers_regex_syntax_allowlist: syntax to illuminate, this is overriden by providers_regex_syntax_denylist - -- Only applies to the 'regex' provider - -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') - providers_regex_syntax_allowlist = {}, - -- under_cursor: whether or not to illuminate under the cursor - under_cursor = true, - -- large_file_cutoff: number of lines at which to use large_file_config - -- The `under_cursor` option is disabled when this cutoff is hit - large_file_cutoff = nil, - -- large_file_config: config to use for large files (based on large_file_cutoff). - -- Supports the same keys passed to .configure - -- If nil, vim-illuminate will be disabled for large files. - large_file_overrides = nil, - -- min_count_to_highlight: minimum number of matches required to perform highlighting - min_count_to_highlight = 1, - }) - end, -} diff --git a/sources/nvim/lua/settings/lazy/plugins/which-key.lua b/sources/nvim/lua/settings/lazy/plugins/which-key.lua deleted file mode 100644 index 2f0841a..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/which-key.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 0 - end, - config = function() - -- Nothing here - end -} diff --git a/sources/nvim/lua/settings/lazy/plugins/zen-mode.lua b/sources/nvim/lua/settings/lazy/plugins/zen-mode.lua deleted file mode 100644 index 6b7fa5d..0000000 --- a/sources/nvim/lua/settings/lazy/plugins/zen-mode.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "folke/zen-mode.nvim", - event = "VeryLazy", - opts = {} -} diff --git a/sources/nvim/lua/settings/options.lua b/sources/nvim/lua/settings/options.lua deleted file mode 100644 index 266b834..0000000 --- a/sources/nvim/lua/settings/options.lua +++ /dev/null @@ -1,46 +0,0 @@ -local opt = vim.opt - -opt.autoindent = true -opt.autoread = true -opt.backspace = "indent,eol,start" -opt.bufhidden = "hide" -opt.clipboard:append("unnamedplus") -opt.confirm = true -opt.copyindent = true -opt.emoji = true -opt.encoding = "UTF-8" -opt.expandtab = true -opt.fileignorecase = true -opt.hlsearch = true -opt.ignorecase = true -opt.incsearch = true -opt.infercase = true -opt.joinspaces = true -opt.laststatus = 2 -opt.lazyredraw = false -opt.backup = false -opt.breakindent = false -opt.compatible = false -opt.errorbells = false -opt.linebreak = false -opt.swapfile = false -opt.number = true -opt.relativenumber = true -opt.shiftround = true -opt.shiftwidth = 2 -opt.shiftwidth = 2 -opt.smartcase = true -opt.smartindent = true -opt.smarttab = true -opt.softtabstop = 2 -opt.tabstop = 2 -opt.syntax = "on" -opt.wrap = false -opt.cursorline = true -opt.termguicolors = true -opt.signcolumn = "yes" -opt.splitright = true -opt.splitbelow = true -opt.conceallevel = 3 - -vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" }) diff --git a/sources/nvim/stylua.toml b/sources/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/sources/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file