Compare commits
No commits in common. "5c61955c2dd765a36103f8fd95c6dba75c22bb91" and "e582ebeab18a98b47c674e93f63a5f45c303ea01" have entirely different histories.
5c61955c2d
...
e582ebeab1
2
init.vim
2
init.vim
@ -80,6 +80,6 @@ command! PS execute ":PackerSync"
|
|||||||
" set termguicolors
|
" set termguicolors
|
||||||
" colorscheme doom-one
|
" colorscheme doom-one
|
||||||
" colorscheme onedark
|
" colorscheme onedark
|
||||||
" colorscheme catppuccin
|
colorscheme catppuccin
|
||||||
highlight Pmenu ctermfg=white ctermbg=black gui=NONE guifg=white guibg=#282C34
|
highlight Pmenu ctermfg=white ctermbg=black gui=NONE guifg=white guibg=#282C34
|
||||||
highlight PmenuSel guifg=purple guibg=red
|
highlight PmenuSel guifg=purple guibg=red
|
||||||
|
171
keybindings.vim
171
keybindings.vim
@ -1,5 +1,5 @@
|
|||||||
nnoremap <F4> :set paste!<Bar>set paste?<CR>
|
nmap <F4> :set paste!<Bar>set paste?<CR>
|
||||||
nnoremap <F5> :set spell!<Bar>set spell?<CR>
|
nmap <F5> :!
|
||||||
|
|
||||||
" reselect visual selection after indent
|
" reselect visual selection after indent
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
@ -13,56 +13,43 @@ tnoremap <leader>tf <C-\><C-N>:FloatermToggle floatterm<CR>
|
|||||||
tnoremap <leader>tp <C-\><C-N>:FloatermToggle ipython<CR>
|
tnoremap <leader>tp <C-\><C-N>:FloatermToggle ipython<CR>
|
||||||
tnoremap <leader>tP <C-\><C-N>:FloatermToggle ipython-full<CR>
|
tnoremap <leader>tP <C-\><C-N>:FloatermToggle ipython-full<CR>
|
||||||
|
|
||||||
nnoremap <C-J> :bnext<CR>
|
nmap <C-J> :bnext<CR>
|
||||||
nnoremap <C-K> :bprev<CR>
|
nmap <C-K> :bprev<CR>
|
||||||
nnoremap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
|
nmap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
|
|
||||||
" open file under cursor, create if necessary
|
" open file under cursor, create if necessary
|
||||||
nnoremap // :Telescope current_buffer_fuzzy_find<CR>
|
nnoremap // :Telescope current_buffer_fuzzy_find<CR>
|
||||||
nnoremap ?? :BLines<CR>
|
nnoremap ?? :BLines<CR>
|
||||||
|
|
||||||
nnoremap gA :lua vim.lsp.buf.code_actions()<CR>
|
nmap gA :lua vim.lsp.buf.code_actions()<CR>
|
||||||
nnoremap gd :Telescope lsp_definitions<CR>
|
nmap gd :Telescope lsp_definitions<CR>
|
||||||
nnoremap gDc :Telescope lsp_implementations<CR>
|
nmap gDc :Telescope lsp_implementations<CR>
|
||||||
nnoremap gDf :Telescope lsp_definitions<CR>
|
nmap gDf :Telescope lsp_definitions<CR>
|
||||||
nnoremap gF :edit <cfile><cr>
|
nmap gF :edit <cfile><cr>
|
||||||
nnoremap gT :Telescope lsp_type_definitions<CR>
|
nmap gT :Telescope lsp_type_definitions<CR>
|
||||||
nnoremap gb :Gitsigns blame_line<CR>
|
nmap gb :Gitsigns blame_line<CR>
|
||||||
nnoremap gi :Telescope lsp_implementations<CR>
|
nmap gi :Telescope lsp_implementations<CR>
|
||||||
nnoremap gj :Telescope jumplist<CR>
|
nmap gj :Telescope jumplist<CR>
|
||||||
nnoremap gl :lua vim.lsp.buf.code_lens()<CR>
|
nmap gl :lua vim.lsp.buf.code_lens()<CR>
|
||||||
nnoremap gr :Telescope lsp_references<CR>
|
nmap gr :Telescope lsp_references<CR>
|
||||||
nnoremap gs :lua vim.lsp.buf.signature_help()<CR>
|
nmap gs :lua vim.lsp.buf.signature_help()<CR>
|
||||||
|
|
||||||
nnoremap Q !!$SHELL<CR>
|
nmap Q !!$SHELL<CR>
|
||||||
|
|
||||||
nnoremap rn :lua vim.lsp.buf.rename()<CR>
|
nmap rn :lua vim.lsp.buf.rename()<CR>
|
||||||
|
|
||||||
nnoremap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
||||||
nnoremap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
||||||
|
|
||||||
nnoremap <leader>bb :Telescope buffers<CR>
|
nmap <leader>bb :Telescope buffers<CR>
|
||||||
nnoremap <leader>bk :bdelete<CR>
|
nmap <leader>bk :bdelete<CR>
|
||||||
nnoremap <leader>bn :bnext<CR>
|
nmap <leader>bn :bnext<CR>
|
||||||
nnoremap <leader>bp :bprev<CR>
|
nmap <leader>bp :bprev<CR>
|
||||||
|
|
||||||
nnoremap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
nmap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
||||||
nnoremap <leader>cd :Telescope diagnostics<CR>
|
nmap <leader>cd :Telescope diagnostics<CR>
|
||||||
nnoremap <silent> <leader>cp :vert Copilot panel<CR>
|
nmap <leader>cp :vert Copilot panel<CR>
|
||||||
nnoremap <silent> <leader>Ci :lua require('chatgpt').edit_with_instructions()<CR>
|
nmap <leader>cs :lua require("copilot.suggestion").toggle_auto_trigger()<CR>
|
||||||
nnoremap <silent> <leader>Cd :ChatGPTRun docstring<CR>
|
|
||||||
nnoremap <silent> <leader>Ct :ChatGPTRun add_tests<CR>
|
|
||||||
nnoremap <silent> <leader>Co :ChatGPTRun optimize_code<CR>
|
|
||||||
nnoremap <silent> <leader>Cs :ChatGPTRun summarize<CR>
|
|
||||||
nnoremap <silent> <leader>Cf :ChatGPTRun fix_bugs<CR>
|
|
||||||
nnoremap <silent> <leader>Ce :ChatGPTRun explain<CR>
|
|
||||||
xmap <silent> <leader>Ci :lua require('chatgpt').edit_with_instructions()<CR>
|
|
||||||
xmap <silent> <leader>Cd :ChatGPTRun docstring<CR>
|
|
||||||
xmap <silent> <leader>Ct :ChatGPTRun add_tests<CR>
|
|
||||||
xmap <silent> <leader>Co :ChatGPTRun optimize_code<CR>
|
|
||||||
xmap <silent> <leader>Cs :ChatGPTRun summarize<CR>
|
|
||||||
xmap <silent> <leader>Cf :ChatGPTRun fix_bugs<CR>
|
|
||||||
xmap <silent> <leader>Ce :ChatGPTRun explain<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>fb :Telescope file_browser<cr>
|
nnoremap <leader>fb :Telescope file_browser<cr>
|
||||||
nnoremap <leader>ff :Telescope find_files<cr>
|
nnoremap <leader>ff :Telescope find_files<cr>
|
||||||
@ -70,73 +57,73 @@ nnoremap <leader>fg :Telescope live_grep<cr>
|
|||||||
nnoremap <leader>fh :Telescope oldfiles<cr>
|
nnoremap <leader>fh :Telescope oldfiles<cr>
|
||||||
nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr>
|
nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr>
|
||||||
|
|
||||||
nnoremap <leader>gb :Gitsigns blame_line<CR>
|
nmap <leader>gb :Gitsigns blame_line<CR>
|
||||||
nnoremap <leader>gc :Telescope git_commits<CR>
|
nmap <leader>gc :Telescope git_commits<CR>
|
||||||
nnoremap <leader>gf :Telescope git_files<CR>
|
nmap <leader>gf :Telescope git_files<CR>
|
||||||
nnoremap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
|
nmap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
|
||||||
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
nnoremap gR <cmd>Telescope lsp_references<cr>
|
nnoremap gR <cmd>Telescope lsp_references<cr>
|
||||||
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
||||||
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
||||||
|
|
||||||
nnoremap <leader>hc :Telescope commands<CR>
|
nmap <leader>hc :Telescope commands<CR>
|
||||||
nnoremap <leader>hv :Telescope help_tags<cr>
|
nnoremap <leader>hv :Telescope help_tags<cr>
|
||||||
nnoremap <leader>hk :Telescope keymaps<CR>
|
nmap <leader>hk :Telescope keymaps<CR>
|
||||||
nnoremap <leader>hs :Telescope spell_suggest<CR>
|
nmap <leader>hs :Telescope spell_suggest<CR>
|
||||||
|
|
||||||
nnoremap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||||
|
|
||||||
nnoremap <leader>j :AnyJump<CR>
|
nmap <leader>j :AnyJump<CR>
|
||||||
|
|
||||||
nnoremap K :lua vim.lsp.buf.hover()<CR>
|
nmap K :lua vim.lsp.buf.hover()<CR>
|
||||||
|
|
||||||
nnoremap <leader>ld :Telescope lsp_definitions<CR>
|
nmap <leader>ld :Telescope lsp_definitions<CR>
|
||||||
nnoremap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
nmap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
||||||
nnoremap <leader>lci :Telescope lsp_incoming_calls<CR>
|
nmap <leader>lci :Telescope lsp_incoming_calls<CR>
|
||||||
nnoremap <leader>lco :Telescope lsp_outgoing_calls<CR>
|
nmap <leader>lco :Telescope lsp_outgoing_calls<CR>
|
||||||
nnoremap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
||||||
nnoremap <leader>li :Telescope lsp_implementations<CR>
|
nmap <leader>li :Telescope lsp_implementations<CR>
|
||||||
nnoremap <leader>lr :Telescope lsp_references<CR>
|
nmap <leader>lr :Telescope lsp_references<CR>
|
||||||
nnoremap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
||||||
nnoremap <leader>ls :Telescope lsp_document_symbols<CR>
|
nmap <leader>ls :Telescope lsp_document_symbols<CR>
|
||||||
nnoremap <leader>lt :Telescope lsp_type_definitions<CR>
|
nmap <leader>lt :Telescope lsp_type_definitions<CR>
|
||||||
nnoremap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
|
nmap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
|
||||||
|
|
||||||
nnoremap <leader>n :NvimTreeToggle<CR>
|
nmap <leader>n :NvimTreeToggle<CR>
|
||||||
|
|
||||||
nnoremap <leader>ob :Telescope file_browser<CR>
|
nmap <leader>ob :Telescope file_browser<CR>
|
||||||
nnoremap <leader>oc :ChatGPT<CR>
|
nmap <leader>oc :ChatGPT<CR>
|
||||||
nnoremap <leader>oB :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
nmap <leader>oB :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||||
nnoremap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||||
nnoremap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
|
nmap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
nnoremap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
|
nmap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
|
||||||
nnoremap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||||
nnoremap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
|
nmap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
|
||||||
nnoremap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
|
nmap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
|
||||||
nnoremap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||||
nnoremap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
nmap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
||||||
|
|
||||||
nnoremap <leader>r :NvimTreeRefresh<CR>
|
nmap <leader>r :NvimTreeRefresh<CR>
|
||||||
|
|
||||||
nnoremap <Leader>sl :<C-u>SessionLoad<CR>
|
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
||||||
nnoremap <Leader>ss :<C-u>SessionSave<CR>
|
nmap <Leader>ss :<C-u>SessionSave<CR>
|
||||||
nnoremap <leader>sc :nohls<Cr>
|
nmap <leader>sc :nohls<Cr>
|
||||||
nnoremap <leader>sC :Telescope commands<Cr>
|
nmap <leader>sC :Telescope commands<Cr>
|
||||||
nnoremap <leader>sf :Telescope find_files<Cr>
|
nmap <leader>sf :Telescope find_files<Cr>
|
||||||
nnoremap <leader>sh :Telescope command_history<CR>
|
nmap <leader>sh :Telescope command_history<CR>
|
||||||
nnoremap <leader>sm :Telescope man_pages<CR>
|
nmap <leader>sm :Telescope man_pages<CR>
|
||||||
nnoremap <leader>s/ :Telescope search_history<CR>
|
nmap <leader>s/ :Telescope search_history<CR>
|
||||||
|
|
||||||
nnoremap <silent> <Leader>tc :Telescope colorscheme<CR>
|
nnoremap <silent> <Leader>tc :Telescope colorscheme<CR>
|
||||||
nnoremap <silent> <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
|
nmap <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
nnoremap <silent> <leader>tp :FloatermToggle ipython<CR>
|
nmap <leader>tp :FloatermToggle ipython<CR>
|
||||||
nnoremap <silent> <leader>tP :FloatermToggle ipython-full<CR>
|
nmap <leader>tP :FloatermToggle ipython-full<CR>
|
||||||
nnoremap <silent> <leader>tt :FloatermToggle split-term<CR>
|
nmap <leader>tt :FloatermToggle split-term<CR>
|
||||||
|
|
||||||
nnoremap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
||||||
nnoremap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
||||||
nnoremap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
||||||
|
|
||||||
nnoremap <leader>y "+
|
nmap <leader>y "+
|
||||||
vmap <leader>y "+
|
vmap <leader>y "+
|
||||||
|
@ -37,7 +37,7 @@ require('packer').startup(function(use)
|
|||||||
},
|
},
|
||||||
suggestion = {
|
suggestion = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
auto_trigger = false,
|
auto_trigger = true,
|
||||||
debounce = 75,
|
debounce = 75,
|
||||||
keymap = {
|
keymap = {
|
||||||
accept = "<C-l>",
|
accept = "<C-l>",
|
||||||
@ -180,19 +180,19 @@ require('packer').startup(function(use)
|
|||||||
use 'williamboman/nvim-lsp-installer'
|
use 'williamboman/nvim-lsp-installer'
|
||||||
|
|
||||||
use { 'Mofiqul/dracula.nvim' }
|
use { 'Mofiqul/dracula.nvim' }
|
||||||
use({
|
use {
|
||||||
'NTBBloodbath/doom-one.nvim',
|
'NTBBloodbath/doom-one.nvim',
|
||||||
setup = function()
|
setup = function()
|
||||||
-- Add color to cursor
|
-- Add color to cursor
|
||||||
vim.g.doom_one_cursor_coloring = false
|
vim.g.doom_one_cursor_coloring = false
|
||||||
-- Set :terminal colors
|
-- Set :terminal colors
|
||||||
vim.g.doom_one_terminal_colors = true
|
vim.g.doom_one_terminal_colors = false
|
||||||
-- Enable italic comments
|
-- Enable italic comments
|
||||||
vim.g.doom_one_italic_comments = false
|
vim.g.doom_one_italic_comments = true
|
||||||
-- Enable TS support
|
-- Enable TS support
|
||||||
vim.g.doom_one_enable_treesitter = true
|
vim.g.doom_one_enable_treesitter = true
|
||||||
-- Color whole diagnostic text or only underline
|
-- Color whole diagnostic text or only underline
|
||||||
vim.g.doom_one_diagnostics_text_color = false
|
vim.g.doom_one_diagnostics_text_color = true
|
||||||
-- Enable transparent background
|
-- Enable transparent background
|
||||||
vim.g.doom_one_transparent_background = false
|
vim.g.doom_one_transparent_background = false
|
||||||
|
|
||||||
@ -201,31 +201,24 @@ require('packer').startup(function(use)
|
|||||||
vim.g.doom_one_pumblend_transparency = 20
|
vim.g.doom_one_pumblend_transparency = 20
|
||||||
|
|
||||||
-- Plugins integration
|
-- Plugins integration
|
||||||
vim.g.doom_one_plugin_neorg = true
|
vim.g.doom_one_plugin_neorg = false
|
||||||
vim.g.doom_one_plugin_barbar = false
|
vim.g.doom_one_plugin_barbar = false
|
||||||
vim.g.doom_one_plugin_telescope = false
|
vim.g.doom_one_plugin_telescope = true
|
||||||
vim.g.doom_one_plugin_neogit = true
|
vim.g.doom_one_plugin_neogit = true
|
||||||
vim.g.doom_one_plugin_nvim_tree = true
|
vim.g.doom_one_plugin_nvim_tree = true
|
||||||
vim.g.doom_one_plugin_dashboard = true
|
vim.g.doom_one_plugin_dashboard = true
|
||||||
vim.g.doom_one_plugin_startify = true
|
vim.g.doom_one_plugin_startify = false
|
||||||
vim.g.doom_one_plugin_whichkey = true
|
vim.g.doom_one_plugin_whichkey = true
|
||||||
vim.g.doom_one_plugin_indent_blankline = true
|
vim.g.doom_one_plugin_indent_blankline = true
|
||||||
vim.g.doom_one_plugin_vim_illuminate = true
|
vim.g.doom_one_plugin_vim_illuminate = false
|
||||||
vim.g.doom_one_plugin_lspsaga = false
|
vim.g.doom_one_plugin_lspsaga = true
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
vim.cmd("colorscheme doom-one")
|
|
||||||
vim.cmd(
|
|
||||||
"highlight Pmenu ctermfg=white ctermbg=black gui=NONE guifg=white guibg=#282C34")
|
|
||||||
vim.cmd("highlight PmenuSel guifg=purple guibg=red")
|
|
||||||
end
|
end
|
||||||
})
|
}
|
||||||
use { 'olimorris/onedarkpro.nvim' }
|
use { 'olimorris/onedarkpro.nvim' }
|
||||||
use { 'projekt0n/github-nvim-theme' }
|
use { 'projekt0n/github-nvim-theme' }
|
||||||
|
|
||||||
use({
|
use({
|
||||||
"jackMort/ChatGPT.nvim",
|
"jackMort/ChatGPT.nvim",
|
||||||
commit = "24bcca7",
|
|
||||||
requires = {
|
requires = {
|
||||||
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope.nvim"
|
"nvim-telescope/telescope.nvim"
|
||||||
|
@ -1,95 +1,47 @@
|
|||||||
require("chatgpt").setup({
|
require("chatgpt").setup({
|
||||||
api_key_cmd = "cat /home/sudacode/.config/openai/apikey",
|
{
|
||||||
yank_register = "+",
|
welcome_message = "ChatGPT is ready!",
|
||||||
edit_with_instructions = {
|
loading_text = "loading",
|
||||||
diff = false,
|
question_sign = "", -- you can use emoji if you want e.g. 🙂
|
||||||
keymaps = {
|
answer_sign = "ﮧ", -- 🤖
|
||||||
close = "<C-c>",
|
|
||||||
accept = "<C-y>",
|
|
||||||
toggle_diff = "<C-d>",
|
|
||||||
toggle_settings = "<C-o>",
|
|
||||||
cycle_windows = "<Tab>",
|
|
||||||
use_output_as_input = "<C-i>"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
chat = {
|
|
||||||
welcome_message = WELCOME_MESSAGE,
|
|
||||||
loading_text = "Loading, please wait ...",
|
|
||||||
question_sign = "",
|
|
||||||
answer_sign = "ﮧ",
|
|
||||||
max_line_length = 120,
|
max_line_length = 120,
|
||||||
sessions_window = {
|
yank_register = "+",
|
||||||
border = { style = "rounded", text = { top = " Sessions " } },
|
chat_layout = {
|
||||||
win_options = {
|
relative = "editor",
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
position = "50%",
|
||||||
}
|
size = {
|
||||||
|
height = "80%",
|
||||||
|
width = "80%",
|
||||||
},
|
},
|
||||||
keymaps = {
|
|
||||||
close = { "<C-c>" },
|
|
||||||
yank_last = "<C-y>",
|
|
||||||
yank_last_code = "<C-k>",
|
|
||||||
scroll_up = "<C-u>",
|
|
||||||
scroll_down = "<C-d>",
|
|
||||||
new_session = "<C-n>",
|
|
||||||
cycle_windows = "<Tab>",
|
|
||||||
cycle_modes = "<C-f>",
|
|
||||||
select_session = "<Space>",
|
|
||||||
rename_session = "r",
|
|
||||||
delete_session = "d",
|
|
||||||
draft_message = "<C-d>",
|
|
||||||
toggle_settings = "<C-o>",
|
|
||||||
toggle_message_role = "<C-r>",
|
|
||||||
toggle_system_role_open = "<C-s>",
|
|
||||||
stop_generating = "<C-x>"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
popup_layout = {
|
settings_window = {
|
||||||
default = "center",
|
border = {
|
||||||
center = { width = "80%", height = "80%" },
|
style = "rounded",
|
||||||
right = { width = "30%", width_settings_open = "50%" }
|
text = {
|
||||||
|
top = " Settings ",
|
||||||
},
|
},
|
||||||
popup_window = {
|
},
|
||||||
|
},
|
||||||
|
chat_window = {
|
||||||
|
filetype = "chatgpt",
|
||||||
border = {
|
border = {
|
||||||
highlight = "FloatBorder",
|
highlight = "FloatBorder",
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = { top = " ChatGPT " }
|
text = {
|
||||||
|
top = " ChatGPT ",
|
||||||
},
|
},
|
||||||
win_options = {
|
|
||||||
wrap = true,
|
|
||||||
linebreak = true,
|
|
||||||
foldcolumn = "1",
|
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
|
||||||
},
|
},
|
||||||
buf_options = { filetype = "markdown" }
|
|
||||||
},
|
},
|
||||||
system_window = {
|
chat_input = {
|
||||||
border = {
|
|
||||||
highlight = "FloatBorder",
|
|
||||||
style = "rounded",
|
|
||||||
text = { top = " SYSTEM " }
|
|
||||||
},
|
|
||||||
win_options = {
|
|
||||||
wrap = true,
|
|
||||||
linebreak = true,
|
|
||||||
foldcolumn = "2",
|
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
popup_input = {
|
|
||||||
prompt = " ",
|
prompt = " ",
|
||||||
border = {
|
border = {
|
||||||
highlight = "FloatBorder",
|
highlight = "FloatBorder",
|
||||||
style = "rounded",
|
style = "rounded",
|
||||||
text = { top_align = "center", top = " Prompt " }
|
text = {
|
||||||
|
top_align = "center",
|
||||||
|
top = " Prompt ",
|
||||||
},
|
},
|
||||||
win_options = { winhighlight = "Normal:Normal,FloatBorder:FloatBorder" },
|
|
||||||
submit = "<C-Enter>",
|
|
||||||
submit_n = "<Enter>",
|
|
||||||
max_visible_lines = 20
|
|
||||||
},
|
},
|
||||||
settings_window = {
|
|
||||||
border = { style = "rounded", text = { top = " Settings " } },
|
|
||||||
win_options = { winhighlight = "Normal:Normal,FloatBorder:FloatBorder" }
|
|
||||||
},
|
},
|
||||||
openai_params = {
|
openai_params = {
|
||||||
model = "gpt-3.5-turbo",
|
model = "gpt-3.5-turbo",
|
||||||
@ -98,15 +50,28 @@ require("chatgpt").setup({
|
|||||||
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 = "code-davinci-edit-001",
|
model = "code-davinci-edit-001",
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
top_p = 1,
|
top_p = 1,
|
||||||
n = 1
|
n = 1,
|
||||||
},
|
},
|
||||||
actions_paths = {},
|
keymaps = {
|
||||||
show_quickfixes_cmd = "Trouble quickfix",
|
close = { "<C-c>" },
|
||||||
predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv"
|
submit = "<C-Enter>",
|
||||||
|
yank_last = "<C-y>",
|
||||||
|
yank_last_code = "<C-k>",
|
||||||
|
scroll_up = "<C-u>",
|
||||||
|
scroll_down = "<C-d>",
|
||||||
|
toggle_settings = "<C-o>",
|
||||||
|
new_session = "<C-n>",
|
||||||
|
cycle_windows = "<Tab>",
|
||||||
|
-- in the Sessions pane
|
||||||
|
select_session = "<Space>",
|
||||||
|
rename_session = "r",
|
||||||
|
delete_session = "d",
|
||||||
|
},
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
local wk = require("which-key")
|
require("which-key").setup {
|
||||||
|
|
||||||
wk.setup {
|
|
||||||
plugins = {
|
plugins = {
|
||||||
marks = true, -- shows a list of your marks on ' and `
|
marks = true, -- shows a list of your marks on ' and `
|
||||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
||||||
spelling = {
|
spelling = {
|
||||||
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
||||||
suggestions = 20 -- how many suggestions should be shown in the list?
|
suggestions = 20, -- how many suggestions should be shown in the list?
|
||||||
},
|
},
|
||||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||||
-- No actual key bindings are created
|
-- No actual key bindings are created
|
||||||
@ -17,8 +15,8 @@ wk.setup {
|
|||||||
windows = true, -- default bindings on <c-w>
|
windows = true, -- default bindings on <c-w>
|
||||||
nav = true, -- misc bindings to work with windows
|
nav = true, -- misc bindings to work with windows
|
||||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
z = true, -- bindings for folds, spelling and others prefixed with z
|
||||||
g = true -- bindings for prefixed with g
|
g = true, -- bindings for prefixed with g
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
-- add operators that will trigger motion and text object completion
|
-- add operators that will trigger motion and text object completion
|
||||||
-- to enable all native operators, set the preset / operators plugin above
|
-- to enable all native operators, set the preset / operators plugin above
|
||||||
@ -33,11 +31,11 @@ wk.setup {
|
|||||||
icons = {
|
icons = {
|
||||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
||||||
separator = "➜", -- symbol used between a key and it's label
|
separator = "➜", -- symbol used between a key and it's label
|
||||||
group = "+" -- symbol prepended to a group
|
group = "+", -- symbol prepended to a group
|
||||||
},
|
},
|
||||||
popup_mappings = {
|
popup_mappings = {
|
||||||
scroll_down = '<c-d>', -- binding to scroll down inside the popup
|
scroll_down = '<c-d>', -- binding to scroll down inside the popup
|
||||||
scroll_up = '<c-u>' -- binding to scroll up inside the popup
|
scroll_up = '<c-u>', -- binding to scroll up inside the popup
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
border = "none", -- none, single, double, shadow
|
border = "none", -- none, single, double, shadow
|
||||||
@ -50,7 +48,7 @@ wk.setup {
|
|||||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
height = { min = 4, max = 25 }, -- min and max height of the columns
|
||||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
width = { min = 20, max = 50 }, -- min and max width of the columns
|
||||||
spacing = 3, -- spacing between columns
|
spacing = 3, -- spacing between columns
|
||||||
align = "left" -- align columns left, center or right
|
align = "left", -- align columns left, center or right
|
||||||
},
|
},
|
||||||
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
|
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
|
||||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
||||||
@ -63,26 +61,10 @@ wk.setup {
|
|||||||
-- this is mostly relevant for key maps that start with a native binding
|
-- this is mostly relevant for key maps that start with a native binding
|
||||||
-- most people should not need to change this
|
-- most people should not need to change this
|
||||||
i = { "j", "k" },
|
i = { "j", "k" },
|
||||||
v = { "j", "k" }
|
v = { "j", "k" },
|
||||||
},
|
},
|
||||||
disable = { buftypes = {}, filetypes = { "TelescopePrompt" } }
|
disable = {
|
||||||
}
|
buftypes = {},
|
||||||
|
filetypes = { "TelescopePrompt" },
|
||||||
wk.register({
|
|
||||||
c = {
|
|
||||||
name = "code",
|
|
||||||
a = "Code Action",
|
|
||||||
d = "Diagnostics",
|
|
||||||
p = "Copilot Panel"
|
|
||||||
},
|
},
|
||||||
C = {
|
|
||||||
name = "ChatGPT",
|
|
||||||
i = "Edit with Instructions",
|
|
||||||
d = "Docstring",
|
|
||||||
t = "Add Tests",
|
|
||||||
o = "Optimize Code",
|
|
||||||
s = "Summarize",
|
|
||||||
f = "Fix Bugs",
|
|
||||||
e = "Explain Code"
|
|
||||||
}
|
}
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
|
Loading…
Reference in New Issue
Block a user