added neovim config and basic README.md
This commit is contained in:
parent
d7a014909d
commit
56bca305b2
12 changed files with 312 additions and 1 deletions
45
lua/core/plugins/autocomplete.lua
Normal file
45
lua/core/plugins/autocomplete.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
-- https://github.com/hrsh7th/nvim-cmp
|
||||
-- Basically a completion plugin for neovim
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
{ "L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp"
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }
|
||||
}),
|
||||
formatting = {
|
||||
format = require("nvim-highlight-colors").format
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue