Skip to content

Commit

Permalink
Fixes and improvements for LLM Chat
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Nov 5, 2024
1 parent 9fcf32d commit a282b02
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
7 changes: 5 additions & 2 deletions trees/uts-002F.tree
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,15 @@ It's very important to stay in the flow and Zen mode as much as possible. Split
- Github Copilot
- `<leader>+aa` to toggle the chat, `<leader>+al` to clear chat history
- `<leader>+a` + a character
- for selected code block, **e**xplain, **r**eview, **o**ptimize, **R**factor, **t**est
- for selected code block, **e**xplain, **r**eview, **o**ptimize, **R**efactor, **t**est
- **d**ebug, **f**ix, co**m**mit log, **n**aming etc.
- `?` to select the model
- `C-s` to send the prompt
- `:help copilot` to learn more
- Avante
- Code Companion (preferred, but suddenly not working)
- `<localleader>+a` to toggle the inline chat (works also for selection)
- `<localleader>+z` to toggle the chat sidebar
- Avante (deprecated)
- `<leader>+aa` to open the chat, use `a` to accept individual suggestions, or `A` to accept all
- select code and `<leader>+ae` to modify code
- it's interesting but I've disabled it for now, in favor of Github Copilot
Expand Down
56 changes: 48 additions & 8 deletions uts-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,13 @@ local plugins = {
opts = {
-- debug = true, -- Enable debugging
-- See Configuration section for rest
window = {
layout = "float",
relative = "cursor",
width = 1,
height = 0.4,
row = 1,
},
-- window = {
-- layout = "float",
-- relative = "cursor",
-- width = 1,
-- height = 0.4,
-- row = 1,
-- },
},
-- {
-- "hrsh7th/nvim-cmp",
Expand Down Expand Up @@ -587,6 +587,20 @@ local plugins = {
{ "<leader>af", "<cmd>CopilotChatFixDiagnostic<cr>", desc = "CopilotChat - Fix Diagnostic" },
{ "<leader>al", "<cmd>CopilotChatReset<cr>", desc = "CopilotChat - Clear buffer and chat history" },
{ "<leader>aa", "<cmd>CopilotChatToggle<cr>", desc = "CopilotChat - Toggle" },
{
"<leader>aa",
mode = "x",
function()
require("CopilotChat").ask("Let's discuss the following", {
selection = require("CopilotChat.select").visual,
})
-- local actions = require "CopilotChat.actions"
-- actions.pick(actions.prompt_actions {
-- selection = require("CopilotChat.select").visual,
-- })
end,
desc = "CopilotChat - for selection",
},
{ "<leader>a?", "<cmd>CopilotChatModels<cr>", desc = "CopilotChat - Select Models" },
{
"<leader>ai",
Expand Down Expand Up @@ -616,7 +630,7 @@ local plugins = {
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer
-- "hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer
"nvim-telescope/telescope.nvim", -- Optional: For using slash commands
{ "stevearc/dressing.nvim", opts = {} }, -- Optional: Improves `vim.ui.select`
{ "echasnovski/mini.diff", version = false },
Expand All @@ -628,6 +642,14 @@ local plugins = {
provider = "mini_diff",
},
},
strategies = {
chat = {
adapter = "copilot",
},
inline = {
adapter = "copilot",
},
},
}
end,
keys = {
Expand Down Expand Up @@ -1282,6 +1304,24 @@ local plugins = {
},
},
},
-- { "neoclide/coc.nvim", branch = "release" },
{
"barreiroleo/ltex_extra.nvim",
branch = "dev",
ft = { "markdown", "tex" },
opts = {
---@type string[]
-- See https://valentjn.github.io/ltex/supported-languages.html#natural-languages
load_langs = { "en-US" },
---@type "none" | "fatal" | "error" | "warn" | "info" | "debug" | "trace"
log_level = "none",
---@type string File's path to load.
-- The setup will normalice it running vim.fs.normalize(path).
-- e.g. subfolder in project root or cwd: ".ltex"
-- e.g. cross project settings: vim.fn.expand("~") .. "/.local/share/ltex"
path = ".ltex",
},
},
-- {
-- "nvchad/ui",
-- config = function()
Expand Down

0 comments on commit a282b02

Please sign in to comment.