From ab59fffd18c10c307ee2a2c6c9a6decbc0cd3837 Mon Sep 17 00:00:00 2001 From: bivashy Date: Sun, 22 Jun 2025 14:45:34 +0500 Subject: [PATCH] Cleanup before LazyVim initialization --- .stylua.toml | 6 --- LICENSE | 24 ---------- README.md | 8 ---- init.lua | 37 --------------- lazy-lock.json | 42 ----------------- lua/autocmds.lua | 1 - lua/chadrc.lua | 19 -------- lua/configs/conform.lua | 13 ------ lua/configs/lazy.lua | 47 ------------------- lua/configs/lspconfig.lua | 95 -------------------------------------- lua/configs/treesitter.lua | 25 ---------- lua/mappings.lua | 28 ----------- lua/options.lua | 9 ---- lua/plugins/init.lua | 63 ------------------------- lua/plugins/java/init.lua | 45 ------------------ lua/snippets/java.lua | 20 -------- 16 files changed, 482 deletions(-) delete mode 100644 .stylua.toml delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 init.lua delete mode 100644 lazy-lock.json delete mode 100644 lua/autocmds.lua delete mode 100644 lua/chadrc.lua delete mode 100644 lua/configs/conform.lua delete mode 100644 lua/configs/lazy.lua delete mode 100644 lua/configs/lspconfig.lua delete mode 100644 lua/configs/treesitter.lua delete mode 100644 lua/mappings.lua delete mode 100644 lua/options.lua delete mode 100644 lua/plugins/init.lua delete mode 100644 lua/plugins/java/init.lua delete mode 100644 lua/snippets/java.lua diff --git a/.stylua.toml b/.stylua.toml deleted file mode 100644 index ecb6dca..0000000 --- a/.stylua.toml +++ /dev/null @@ -1,6 +0,0 @@ -column_width = 120 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "None" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index fdddb29..0000000 --- a/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/README.md b/README.md deleted file mode 100644 index f2e54c7..0000000 --- a/README.md +++ /dev/null @@ -1,8 +0,0 @@ -**NvChad modified!** - -- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. -- Modification for personal use - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/init.lua b/init.lua deleted file mode 100644 index e861b68..0000000 --- a/init.lua +++ /dev/null @@ -1,37 +0,0 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" -vim.g.mapleader = " " - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, -}, lazy_config) - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "options" -require "autocmds" - -vim.schedule(function() - require "mappings" -end) diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index ac7c3dd..0000000 --- a/lazy-lock.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" }, - "NvChad": { "branch": "v2.5", "commit": "f95da3325c2b0dca9468f52440225e351b074a3a" }, - "base46": { "branch": "v3.0", "commit": "2dbb72f4ae6f78cb3adc60c2c3b69524f97c9cd6" }, - "cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lua-async-await": { "branch": "main", "commit": "652d94df34e97abe2d4a689edbc4270e7ead1a98" }, - "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, - "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-dap": { "branch": "master", "commit": "2edd6375692d9ac1053d50acfe415c1eb2ba92d0" }, - "nvim-java": { "branch": "main", "commit": "7c2e81caa301b0d1bc7992b88981af883b3b5d6b" }, - "nvim-java-core": { "branch": "main", "commit": "401bf7683012a25929a359deec418f36beb876e2" }, - "nvim-java-dap": { "branch": "main", "commit": "55f239532f7a3789d21ea68d1e795abc77484974" }, - "nvim-java-refactor": { "branch": "main", "commit": "b51a57d862338999059e1d1717df3bc80a3a15c0" }, - "nvim-java-test": { "branch": "main", "commit": "7f0f40e9c5b7eab5096d8bec6ac04251c6e81468" }, - "nvim-lspconfig": { "branch": "master", "commit": "314b35335cc84bc2a085c84c69da955ba22da163" }, - "nvim-tree.lua": { "branch": "master", "commit": "0a06f65bf06157972f20ca1dee03c97a0efcb188" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" }, - "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "ui": { "branch": "v3.0", "commit": "d3fb80f458bb91a170fb4aa8c0ce40867c71fcb9" }, - "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, - "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, - "workspaces.nvim": { "branch": "master", "commit": "55a1eb6f5b72e07ee8333898254e113e927180ca" } -} diff --git a/lua/autocmds.lua b/lua/autocmds.lua deleted file mode 100644 index d2db0bb..0000000 --- a/lua/autocmds.lua +++ /dev/null @@ -1 +0,0 @@ -require "nvchad.autocmds" diff --git a/lua/chadrc.lua b/lua/chadrc.lua deleted file mode 100644 index a505152..0000000 --- a/lua/chadrc.lua +++ /dev/null @@ -1,19 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua --- Please read that file to know all available options :( - ----@type ChadrcConfig -local M = {} - -M.base46 = { - theme = "onedark", - - hl_override = { - Comment = { italic = true }, - ["@comment"] = { italic = true }, - }, -} - -M.nvdash = { load_on_startup = true } - -return M diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua deleted file mode 100644 index 91fe9f1..0000000 --- a/lua/configs/conform.lua +++ /dev/null @@ -1,13 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - java = { "java" }, - }, - - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, -} - -return options diff --git a/lua/configs/lazy.lua b/lua/configs/lazy.lua deleted file mode 100644 index cd170bd..0000000 --- a/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua deleted file mode 100644 index 4cdd6e7..0000000 --- a/lua/configs/lspconfig.lua +++ /dev/null @@ -1,95 +0,0 @@ -require("nvchad.configs.lspconfig").defaults() - -local lspconfig = require "lspconfig" -local nvlsp = require "nvchad.configs.lspconfig" - -local servers = - { "html", "cssls", "jdtls", "clangd", "gopls", "stylelint_lsp", "jsonls", "svelte", "eslint", "lemminx" } - -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - } -end - -lspconfig["tailwindcss"].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - settings = { - validate = true, - filetypes = { "svelte" }, - }, -} - -local ymlCapabilities = vim.lsp.protocol.make_client_capabilities() -ymlCapabilities.textDocument.foldingRange = { - dynamicRegistration = false, - lineFoldingOnly = true, -} - -lspconfig.yamlls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = ymlCapabilities, - settings = { - yaml = { - schemas = {}, - }, - }, -} - -lspconfig.vtsls.setup { - on_init = nvlsp.on_init, - on_attach = nvlsp.on_attach, - capabilities = nvlsp.capabilities, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - "vue", - }, - settings = { - vtsls = { - autoUseWorkspaceTsdk = true, - tsserver = { - globalPlugins = { - { - name = "@vue/typescript-plugin", - location = vim.fn.stdpath "data" .. "/mason/packages/vue-language-server/node_modules/@vue/language-server", - languages = { "vue" }, - configNamespace = "typescript", - enableForWorkspaceTypeScriptVersions = true, - }, - }, - }, - }, - typescript = { - preferences = { - importModuleSpecifier = "non-relative", - updateImportsOnFileMove = { - enabled = "always", - }, - suggest = { - completeFunctionCalls = true, - }, - }, - }, - }, -} - -lspconfig.volar.setup { - on_init = nvlsp.on_init, - on_attach = nvlsp.on_attach, - capabilities = nvlsp.capabilities, - settings = { - emmet = { - showExpandedAbbreviation = "never", - }, - }, -} diff --git a/lua/configs/treesitter.lua b/lua/configs/treesitter.lua deleted file mode 100644 index 808e2b5..0000000 --- a/lua/configs/treesitter.lua +++ /dev/null @@ -1,25 +0,0 @@ -local options = { - ensure_installed = { - "lua", - "luadoc", - "printf", - "vim", - "vimdoc", - "java", - "go", - "vue", - "typescript", - "javascript", - "xml", - "html", - }, - - highlight = { - enable = true, - use_languagetree = true, - }, - - indent = { enable = true }, -} - -require("nvim-treesitter.configs").setup(options) diff --git a/lua/mappings.lua b/lua/mappings.lua deleted file mode 100644 index 79bd0a2..0000000 --- a/lua/mappings.lua +++ /dev/null @@ -1,28 +0,0 @@ -require "nvchad.mappings" - -local map = vim.keymap.set - -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jj", "") -map("n", "cd", ":cd ..", { desc = "Go to parent directory" }) -map("n", "ca", vim.lsp.buf.code_action, { desc = "LSP code action" }) -map("v", "ca", vim.lsp.buf.code_action, { desc = "LSP code action" }) -map("n", "fl", function() - require("telescope.builtin").lsp_references {} -end, { desc = "Find references (LSP)" }) -map("n", "j", function() - vim.diagnostic.jump { count = 1 } -end, { desc = "Go to next diagnostic" }) - -map("n", "k", function() - vim.diagnostic.jump { count = -1 } -end, { desc = "Go to previous diagnostic" }) - -local modes = { "n", "i", "v", "x" } -local keys = { "", "", "", "" } - -for _, mode in ipairs(modes) do - for _, key in ipairs(keys) do - map(mode, key, "", { desc = "Disabled arrow key" }) - end -end diff --git a/lua/options.lua b/lua/options.lua deleted file mode 100644 index fb9fe35..0000000 --- a/lua/options.lua +++ /dev/null @@ -1,9 +0,0 @@ -require "nvchad.options" - -local g = vim.g -local o = vim.o -o.shiftwidth = 4 -o.tabstop = 4 -o.softtabstop = 4 - -g.lua_snippets_path = vim.fn.stdpath "config" .. "/lua/snippets" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua deleted file mode 100644 index d7dca1d..0000000 --- a/lua/plugins/init.lua +++ /dev/null @@ -1,63 +0,0 @@ -return { - { - "stevearc/conform.nvim", - event = "BufWritePre", - opts = require "configs.conform", - }, - - { - "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, - }, - - { - event = "VeryLazy", - "natecraddock/workspaces.nvim", - config = function() - require("workspaces").setup() - end, - }, - - { - "nvim-tree/nvim-tree.lua", - opts = function() - local conf = require "nvchad.configs.nvimtree" - conf.renderer.group_empty = true - return conf - end, - }, - - { - "nvim-treesitter/nvim-treesitter", - event = { "BufReadPre", "BufNewFile" }, - opts = { - require "configs.treesitter", - }, - }, - - { - require "plugins.java.init", - }, - - { - "mg979/vim-visual-multi", - branch = "master", - lazy = false, - }, - - { - "nvim-treesitter/nvim-treesitter-context", - event = { "BufReadPre", "BufNewFile" }, - opts = function() - return { mode = "cursor", max_lines = 3 } - end, - }, - - { - "windwp/nvim-ts-autotag", - event = { "BufReadPre", "BufNewFile" }, - opts = {}, - }, -} diff --git a/lua/plugins/java/init.lua b/lua/plugins/java/init.lua deleted file mode 100644 index fb7a5b8..0000000 --- a/lua/plugins/java/init.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - "nvim-java/nvim-java", - dependencies = { - { - "neovim/nvim-lspconfig", - opts = { - servers = { - jdtls = { - settings = { - java = { - configuration = { - runtimes = { - { - name = "JavaSE-21", - path = "/usr/bin/java", - }, - }, - }, - }, - }, - }, - }, - setup = { - jdtls = function() - require("java").setup { - jdk = { - auto_install = false, - }, - root_markers = { - "settings.gradle", - "settings.gradle.kts", - "pom.xml", - "build.gradle", - "mvnw", - "gradlew", - "build.gradle", - "build.gradle.kts", - }, - } - end, - }, - }, - }, - }, -} diff --git a/lua/snippets/java.lua b/lua/snippets/java.lua deleted file mode 100644 index d539f77..0000000 --- a/lua/snippets/java.lua +++ /dev/null @@ -1,20 +0,0 @@ -local ls = require "luasnip" -local s = ls.snippet -local t = ls.text_node -local i = ls.insert_node -local f = ls.function_node - --- Function to get the current class name from filename -local function get_class_name() - local filename = vim.fn.expand "%:t:r" -- Get filename without extension - return filename -end - -return { - -- Logger with automatic class name detection - s("logger", { - t "private static final Logger log = LoggerFactory.getLogger(", - f(get_class_name, {}), - t ".class);", - }), -}