diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2023-12-09 23:26:16 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2023-12-09 23:26:16 +0300 |
commit | 7e86db99b40aa92b290b106a4875b5cc25c2a8e3 (patch) | |
tree | 39fb4139490cb87cbe8e2538001ff4aa34dc5c02 /.config/nvim/lua/user/lsp/common.lua | |
parent | d2193c1bd22ba52fc4784eb271b40d71cb140738 (diff) |
Fixed typoo in common.luad (mappings -> mapping)
Diffstat (limited to '.config/nvim/lua/user/lsp/common.lua')
-rw-r--r-- | .config/nvim/lua/user/lsp/common.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.config/nvim/lua/user/lsp/common.lua b/.config/nvim/lua/user/lsp/common.lua index 032cb7f..acc3a64 100644 --- a/.config/nvim/lua/user/lsp/common.lua +++ b/.config/nvim/lua/user/lsp/common.lua @@ -11,6 +11,7 @@ luasnip.setup() local expnoresilent = {expr = true, noremap = true, silent = true} local noresilent = {noremap = true, silent = true} +local map = cmp.mapping -- stolen from https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance local kind_icons = { @@ -36,14 +37,18 @@ local stolen_function = function() -- to check whether there are words before cu return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end --- TODO: Finish cmp.setup { snippet = { expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- for vsnip (i left it) + -- vim.fn["vsnip#anonymous"](args.body) -- for vsnip (i left it) luasnip.lsp_expand(args.body) -- for luasnip cause i like it more end, }, + mapping = { + ["<C-n>"] = map.select_next_item(), + ["<C-p>"] = map(map.select_prev_item({ behavior = cmp.SelectBehavior.Insert })), + ["<C-Space>"] = map.complete(), + }, -- NOTE: ordering or this table affects completions ordering sources = { -- TODO: Add keyword_length to some of them ?????? { name = 'nvim_lsp' }, |