-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_config.lua
More file actions
65 lines (57 loc) · 2.12 KB
/
example_config.lua
File metadata and controls
65 lines (57 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
-- Example LocalNest configuration for Neovim
-- Copy this to your Neovim config (e.g., ~/.config/nvim/lua/plugins/ai.lua)
return {
-- LocalNest AI Assistant
{
dir = vim.fn.stdpath('config') .. '/lua/localnest',
config = function()
require('localnest').setup({
-- Backend configuration
backend = {
type = "deepseek", -- Switch to "local" for local llama.cpp server
deepseek = {
api_key_env = "DEEPSEEK_API_KEY",
models = {
chat = "deepseek-chat", -- For chat conversations
fim = "deepseek-coder", -- For code completion
reasoning = "deepseek-reasoner", -- For complex reasoning
},
timeout = 30000, -- 30 seconds
},
},
-- FIM (Fill-in-the-Middle) configuration
fim = {
enabled = true,
auto_trigger = true,
max_tokens = 128,
temperature = 0.0, -- Lower temperature for more deterministic code completion
-- Filetypes where FIM is enabled
code_filetypes = {
"lua", "rust", "python", "go", "typescript", "javascript",
"java", "c", "cpp", "csharp", "php", "ruby", "swift", "kotlin", "scala"
},
-- DeepSeek specific FIM settings
deepseek_fim = {
max_tokens = 256,
temperature = 0.1,
top_p = 0.95,
},
},
-- Chat configuration
chat = {
enabled = true,
max_tokens = 4096,
temperature = 0.7,
system_prompt = [[You are a highly skilled coding assistant. Provide accurate, concise, and helpful responses. Focus on code quality, best practices, and practical solutions. When explaining code, be thorough but avoid unnecessary verbosity.]],
-- DeepSeek specific chat settings
deepseek_chat = {
max_tokens = 8192,
temperature = 0.7,
frequency_penalty = 0.0,
presence_penalty = 0.0,
},
},
})
end,
},
}