Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions config/vim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ require('lazy').setup({
dependencies = { 'nvim-lua/plenary.nvim' }
},
{ 'onsails/lspkind.nvim' }, -- lsp kind, makes autocomplete look better
{ 'hrsh7th/vim-vsnip' },
{ 'nvim-lua/plenary.nvim' }, -- lua utility functions
{
'nvim-telescope/telescope.nvim',
Expand All @@ -107,15 +106,15 @@ require('lazy').setup({
},
{ -- adds file bars along the top similar to vscode
'romgrk/barbar.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons' }
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
{ -- adds a file explorer similar to vscode
'nvim-tree/nvim-tree.lua',
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
{ -- adds diagnostics for files
"folke/trouble.nvim",
dependencies = "kyazdani42/nvim-web-devicons",
dependencies = "nvim-tree/nvim-web-devicons",
config = function()
require("trouble").setup {}
end
Expand Down Expand Up @@ -300,6 +299,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
local lspkind = require('lspkind')
lspkind.init({})

-- Pull in the friendly-snippets library (vscode-format) for LuaSnip.
require('luasnip.loaders.from_vscode').lazy_load()

cmp.setup({
formatting = {
format = lspkind.cmp_format({
Expand All @@ -311,7 +313,7 @@ cmp.setup({
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
require('luasnip').lsp_expand(args.body)
end
},
window = {},
Expand All @@ -324,6 +326,7 @@ cmp.setup({
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'nvim_lua' },
{ name = 'path' },
}, {
Expand Down
Loading