update config

This commit is contained in:
sudacode 2023-03-01 16:54:47 -08:00
parent dda7fdaf67
commit 82dca24ece
3 changed files with 47 additions and 11 deletions

View File

@ -29,13 +29,18 @@ require('packer').startup(function(use)
refresh = "gr", refresh = "gr",
open = "<C-CR>" open = "<C-CR>"
}, },
layout = {
position = "right", -- | top | left | right
ratio = 0.4
},
}, },
suggestion = { suggestion = {
enabled = true, enabled = true,
auto_trigger = true, auto_trigger = true,
debounce = 75, debounce = 75,
keymap = { keymap = {
accept = "<Tab>", -- accept = "<Tab>",
accept = "<Right>",
next = "<M-]>", next = "<M-]>",
prev = "<M-[>", prev = "<M-[>",
dismiss = "<C-]>", dismiss = "<C-]>",
@ -54,7 +59,15 @@ require('packer').startup(function(use)
-- }, -- },
copilot_node_command = 'node', -- Node version must be < 18 copilot_node_command = 'node', -- Node version must be < 18
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer", plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
server_opts_overrides = {}, server_opts_overrides = {
trace = "verbose",
settings = {
advanced = {
listCount = 10, -- #completions for panel
inlineSuggestCount = 4, -- #completions for getCompletions
}
},
}
}) })
require("copilot.suggestion").toggle_auto_trigger() require("copilot.suggestion").toggle_auto_trigger()
end, 100) end, 100)
@ -172,6 +185,9 @@ require('packer').startup(function(use)
use { use {
'hrsh7th/cmp-path' 'hrsh7th/cmp-path'
} }
use {
'hrsh7th/cmp-cmdline'
}
use { use {
'hrsh7th/cmp-buffer' 'hrsh7th/cmp-buffer'
} }
@ -269,6 +285,14 @@ require('packer').startup(function(use)
}, },
}, },
}, },
settings_window = {
border = {
style = "rounded",
text = {
top = " Settings ",
},
},
},
chat_input = { chat_input = {
prompt = "", prompt = "",
border = { border = {
@ -292,11 +316,21 @@ require('packer').startup(function(use)
top_p = 1, top_p = 1,
n = 1, n = 1,
}, },
openai_edit_params = {
-- model = "code-davinci-edit-001",
model = "gpt-3.5-turbo",
temperature = 0,
top_p = 1,
n = 1,
},
keymaps = { keymaps = {
close = "<C-c>", close = { "<C-c>", "<Esc>" },
yank_last = "<C-y>", yank_last = "<C-y>",
scroll_up = "<C-u>", scroll_up = "<C-u>",
scroll_down = "<C-d>", scroll_down = "<C-d>",
toggle_settings = "<C-o>",
new_session = "<C-n>",
cycle_windows = "<Right>",
} }
} }
)end, )end,

View File

@ -1,7 +1,6 @@
-- Setup nvim-cmp. -- Setup nvim-cmp.
local cmp = require 'cmp' local cmp = require 'cmp'
local lspkind = require('lspkind') local lspkind = require('lspkind')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require('lspconfig') local lspconfig = require('lspconfig')
-- luasnip setup -- luasnip setup
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
@ -74,6 +73,8 @@ cmp.setup({
["<Tab>"] = vim.schedule_wrap(function(fallback) ["<Tab>"] = vim.schedule_wrap(function(fallback)
if cmp.visible() and has_words_before() then if cmp.visible() and has_words_before() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else else
fallback() fallback()
end end
@ -174,6 +175,7 @@ cmp.setup({
} }
}) })
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls', 'html', 'cssls' } local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls', 'html', 'cssls' }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
@ -183,9 +185,9 @@ for _, lsp in ipairs(servers) do
} }
end end
-- cmp.event:on("menu_opened", function() cmp.event:on("menu_opened", function()
-- vim.b.copilot_suggestion_hidden = true vim.b.copilot_suggestion_hidden = true
-- end) end)
-- cmp.event:on("menu_closed", function() cmp.event:on("menu_closed", function()
-- vim.b.copilot_suggestion_hidden = false vim.b.copilot_suggestion_hidden = false
-- end) end)

View File

@ -19,7 +19,7 @@ require('telescope').setup{
-- e.g. git_{create, delete, ...}_branch for the git_branches picker -- e.g. git_{create, delete, ...}_branch for the git_branches picker
["<C-h>"] = "which_key" ["<C-h>"] = "which_key"
} }
} },
file_ignore_patterns = { "node_modules", "env", "__pycache__" } file_ignore_patterns = { "node_modules", "env", "__pycache__" }
}, },
pickers = { pickers = {