Fix nvim-cmp setup and telescope config

This commit is contained in:
Fabian Becker 2022-07-29 16:40:51 +02:00
parent 9019997d59
commit c676e8e7dd
4 changed files with 10 additions and 9 deletions

View File

@ -9,7 +9,6 @@ local source_mapping = {
cmp_tabnine = "[TN]",
path = "[Path]",
}
cmp.setup({
-- snippet = {
-- -- REQUIRED - you must specify a snippet engine
@ -32,8 +31,8 @@ cmp.setup({
end,
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
['<C-n>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
@ -76,7 +75,8 @@ cmp.setup.cmdline(':', {
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
}),
mappings = cmp.mapping.preset.cmdline(),
})
-- Setup tabnine

View File

@ -6,10 +6,10 @@ local xnoremap = Remap.xnoremap
local nmap = Remap.nmap
-- better window movement
nnoremap('<C-h>', '<C-w>h')
nnoremap('<C-j>', '<C-w>j')
nnoremap('<C-k>', '<C-w>k')
nnoremap('<C-l>', '<C-w>l')
-- nnoremap('<C-h>', '<C-w>h')
-- nnoremap('<C-j>', '<C-w>j')
-- nnoremap('<C-k>', '<C-w>k')
-- nnoremap('<C-l>', '<C-w>l')
-- resize with arrows
nnoremap('<C-Up>', ':resize -2<CR>')

View File

@ -7,6 +7,7 @@ require('halfdan.keymap')
require('halfdan.colorscheme')
require('halfdan.treesitter')
require('halfdan.telescope')
require('halfdan.themes.nord')

View File

@ -38,6 +38,6 @@ vim.opt.winbar = "%=%m %f" -- Show winbar with modified flag and filename right
-- Enable telescope theme
vim.g.gruvbox_baby_telescope_theme = 1
vim.g.gruvbox_baby_background_color = "light"
vim.g.gruvbox_baby_background_color = "dark"
vim.g.mapleader = ' '