mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 10:05:17 +00:00
rm supermaven and accept cmp
This commit is contained in:
parent
7c67bd3fb4
commit
13f4b8125f
5 changed files with 56 additions and 20 deletions
|
|
@ -17,7 +17,12 @@ function M.on_attach(_, bufnr)
|
|||
end
|
||||
|
||||
function M.capabilities()
|
||||
return vim.lsp.protocol.make_client_capabilities()
|
||||
local caps = vim.lsp.protocol.make_client_capabilities()
|
||||
local ok, blink = pcall(require, 'blink.cmp')
|
||||
if ok then
|
||||
caps = blink.get_lsp_capabilities(caps)
|
||||
end
|
||||
return caps
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
46
config/nvim/lua/plugins/cmp.lua
Normal file
46
config/nvim/lua/plugins/cmp.lua
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
return {
|
||||
'saghen/blink.cmp',
|
||||
version = '*',
|
||||
event = { 'InsertEnter', 'LspAttach' },
|
||||
opts = {
|
||||
keymap = {
|
||||
['<Tab>'] = { 'select_and_accept', 'snippet_forward', 'fallback' },
|
||||
['<S-Tab>'] = { 'snippet_backward', 'fallback' },
|
||||
['<c-p>'] = { 'select_prev', 'fallback' },
|
||||
['<c-n>'] = { 'show', 'select_next', 'fallback' },
|
||||
['<c-y>'] = { 'select_and_accept', 'fallback' },
|
||||
['<c-e>'] = { 'cancel', 'fallback' },
|
||||
['<c-u>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<c-d>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
},
|
||||
cmdline = { enabled = false },
|
||||
completion = {
|
||||
accept = {
|
||||
auto_brackets = { enabled = true },
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
window = {
|
||||
border = 'single',
|
||||
scrollbar = false,
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
auto_show = true,
|
||||
border = 'single',
|
||||
scrollbar = false,
|
||||
draw = {
|
||||
treesitter = { 'lsp' },
|
||||
columns = {
|
||||
{ 'label', 'label_description', gap = 1 },
|
||||
{ 'kind' },
|
||||
},
|
||||
},
|
||||
},
|
||||
ghost_text = { enabled = true },
|
||||
},
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'buffer', 'snippets' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -147,21 +147,6 @@ return {
|
|||
map('n', '<leader>co', open_current_cp_problem_url, { desc = 'CP open problem url' })
|
||||
end,
|
||||
},
|
||||
{
|
||||
'supermaven-inc/supermaven-nvim',
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = '<Tab>',
|
||||
clear_suggestion = '<C-]>',
|
||||
accept_word = '<C-j>',
|
||||
},
|
||||
ignore_filetypes = { gitcommit = true },
|
||||
color = {
|
||||
suggestion_color = vim.api.nvim_get_hl(0, { name = 'Comment' }).fg,
|
||||
cterm = 244,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'barrettruth/pending.nvim',
|
||||
init = function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue