diff --git a/lua/plugins/alpha-nvim.lua b/lua/plugins/alpha-nvim.lua index b4ee958..3f407db 100644 --- a/lua/plugins/alpha-nvim.lua +++ b/lua/plugins/alpha-nvim.lua @@ -1,43 +1,43 @@ return { - 'goolord/alpha-nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - local alpha = require("alpha") - local dashboard = require("alpha.themes.dashboard") + "goolord/alpha-nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") - -- https://github.com/MaximilianLloyd/ascii.nvim - dashboard.section.header.val = { - " ", - " ░░░ ▄▄▄▄▄▄███▄▄▄▄▄ ", - " ▄███████▀▀▀▀▀▀█▓▓▓▓▓▓██▄▄▄▄ ", - " ▐████▄▄ ■▓▓▓▓▀▀▀▀▀▀▀▀▀█████■ ██▄ ", - " ▀█████████▄▄▄▄▄███████████▀▀ ▄▄ ████░▄▄▄ ", - " ▐██▄ ▄▄▄▄▄▄▀▀▀▀▀▀▀▀▓▓▓▀░░░▄▄▄ ▄▄ ▐███▏▐██▓▄████ ", - " ▄█▓░███▓ ▄▓▓▓▄▄████████████▄█████▄ ▄█████████▐███ ████▏██▀████▀ ", - " ▐███▄███░▀████████▀▀ ▀▓█████▓▀██▓████▀▀ ███████ ▄█████ ■ ██▀ ", - " ▀████▓██ ▐██████ ▐████ ▐████▀ ▒████████▄ ▄███████ ", - " ▀███ ▀▀█████▄ ▄████ ▄████▏ ▄█████▀█████████▀ ███ ", - " ▀████▄ ▄████▐██▄███████▄▄▄███▓██▏ ▀██████▀ ▐██ ", - " ▀████████▀ ▀████▀▀████████▀▐██▏ ▀██▀▀ ▐██▏ ", - " ▓▓█ ▀████ ▀ ■███▄▄ ███ ██▏ ", - " ▀▀▀ ▀▀ ▀█████▄▓▀ ██▏ ", - " ░░ ▄████████████▄▄▄▄▄▄▄ ▀▀▀████▄▄ ▒▒▒ ██▏ ▄▄ ", - " ▀▀████▀▀▀▀▀▀████████████▄▄▓▓▓███▄ ░░░░ ▐█▏ ■▀▀ ", - " ▀▀▀▀▀▀█████▓▓▓▓█▄▄ ▐█ ", - " ▄█████████▄▄ ", - " ▄▄▄▄████████▀▀▀▀▀▀▀███▏ ", - " ▄▄█████▀▀▀▀ ▀■ ", - " ▄███▀▀▀▀ ", - " ■▀▀ ", - " ", - } + -- https://github.com/MaximilianLloyd/ascii.nvim + dashboard.section.header.val = { + " ", + " ░░░ ▄▄▄▄▄▄███▄▄▄▄▄ ", + " ▄███████▀▀▀▀▀▀█▓▓▓▓▓▓██▄▄▄▄ ", + " ▐████▄▄ ■▓▓▓▓▀▀▀▀▀▀▀▀▀█████■ ██▄ ", + " ▀█████████▄▄▄▄▄███████████▀▀ ▄▄ ████░▄▄▄ ", + " ▐██▄ ▄▄▄▄▄▄▀▀▀▀▀▀▀▀▓▓▓▀░░░▄▄▄ ▄▄ ▐███▏▐██▓▄████ ", + " ▄█▓░███▓ ▄▓▓▓▄▄████████████▄█████▄ ▄█████████▐███ ████▏██▀████▀ ", + " ▐███▄███░▀████████▀▀ ▀▓█████▓▀██▓████▀▀ ███████ ▄█████ ■ ██▀ ", + " ▀████▓██ ▐██████ ▐████ ▐████▀ ▒████████▄ ▄███████ ", + " ▀███ ▀▀█████▄ ▄████ ▄████▏ ▄█████▀█████████▀ ███ ", + " ▀████▄ ▄████▐██▄███████▄▄▄███▓██▏ ▀██████▀ ▐██ ", + " ▀████████▀ ▀████▀▀████████▀▐██▏ ▀██▀▀ ▐██▏ ", + " ▓▓█ ▀████ ▀ ■███▄▄ ███ ██▏ ", + " ▀▀▀ ▀▀ ▀█████▄▓▀ ██▏ ", + " ░░ ▄████████████▄▄▄▄▄▄▄ ▀▀▀████▄▄ ▒▒▒ ██▏ ▄▄ ", + " ▀▀████▀▀▀▀▀▀████████████▄▄▓▓▓███▄ ░░░░ ▐█▏ ■▀▀ ", + " ▀▀▀▀▀▀█████▓▓▓▓█▄▄ ▐█ ", + " ▄█████████▄▄ ", + " ▄▄▄▄████████▀▀▀▀▀▀▀███▏ ", + " ▄▄█████▀▀▀▀ ▀■ ", + " ▄███▀▀▀▀ ", + " ■▀▀ ", + " ", + } - dashboard.section.buttons.val = { - dashboard.button("e", " > New File", "ene"), - dashboard.button("SPC ee", " > File explorer", "Neotree"), - dashboard.button("q", " > Quit", "qa"), - } + dashboard.section.buttons.val = { + dashboard.button("e", " > New File", "ene"), + dashboard.button("SPC ee", " > File explorer", "Neotree"), + dashboard.button("q", " > Quit", "qa"), + } - alpha.setup(dashboard.opts) - end -}; + alpha.setup(dashboard.opts) + end, +} diff --git a/lua/plugins/formatting.lua b/lua/plugins/formatting.lua new file mode 100644 index 0000000..5820e06 --- /dev/null +++ b/lua/plugins/formatting.lua @@ -0,0 +1,20 @@ +return { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + css = { "prettierd" }, + scss = { "prettierd" }, + html = { "djlint" }, + lua = { "stylelua" }, + javascript = { "prettierd" }, + javascriptreact = { "prettierd" }, + json = { "prettierd" }, + jsonc = { "prettierd" }, + typescript = { "prettierd" }, + typescriptreact = { "prettierd" }, + }, + format_on_save = { + lsp_fallback = true, + }, + }, +} diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 1a989fb..684d54b 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -1,10 +1,10 @@ return { - "tpope/vim-fugitive", - config = function() - vim.keymap.set("n", "gs", vim.cmd.Git, { desc = "View `git status`" }) - vim.keymap.set("n", "gh", "diffget //2", { desc = "Pick gitdiff on left" }) - vim.keymap.set("n", "gl", "diffget //3", { desc = "Pick gitdiff on right" }) - vim.keymap.set("n", "gp", ":Git push", { desc = "Run `git push`" }) - vim.keymap.set("n", "gc", ":Git checkout ", { desc = "Git checkout" }) - end + "tpope/vim-fugitive", + config = function() + vim.keymap.set("n", "gs", vim.cmd.Git, { desc = "View `git status`" }) + vim.keymap.set("n", "gh", "diffget //2", { desc = "Pick gitdiff on left" }) + vim.keymap.set("n", "gl", "diffget //3", { desc = "Pick gitdiff on right" }) + vim.keymap.set("n", "gp", ":Git push", { desc = "Run `git push`" }) + vim.keymap.set("n", "gc", ":Git checkout ", { desc = "Git checkout" }) + end, } diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 6a45483..a831f96 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,76 +1,52 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { "lua_ls", "tsserver", "html" } - }) - end - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") - local capabilities = require("cmp_nvim_lsp").default_capabilities() + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { "lua_ls", "tsserver", "html" }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") + local capabilities = require("cmp_nvim_lsp").default_capabilities() - lspconfig.lua_ls.setup({ - capabilities = capabilities - }) + lspconfig.lua_ls.setup({ + capabilities = capabilities, + }) - lspconfig.tsserver.setup({ - capabilities = capabilities, - }) + lspconfig.tsserver.setup({ + capabilities = capabilities, + }) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = "Go to definition" }) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { desc = "Go to implementation" }) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, { desc = "Show signature" }) - vim.keymap.set('n', 'f', vim.lsp.buf.format, { desc = "Format buffer" }) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, { desc = "View code actions" }) - end - }, - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - config = function() - local mason_tool_installer = require("mason-tool-installer") + vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" }) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" }) + vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Show signature" }) + vim.keymap.set("n", "f", vim.lsp.buf.format, { desc = "Format buffer" }) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, { desc = "View code actions" }) + end, + }, + { + "WhoIsSethDaniel/mason-tool-installer.nvim", + config = function() + local mason_tool_installer = require("mason-tool-installer") - mason_tool_installer.setup({ - ensure_installed = { - "djlint", - "prettierd", - "eslint_d", - }, - automatic_installation = true - }) - end - }, - { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - lua = { "stylua" }, - javascript = { "eslint_d" }, - javascriptreact = { "eslint_d" }, - json = { "prettierd" }, - jsonc = { "prettierd" }, - yaml = { "prettierd" }, - typescript = { "eslint_d" }, - typescriptreact = { "eslint_d" }, - html = { "djlint" }, - ejs = { "prettierd" }, - css = { "prettierd" }, - scss = { "prettierd" }, - graphql = { "prettierd" }, - ["_"] = { "trim_whitespace" }, - }, - format_on_save = { - lsp_fallback = true, - }, - }, - } + mason_tool_installer.setup({ + ensure_installed = { + "djlint", + "prettierd", + "eslint_d", + }, + automatic_installation = true, + }) + end, + }, } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index b368357..9f40934 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,12 +1,12 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require('lualine').setup({ - options = { - icons_enabled = true, - theme = 'tokyonight' - } - }) - end + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + icons_enabled = true, + theme = "tokyonight", + }, + }) + end, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index b632f9d..932d76f 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,26 +1,40 @@ return { - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - local config = require("nvim-treesitter.configs") - config.setup({ - ensure_installed = { "lua", "javascript", "typescript", "tsx", "htmldjango", "html", "jsonc", "json", "jsdoc", "markdown", "markdown_inline", "vim", "vimdoc" }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true } - }) - end - }, - { - "nvim-treesitter/nvim-treesitter-context", - opts = { - max_lines = 2, - } - }, - { - 'windwp/nvim-autopairs', - event = "InsertEnter", - opts = {} - } + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local config = require("nvim-treesitter.configs") + config.setup({ + ensure_installed = { + "lua", + "javascript", + "typescript", + "tsx", + "htmldjango", + "html", + "jsonc", + "json", + "jsdoc", + "markdown", + "markdown_inline", + "vim", + "vimdoc", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-context", + opts = { + max_lines = 2, + }, + }, + { + "windwp/nvim-autopairs", + event = "InsertEnter", + opts = {}, + }, } diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 9aa07d6..9d2083d 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -1,55 +1,55 @@ return { - { - "lukas-reineke/indent-blankline.nvim", - opts = { - indent = { - char = "│", - tab_char = "│", - }, - scope = { enabled = false }, - exclude = { - filetypes = { - "help", - "alpha", - "dashboard", - "neo-tree", - "Trouble", - "trouble", - "lazy", - "mason", - "notify", - "toggleterm", - "lazyterm", - }, - }, - }, - main = "ibl", - }, - { - "echasnovski/mini.indentscope", - opts = { - symbol = "│", - options = { try_as_border = true }, - }, - init = function() - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "help", - "alpha", - "dashboard", - "neo-tree", - "Trouble", - "trouble", - "lazy", - "mason", - "notify", - "toggleterm", - "lazyterm", - }, - callback = function() - vim.b.miniindentscope_disable = true - end, - }) - end, - }, + { + "lukas-reineke/indent-blankline.nvim", + opts = { + indent = { + char = "│", + tab_char = "│", + }, + scope = { enabled = false }, + exclude = { + filetypes = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + }, + }, + main = "ibl", + }, + { + "echasnovski/mini.indentscope", + opts = { + symbol = "│", + options = { try_as_border = true }, + }, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + end, + }, }