Added new nvim plugins: autopair, completions, indent-blankline, lazydev
This commit is contained in:
5
.config/nvim/nvim/lua/plugins/autopair.lua
Normal file
5
.config/nvim/nvim/lua/plugins/autopair.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true,
|
||||
}
|
||||
50
.config/nvim/nvim/lua/plugins/completions.lua
Normal file
50
.config/nvim/nvim/lua/plugins/completions.lua
Normal file
@@ -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({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<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" },
|
||||
}, { { name = "buffer"} })
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
8
.config/nvim/nvim/lua/plugins/indent-blankline.lua
Normal file
8
.config/nvim/nvim/lua/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
opts = {},
|
||||
config = function ()
|
||||
require("ibl").setup()
|
||||
end
|
||||
}
|
||||
13
.config/nvim/nvim/lua/plugins/lazydev.lua
Normal file
13
.config/nvim/nvim/lua/plugins/lazydev.lua
Normal file
@@ -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",
|
||||
}
|
||||
1
.config/nvim/nvim/nvim
Symbolic link
1
.config/nvim/nvim/nvim
Symbolic link
@@ -0,0 +1 @@
|
||||
../../dotfiles/.config/nvim/nvim
|
||||
Reference in New Issue
Block a user