-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
83 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cmp-nvim-lsp
added at
9af212
Submodule cmp_luasnip
added at
438632
Submodule cmp-buffer
added at
5dde54
Submodule nvim-compe
deleted from
dc39f9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
require('nvim-autopairs').setup() | ||
require('nvim-autopairs.completion.compe').setup({ map_cr = true }) | ||
require('nvim-autopairs.completion.cmp').setup({ map_cr = true }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
local kinds = { | ||
Text = ' Text', | ||
Method = ' Method', | ||
Function = ' Function', | ||
Constructor = ' Constructor', | ||
Field = 'ﰠ Field', | ||
Variable = ' Variable', | ||
Class = ' Class', | ||
Interface = ' Interface', | ||
Module = ' Module', | ||
Property = ' Property', | ||
Unit = ' Unit', | ||
Value = ' Value', | ||
Enum = ' Enum', | ||
Keyword = ' Keyword', | ||
Snippet = ' Snippet', | ||
Color = ' Color', | ||
File = ' File', | ||
Reference = ' Reference', | ||
Folder = ' Folder', | ||
EnumMember = ' EnumMember', | ||
Constant = ' Constant', | ||
Struct = ' Struct', | ||
Event = 'ﯓ Event', | ||
Operator = ' Operator', | ||
TypeParameter = ' TypeParameter', | ||
} | ||
|
||
local sources = { | ||
{ name = 'buffer' }, | ||
} | ||
if not vim.g.started_by_firenvim then | ||
table.insert(sources, { name = 'nvim_lsp' }) | ||
table.insert(sources, { name = 'luasnip' }) | ||
end | ||
|
||
local luasnip = require('luasnip') | ||
local cmp = require('cmp') | ||
cmp.setup({ | ||
sources = sources, | ||
mapping = { | ||
['<C-d>'] = cmp.mapping.scroll_docs(-4), | ||
['<C-f>'] = cmp.mapping.scroll_docs(4), | ||
['<C-Space>'] = cmp.mapping.confirm({ select = true }), | ||
['<C-e>'] = cmp.mapping.close(), | ||
}, | ||
snippet = { | ||
expand = function(args) | ||
luasnip.lsp_expand(args.body) | ||
end, | ||
}, | ||
formatting = { | ||
format = function(_, vim_item) | ||
vim_item.kind = kinds[vim_item.kind] | ||
return vim_item | ||
end, | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters