From 13951466614918521fcc39d4d1ce0ca68f0d5603 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 17 Dec 2024 16:31:06 -0800 Subject: [PATCH 1/3] avante update --- dot_vim/lua/avante_setup.lua | 50 ++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/dot_vim/lua/avante_setup.lua b/dot_vim/lua/avante_setup.lua index 5c51fbf..effb86b 100644 --- a/dot_vim/lua/avante_setup.lua +++ b/dot_vim/lua/avante_setup.lua @@ -1,37 +1,19 @@ require("avante_lib").load() require("avante").setup({ - provider = "ollama", - auto_suggestions_provider = "ollama", - behavior = { - auto_suggestions = false, - }, - hints = { - enabled = false, - }, - vendors = { - ---@type AvanteProvider - ollama = { - ["local"] = true, - endpoint = "127.0.0.1:11434/v1", - model = "qwen2.5-coder:7b", - parse_curl_args = function(opts, code_opts) - return { - url = opts.endpoint .. "/chat/completions", - headers = { - ["Accept"] = "application/json", - ["Content-Type"] = "application/json", - }, - body = { - model = opts.model, - messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced - max_tokens = 2048, - stream = true, - }, - } - end, - parse_response_data = function(data_stream, event_state, opts) - require("avante.providers").openai.parse_response(data_stream, event_state, opts) - end, - }, - }, + provider = "ollama", + auto_suggestions_provider = "ollama", + behavior = { + auto_suggestions = false, + }, + hints = { + enabled = false, + }, + vendors = { + ollama = { + endpoint = "http://127.0.0.1:11434/v1", + model = "qwen2.5-coder:7b", + __inherited_from = "openai", + api_key_name = "", + }, + }, }) From 9e3c50f60bb3513080d462fbae11c06f95786607 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 17 Dec 2024 16:36:00 -0800 Subject: [PATCH 2/3] force LANG, add rosencrantz configs --- dot_config/alacritty/alacritty.toml.tmpl | 7 ++++++- dot_config/fish/config.fish | 1 + dot_vim/nvim.lua | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dot_config/alacritty/alacritty.toml.tmpl b/dot_config/alacritty/alacritty.toml.tmpl index b87cf7a..2f8adb3 100644 --- a/dot_config/alacritty/alacritty.toml.tmpl +++ b/dot_config/alacritty/alacritty.toml.tmpl @@ -37,6 +37,8 @@ TERM = "xterm-256color" size = 15.5 {{ else if eq .chezmoi.hostname "mercutio" -}} size = 20.0 +{{ else if eq .chezmoi.hostname "rosencrantz" -}} +size = 15.0 {{ else -}} size = 19.0 {{ end }} @@ -101,8 +103,11 @@ key = "P" mode = "Vi|~Search" [[keyboard.bindings]] +{{if eq .chezmoi.hostname "rosencrantz" -}} +action = "ToggleFullscreen" +{{ else -}} action = "ToggleMaximized" -#action = "ToggleFullscreen" +{{ end }} key = "Return" mods = "Alt" diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index c0ed5f0..95d7897 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -12,6 +12,7 @@ set fish_greeting "" set EDITOR vi set -x GOPATH ~/.go set -x BROWSER xdg-open +set -gx LANG en_US.UTF-8 if test -e $HOME/.asdf/asdf.fish . ~/.asdf/asdf.fish diff --git a/dot_vim/nvim.lua b/dot_vim/nvim.lua index e856eb6..c954d23 100644 --- a/dot_vim/nvim.lua +++ b/dot_vim/nvim.lua @@ -211,7 +211,7 @@ require('go').setup({ iferr_vertical_shift = 2 }) -require('telescope').load_extension('goimpl') +--require('telescope').load_extension('goimpl') function org_imports(wait_ms) local params = vim.lsp.util.make_range_params() From 647e39b5cfe49f767467ddce01e210d8f9a7bf2f Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 17 Dec 2024 16:36:00 -0800 Subject: [PATCH 3/3] force LANG, add rosencrantz configs --- dot_config/alacritty/alacritty.toml.tmpl | 7 ++++++- dot_vim/nvim.lua | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dot_config/alacritty/alacritty.toml.tmpl b/dot_config/alacritty/alacritty.toml.tmpl index b87cf7a..2f8adb3 100644 --- a/dot_config/alacritty/alacritty.toml.tmpl +++ b/dot_config/alacritty/alacritty.toml.tmpl @@ -37,6 +37,8 @@ TERM = "xterm-256color" size = 15.5 {{ else if eq .chezmoi.hostname "mercutio" -}} size = 20.0 +{{ else if eq .chezmoi.hostname "rosencrantz" -}} +size = 15.0 {{ else -}} size = 19.0 {{ end }} @@ -101,8 +103,11 @@ key = "P" mode = "Vi|~Search" [[keyboard.bindings]] +{{if eq .chezmoi.hostname "rosencrantz" -}} +action = "ToggleFullscreen" +{{ else -}} action = "ToggleMaximized" -#action = "ToggleFullscreen" +{{ end }} key = "Return" mods = "Alt" diff --git a/dot_vim/nvim.lua b/dot_vim/nvim.lua index e856eb6..c954d23 100644 --- a/dot_vim/nvim.lua +++ b/dot_vim/nvim.lua @@ -211,7 +211,7 @@ require('go').setup({ iferr_vertical_shift = 2 }) -require('telescope').load_extension('goimpl') +--require('telescope').load_extension('goimpl') function org_imports(wait_ms) local params = vim.lsp.util.make_range_params()