0% found this document useful (0 votes)
5 views3 pages

Neovim Configuration for Vsnip Users

Uploaded by

mokshparikh30
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Neovim Configuration for Vsnip Users

Uploaded by

mokshparikh30
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

call plug#begin()

Plug 'nvim-treesitter/nvim-treesitter'
Plug 'tpope/vim-commentary'

Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'

" For vsnip users.


Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'

Plug 'norcalli/[Link]'

Plug 'itchyny/[Link]'

Plug '[Link]

Plug 'preservim/nerdtree'
call plug#end()

syntax on
set number
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
set noshowmode
set cursorline
nnoremap <C-t> :NERDTreeToggle<CR>

let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified'] ]
\ },
\ 'component': {
\ 'lineinfo': "%{line('.') . '/' . line('$')}",
\ },
\ }

colorscheme lavender

lua <<EOF

require'[Link]'.setup{highlight = {enable = true},indent =


{enable = true},}
require '[Link]'.compilers = { "zig" }
require 'colorizer'.setup{'css';'javascript';'json';html={mode =
'foreground';}}-- Set up nvim-cmp.

local cmp = require'cmp'

[Link]({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
[Link]["vsnip#anonymous"]([Link]) -- For `vsnip` users.
-- require('luasnip').lsp_expand([Link]) -- For `luasnip` users.
-- require('snippy').expand_snippet([Link]) -- For `snippy` users.
-- [Link]["UltiSnips#Anon"]([Link]) -- For `ultisnips` users.
-- [Link]([Link]) -- For native neovim snippets (Neovim
v0.10+)
end,
},
window = {
-- completion = [Link](),
-- documentation = [Link](),
},
mapping = [Link]({
['<C-b>'] = [Link].scroll_docs(-4),
['<C-f>'] = [Link].scroll_docs(4),
['<C-Space>'] = [Link](),
['<C-e>'] = [Link](),
['<CR>'] = [Link]({ select = true }), -- Accept currently
selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = [Link]({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
})
})

-- To use git you need to install the plugin petertriho/cmp-git and uncomment
lines below
-- Set configuration for specific filetype.
--[[ [Link]('gitcommit', {
sources = [Link]({
{ name = 'git' },
}, {
{ name = 'buffer' },
})
})
require("cmp_git").setup() ]]--

-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't
work anymore).
[Link]({ '/', '?' }, {
mapping = [Link](),
sources = {
{ name = 'buffer' }
}
})

-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't
work anymore).
[Link](':', {
mapping = [Link](),
sources = [Link]({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
EOF

You might also like