mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 06:04:42 +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
|
|
@ -27,7 +27,7 @@ Global helpers defined in init.lua:
|
|||
Default (no LSP, no completion): >bash
|
||||
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash
|
||||
<
|
||||
Full install (LSP + Supermaven): >bash
|
||||
Full install (LSP + completion): >bash
|
||||
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash -s -- --bells-and-whistles
|
||||
<
|
||||
Options: >
|
||||
|
|
@ -54,7 +54,8 @@ Options: >
|
|||
rust_analyzer.lua
|
||||
ts_ls.lua
|
||||
plugins/
|
||||
editor.lua Autopairs, flash, surround, ufo, supermaven
|
||||
editor.lua Autopairs, flash, surround, ufo
|
||||
cmp.lua Blink.cmp completion
|
||||
fzf.lua Fzf-lua fuzzy finder
|
||||
git.lua Fugitive, gitsigns, diffs.nvim
|
||||
lsp.lua nvim-lspconfig
|
||||
|
|
@ -100,7 +101,7 @@ All plugins load at startup via `defaults = { lazy = false }`.
|
|||
kylechui/nvim-surround Surround operations
|
||||
folke/flash.nvim Jump/search motions
|
||||
kevinhwang91/nvim-ufo Code folding
|
||||
supermaven-inc/supermaven-nvim Inline AI suggestions
|
||||
saghen/blink.cmp Autocompletion (LSP, path, buffer, snippets)
|
||||
|
||||
==============================================================================
|
||||
5. KEYMAPS *config-keymaps*
|
||||
|
|
|
|||
|
|
@ -20,6 +20,5 @@
|
|||
"pending.nvim": { "branch": "main", "commit": "077e4121b4fec369ad9da00a00228a3daf4e9031" },
|
||||
"preview.nvim": { "branch": "main", "commit": "39406c559cf90255bc3046df0dbad48b7c1e8319" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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