add copilot lualine
This commit is contained in:
parent
324074bb1c
commit
29bd43a36a
1
init.vim
1
init.vim
@ -19,6 +19,7 @@ source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
|||||||
source ~/.config/nvim/plugin-confs/gitsigns.lua
|
source ~/.config/nvim/plugin-confs/gitsigns.lua
|
||||||
" source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
" source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
||||||
source ~/.config/nvim/plugin-confs/lualine.lua
|
source ~/.config/nvim/plugin-confs/lualine.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/copilot-lualine.lua
|
||||||
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
||||||
source ~/.config/nvim/plugin-confs/presence.lua
|
source ~/.config/nvim/plugin-confs/presence.lua
|
||||||
source ~/.config/nvim/plugin-confs/treesitter.lua
|
source ~/.config/nvim/plugin-confs/treesitter.lua
|
||||||
|
100
lua/plugins.lua
100
lua/plugins.lua
@ -95,8 +95,7 @@ require('packer').startup(function(use)
|
|||||||
"jackMort/ChatGPT.nvim",
|
"jackMort/ChatGPT.nvim",
|
||||||
commit = "24bcca7",
|
commit = "24bcca7",
|
||||||
config = function()
|
config = function()
|
||||||
require("chatgpt").setup(
|
require("chatgpt").setup({
|
||||||
{
|
|
||||||
api_key_cmd = "cat /home/sudacode/.openaikey",
|
api_key_cmd = "cat /home/sudacode/.openaikey",
|
||||||
yank_register = "+",
|
yank_register = "+",
|
||||||
edit_with_instructions = {
|
edit_with_instructions = {
|
||||||
@ -108,8 +107,8 @@ require('packer').startup(function(use)
|
|||||||
toggle_settings = "<C-o>",
|
toggle_settings = "<C-o>",
|
||||||
toggle_help = "<C-h>",
|
toggle_help = "<C-h>",
|
||||||
cycle_windows = "<Tab>",
|
cycle_windows = "<Tab>",
|
||||||
use_output_as_input = "<C-i>",
|
use_output_as_input = "<C-i>"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
chat = {
|
chat = {
|
||||||
welcome_message = WELCOME_MESSAGE,
|
welcome_message = WELCOME_MESSAGE,
|
||||||
@ -125,13 +124,11 @@ require('packer').startup(function(use)
|
|||||||
current_line_sign = "",
|
current_line_sign = "",
|
||||||
border = {
|
border = {
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = {
|
text = { top = " Sessions " }
|
||||||
top = " Sessions ",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
win_options = {
|
win_options = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
close = "<C-c>",
|
close = "<C-c>",
|
||||||
@ -155,93 +152,68 @@ require('packer').startup(function(use)
|
|||||||
toggle_help = "<C-h>",
|
toggle_help = "<C-h>",
|
||||||
toggle_message_role = "<C-r>",
|
toggle_message_role = "<C-r>",
|
||||||
toggle_system_role_open = "<C-s>",
|
toggle_system_role_open = "<C-s>",
|
||||||
stop_generating = "<C-x>",
|
stop_generating = "<C-x>"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
popup_layout = {
|
popup_layout = {
|
||||||
default = "center",
|
default = "center",
|
||||||
center = {
|
center = { width = "80%", height = "80%" },
|
||||||
width = "80%",
|
right = { width = "30%", width_settings_open = "50%" }
|
||||||
height = "80%",
|
|
||||||
},
|
|
||||||
right = {
|
|
||||||
width = "30%",
|
|
||||||
width_settings_open = "50%",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
popup_window = {
|
popup_window = {
|
||||||
border = {
|
border = {
|
||||||
highlight = "FloatBorder",
|
highlight = "FloatBorder",
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = {
|
text = { top = " ChatGPT " }
|
||||||
top = " ChatGPT ",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
win_options = {
|
win_options = {
|
||||||
wrap = true,
|
wrap = true,
|
||||||
linebreak = true,
|
linebreak = true,
|
||||||
foldcolumn = "1",
|
foldcolumn = "1",
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
|
||||||
buf_options = {
|
|
||||||
filetype = "markdown",
|
|
||||||
},
|
},
|
||||||
|
buf_options = { filetype = "markdown" }
|
||||||
},
|
},
|
||||||
system_window = {
|
system_window = {
|
||||||
border = {
|
border = {
|
||||||
highlight = "FloatBorder",
|
highlight = "FloatBorder",
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = {
|
text = { top = " SYSTEM " }
|
||||||
top = " SYSTEM ",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
win_options = {
|
win_options = {
|
||||||
wrap = true,
|
wrap = true,
|
||||||
linebreak = true,
|
linebreak = true,
|
||||||
foldcolumn = "2",
|
foldcolumn = "2",
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
popup_input = {
|
popup_input = {
|
||||||
prompt = " ",
|
prompt = " ",
|
||||||
border = {
|
border = {
|
||||||
highlight = "FloatBorder",
|
highlight = "FloatBorder",
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = {
|
text = { top_align = "center", top = " Prompt " }
|
||||||
top_align = "center",
|
|
||||||
top = " Prompt ",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
win_options = {
|
win_options = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
},
|
||||||
submit = "<C-Enter>",
|
submit = "<C-Enter>",
|
||||||
submit_n = "<Enter>",
|
submit_n = "<Enter>",
|
||||||
max_visible_lines = 20,
|
max_visible_lines = 20
|
||||||
},
|
},
|
||||||
settings_window = {
|
settings_window = {
|
||||||
setting_sign = " ",
|
setting_sign = " ",
|
||||||
border = {
|
border = { style = "rounded", text = { top = " Settings " } },
|
||||||
style = "rounded",
|
|
||||||
text = {
|
|
||||||
top = " Settings ",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
win_options = {
|
win_options = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
help_window = {
|
help_window = {
|
||||||
setting_sign = " ",
|
setting_sign = " ",
|
||||||
border = {
|
border = { style = "rounded", text = { top = " Help " } },
|
||||||
style = "rounded",
|
|
||||||
text = {
|
|
||||||
top = " Help ",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
win_options = {
|
win_options = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
openai_params = {
|
openai_params = {
|
||||||
model = "gpt-3.5-turbo",
|
model = "gpt-3.5-turbo",
|
||||||
@ -250,7 +222,7 @@ require('packer').startup(function(use)
|
|||||||
max_tokens = 300,
|
max_tokens = 300,
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
top_p = 1,
|
top_p = 1,
|
||||||
n = 1,
|
n = 1
|
||||||
},
|
},
|
||||||
openai_edit_params = {
|
openai_edit_params = {
|
||||||
model = "gpt-3.5-turbo",
|
model = "gpt-3.5-turbo",
|
||||||
@ -258,18 +230,18 @@ require('packer').startup(function(use)
|
|||||||
presence_penalty = 0,
|
presence_penalty = 0,
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
top_p = 1,
|
top_p = 1,
|
||||||
n = 1,
|
n = 1
|
||||||
},
|
},
|
||||||
use_openai_functions_for_edits = false,
|
use_openai_functions_for_edits = false,
|
||||||
actions_paths = {},
|
actions_paths = {},
|
||||||
show_quickfixes_cmd = "Trouble quickfix",
|
show_quickfixes_cmd = "Trouble quickfix",
|
||||||
predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv",
|
predefined_chat_gpt_prompts =
|
||||||
|
"https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv",
|
||||||
highlights = {
|
highlights = {
|
||||||
help_key = "@symbol",
|
help_key = "@symbol",
|
||||||
help_description = "@comment",
|
help_description = "@comment"
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
end,
|
end,
|
||||||
requires = {
|
requires = {
|
||||||
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
||||||
@ -324,6 +296,15 @@ require('packer').startup(function(use)
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- UI {{{
|
-- UI {{{
|
||||||
|
use {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
config = function()
|
||||||
|
opts = {}
|
||||||
|
-- Other blankline configuration here
|
||||||
|
require("ibl").setup(require("indent-rainbowline").make_opts(opts))
|
||||||
|
end,
|
||||||
|
requires = { "TheGLander/indent-rainbowline.nvim" }
|
||||||
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'glepnir/dashboard-nvim',
|
'glepnir/dashboard-nvim',
|
||||||
@ -343,6 +324,7 @@ require('packer').startup(function(use)
|
|||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||||
}
|
}
|
||||||
|
use { 'AndreM222/copilot-lualine' }
|
||||||
use { 'kyazdani42/nvim-web-devicons' }
|
use { 'kyazdani42/nvim-web-devicons' }
|
||||||
use { 'norcalli/nvim-colorizer.lua' }
|
use { 'norcalli/nvim-colorizer.lua' }
|
||||||
use { 'akinsho/nvim-bufferline.lua' }
|
use { 'akinsho/nvim-bufferline.lua' }
|
||||||
|
40
plugin-confs/copilot-lualine.lua
Normal file
40
plugin-confs/copilot-lualine.lua
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
local lualine = require('lualine')
|
||||||
|
lualine.setup({
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = cozynight,
|
||||||
|
component_separators = { left = '', right = '' },
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
disabled_filetypes = {},
|
||||||
|
always_divide_middle = true
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { 'mode' },
|
||||||
|
lualine_b = {
|
||||||
|
'branch', 'diff', {
|
||||||
|
'diagnostics',
|
||||||
|
sources = { "nvim_diagnostic" },
|
||||||
|
symbols = {
|
||||||
|
error = ' ',
|
||||||
|
warn = ' ',
|
||||||
|
info = ' ',
|
||||||
|
hint = ' '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lualine_c = { 'filename' },
|
||||||
|
lualine_x = { 'copilot', 'encoding', 'fileformat', 'filetype' }, -- I added copilot here
|
||||||
|
lualine_y = { 'progress' },
|
||||||
|
lualine_z = { 'location' }
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = { 'filename' },
|
||||||
|
lualine_x = { 'location' },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {}
|
||||||
|
})
|
@ -215,7 +215,7 @@ cmp.setup.cmdline(':', {
|
|||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
'bashls', 'pyright', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls',
|
'bashls', 'pyright', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls',
|
||||||
'html', 'cssls', 'lua_ls', 'eslint', 'tsserver', 'angularls', 'ansiblels'
|
'html', 'cssls', 'lua_ls', 'eslint', 'ts_ls', 'angularls', 'ansiblels'
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
|
Loading…
Reference in New Issue
Block a user