update
This commit is contained in:
parent
324074bb1c
commit
db6c0f9b4e
1
init.vim
1
init.vim
@ -22,6 +22,7 @@ source ~/.config/nvim/plugin-confs/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
|
||||||
|
source ~/.config/nvim/plugin-confs/treesitter-context.lua
|
||||||
source ~/.config/nvim/plugin-confs/whichkey.lua
|
source ~/.config/nvim/plugin-confs/whichkey.lua
|
||||||
source ~/.config/nvim/plugin-confs/telescope.lua
|
source ~/.config/nvim/plugin-confs/telescope.lua
|
||||||
source ~/.config/nvim/plugin-confs/telescope-file-browser.lua
|
source ~/.config/nvim/plugin-confs/telescope-file-browser.lua
|
||||||
|
335
lua/plugins.lua
335
lua/plugins.lua
@ -10,6 +10,7 @@ require('packer').startup(function(use)
|
|||||||
require('nvim-treesitter.install').update({ with_sync = true })
|
require('nvim-treesitter.install').update({ with_sync = true })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
use { 'nvim-treesitter/nvim-treesitter-context' }
|
||||||
|
|
||||||
-- TELESCOPE {{{
|
-- TELESCOPE {{{
|
||||||
|
|
||||||
@ -95,181 +96,153 @@ 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 = {
|
diff = false,
|
||||||
diff = false,
|
keymaps = {
|
||||||
keymaps = {
|
close = "<C-c>",
|
||||||
close = "<C-c>",
|
accept = "<C-y>",
|
||||||
accept = "<C-y>",
|
toggle_diff = "<C-d>",
|
||||||
toggle_diff = "<C-d>",
|
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,
|
loading_text = "Loading, please wait ...",
|
||||||
loading_text = "Loading, please wait ...",
|
question_sign = "", -- 🙂
|
||||||
question_sign = "", -- 🙂
|
answer_sign = "ﮧ", -- 🤖
|
||||||
answer_sign = "ﮧ", -- 🤖
|
border_left_sign = "",
|
||||||
border_left_sign = "",
|
border_right_sign = "",
|
||||||
border_right_sign = "",
|
max_line_length = 120,
|
||||||
max_line_length = 120,
|
sessions_window = {
|
||||||
sessions_window = {
|
active_sign = " ",
|
||||||
active_sign = " ",
|
inactive_sign = " ",
|
||||||
inactive_sign = " ",
|
current_line_sign = "",
|
||||||
current_line_sign = "",
|
border = {
|
||||||
border = {
|
style = "rounded",
|
||||||
style = "rounded",
|
text = { top = " Sessions " }
|
||||||
text = {
|
},
|
||||||
top = " Sessions ",
|
win_options = {
|
||||||
},
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
win_options = {
|
},
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
keymaps = {
|
||||||
},
|
close = "<C-c>",
|
||||||
},
|
yank_last = "<C-y>",
|
||||||
keymaps = {
|
yank_last_code = "<C-k>",
|
||||||
close = "<C-c>",
|
scroll_up = "<C-u>",
|
||||||
yank_last = "<C-y>",
|
scroll_down = "<C-d>",
|
||||||
yank_last_code = "<C-k>",
|
new_session = "<C-n>",
|
||||||
scroll_up = "<C-u>",
|
cycle_windows = "<Tab>",
|
||||||
scroll_down = "<C-d>",
|
cycle_modes = "<C-f>",
|
||||||
new_session = "<C-n>",
|
next_message = "<C-j>",
|
||||||
cycle_windows = "<Tab>",
|
prev_message = "<C-k>",
|
||||||
cycle_modes = "<C-f>",
|
select_session = "<Space>",
|
||||||
next_message = "<C-j>",
|
rename_session = "r",
|
||||||
prev_message = "<C-k>",
|
delete_session = "d",
|
||||||
select_session = "<Space>",
|
draft_message = "<C-r>",
|
||||||
rename_session = "r",
|
edit_message = "e",
|
||||||
delete_session = "d",
|
delete_message = "d",
|
||||||
draft_message = "<C-r>",
|
toggle_settings = "<C-o>",
|
||||||
edit_message = "e",
|
toggle_sessions = "<C-p>",
|
||||||
delete_message = "d",
|
toggle_help = "<C-h>",
|
||||||
toggle_settings = "<C-o>",
|
toggle_message_role = "<C-r>",
|
||||||
toggle_sessions = "<C-p>",
|
toggle_system_role_open = "<C-s>",
|
||||||
toggle_help = "<C-h>",
|
stop_generating = "<C-x>"
|
||||||
toggle_message_role = "<C-r>",
|
}
|
||||||
toggle_system_role_open = "<C-s>",
|
},
|
||||||
stop_generating = "<C-x>",
|
popup_layout = {
|
||||||
},
|
default = "center",
|
||||||
},
|
center = { width = "80%", height = "80%" },
|
||||||
popup_layout = {
|
right = { width = "30%", width_settings_open = "50%" }
|
||||||
default = "center",
|
},
|
||||||
center = {
|
popup_window = {
|
||||||
width = "80%",
|
border = {
|
||||||
height = "80%",
|
highlight = "FloatBorder",
|
||||||
},
|
style = "rounded",
|
||||||
right = {
|
text = { top = " ChatGPT " }
|
||||||
width = "30%",
|
},
|
||||||
width_settings_open = "50%",
|
win_options = {
|
||||||
},
|
wrap = true,
|
||||||
},
|
linebreak = true,
|
||||||
popup_window = {
|
foldcolumn = "1",
|
||||||
border = {
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
highlight = "FloatBorder",
|
},
|
||||||
style = "rounded",
|
buf_options = { filetype = "markdown" }
|
||||||
text = {
|
},
|
||||||
top = " ChatGPT ",
|
system_window = {
|
||||||
},
|
border = {
|
||||||
},
|
highlight = "FloatBorder",
|
||||||
win_options = {
|
style = "rounded",
|
||||||
wrap = true,
|
text = { top = " SYSTEM " }
|
||||||
linebreak = true,
|
},
|
||||||
foldcolumn = "1",
|
win_options = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
wrap = true,
|
||||||
},
|
linebreak = true,
|
||||||
buf_options = {
|
foldcolumn = "2",
|
||||||
filetype = "markdown",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
system_window = {
|
popup_input = {
|
||||||
border = {
|
prompt = " ",
|
||||||
highlight = "FloatBorder",
|
border = {
|
||||||
style = "rounded",
|
highlight = "FloatBorder",
|
||||||
text = {
|
style = "rounded",
|
||||||
top = " SYSTEM ",
|
text = { top_align = "center", top = " Prompt " }
|
||||||
},
|
},
|
||||||
},
|
win_options = {
|
||||||
win_options = {
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
wrap = true,
|
},
|
||||||
linebreak = true,
|
submit = "<C-Enter>",
|
||||||
foldcolumn = "2",
|
submit_n = "<Enter>",
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
max_visible_lines = 20
|
||||||
},
|
},
|
||||||
},
|
settings_window = {
|
||||||
popup_input = {
|
setting_sign = " ",
|
||||||
prompt = " ",
|
border = { style = "rounded", text = { top = " Settings " } },
|
||||||
border = {
|
win_options = {
|
||||||
highlight = "FloatBorder",
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
style = "rounded",
|
}
|
||||||
text = {
|
},
|
||||||
top_align = "center",
|
help_window = {
|
||||||
top = " Prompt ",
|
setting_sign = " ",
|
||||||
},
|
border = { style = "rounded", text = { top = " Help " } },
|
||||||
},
|
win_options = {
|
||||||
win_options = {
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder"
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
}
|
||||||
},
|
},
|
||||||
submit = "<C-Enter>",
|
openai_params = {
|
||||||
submit_n = "<Enter>",
|
model = "gpt-3.5-turbo",
|
||||||
max_visible_lines = 20,
|
frequency_penalty = 0,
|
||||||
},
|
presence_penalty = 0,
|
||||||
settings_window = {
|
max_tokens = 300,
|
||||||
setting_sign = " ",
|
temperature = 0,
|
||||||
border = {
|
top_p = 1,
|
||||||
style = "rounded",
|
n = 1
|
||||||
text = {
|
},
|
||||||
top = " Settings ",
|
openai_edit_params = {
|
||||||
},
|
model = "gpt-3.5-turbo",
|
||||||
},
|
frequency_penalty = 0,
|
||||||
win_options = {
|
presence_penalty = 0,
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
temperature = 0,
|
||||||
},
|
top_p = 1,
|
||||||
},
|
n = 1
|
||||||
help_window = {
|
},
|
||||||
setting_sign = " ",
|
use_openai_functions_for_edits = false,
|
||||||
border = {
|
actions_paths = {},
|
||||||
style = "rounded",
|
show_quickfixes_cmd = "Trouble quickfix",
|
||||||
text = {
|
predefined_chat_gpt_prompts =
|
||||||
top = " Help ",
|
"https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv",
|
||||||
},
|
highlights = {
|
||||||
},
|
help_key = "@symbol",
|
||||||
win_options = {
|
help_description = "@comment"
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
}
|
||||||
},
|
})
|
||||||
},
|
|
||||||
openai_params = {
|
|
||||||
model = "gpt-3.5-turbo",
|
|
||||||
frequency_penalty = 0,
|
|
||||||
presence_penalty = 0,
|
|
||||||
max_tokens = 300,
|
|
||||||
temperature = 0,
|
|
||||||
top_p = 1,
|
|
||||||
n = 1,
|
|
||||||
},
|
|
||||||
openai_edit_params = {
|
|
||||||
model = "gpt-3.5-turbo",
|
|
||||||
frequency_penalty = 0,
|
|
||||||
presence_penalty = 0,
|
|
||||||
temperature = 0,
|
|
||||||
top_p = 1,
|
|
||||||
n = 1,
|
|
||||||
},
|
|
||||||
use_openai_functions_for_edits = false,
|
|
||||||
actions_paths = {},
|
|
||||||
show_quickfixes_cmd = "Trouble quickfix",
|
|
||||||
predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv",
|
|
||||||
highlights = {
|
|
||||||
help_key = "@symbol",
|
|
||||||
help_description = "@comment",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end,
|
end,
|
||||||
requires = {
|
requires = {
|
||||||
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
||||||
@ -299,7 +272,8 @@ require('packer').startup(function(use)
|
|||||||
use { 'hrsh7th/cmp-path' }
|
use { 'hrsh7th/cmp-path' }
|
||||||
use { 'hrsh7th/nvim-cmp' }
|
use { 'hrsh7th/nvim-cmp' }
|
||||||
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
|
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
|
||||||
use { 'jose-elias-alvarez/null-ls.nvim' }
|
-- use { 'jose-elias-alvarez/null-ls.nvim' }
|
||||||
|
use { 'nvimtools/none-ls.nvim' }
|
||||||
use { 'neovim/nvim-lspconfig' }
|
use { 'neovim/nvim-lspconfig' }
|
||||||
use { 'onsails/lspkind-nvim' }
|
use { 'onsails/lspkind-nvim' }
|
||||||
|
|
||||||
@ -324,6 +298,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',
|
||||||
|
@ -19,6 +19,7 @@ o.relativenumber = true
|
|||||||
o.colorcolumn = '80'
|
o.colorcolumn = '80'
|
||||||
o.textwidth = 80
|
o.textwidth = 80
|
||||||
o.shiftwidth = 4
|
o.shiftwidth = 4
|
||||||
|
o.expandtab = true
|
||||||
o.tabstop = 4
|
o.tabstop = 4
|
||||||
o.autoindent = true
|
o.autoindent = true
|
||||||
o.ignorecase = true
|
o.ignorecase = true
|
||||||
@ -48,12 +49,12 @@ o.foldmethod = 'marker'
|
|||||||
g.db_ui_use_nerd_fonts = 1
|
g.db_ui_use_nerd_fonts = 1
|
||||||
|
|
||||||
local border = {
|
local border = {
|
||||||
{ "╭", "FloatBorder" }, { "─", "FloatBorder" }, { "╮", "FloatBorder" },
|
{ "╭", "FloatBorder" }, { "─", "FloatBorder" }, { "╮", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" }, { "╯", "FloatBorder" }, { "─", "FloatBorder" },
|
{ "│", "FloatBorder" }, { "╯", "FloatBorder" }, { "─", "FloatBorder" },
|
||||||
{ "╰", "FloatBorder" }, { "│", "FloatBorder" }
|
{ "╰", "FloatBorder" }, { "│", "FloatBorder" }
|
||||||
}
|
}
|
||||||
|
|
||||||
l.handlers["textDocument/signatureHelp"] =
|
l.handlers["textDocument/signatureHelp"] =
|
||||||
vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||||
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,
|
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,
|
||||||
{ border = border })
|
{ border = border })
|
||||||
|
@ -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
|
||||||
|
14
plugin-confs/treesitter-context.lua
Normal file
14
plugin-confs/treesitter-context.lua
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
require 'treesitter-context'.setup {
|
||||||
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
|
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||||
|
line_numbers = true,
|
||||||
|
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||||
|
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||||
|
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||||
|
-- Separator between context and content. Should be a single character string, like '-'.
|
||||||
|
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||||
|
separator = nil,
|
||||||
|
zindex = 20, -- The Z-index of the context window
|
||||||
|
on_attach = nil -- (fun(buf: integer): boolean) return false to disable attaching
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user