aboutsummaryrefslogtreecommitdiffstats
path: root/config/nvim/lua/plugins
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2024-08-14 00:48:44 +0900
committerGitHub <noreply@github.com>2024-08-14 00:48:44 +0900
commitac062ecf708b28d10cc3275fcf9e18c736d568f4 (patch)
treed80f5d1f469304bd625b4a8fd2c49085e24f3285 /config/nvim/lua/plugins
parentf9ff441fe41e4af112411b4bef55bca98c2f7474 (diff)
parent69a7793deddb102d9643d5ee047bde81ba25bcbd (diff)
Merge pull request #402 from JaKooLit/main
Main to AGS-Dev
Diffstat (limited to 'config/nvim/lua/plugins')
-rw-r--r--config/nvim/lua/plugins/alpha.lua105
-rw-r--r--config/nvim/lua/plugins/catppuccin.lua13
-rw-r--r--config/nvim/lua/plugins/lsp-config.lua25
-rw-r--r--config/nvim/lua/plugins/lualine.lua10
-rw-r--r--config/nvim/lua/plugins/neo-tree.lua12
-rw-r--r--config/nvim/lua/plugins/telescope.lua13
-rw-r--r--config/nvim/lua/plugins/treesitter.lua12
7 files changed, 190 insertions, 0 deletions
diff --git a/config/nvim/lua/plugins/alpha.lua b/config/nvim/lua/plugins/alpha.lua
new file mode 100644
index 00000000..a3346f1b
--- /dev/null
+++ b/config/nvim/lua/plugins/alpha.lua
@@ -0,0 +1,105 @@
+--- @type LazyPluginSpec
+return {
+ "goolord/alpha-nvim",
+ event = "VimEnter",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ opts = function()
+ local dashboard = require("alpha.themes.dashboard")
+ require("alpha.term")
+ local arttoggle = false
+
+ local logo = {
+ [[ ]],
+ [[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
+ [[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
+ [[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
+ [[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
+ [[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
+ [[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
+ [[ ]],
+ }
+
+ local art = {
+ -- { name, width, height }
+ { "tohru", 62, 17 },
+ }
+
+ if arttoggle == true then
+ dashboard.opts.opts.noautocmd = true
+ dashboard.section.terminal.opts.redraw = true
+ local path = vim.fn.stdpath("config") .. "/assets/"
+ -- local random = math.random(1, #art)
+ local currentart = art[1]
+ dashboard.section.terminal.command = "cat " .. path .. currentart[1]
+
+ dashboard.section.terminal.width = currentart[2]
+ dashboard.section.terminal.height = currentart[3]
+
+ dashboard.opts.layout = {
+ dashboard.section.terminal,
+ { type = "padding", val = 2 },
+ dashboard.section.buttons,
+ dashboard.section.footer,
+ }
+ else
+ dashboard.section.header.val = logo
+ end
+ dashboard.section.buttons.val = {
+ dashboard.button("f", " " .. "Find files", ":Telescope find_files <CR>"),
+ }
+ for _, button in ipairs(dashboard.section.buttons.val) do
+ button.opts.hl = "AlphaButtons"
+ button.opts.hl_shortcut = "AlphaShortcut"
+ end
+ dashboard.section.header.opts.hl = "Function"
+ dashboard.section.buttons.opts.hl = "Identifier"
+ dashboard.section.footer.opts.hl = "Function"
+ dashboard.opts.layout[1].val = 4
+ return dashboard
+ end,
+ config = function(_, dashboard)
+ if vim.o.filetype == "lazy" then
+ vim.cmd.close()
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "AlphaReady",
+ callback = function()
+ require("lazy").show()
+ end,
+ })
+ end
+ require("alpha").setup(dashboard.opts)
+ vim.api.nvim_create_autocmd("User", {
+ pattern = "LazyVimStarted",
+ callback = function()
+ local v = vim.version()
+ local dev = ""
+ if v.prerelease == "dev" then
+ dev = "-dev+" .. v.build
+ else
+ dev = ""
+ end
+ local version = v.major .. "." .. v.minor .. "." .. v.patch .. dev
+ local stats = require("lazy").stats()
+ local plugins_count = stats.loaded .. "/" .. stats.count
+ local ms = math.floor(stats.startuptime + 0.5)
+ local time = vim.fn.strftime("%H:%M:%S")
+ local date = vim.fn.strftime("%d.%m.%Y")
+ local line1 = " " .. plugins_count .. " plugins loaded in " .. ms .. "ms"
+ local line2 = "󰃭 " .. date .. "  " .. time
+ local line3 = " " .. version
+
+ local line1_width = vim.fn.strdisplaywidth(line1)
+ local line2Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line2)) / 2) .. line2
+ local line3Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line3)) / 2) .. line3
+
+ dashboard.section.footer.val = {
+ line1,
+ line2Padded,
+ line3Padded,
+ }
+ pcall(vim.cmd.AlphaRedraw)
+ end,
+ })
+ end,
+}
+
diff --git a/config/nvim/lua/plugins/catppuccin.lua b/config/nvim/lua/plugins/catppuccin.lua
new file mode 100644
index 00000000..6d05f984
--- /dev/null
+++ b/config/nvim/lua/plugins/catppuccin.lua
@@ -0,0 +1,13 @@
+return {
+ "catppuccin/nvim",
+ lazy = false,
+ name = "catppuccin",
+ priority = 1000,
+ config = function()
+ require("catppuccin").setup({
+ transparent_background = true,
+ })
+ vim.cmd.colorscheme "catppuccin"
+ end
+}
+
diff --git a/config/nvim/lua/plugins/lsp-config.lua b/config/nvim/lua/plugins/lsp-config.lua
new file mode 100644
index 00000000..f41e7984
--- /dev/null
+++ b/config/nvim/lua/plugins/lsp-config.lua
@@ -0,0 +1,25 @@
+return {
+ {
+ "williamboman/mason.nvim",
+ config = function()
+ require("mason").setup()
+ end
+ },
+ {
+ "williamboman/mason-lspconfig.nvim",
+ config = function()
+ require("mason-lspconfig").setup({
+ ensure_installed = {"lua_ls", "clangd", "cmake", "cssls", "html"}
+ })
+ end
+ },
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local lspconfig = require("lspconfig")
+ lspconfig.lua_ls.setup({})
+ vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
+ end
+ }
+}
+
diff --git a/config/nvim/lua/plugins/lualine.lua b/config/nvim/lua/plugins/lualine.lua
new file mode 100644
index 00000000..bf5923d6
--- /dev/null
+++ b/config/nvim/lua/plugins/lualine.lua
@@ -0,0 +1,10 @@
+return {
+ 'nvim-lualine/lualine.nvim',
+ config = function()
+ require('lualine').setup({
+ options = {
+ theme = 'dracula'
+ }
+ })
+ end
+}
diff --git a/config/nvim/lua/plugins/neo-tree.lua b/config/nvim/lua/plugins/neo-tree.lua
new file mode 100644
index 00000000..da29ce40
--- /dev/null
+++ b/config/nvim/lua/plugins/neo-tree.lua
@@ -0,0 +1,12 @@
+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()
+ vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>', {})
+ end
+}
diff --git a/config/nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua
new file mode 100644
index 00000000..7282f2cb
--- /dev/null
+++ b/config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,13 @@
+return {
+ {
+ 'nvim-telescope/telescope.nvim', tag = '0.1.8',
+ dependencies = { 'nvim-lua/plenary.nvim' },
+ config = function()
+ local builtin = require("telescope.builtin")
+ vim.keymap.set('n', '<C-p>', builtin.find_files, {})
+ end
+ },
+ {
+ "nvim-telescope/telescope-ui-select.nvim"
+ }
+}
diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 00000000..20063418
--- /dev/null
+++ b/config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,12 @@
+return {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ config = function()
+ local configs = require("nvim-treesitter.configs")
+ configs.setup({
+ ensure_installed = {"lua", "c", "javascript"},
+ highlight = { enable = true },
+ indent = { enable = true }
+ })
+ end
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage