use j and k for popups

This commit is contained in:
Joel Lau 2024-02-17 14:00:43 +08:00
parent 45fe63f559
commit 23e3bee7d3
No known key found for this signature in database
GPG Key ID: 5C11071C7BA68EC2
1 changed files with 6 additions and 4 deletions

View File

@ -391,6 +391,8 @@ require('telescope').setup {
i = {
['<C-u>'] = false,
['<C-d>'] = false,
['<C-j>'] = require('telescope.actions').move_selection_next,
['<C-k>'] = require('telescope.actions').move_selection_previous,
},
},
},
@ -617,11 +619,11 @@ require('mason-lspconfig').setup()
-- define the property 'filetypes' to the map in question.
local servers = {
-- clangd = {},
-- gopls = {},
gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- tsserver = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
html = { filetypes = { 'html' } },
lua_ls = {
Lua = {
@ -675,8 +677,8 @@ cmp.setup {
completeopt = 'menu,menuone,noinsert',
},
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-j>'] = cmp.mapping.select_next_item(),
['<C-k>'] = cmp.mapping.select_prev_item(),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {},