-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature inquiry/request: Setting max linewidth for AI output #27
Comments
Hi, I assume your vim/nvim is configured to not wrap lines. If that's the case, a good solution could be wrapping lines just in the chat, e.g. run this within a chat window: Does it help? |
|
I am not sure what are you trying to accomplish. Could you attach a screenshot of what is the actual behavior and what would you like it to be? |
I have added a new let g:vim_ai_chat = {
\ "ui": {
\ "paste_mode": 0,
\ },
\}
autocmd FileType aichat setlocal textwidth=130 Note that it is experimental as it could mess up indentation completely if used in incorrect context, but should be safe for use in the chat buffer. |
I see, does my previous comment resolve the issue? (you need to update the plugin before trying out) |
I think AIChat should be configured with a textwidth by default. |
I think that it depends. If you use to copy data from the chat, it could be quite uncomfortable to join lines every time. Also it does not fit well when used in combination with right sider ( |
I add it to the initial prompt: vim.cmd [[
let g:vim_ai_chat = {
\ "options": {
\ "model": "gpt-4-1106-preview",
\ "max_tokens": 1000,
\ "temperature": 1,
\ "request_timeout": 20,
\ "selection_boundary": "",
\ "initial_prompt": ">>> system\n - You are a code assistant\n - Always add line breaks at collumn 78\n - Always use 80 characters for each line of the respone\n - If you attach a code block add syntax type after ``` to enable syntax highlighting.\n",
\ },
\ "ui": {
\ "code_syntax_enabled": 1,
\ "populate_options": 0,
\ "open_chat_command": "preset_right",
\ "scratch_buffer_keep_open": 0,
\ },
\}
]]
|
Does anybody know if it is possible to set |
Hello,
I usually use vim on a side monitor or split, so that I can comfortably read maybe 130 characters. AI output usually exceeds this.
Is there a way to set a maximum linewidth? How difficult would it be to add an option? I could look into implementing that option with some guidance.
Best regards,
aJns
The text was updated successfully, but these errors were encountered: