mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-04-26 20:35:40 +00:00
Fix nvim-cmp setup and telescope config
This commit is contained in:
parent
9019997d59
commit
c676e8e7dd
@ -9,7 +9,6 @@ local source_mapping = {
|
|||||||
cmp_tabnine = "[TN]",
|
cmp_tabnine = "[TN]",
|
||||||
path = "[Path]",
|
path = "[Path]",
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
-- snippet = {
|
-- snippet = {
|
||||||
-- -- REQUIRED - you must specify a snippet engine
|
-- -- REQUIRED - you must specify a snippet engine
|
||||||
@ -32,8 +31,8 @@ cmp.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-p>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
['<C-n>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
@ -76,7 +75,8 @@ cmp.setup.cmdline(':', {
|
|||||||
{ name = 'path' }
|
{ name = 'path' }
|
||||||
}, {
|
}, {
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
})
|
}),
|
||||||
|
mappings = cmp.mapping.preset.cmdline(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Setup tabnine
|
-- Setup tabnine
|
||||||
|
@ -6,10 +6,10 @@ local xnoremap = Remap.xnoremap
|
|||||||
local nmap = Remap.nmap
|
local nmap = Remap.nmap
|
||||||
|
|
||||||
-- better window movement
|
-- better window movement
|
||||||
nnoremap('<C-h>', '<C-w>h')
|
-- nnoremap('<C-h>', '<C-w>h')
|
||||||
nnoremap('<C-j>', '<C-w>j')
|
-- nnoremap('<C-j>', '<C-w>j')
|
||||||
nnoremap('<C-k>', '<C-w>k')
|
-- nnoremap('<C-k>', '<C-w>k')
|
||||||
nnoremap('<C-l>', '<C-w>l')
|
-- nnoremap('<C-l>', '<C-w>l')
|
||||||
|
|
||||||
-- resize with arrows
|
-- resize with arrows
|
||||||
nnoremap('<C-Up>', ':resize -2<CR>')
|
nnoremap('<C-Up>', ':resize -2<CR>')
|
||||||
|
@ -7,6 +7,7 @@ require('halfdan.keymap')
|
|||||||
|
|
||||||
require('halfdan.colorscheme')
|
require('halfdan.colorscheme')
|
||||||
require('halfdan.treesitter')
|
require('halfdan.treesitter')
|
||||||
|
require('halfdan.telescope')
|
||||||
|
|
||||||
require('halfdan.themes.nord')
|
require('halfdan.themes.nord')
|
||||||
|
|
||||||
|
@ -38,6 +38,6 @@ vim.opt.winbar = "%=%m %f" -- Show winbar with modified flag and filename right
|
|||||||
|
|
||||||
-- Enable telescope theme
|
-- Enable telescope theme
|
||||||
vim.g.gruvbox_baby_telescope_theme = 1
|
vim.g.gruvbox_baby_telescope_theme = 1
|
||||||
vim.g.gruvbox_baby_background_color = "light"
|
vim.g.gruvbox_baby_background_color = "dark"
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user