Cosmetics
This commit is contained in:
parent
da30d262e1
commit
9adb558ea7
@ -23,7 +23,7 @@ local function setup_chat_highlighting(bufnr)
|
||||
|
||||
-- Create syntax groups for user input and separators
|
||||
vim.cmd([[
|
||||
highlight GeminiUser guifg=#88C0D0 gui=bold
|
||||
highlight GeminiUser guifg=#EBCB8B gui=bold
|
||||
highlight GeminiSeparator guifg=#616E88 gui=bold
|
||||
syntax match GeminiUser /^User:.*$/
|
||||
syntax match GeminiSeparator /^━━━━━━━━━━━━━━━━━━━━━━━━━━$/
|
||||
@ -117,15 +117,25 @@ local function update_chat_window(new_content)
|
||||
-- Make buffer modifiable
|
||||
vim.api.nvim_buf_set_option(chat_bufnr, 'modifiable', true)
|
||||
|
||||
-- Add separator before new content
|
||||
local separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
vim.api.nvim_buf_set_lines(chat_bufnr, -1, -1, false, {separator})
|
||||
-- Initialize with content (without separator)
|
||||
vim.api.nvim_buf_set_lines(chat_bufnr, 0, -1, false, vim.split(new_content, "\n"))
|
||||
|
||||
-- Update content
|
||||
vim.api.nvim_buf_set_lines(chat_bufnr, -1, -1, false, vim.split(new_content, "\n"))
|
||||
|
||||
-- Make buffer unmodifiable again
|
||||
-- Make buffer unmodifiable
|
||||
vim.api.nvim_buf_set_option(chat_bufnr, 'modifiable', false)
|
||||
else
|
||||
-- Make buffer modifiable
|
||||
vim.api.nvim_buf_set_option(chat_bufnr, 'modifiable', true)
|
||||
|
||||
-- Add separator before new content (only for subsequent messages)
|
||||
local separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
vim.api.nvim_buf_set_lines(chat_bufnr, -1, -1, false, {separator})
|
||||
|
||||
-- Update content
|
||||
vim.api.nvim_buf_set_lines(chat_bufnr, -1, -1, false, vim.split(new_content, "\n"))
|
||||
|
||||
-- Make buffer unmodifiable
|
||||
vim.api.nvim_buf_set_option(chat_bufnr, 'modifiable', false)
|
||||
end
|
||||
|
||||
-- Scroll to bottom
|
||||
local line_count = vim.api.nvim_buf_line_count(chat_bufnr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user