From 7273ea8d924b6fa785298407ad1cf456ec7f0105 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Wed, 3 Jul 2024 00:07:08 +0200 Subject: [PATCH] remove nvim conf --- .config/nvim/.gitignore | 3 - .config/nvim/dependencies.dnf.txt | 17 --- .config/nvim/init.lua | 1 - .config/nvim/lua/core/editor.lua | 8 -- .config/nvim/lua/core/init.lua | 3 - .config/nvim/lua/core/keymap.lua | 5 - .config/nvim/lua/core/package_manager.lua | 15 -- .config/nvim/lua/plugins/dashboard.lua | 32 ----- .config/nvim/lua/plugins/editor.lua | 9 -- .../plugins/editor/debugging/debugging_go.lua | 13 -- .../plugins/editor/editor_auto_brackets.lua | 4 - .../editor/editor_code_highlighting.lua | 19 --- .../plugins/editor/editor_code_snippets.lua | 76 ---------- .../lua/plugins/editor/editor_debugging.lua | 133 ------------------ .../plugins/editor/editor_language_server.lua | 133 ------------------ .../editor/editor_markdown_preview.lua | 35 ----- .../lua/plugins/editor/editor_nvim_dev.lua | 9 -- .../language_server_generic.lua | 43 ------ .../language_server/language_server_go.lua | 23 --- .../language_server/language_server_lua.lua | 29 ---- .../language_server/language_server_php.lua | 28 ---- .../language_server/language_server_web.lua | 35 ----- .../plugins/extension/status_bar_plugin.lua | 65 --------- .config/nvim/lua/plugins/file_tree.lua | 81 ----------- .config/nvim/lua/plugins/git.lua | 38 ----- .config/nvim/lua/plugins/key_list.lua | 8 -- .config/nvim/lua/plugins/search.lua | 68 --------- .config/nvim/lua/plugins/status_bar.lua | 77 ---------- .config/nvim/lua/plugins/theme.lua | 9 -- .config/nvim/lua/utils/finder.lua | 114 --------------- .config/nvim/stylua.toml | 7 - 31 files changed, 1140 deletions(-) delete mode 100644 .config/nvim/.gitignore delete mode 100644 .config/nvim/dependencies.dnf.txt delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/core/editor.lua delete mode 100644 .config/nvim/lua/core/init.lua delete mode 100644 .config/nvim/lua/core/keymap.lua delete mode 100644 .config/nvim/lua/core/package_manager.lua delete mode 100644 .config/nvim/lua/plugins/dashboard.lua delete mode 100644 .config/nvim/lua/plugins/editor.lua delete mode 100644 .config/nvim/lua/plugins/editor/debugging/debugging_go.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_auto_brackets.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_code_highlighting.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_code_snippets.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_debugging.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_language_server.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_markdown_preview.lua delete mode 100644 .config/nvim/lua/plugins/editor/editor_nvim_dev.lua delete mode 100644 .config/nvim/lua/plugins/editor/language_server/language_server_generic.lua delete mode 100644 .config/nvim/lua/plugins/editor/language_server/language_server_go.lua delete mode 100644 .config/nvim/lua/plugins/editor/language_server/language_server_lua.lua delete mode 100644 .config/nvim/lua/plugins/editor/language_server/language_server_php.lua delete mode 100644 .config/nvim/lua/plugins/editor/language_server/language_server_web.lua delete mode 100644 .config/nvim/lua/plugins/extension/status_bar_plugin.lua delete mode 100644 .config/nvim/lua/plugins/file_tree.lua delete mode 100644 .config/nvim/lua/plugins/git.lua delete mode 100644 .config/nvim/lua/plugins/key_list.lua delete mode 100644 .config/nvim/lua/plugins/search.lua delete mode 100644 .config/nvim/lua/plugins/status_bar.lua delete mode 100644 .config/nvim/lua/plugins/theme.lua delete mode 100644 .config/nvim/lua/utils/finder.lua delete mode 100644 .config/nvim/stylua.toml diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore deleted file mode 100644 index ca6b2f5..0000000 --- a/.config/nvim/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.* -!.gitignore -lazy-lock.json diff --git a/.config/nvim/dependencies.dnf.txt b/.config/nvim/dependencies.dnf.txt deleted file mode 100644 index f544f0b..0000000 --- a/.config/nvim/dependencies.dnf.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Coprs -yorickpeterse/stylua - -# YUM Repos -echo '[charm] -name=Charm -baseurl=https://repo.charm.sh/yum/ -enabled=1 -gpgcheck=1 -gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo - -# Packages -neovim lua gcc curl wget git unzip tar gzip ripgrep php composer go nodejs npm delve stylua - -# NPM -npm install -g @fsouza/prettierd -npm install -g eslint_d diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index d9a3b72..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1 +0,0 @@ -require("core") diff --git a/.config/nvim/lua/core/editor.lua b/.config/nvim/lua/core/editor.lua deleted file mode 100644 index 5a56369..0000000 --- a/.config/nvim/lua/core/editor.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Use 2 Spaces Instead of Tabs -- -vim.opt.expandtab = true -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 - --- Enable Line Number -- -vim.opt.number = true diff --git a/.config/nvim/lua/core/init.lua b/.config/nvim/lua/core/init.lua deleted file mode 100644 index 39ba678..0000000 --- a/.config/nvim/lua/core/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("core.keymap") -require("core.editor") -require("core.package_manager") diff --git a/.config/nvim/lua/core/keymap.lua b/.config/nvim/lua/core/keymap.lua deleted file mode 100644 index 1f11767..0000000 --- a/.config/nvim/lua/core/keymap.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.g.mapleader = " " - ---[[ Indentation ]] -vim.keymap.set("n", "", ">>") -vim.keymap.set("n", "", "<<") diff --git a/.config/nvim/lua/core/package_manager.lua b/.config/nvim/lua/core/package_manager.lua deleted file mode 100644 index 0bcad8a..0000000 --- a/.config/nvim/lua/core/package_manager.lua +++ /dev/null @@ -1,15 +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", - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -local opts = {} -require("lazy").setup("plugins", opts) diff --git a/.config/nvim/lua/plugins/dashboard.lua b/.config/nvim/lua/plugins/dashboard.lua deleted file mode 100644 index 0a08d22..0000000 --- a/.config/nvim/lua/plugins/dashboard.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - "goolord/alpha-nvim", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - -- Setup -- - local alpha = require("alpha") - local dashboard = require("alpha.themes.startify") - - -- Header -- - dashboard.section.header.val = { - [[ ]], - [[ ]], - [[ ]], - [[ ]], - [[  ]], - [[ ████ ██████ █████ ██ ]], - [[ ███████████ █████  ]], - [[ █████████ ███████████████████ ███ ███████████ ]], - [[ █████████ ███ █████████████ █████ ██████████████ ]], - [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], - [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], - [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], - [[ ]], - [[ ]], - [[ ]], - } - - alpha.setup(dashboard.opts) - end, -} diff --git a/.config/nvim/lua/plugins/editor.lua b/.config/nvim/lua/plugins/editor.lua deleted file mode 100644 index 6b4de38..0000000 --- a/.config/nvim/lua/plugins/editor.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - require("plugins.editor.editor_auto_brackets"), - require("plugins.editor.editor_code_highlighting"), - require("plugins.editor.editor_code_snippets"), - require("plugins.editor.editor_debugging"), - require("plugins.editor.editor_language_server"), - require("plugins.editor.editor_markdown_preview"), - require("plugins.editor.editor_nvim_dev"), -} diff --git a/.config/nvim/lua/plugins/editor/debugging/debugging_go.lua b/.config/nvim/lua/plugins/editor/debugging/debugging_go.lua deleted file mode 100644 index 26163d7..0000000 --- a/.config/nvim/lua/plugins/editor/debugging/debugging_go.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "leoluz/nvim-dap-go", - config = function() - local dir = require("utils.finder").find_project_dir( - "go.mod", - 3, - { "src", "app", "pkg" }, - { "test" }, - true - ) - require("dap-go").setup({ delve = { cwd = dir } }) - end, -} diff --git a/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua b/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua deleted file mode 100644 index e4bdf2d..0000000 --- a/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "m4xshen/autoclose.nvim", - config = function() require("autoclose").setup() end, -} diff --git a/.config/nvim/lua/plugins/editor/editor_code_highlighting.lua b/.config/nvim/lua/plugins/editor/editor_code_highlighting.lua deleted file mode 100644 index 44e0579..0000000 --- a/.config/nvim/lua/plugins/editor/editor_code_highlighting.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - -- Setup -- - local config = require("nvim-treesitter.configs") - config.setup({ - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - }) - end, - }, - { - "NoahTheDuke/vim-just", - ft = { "just" }, - }, -} diff --git a/.config/nvim/lua/plugins/editor/editor_code_snippets.lua b/.config/nvim/lua/plugins/editor/editor_code_snippets.lua deleted file mode 100644 index 9bfd8e0..0000000 --- a/.config/nvim/lua/plugins/editor/editor_code_snippets.lua +++ /dev/null @@ -1,76 +0,0 @@ -return { - { - "L3MON4D3/LuaSnip", - version = "2.*", - dependencies = { - "rafamadriz/friendly-snippets", - "mireq/luasnip-snippets", - }, - build = "make install_jsregexp", - config = function() - -- Setup -- - require("luasnip.loaders.from_vscode").lazy_load() - require("luasnip.loaders.from_snipmate").lazy_load() - require("luasnip_snippets.common.snip_utils").setup() - end, - }, - { - "hrsh7th/nvim-cmp", - dependencies = { - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "hrsh7th/cmp-nvim-lsp", - }, - config = function() - -- Setup -- - local cmp = require("cmp") - local luasnip = require("luasnip") - luasnip.setup({ - load_ft_func = require("luasnip_snippets.common.snip_utils").load_ft_func, - ft_func = require("luasnip_snippets.common.snip_utils").ft_func, - enable_autosnippets = true, - }) - - -- Keybinding -- - vim.keymap.set({ "i", "s" }, "", function() - if luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - vim.api.nvim_input("") - end - end, { silent = true }) - - vim.keymap.set( - { "i", "s" }, - "", - function() luasnip.jump(-1) end, - { silent = true } - ) - - local doc_keybindings = { - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - } - - -- Setup -- - cmp.setup({ - snippet = { - expand = function(args) luasnip.lsp_expand(args.body) end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert(doc_keybindings), - sources = cmp.config.sources({ - { name = "lazydev", group_index = 0 }, - { name = "nvim_lsp" }, - { name = "luasnip" }, - }, { { name = "buffer" } }), - }) - end, - }, -} diff --git a/.config/nvim/lua/plugins/editor/editor_debugging.lua b/.config/nvim/lua/plugins/editor/editor_debugging.lua deleted file mode 100644 index f41c75b..0000000 --- a/.config/nvim/lua/plugins/editor/editor_debugging.lua +++ /dev/null @@ -1,133 +0,0 @@ -return { - { - "mfussenegger/nvim-dap", - dependencies = { - "rcarriga/nvim-dap-ui", - "nvim-neotest/nvim-nio", - }, - config = function() - -- Setup Debugging -- - local dap = require("dap") - - -- Open UI on Debugging -- - local dapui = require("dapui") - dapui.setup({ - layouts = { - { - elements = { - { id = "scopes", size = 0.65 }, - { id = "breakpoints", size = 0.35 }, - }, - position = "left", - size = 40, - }, - { - elements = { - { id = "repl", size = 0.5 }, - { id = "console", size = 0.5 }, - }, - position = "bottom", - size = 10, - }, - }, - }) - dap.listeners.before.attach.dapui_config = function() dapui.open() end - dap.listeners.before.launch.dapui_config = function() dapui.open() end - - -- Keybinding -- - vim.keymap.set( - "n", - "dt", - dapui.toggle, - { desc = "Toggle Debugger UI" } - ) - vim.keymap.set( - "n", - "db", - dap.toggle_breakpoint, - { desc = "Toggle Breakpoint" } - ) - vim.keymap.set( - "n", - "dc", - dap.continue, - { desc = "Debugger Continue" } - ) - vim.keymap.set( - "n", - "dx", - dap.terminate, - { desc = "Debugger Terminate" } - ) - vim.keymap.set( - "n", - "ds", - dap.step_over, - { desc = "Debugger Step Over" } - ) - - -- Breakpoints -- - vim.api.nvim_set_hl( - 0, - "DapBreakpoint", - { ctermbg = 0, fg = "#993939", bg = "#31353f" } - ) - vim.api.nvim_set_hl( - 0, - "DapLogPoint", - { ctermbg = 0, fg = "#61afef", bg = "#31353f" } - ) - vim.api.nvim_set_hl( - 0, - "DapStopped", - { ctermbg = 0, fg = "#98c379", bg = "#31353f" } - ) - vim.fn.sign_define( - "DapBreakpoint", - { - text = "", - texthl = "DapBreakpoint", - linehl = "DapBreakpoint", - numhl = "DapBreakpoint", - } - ) - vim.fn.sign_define( - "DapBreakpointCondition", - { - text = "󰣏", - texthl = "DapBreakpoint", - linehl = "DapBreakpoint", - numhl = "DapBreakpoint", - } - ) - vim.fn.sign_define( - "DapBreakpointRejected", - { - text = "", - texthl = "DapBreakpoint", - linehl = "DapBreakpoint", - numhl = "DapBreakpoint", - } - ) - vim.fn.sign_define( - "DapLogPoint", - { - text = "", - texthl = "DapLogPoint", - linehl = "DapLogPoint", - numhl = "DapLogPoint", - } - ) - vim.fn.sign_define( - "DapStopped", - { - text = "", - texthl = "DapStopped", - linehl = "DapStopped", - numhl = "DapStopped", - } - ) - end, - }, - require("plugins.editor.debugging.debugging_go"), -} diff --git a/.config/nvim/lua/plugins/editor/editor_language_server.lua b/.config/nvim/lua/plugins/editor/editor_language_server.lua deleted file mode 100644 index 1d6f8b8..0000000 --- a/.config/nvim/lua/plugins/editor/editor_language_server.lua +++ /dev/null @@ -1,133 +0,0 @@ -local lua_lsp = require("plugins.editor.language_server.language_server_lua") -local generic_lsp = - require("plugins.editor.language_server.language_server_generic") -local go_lsp = require("plugins.editor.language_server.language_server_go") -local web_lsp = require("plugins.editor.language_server.language_server_web") -local php_lsp = require("plugins.editor.language_server.language_server_php") - -return { - { - "williamboman/mason.nvim", - lazy = false, - config = function() require("mason").setup() end, - }, - { - "williamboman/mason-lspconfig.nvim", - lazy = false, - opts = { - auto_install = true, - }, - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - table.unpack(lua_lsp.mason_requirements), - table.unpack(generic_lsp.mason_requirements), - table.unpack(go_lsp.mason_requirements), - table.unpack(web_lsp.mason_requirements), - table.unpack(php_lsp.mason_requirements), - }, - }) - end, - }, - { - "neovim/nvim-lspconfig", - lazy = false, - config = function() - -- Setup -- - local capabilities = require("cmp_nvim_lsp").default_capabilities() - local lspconfig = require("lspconfig") - - lua_lsp.setup(lspconfig, capabilities) - generic_lsp.setup(lspconfig, capabilities) - go_lsp.setup(lspconfig, capabilities) - web_lsp.setup(lspconfig, capabilities) - php_lsp.setup(lspconfig, capabilities) - - -- Keybinding -- - vim.keymap.set( - "n", - "cd", - vim.lsp.buf.hover, - { desc = "Show Code Definition" } - ) - vim.keymap.set( - "n", - "gd", - vim.lsp.buf.definition, - { desc = "Go to Definition" } - ) - vim.keymap.set( - "n", - "gr", - vim.lsp.buf.references, - { desc = "Go to References" } - ) - vim.keymap.set( - "n", - "ca", - vim.lsp.buf.code_action, - { desc = "Do Code Actions" } - ) - end, - }, - { - "nvimtools/none-ls.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvimtools/none-ls-extras.nvim", - }, - config = function() - -- Setup -- - local null_ls = require("null-ls") - null_ls.setup({ - sources = { - table.unpack(lua_lsp.formatter(null_ls)), - table.unpack(generic_lsp.formatter(null_ls)), - table.unpack(go_lsp.formatter(null_ls)), - table.unpack(web_lsp.formatter(null_ls)), - table.unpack(php_lsp.formatter(null_ls)), - }, - }) - - -- Keybinding -- - vim.keymap.set( - "n", - "fc", - vim.lsp.buf.format, - { desc = "Format Code" } - ) - end, - }, - { - "nvimdev/lspsaga.nvim", - after = "nvim-lspconfig", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons", - }, - config = function() - local lspsaga = require("lspsaga") - lspsaga.setup({}) - - -- Keybinding -- - vim.keymap.set( - "n", - "cr", - ":Lspsaga rename", - { desc = "Rename Variable" } - ) - vim.keymap.set( - "n", - "cp", - ":Lspsaga peek_definition", - { desc = "Peek Code Definition" } - ) - vim.keymap.set( - { "n", "t" }, - "", - "Lspsaga term_toggle", - { desc = "Toggle Terminal" } - ) - end, - }, -} diff --git a/.config/nvim/lua/plugins/editor/editor_markdown_preview.lua b/.config/nvim/lua/plugins/editor/editor_markdown_preview.lua deleted file mode 100644 index ad0cc39..0000000 --- a/.config/nvim/lua/plugins/editor/editor_markdown_preview.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - "mrjones2014/mdpreview.nvim", - ft = "markdown", - dependencies = { - "norcalli/nvim-terminal.lua", - config = true, - }, - config = function() - require("mdpreview").setup({ - cli_args = { - "glow", - "-s", - "~/.config/glow/catppuccin-macchiato.json", - "-w", - "1", - "--local", - }, - renderer = { - opts = { - win_opts = { - number = true, - wrap = false, - }, - }, - }, - }) - - vim.keymap.set( - "n", - "mp", - ":Mdpreview", - { desc = "Show Markdown Preview" } - ) - end, -} diff --git a/.config/nvim/lua/plugins/editor/editor_nvim_dev.lua b/.config/nvim/lua/plugins/editor/editor_nvim_dev.lua deleted file mode 100644 index 983b979..0000000 --- a/.config/nvim/lua/plugins/editor/editor_nvim_dev.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - "folke/lazydev.nvim", - ft = "lua", - opts = { - library = {}, - }, - }, -} diff --git a/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua deleted file mode 100644 index 986583f..0000000 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua +++ /dev/null @@ -1,43 +0,0 @@ -local LSP = {} - -LSP.mason_requirements = { - "bashls", - "jsonls", - "sqlls", - "lemminx", - "yamlls", - "marksman", -} - -LSP.plugin_info = {} - -function LSP.setup(lspconfig, capabilities) - local config = { capabilities = capabilities } - lspconfig.bashls.setup(config) - lspconfig.jsonls.setup(config) - lspconfig.sqlls.setup(config) - lspconfig.lemminx.setup(config) - lspconfig.yamlls.setup(config) - lspconfig.marksman.setup(config) -end - -function LSP.formatter(null_ls) - return { - null_ls.builtins.formatting.prettier.with({ - command = "prettierd", - }), - null_ls.builtins.diagnostics.spectral, - null_ls.builtins.code_actions.refactoring, - null_ls.builtins.code_actions.proselint, - null_ls.builtins.diagnostics.actionlint, - null_ls.builtins.diagnostics.markdownlint, - null_ls.builtins.diagnostics.alex, - null_ls.builtins.diagnostics.checkmake, - null_ls.builtins.diagnostics.codespell, - null_ls.builtins.diagnostics.dotenv_linter, - null_ls.builtins.diagnostics.trail_space, - null_ls.builtins.diagnostics.vacuum, - } -end - -return LSP diff --git a/.config/nvim/lua/plugins/editor/language_server/language_server_go.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_go.lua deleted file mode 100644 index a810603..0000000 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_go.lua +++ /dev/null @@ -1,23 +0,0 @@ -local LSP = {} - -LSP.mason_requirements = { - "gopls", -} - -LSP.plugin_info = {} - -function LSP.setup(lspconfig, capabilities) - lspconfig.gopls.setup({ capabilities = capabilities }) -end - -function LSP.formatter(null_ls) - return { - null_ls.builtins.formatting.gofumpt, - null_ls.builtins.code_actions.gomodifytags, - null_ls.builtins.code_actions.impl, - null_ls.builtins.diagnostics.golangci_lint, - null_ls.builtins.diagnostics.staticcheck, - } -end - -return LSP diff --git a/.config/nvim/lua/plugins/editor/language_server/language_server_lua.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_lua.lua deleted file mode 100644 index 2f242f6..0000000 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_lua.lua +++ /dev/null @@ -1,29 +0,0 @@ -local LSP = {} - -LSP.mason_requirements = { - "lua_ls", -} - -LSP.plugin_info = {} - -function LSP.setup(lspconfig, capabilities) - lspconfig.lua_ls.setup({ - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - }, - }, - }) -end - -function LSP.formatter(null_ls) - return { - null_ls.builtins.formatting.stylua, - null_ls.builtins.diagnostics.selene, - } -end - -return LSP diff --git a/.config/nvim/lua/plugins/editor/language_server/language_server_php.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_php.lua deleted file mode 100644 index 61dec91..0000000 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_php.lua +++ /dev/null @@ -1,28 +0,0 @@ -local LSP = {} - -LSP.mason_requirements = { - "phpactor", - "stimulus_ls", -} - -LSP.plugin_info = {} - -function LSP.setup(lspconfig, capabilities) - local config = { capabilities = capabilities } - lspconfig.phpactor.setup(config) - lspconfig.stimulus_ls.setup(config) -end - -function LSP.formatter(null_ls) - return { - null_ls.builtins.diagnostics.phpstan, - null_ls.builtins.formatting.phpcsfixer.with({ - prefer_local = "vendor/bin/php-cs-fixer", - args = { "fix", "--allow-risky=yes", "$FILENAME" }, - }), - null_ls.builtins.diagnostics.phpcs, - null_ls.builtins.diagnostics.twigcs, - } -end - -return LSP diff --git a/.config/nvim/lua/plugins/editor/language_server/language_server_web.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_web.lua deleted file mode 100644 index f755d58..0000000 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_web.lua +++ /dev/null @@ -1,35 +0,0 @@ -local LSP = {} - -LSP.mason_requirements = { - "html", - "emmet_ls", - "cssls", - "tailwindcss", - "tsserver", - "svelte", - "volar", - "eslint", -} - -LSP.plugin_info = {} - -function LSP.setup(lspconfig, capabilities) - local config = { capabilities = capabilities } - lspconfig.html.setup(config) - lspconfig.emmet_ls.setup(config) - lspconfig.cssls.setup(config) - lspconfig.tailwindcss.setup(config) - lspconfig.tsserver.setup(config) - lspconfig.svelte.setup(config) - lspconfig.volar.setup(config) - lspconfig.eslint.setup(config) -end - -function LSP.formatter(null_ls) - return { - require("none-ls.formatting.eslint_d"), - null_ls.builtins.diagnostics.stylelint, - } -end - -return LSP diff --git a/.config/nvim/lua/plugins/extension/status_bar_plugin.lua b/.config/nvim/lua/plugins/extension/status_bar_plugin.lua deleted file mode 100644 index 96bac22..0000000 --- a/.config/nvim/lua/plugins/extension/status_bar_plugin.lua +++ /dev/null @@ -1,65 +0,0 @@ -local M = {} - -M.filetypes = { - "dap-repl", - "dapui_console", - "dapui_console", - "dapui_watches", - "dapui_stacks", - "dapui_breakpoints", - "dapui_scopes", -} - -local function merge_colors(foreground, background) - local new_name = foreground .. background - - local hl_fg = vim.api.nvim_get_hl(0, { name = foreground }) - local hl_bg = vim.api.nvim_get_hl(0, { name = background }) - - local fg = string.format("#%06x", hl_fg.fg and hl_fg.fg or 0) - local bg = string.format("#%06x", hl_bg.bg and hl_bg.bg or 0) - - vim.api.nvim_set_hl(0, new_name, { fg = fg, bg = bg }) - return new_name -end - -local function get_dap_repl_winbar(active) - local get_mode = require("lualine.highlight").get_mode_suffix - - return function() - local filetype = vim.bo.filetype - local disabled_filetypes = { "dap-repl" } - - if not vim.tbl_contains(disabled_filetypes, filetype) then - return "" - end - - local background_color = string.format( - "lualine_b" .. "%s", - active and get_mode() or "_inactive" - ) - - local controls_string = "%#" .. background_color .. "#" - for element in require("dapui.controls").controls():gmatch("%S+") do - local color, action = string.match(element, "%%#(.*)#(%%.*)%%#0#") - controls_string = controls_string - .. " %#" - .. merge_colors(color, background_color) - .. "#" - .. action - end - return controls_string - end -end - -M.winbar = { - lualine_a = { { "filename", file_status = false } }, - lualine_b = { get_dap_repl_winbar(true) }, -} - -M.inactive_winbar = { - lualine_a = { { "filename", file_status = false } }, - lualine_b = { get_dap_repl_winbar(false) }, -} - -return M diff --git a/.config/nvim/lua/plugins/file_tree.lua b/.config/nvim/lua/plugins/file_tree.lua deleted file mode 100644 index 0699686..0000000 --- a/.config/nvim/lua/plugins/file_tree.lua +++ /dev/null @@ -1,81 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - -- Setup -- - require("neo-tree").setup({ - close_if_last_window = false, - enable_git_status = true, - enable_diagnostics = true, - name = { - trailing_slash = false, - use_git_status_colors = true, - highlight = "NeoTreeFileName", - }, - git_status = { - symbols = { - -- Git Change type Icon -- - added = "✚", - modified = "", - deleted = "✖", - renamed = "󰁕", - -- Git Status type Icon -- - untracked = "", - ignored = "", - unstaged = "󰄱", - staged = "", - conflict = "", - }, - }, - symlink_target = { - enabled = false, - }, - filesystem = { - hijack_netrw_behavior = "open_default", - }, - -- Keybinding -- - window = { - mappings = { - [""] = "open", - }, - }, - }) - - -- Dignostic Icons -- - vim.fn.sign_define("DiagnosticSignError", { - text = " ", - texthl = "DiagnosticSignError", - }) - vim.fn.sign_define("DiagnosticSignWarn", { - text = " ", - texthl = "DiagnosticSignWarn", - }) - vim.fn.sign_define("DiagnosticSignInfo", { - text = " ", - texthl = "DiagnosticSignInfo", - }) - vim.fn.sign_define("DiagnosticSignHint", { - text = "󰌵", - texthl = "DiagnosticSignHint", - }) - - -- Keybinding -- - vim.keymap.set( - "n", - "ft", - ":Neotree toggle reveal left", - { desc = "Toggle File Tree" } - ) - vim.keymap.set( - "n", - "fo", - ":Neotree buffers reveal float", - { desc = "Show Open Files" } - ) - end, -} diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua deleted file mode 100644 index de2d008..0000000 --- a/.config/nvim/lua/plugins/git.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - { - "tpope/vim-fugitive", - }, - { - "lewis6991/gitsigns.nvim", - config = function() - -- Setup -- - require("gitsigns").setup() - - -- Keybinding -- - vim.keymap.set( - "n", - "gh", - ":Gitsigns preview_hunk_inline", - { desc = "Toggle Inline Git Diff" } - ) - vim.keymap.set( - "n", - "gb", - ":Gitsigns toggle_current_line_blame", - { desc = "Toggle Inline Git Blame" } - ) - vim.keymap.set( - "n", - "go", - ":Git ", - { desc = "Open Git" } - ) - end, - }, - { - "moyiz/git-dev.nvim", - lazy = true, - cmd = { "GitDevOpen", "GitDevCleanAll" }, - opts = {}, - }, -} diff --git a/.config/nvim/lua/plugins/key_list.lua b/.config/nvim/lua/plugins/key_list.lua deleted file mode 100644 index 463fe43..0000000 --- a/.config/nvim/lua/plugins/key_list.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "folke/which-key.nvim", - config = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - require("which-key").setup({}) - end, -} diff --git a/.config/nvim/lua/plugins/search.lua b/.config/nvim/lua/plugins/search.lua deleted file mode 100644 index d6958bf..0000000 --- a/.config/nvim/lua/plugins/search.lua +++ /dev/null @@ -1,68 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - tag = "0.1.5", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-ui-select.nvim", - }, - config = function() - -- Setup -- - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown({}), - }, - }, - }) - require("telescope").load_extension("ui-select") - - -- Keybinding -- - local function setTelescopeBinding( - mode, - keymap, - method, - search_global, - description - ) - local function binding() - local path = search_global and "~" - or require("neo-tree.sources.manager").get_state( - "filesystem" - ).path - method({ search_dirs = { path } }) - end - vim.keymap.set(mode, keymap, binding, { desc = description }) - end - - local telescope = require("telescope.builtin") - - setTelescopeBinding( - "n", - "ff", - telescope.find_files, - false, - "Find File" - ) - setTelescopeBinding( - "n", - "fz", - telescope.live_grep, - false, - "Fuzzy Find" - ) - setTelescopeBinding( - "n", - "gff", - telescope.find_files, - true, - "Global Find File" - ) - setTelescopeBinding( - "n", - "gfz", - telescope.live_grep, - true, - "Global Fuzzy Find" - ) - end, -} diff --git a/.config/nvim/lua/plugins/status_bar.lua b/.config/nvim/lua/plugins/status_bar.lua deleted file mode 100644 index 7636b35..0000000 --- a/.config/nvim/lua/plugins/status_bar.lua +++ /dev/null @@ -1,77 +0,0 @@ -return { - { - "nvim-lualine/lualine.nvim", - dependencies = { - "nvim-tree/nvim-web-devicons", - "nvimdev/lspsaga.nvim", - }, - after = "rcarriga/nvim-dap-ui", - config = function() - -- Setup -- - local lspsaga_breadcrumbs = require("lspsaga.symbol.winbar").get_bar - - require("lualine").setup({ - options = { - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = { - "neo-tree", - "fugitive", - "help", - statusline = { - "dap-repl", - "dapui_console", - "dapui_console", - "dapui_watches", - "dapui_stacks", - "dapui_breakpoints", - "dapui_scopes", - }, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "diagnostics" }, - lualine_c = { lspsaga_breadcrumbs }, - lualine_x = { "location" }, - lualine_y = { "diff", "branch" }, - lualine_z = { "filetype" }, - }, - inactive_sections = { - lualine_a = { "mode" }, - lualine_b = { "diagnostics" }, - lualine_c = {}, - lualine_x = { "location" }, - lualine_y = { "diff", "branch" }, - lualine_z = { "filetype" }, - }, - tabline = {}, - winbar = { - lualine_a = { "filename" }, - }, - inactive_winbar = { - lualine_a = { "filename" }, - }, - extensions = { - require("plugins.extension.status_bar_plugin"), - }, - }) - end, - }, - { - "romgrk/barbar.nvim", - dependencies = { - "lewis6991/gitsigns.nvim", - "nvim-tree/nvim-web-devicons", - }, - config = function() require("barbar").setup() end, - }, -} diff --git a/.config/nvim/lua/plugins/theme.lua b/.config/nvim/lua/plugins/theme.lua deleted file mode 100644 index 4d4d2f2..0000000 --- a/.config/nvim/lua/plugins/theme.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, - config = function() - -- Set Theme -- - vim.cmd("colorscheme catppuccin") - end, -} diff --git a/.config/nvim/lua/utils/finder.lua b/.config/nvim/lua/utils/finder.lua deleted file mode 100644 index 6764b2c..0000000 --- a/.config/nvim/lua/utils/finder.lua +++ /dev/null @@ -1,114 +0,0 @@ -local Finder = {} - -Finder = {} - -local function is_ignored(entry, ignore_dot_dirs, ignored_dirs) - if entry == ".." or entry == "." then - return true - end - - if ignore_dot_dirs and string.match(entry, "^%.") then - return true - end - - for _, dir in ipairs(ignored_dirs) do - if entry == dir or string.find(entry, dir, 1, true) then - return true - end - end - - return false -end - -local function read_dir(dir) - local handle = io.popen('ls -a "' .. dir .. '"') - if not handle then - return nil - end - local result = handle:read("*a") - handle:close() - return result -end - -local function is_dir(path) - local f = io.open(path, "r") - if f == nil then - return false - end - local _, _, code = f:read(1) - f:close() - return code == 21 -end - -local function find_path_recursive(_dir, options) - -- Check max Depth - if options.current_depth > options.max_depth then - return nil - end - - local entries = read_dir(_dir) - if entries == nil then - return nil - end - - for entry in string.gmatch(entries, "[^\r\n]+") do - -- Check Ignored - if is_ignored(entry, options.ignore_dot_dirs, options.ignored_dirs) then - goto continue - end - - local full_path = _dir .. "/" .. entry - - -- Check for File - if entry == options.needle_file then - return full_path - end - - -- Check is Dir - if not is_dir(full_path) then - goto continue - end - - -- Recursive Call - options.current_depth = options.current_depth + 1 - local result = find_path_recursive(full_path, options) - if result ~= nil then - return result - end - - -- Cleanup - options.current_depth = options.current_depth - 1 - :: continue :: - end - return nil -end - -local function get_opened_folder() - local cwd = vim.fn.getcwd() - local file_path = vim.fn.expand('%:p:h') - - if file_path ~= '' then - return file_path - end - return cwd -end - -function Finder.find_project_dir(needle_file, max_depth, priority_dirs, ignored_dirs, ignore_dot_dirs) - local options = { - needle_file = needle_file, - max_depth = max_depth, - priority_dirs = priority_dirs, - ignored_dirs = ignored_dirs, - ignore_dot_dirs = ignore_dot_dirs, - current_depth = 0 - } - - local dir = get_opened_folder() - local file = find_path_recursive(dir, options) - if file == nil then - return nil - end - return file:match("(.*/)") -end - -return Finder diff --git a/.config/nvim/stylua.toml b/.config/nvim/stylua.toml deleted file mode 100644 index 474dd4d..0000000 --- a/.config/nvim/stylua.toml +++ /dev/null @@ -1,7 +0,0 @@ -column_width = 80 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 4 -quote_style = "AutoPreferDouble" -call_parentheses = "Always" -collapse_simple_statement = "FunctionOnly"