diff --git a/.config/nvim/lua/core/editor.lua b/.config/nvim/lua/core/editor.lua index 3781ab5..5a56369 100644 --- a/.config/nvim/lua/core/editor.lua +++ b/.config/nvim/lua/core/editor.lua @@ -1,8 +1,8 @@ -- Use 2 Spaces Instead of Tabs -- -vim.cmd("set expandtab") -vim.cmd("set tabstop=4") -vim.cmd("set softtabstop=4") -vim.cmd("set shiftwidth=4") +vim.opt.expandtab = true +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 -- Enable Line Number -- -vim.cmd("set number") \ No newline at end of file +vim.opt.number = true diff --git a/.config/nvim/lua/core/keymap.lua b/.config/nvim/lua/core/keymap.lua index 82da307..1f11767 100644 --- a/.config/nvim/lua/core/keymap.lua +++ b/.config/nvim/lua/core/keymap.lua @@ -1,5 +1,5 @@ vim.g.mapleader = " " ---[[ Indentation ]]-- -vim.keymap.set("n", "", " >>") -vim.keymap.set("n", "", " <<") \ No newline at end of file +--[[ Indentation ]] +vim.keymap.set("n", "", ">>") +vim.keymap.set("n", "", "<<") diff --git a/.config/nvim/lua/plugins/editor.lua b/.config/nvim/lua/plugins/editor.lua index 5806e6d..6b4de38 100644 --- a/.config/nvim/lua/plugins/editor.lua +++ b/.config/nvim/lua/plugins/editor.lua @@ -5,5 +5,5 @@ return { require("plugins.editor.editor_debugging"), require("plugins.editor.editor_language_server"), require("plugins.editor.editor_markdown_preview"), - require("plugins.editor.editor_nvim_dev") + require("plugins.editor.editor_nvim_dev"), } diff --git a/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua b/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua index 366c2a7..b6147b0 100644 --- a/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua +++ b/.config/nvim/lua/plugins/editor/editor_auto_brackets.lua @@ -1,6 +1,6 @@ return { - 'm4xshen/autoclose.nvim', + "m4xshen/autoclose.nvim", config = function() require("autoclose").setup() - end + end, } diff --git a/.config/nvim/lua/plugins/editor/editor_debugging.lua b/.config/nvim/lua/plugins/editor/editor_debugging.lua index 8a29b8c..f4615a8 100644 --- a/.config/nvim/lua/plugins/editor/editor_debugging.lua +++ b/.config/nvim/lua/plugins/editor/editor_debugging.lua @@ -23,7 +23,7 @@ return { }, { elements = { - { id = "repl", size = 0.5 }, + { id = "repl", size = 0.5 }, { id = "console", size = 0.5 }, }, position = "bottom", diff --git a/.config/nvim/lua/plugins/editor/editor_language_server.lua b/.config/nvim/lua/plugins/editor/editor_language_server.lua index 31986b4..7874f3e 100644 --- a/.config/nvim/lua/plugins/editor/editor_language_server.lua +++ b/.config/nvim/lua/plugins/editor/editor_language_server.lua @@ -5,90 +5,90 @@ 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") + { + "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) + 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", "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", "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, - }, + -- 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/language_server/language_server_generic.lua b/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua index 81e4931..986583f 100644 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua +++ b/.config/nvim/lua/plugins/editor/language_server/language_server_generic.lua @@ -6,12 +6,10 @@ LSP.mason_requirements = { "sqlls", "lemminx", "yamlls", - "marksman" + "marksman", } -LSP.plugin_info = { - -} +LSP.plugin_info = {} function LSP.setup(lspconfig, capabilities) local config = { capabilities = capabilities } @@ -26,7 +24,7 @@ end function LSP.formatter(null_ls) return { null_ls.builtins.formatting.prettier.with({ - command = "prettierd" + command = "prettierd", }), null_ls.builtins.diagnostics.spectral, null_ls.builtins.code_actions.refactoring, @@ -38,7 +36,7 @@ function LSP.formatter(null_ls) null_ls.builtins.diagnostics.codespell, null_ls.builtins.diagnostics.dotenv_linter, null_ls.builtins.diagnostics.trail_space, - null_ls.builtins.diagnostics.vacuum + null_ls.builtins.diagnostics.vacuum, } end 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 index b0a1880..a810603 100644 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_go.lua +++ b/.config/nvim/lua/plugins/editor/language_server/language_server_go.lua @@ -1,12 +1,10 @@ local LSP = {} LSP.mason_requirements = { - "gopls" + "gopls", } -LSP.plugin_info = { - -} +LSP.plugin_info = {} function LSP.setup(lspconfig, capabilities) lspconfig.gopls.setup({ capabilities = capabilities }) @@ -18,7 +16,7 @@ function LSP.formatter(null_ls) null_ls.builtins.code_actions.gomodifytags, null_ls.builtins.code_actions.impl, null_ls.builtins.diagnostics.golangci_lint, - null_ls.builtins.diagnostics.staticcheck + null_ls.builtins.diagnostics.staticcheck, } end 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 index ad46ddc..2f242f6 100644 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_lua.lua +++ b/.config/nvim/lua/plugins/editor/language_server/language_server_lua.lua @@ -1,12 +1,10 @@ local LSP = {} LSP.mason_requirements = { - "lua_ls" + "lua_ls", } -LSP.plugin_info = { - -} +LSP.plugin_info = {} function LSP.setup(lspconfig, capabilities) lspconfig.lua_ls.setup({ @@ -15,16 +13,16 @@ function LSP.setup(lspconfig, capabilities) Lua = { diagnostics = { globals = { "vim" }, - } - } - } + }, + }, + }, }) end function LSP.formatter(null_ls) return { null_ls.builtins.formatting.stylua, - null_ls.builtins.diagnostics.selene + null_ls.builtins.diagnostics.selene, } end 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 index 5befb03..61dec91 100644 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_php.lua +++ b/.config/nvim/lua/plugins/editor/language_server/language_server_php.lua @@ -2,12 +2,10 @@ local LSP = {} LSP.mason_requirements = { "phpactor", - "stimulus_ls" + "stimulus_ls", } -LSP.plugin_info = { - -} +LSP.plugin_info = {} function LSP.setup(lspconfig, capabilities) local config = { capabilities = capabilities } @@ -20,7 +18,7 @@ function LSP.formatter(null_ls) null_ls.builtins.diagnostics.phpstan, null_ls.builtins.formatting.phpcsfixer.with({ prefer_local = "vendor/bin/php-cs-fixer", - args = { "fix", "--allow-risky=yes", "$FILENAME" } + args = { "fix", "--allow-risky=yes", "$FILENAME" }, }), null_ls.builtins.diagnostics.phpcs, null_ls.builtins.diagnostics.twigcs, 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 index 5b49fab..f755d58 100644 --- a/.config/nvim/lua/plugins/editor/language_server/language_server_web.lua +++ b/.config/nvim/lua/plugins/editor/language_server/language_server_web.lua @@ -11,9 +11,7 @@ LSP.mason_requirements = { "eslint", } -LSP.plugin_info = { - -} +LSP.plugin_info = {} function LSP.setup(lspconfig, capabilities) local config = { capabilities = capabilities } @@ -30,7 +28,7 @@ end function LSP.formatter(null_ls) return { require("none-ls.formatting.eslint_d"), - null_ls.builtins.diagnostics.stylelint + null_ls.builtins.diagnostics.stylelint, } end diff --git a/.config/nvim/lua/plugins/file_tree.lua b/.config/nvim/lua/plugins/file_tree.lua index ab8e824..c75df68 100644 --- a/.config/nvim/lua/plugins/file_tree.lua +++ b/.config/nvim/lua/plugins/file_tree.lua @@ -1,71 +1,71 @@ 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", - }, - }, - }) + "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", - }) + -- 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, + -- 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/key_list.lua b/.config/nvim/lua/plugins/key_list.lua index db3615a..463fe43 100644 --- a/.config/nvim/lua/plugins/key_list.lua +++ b/.config/nvim/lua/plugins/key_list.lua @@ -1,10 +1,8 @@ return { "folke/which-key.nvim", config = function() - vim.o.timeout = true; + vim.o.timeout = true vim.o.timeoutlen = 300 - require("which-key").setup({ - - }) - end + require("which-key").setup({}) + end, } diff --git a/.config/nvim/lua/plugins/search.lua b/.config/nvim/lua/plugins/search.lua index e1d988d..db1821f 100644 --- a/.config/nvim/lua/plugins/search.lua +++ b/.config/nvim/lua/plugins/search.lua @@ -3,7 +3,7 @@ return { tag = "0.1.5", dependencies = { "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-ui-select.nvim" + "nvim-telescope/telescope-ui-select.nvim", }, config = function() -- Setup -- @@ -31,6 +31,5 @@ return { 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 + end, } diff --git a/.config/nvim/lua/plugins/status_bar.lua b/.config/nvim/lua/plugins/status_bar.lua index dd7cdf6..6a750f5 100644 --- a/.config/nvim/lua/plugins/status_bar.lua +++ b/.config/nvim/lua/plugins/status_bar.lua @@ -1,79 +1,79 @@ 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 + { + "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.temp.status_bar_plugin"), - }, - }) - end, - }, - { - "romgrk/barbar.nvim", - dependencies = { - "lewis6991/gitsigns.nvim", - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("barbar").setup() - end, - }, + 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 index 0cdc73b..4d4d2f2 100644 --- a/.config/nvim/lua/plugins/theme.lua +++ b/.config/nvim/lua/plugins/theme.lua @@ -5,5 +5,5 @@ return { config = function() -- Set Theme -- vim.cmd("colorscheme catppuccin") - end -} \ No newline at end of file + end, +}