cmp and copilot tweaks

This commit is contained in:
Tiago Sousa 2024-02-03 23:06:03 +00:00
parent 607f7448e1
commit c0f6b203f7
3 changed files with 14 additions and 3 deletions

View file

@ -2,6 +2,5 @@ return {
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"tpope/vim-surround", "tpope/vim-surround",
"github/copilot.vim",
"laytan/cloak.nvim", "laytan/cloak.nvim",
} }

View file

@ -1,6 +1,6 @@
return { return {
{ {
"hrsh7th/nvim-cmp", 'hrsh7th/nvim-cmp',
dependencies = { dependencies = {
'hrsh7th/cmp-nvim-lsp', -- lsp 'hrsh7th/cmp-nvim-lsp', -- lsp
'hrsh7th/cmp-nvim-lua', -- Nvim API completions 'hrsh7th/cmp-nvim-lua', -- Nvim API completions
@ -11,6 +11,8 @@ return {
'saadparwaiz1/cmp_luasnip', 'saadparwaiz1/cmp_luasnip',
'L3MON4D3/LuaSnip', 'L3MON4D3/LuaSnip',
'onsails/lspkind.nvim', 'onsails/lspkind.nvim',
'zbirenbaum/copilot.lua',
'zbirenbaum/copilot-cmp',
}, },
config = function() config = function()
local cmp_status_ok, cmp = pcall(require, "cmp") local cmp_status_ok, cmp = pcall(require, "cmp")
@ -28,6 +30,13 @@ return {
return return
end end
-- this is to make copilot-cmp work better
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
require("copilot_cmp").setup()
lspkind.init { lspkind.init {
symbol_map = { symbol_map = {
Copilot = "", Copilot = "",
@ -89,6 +98,7 @@ return {
menu = { menu = {
buffer = "[buf]", buffer = "[buf]",
nvim_lsp = "[lsp]", nvim_lsp = "[lsp]",
copilot = "[cop]",
luasnip = "[snip]", luasnip = "[snip]",
nvim_lsp_signature_help = "[sig]", nvim_lsp_signature_help = "[sig]",
nvim_lua = "[lua]", nvim_lua = "[lua]",
@ -114,6 +124,7 @@ return {
{ {
{ name = "nvim_lsp", }, { name = "nvim_lsp", },
{ name = 'nvim_lua' }, { name = 'nvim_lua' },
{ name = "copilot" },
{ name = 'luasnip' }, { name = 'luasnip' },
--{ name = 'nvim_lsp_signature_help' }, --{ name = 'nvim_lsp_signature_help' },
{ name = 'orgmode' } { name = 'orgmode' }
@ -163,7 +174,7 @@ return {
-- }, -- },
experimental = { experimental = {
ghost_text = false, ghost_text = true,
native_menu = false, native_menu = false,
}, },
} }

View file

@ -7,6 +7,7 @@ bind-key C-a send-prefix
set -g status-style 'bg=#181926 fg=#cad3f5' set -g status-style 'bg=#181926 fg=#cad3f5'
set-option -g status-position top set-option -g status-position top
set -g status-left-length 20 set -g status-left-length 20
set-option -sg escape-time 10
bind r source-file ~/.config/tmux/tmux.conf bind r source-file ~/.config/tmux/tmux.conf
set -g base-index 1 set -g base-index 1