diff --git a/.config/nvim/nvim/lua/plugins/autopair.lua b/.config/nvim/nvim/lua/plugins/autopair.lua new file mode 100644 index 0000000..c51bf19 --- /dev/null +++ b/.config/nvim/nvim/lua/plugins/autopair.lua @@ -0,0 +1,5 @@ +return { + 'windwp/nvim-autopairs', + event = 'InsertEnter', + config = true, +} diff --git a/.config/nvim/nvim/lua/plugins/completions.lua b/.config/nvim/nvim/lua/plugins/completions.lua new file mode 100644 index 0000000..51b7a78 --- /dev/null +++ b/.config/nvim/nvim/lua/plugins/completions.lua @@ -0,0 +1,50 @@ +return { + { + "hrsh7th/cmp-nvim-lsp" + }, + { + "L3MON4D3/LuaSnip", + dependencies = { + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets" + } + }, + { + "hrsh7th/nvim-cmp", + opts = function(_, opts) + -- Setup options for lazydev.nvim + opts.sources = opts.sources or {} + table.insert(opts.sources, { + name = "lazydev", + group_index = 0, + }) + end, + 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(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = true}), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + }, { { name = "buffer"} }) + }) + end + } +} diff --git a/.config/nvim/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/nvim/lua/plugins/indent-blankline.lua new file mode 100644 index 0000000..aec0a40 --- /dev/null +++ b/.config/nvim/nvim/lua/plugins/indent-blankline.lua @@ -0,0 +1,8 @@ +return { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + opts = {}, + config = function () + require("ibl").setup() + end +} diff --git a/.config/nvim/nvim/lua/plugins/lazydev.lua b/.config/nvim/nvim/lua/plugins/lazydev.lua new file mode 100644 index 0000000..a073d8d --- /dev/null +++ b/.config/nvim/nvim/lua/plugins/lazydev.lua @@ -0,0 +1,13 @@ +return { + { + "folke/lazydev.nvim", + ft = "lua", + opts = { + library = { + { path = "luvit-meta/library", words = { "vim%.uv" } }, + }, + }, + }, + { "Bilal2453/luvit-meta", lazy = true }, + "hrsh7th/nvim-cmp", +} diff --git a/.config/nvim/nvim/nvim b/.config/nvim/nvim/nvim new file mode 120000 index 0000000..ae85021 --- /dev/null +++ b/.config/nvim/nvim/nvim @@ -0,0 +1 @@ +../../dotfiles/.config/nvim/nvim \ No newline at end of file