diff options
Diffstat (limited to 'lua/plugins')
-rw-r--r-- | lua/plugins/alpha.lua | 38 | ||||
-rw-r--r-- | lua/plugins/catppuccin.lua | 8 | ||||
-rw-r--r-- | lua/plugins/completions.lua | 51 | ||||
-rw-r--r-- | lua/plugins/lsp-config.lua | 38 | ||||
-rw-r--r-- | lua/plugins/lualine.lua | 29 | ||||
-rw-r--r-- | lua/plugins/none-ls.lua | 15 | ||||
-rw-r--r-- | lua/plugins/telescope.lua | 10 | ||||
-rw-r--r-- | lua/plugins/treesitter.lua | 13 |
8 files changed, 202 insertions, 0 deletions
diff --git a/lua/plugins/alpha.lua b/lua/plugins/alpha.lua new file mode 100644 index 0000000..0762154 --- /dev/null +++ b/lua/plugins/alpha.lua @@ -0,0 +1,38 @@ +return { + "goolord/alpha-nvim", + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + + config = function() + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") + + dashboard.section.header.val = { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", + " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", + " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", + " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", + " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", + " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", + " ", + } + + -- Set menu + dashboard.section.buttons.val = { + dashboard.button( "e", " > New file" , ":ene <BAR> startinsert <CR>"), + dashboard.button( "Ctrl-p", " > Find file", ":Telescope find_files<CR>"), + dashboard.button( "q", " > Quit NVIM", ":qa<CR>"), + dashboard.button("m", " > Mason", ":Mason<CR>"), + } + alpha.setup(dashboard.opts) + + end +} diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua new file mode 100644 index 0000000..366ee25 --- /dev/null +++ b/lua/plugins/catppuccin.lua @@ -0,0 +1,8 @@ +return { "catppuccin/nvim", + name = "catppuccin", + priority = 1000 , + flavour = "mocha", -- latte, frappe, macchiato, mocha + config = function() +vim.cmd.colorscheme "catppuccin" + end +} diff --git a/lua/plugins/completions.lua b/lua/plugins/completions.lua new file mode 100644 index 0000000..e2de671 --- /dev/null +++ b/lua/plugins/completions.lua @@ -0,0 +1,51 @@ +return { + { + "hrsh7th/cmp-nvim-lsp", + }, + { + "L3MON4D3/LuaSnip", + dependencies = { + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + }, + }, + { + "hrsh7th/nvim-cmp", + config = function() + local cmp = require("cmp") + require("luasnip.loaders.from_vscode").lazy_load() + + cmp.setup({ + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + + --- + completion = { + autocomplete = false, + }, + --- + + mapping = cmp.mapping.preset.insert({ + ["<C-p>"] = cmp.mapping.select_prev_item(), + ["<C-n>"] = cmp.mapping.select_prev_item(), + ["<C-Space>"] = cmp.mapping.complete(), + ["<C-e>"] = cmp.mapping.abort(), + ["<CR>"] = cmp.mapping.confirm({ select = true }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, -- For luasnip users. + }, { + { name = "buffer" }, + }), + }) + end, + }, +} diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua new file mode 100644 index 0000000..708b5b3 --- /dev/null +++ b/lua/plugins/lsp-config.lua @@ -0,0 +1,38 @@ +return { + { + "williamboman/mason.nvim", + lazy = false, + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + lazy = false, + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { "lua_ls", "html" }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + lazy = false, + config = function() + -- local capabilities = require('cmp_nvim_lsp').default_capabilities() + + local lspconfig = require("lspconfig") + lspconfig.html.setup({ + capabilities = capabilities + }) + lspconfig.lua_ls.setup({ + capabilities = capabilities + }) + + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + -- vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {}) + -- vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {}) + -- vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {}) + end, + }, +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..a07a67d --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,29 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + --theme = "powerline" + --theme = "dracula" + theme = "OceanicNext", + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff"}, + lualine_c = { "buffers" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "buffers" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + }) + end, +} diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..a569d93 --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,15 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.black, -- python + null_ls.builtins.formatting.yamlfmt, + null_ls.builtins.diagnostics.djlint, -- html + }, + }) + vim.keymap.set("n", "<leader>fg", vim.lsp.buf.format, {}) + end, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..c4baade --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,10 @@ +return { + "nvim-telescope/telescope.nvim", + tag = "0.1.6", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set("n", "<C-p>", builtin.find_files, {}) + vim.keymap.set("n", "<leader>gf", builtin.live_grep, {}) + end, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..e7b181d --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,13 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local config = require("nvim-treesitter.configs") + config.setup({ + ensure_installed = { "lua", "javascript", "yaml", "python", "terraform" }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) + end +} |