Skip to content

Language settings for copilot answers#51

Merged
jellydn merged 3 commits intoCopilotC-Nvim:mainfrom
neutrinoA4:dev_language
Feb 17, 2024
Merged

Language settings for copilot answers#51
jellydn merged 3 commits intoCopilotC-Nvim:mainfrom
neutrinoA4:dev_language

Conversation

@neutrinoA4
Copy link
Copy Markdown
Contributor

Hi! I added the ability to set the language of Copilot answers.
If you originally create a prompt in the language you want the answer to be in "opts.prompts", the answer will be created in the corresponding language.
However, it is difficult to configure with "CopilotChatFixDiagnostic", so I added this setting item.
It works by adding language to opts in the settings.
If nothing is set, you will receive answers in English as before.

opts = {
      show_help = "yes",         -- Show help text for CopilotChatInPlace, default: yes
      debug = false,             -- Enable or disable debug mode, the log file will be in ~/.local/state/nvim/CopilotChat.nvim.log
      disable_extra_info = 'no', -- Disable extra information (e.g: system prompt) in the response.
      language = 'Japanese',
}

If it is not unnecessary, please consider merging it.

@jellydn jellydn changed the base branch from main to canary February 17, 2024 18:54
vim.g.copilot_chat_disable_separators = options and options.disable_extra_info or 'yes'
vim.g.copilot_chat_hide_system_prompt = options and options.hide_system_prompt or 'yes'
vim.g.copilot_chat_proxy = options and options.proxy or ''
vim.g.copilot_chat_language = options and options.language or ''
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add to the document to README and before setup function? Thanks @neutrinoA4

Copy link
Copy Markdown
Contributor

@jellydn jellydn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @neutrinoA4 👏 Could you help to address my comments on your PR? Thanks.

@neutrinoA4
Copy link
Copy Markdown
Contributor Author

@jellydn
Thanks for your review.
I have responded to your comment.

Copy link
Copy Markdown
Contributor

@jellydn jellydn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @neutrinoA4

Let's wait for @gptlang input on this.

neutrinoA4 and others added 3 commits February 18, 2024 03:26
Copy link
Copy Markdown
Contributor

@gptlang gptlang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jellydn jellydn changed the base branch from canary to main February 17, 2024 23:37
@jellydn jellydn merged commit 8e40e41 into CopilotC-Nvim:main Feb 17, 2024
cjoke pushed a commit to cjoke/CopilotChat.nvim that referenced this pull request Feb 18, 2024
* feat: add CopilotChatDebugInfo command

chore: add remote plugin path to util

* docs: add debug command to receipts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants