From 0e03e0a861885431609199a5a93fe2f032370cef Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Fri, 20 Jun 2025 06:39:20 +0800 Subject: [PATCH] =?UTF-8?q?nvim:=20=E5=85=88=E6=9A=AB=E6=99=82=E9=97=9C?= =?UTF-8?q?=E9=96=89=E6=9C=83=E5=BD=B1=E9=9F=BF=E5=B7=A5=E4=BD=9C=E7=9A=84?= =?UTF-8?q?=E6=9D=B1=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exact_components/ai.lua.tmpl | 56 +++++++++---------- .../exact_plugins/exact_ui/hover.lua | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl b/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl index a455e45..5fbe815 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl @@ -117,32 +117,32 @@ return { end, }, - { - -- 自動補全用 - 'huggingface/llm.nvim', - dependencies = { 'kevinhwang91/nvim-ufo' }, -- 確保 ufo 先載入 - event = 'VeryLazy', -- 啟動後自動載入 - opts = { - backend = "openai", - -- chat_mode = true, - -- model = "qwen2.5-coder:1.5b", -- 實測發現不相容,先關掉 - -- model = "codellama:7b", - -- model = "starcoder2:3b", - -- model = "starcoder:1b", - model = "stable-code:3b", - url = {{ .ollamaUrl | quote }}, -- llm-ls uses "/api/generate" - {{ if .ollamaKey }}api_token = {{ .ollamaKey | quote }},{{ end }} - -- -- cf https://github.com/ollama/ollama/blob/main/docs/api.md#parametersu can set any field:value pair here it will be passed as is to the backend - request_body = { - -- Modelfile options for the model you use - options = { - temperature = 0.2, - top_p = 0.95, - } - }, - -- on_response = function(output) - -- return output:gsub("^```[%w]*\n?", ""):gsub("```$", "") - -- end, - }, - }, + -- { + -- -- 自動補全用 + -- 'huggingface/llm.nvim', + -- dependencies = { 'kevinhwang91/nvim-ufo' }, -- 確保 ufo 先載入 + -- event = 'VeryLazy', -- 啟動後自動載入 + -- opts = { + -- backend = "openai", + -- -- chat_mode = true, + -- -- model = "qwen2.5-coder:1.5b", -- 實測發現不相容,先關掉 + -- -- model = "codellama:7b", + -- -- model = "starcoder2:3b", + -- -- model = "starcoder:1b", + -- model = "stable-code:3b", + -- url = {{ .ollamaUrl | quote }}, -- llm-ls uses "/api/generate" + -- {{ if .ollamaKey }}api_token = {{ .ollamaKey | quote }},{{ end }} + -- -- -- cf https://github.com/ollama/ollama/blob/main/docs/api.md#parametersu can set any field:value pair here it will be passed as is to the backend + -- request_body = { + -- -- Modelfile options for the model you use + -- options = { + -- temperature = 0.2, + -- top_p = 0.95, + -- } + -- }, + -- -- on_response = function(output) + -- -- return output:gsub("^```[%w]*\n?", ""):gsub("```$", "") + -- -- end, + -- }, + -- }, } diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_ui/hover.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_ui/hover.lua index 1eb943e..1a5a91e 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_ui/hover.lua +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_ui/hover.lua @@ -1,4 +1,4 @@ --- if true then return {} end +if true then return {} end return { {