@@ -124,7 +124,7 @@ if not vim.g.vscode then
124124 vim .opt .rtp :append (package_path .. " consolelog.nvim" )
125125 local ok , consolelog = pcall (require , " consolelog" )
126126 if ok then
127- consolelog .setup ({ keymaps = { enabled = false } })
127+ consolelog .setup ({ auto_enable = false , keymaps = { enabled = false } })
128128 end
129129end
130130
185185---- --------------------------------------------------------------------------------------------------------------------
186186
187187if not vim .g .vscode then
188- map ( { ' x' , ' n' , ' i' }, ' <leader>lg' , " :Sidekick cli toggle name=gemini<cr>" , { desc = ' Gemini cli' })
189- map ( { ' x' , ' n' , ' i' }, ' <leader>lG' , " :Sidekick cli prompt<cr>" , { desc = ' Gemini prompt' })
188+ map ({ ' x' , ' n' , ' i' }, ' <leader>lg' , " :Sidekick cli toggle name=gemini<cr>" , { desc = ' Gemini cli' })
189+ map ({ ' x' , ' n' , ' i' }, ' <leader>lG' , " :Sidekick cli prompt<cr>" , { desc = ' Gemini prompt' })
190190
191191 vim .opt .rtp :append (package_path .. " sidekick.nvim" )
192192 local ok , sidekick = pcall (require , " sidekick" )
@@ -254,6 +254,10 @@ autocmd({ "BufWinEnter" }, { pattern = "*.code-snippets", command = "set ft=json
254254vim .cmd [[ anoremenu PopUp.Explorer <cmd>lua Snacks.explorer.open({ auto_close = true, layout = { preset = 'big_preview', preview = true, layout = { width = vim.o.columns, height = vim.o.lines } }})<cr> ]]
255255vim .cmd [[ anoremenu PopUp.Quit <cmd>quit!<cr> ]]
256256
257+ -- consolelog.nvim freezes mini.starter
258+ autocmd (' Filetype' , { pattern = ' javascript*' , command = " ConsoleLogReload" })
259+ autocmd (' Filetype' , { pattern = ' typescript*' , command = " ConsoleLogReload" })
260+
257261autocmd ({ " TermEnter" , " TermOpen" }, { callback = function () vim .cmd .startinsert () end })
258262
259263-- https://github.com/neovim/neovim/issues/14986
@@ -1143,9 +1147,9 @@ if not vim.g.vscode then
11431147 if vim .env .APPDATA then vim .notify (" windows not supported" ) return end
11441148
11451149 vim .pack .add ({{ src = ' https://github.com/chriswritescode-dev/consolelog.nvim' , version = ' a7fe38cbef59d78f669744765f6d8b7b14b27d9a' }})
1146- vim .opt .rtp :append (package_path .. " consolelog.nvim" )
1147- require (" consolelog" ).setup ({ keymaps = { enabled = false } })
11481150
1151+ vim .notify (" relaunch nvim" )
1152+ vim .notify (" only available for js, jsx, ts, tsx files" )
11491153 vim .notify (" consolelog.nvim requires (debian) ------> apt install net-tools" )
11501154 vim .notify (" consolelog.nvim requires (archlinux) ---> pacman -S net-tools" )
11511155 end ,
@@ -1155,18 +1159,18 @@ if not vim.g.vscode then
11551159 " n" ,
11561160 " <leader>El" ,
11571161 function ()
1158- local os = vim .uv .os_uname ().sysname :lower ()
1159- if os :find (' win' ) then os = " win32" end
1160-
1161- -- sendSequence('pixi g install pnpm; pnpm install --dir ~/.cache @github/copilot-language-server', 'cp ~/.cache/node_modules/@github/copilot-language-server/native/' .. os .. '-x64/copilot-language-server ~/.local/bin')
1162- sendSequence (
1163- ' pixi exec curl -C- -o $HOME/.cache/copilot.zip -L https://github.com/github/copilot-language-server-release/releases/download/1.397.0/copilot-language-server-' .. os .. ' -x64-1.397.0.zip' ,
1164- ' 7z x $HOME/.cache/copilot.zip -o"$HOME/.local/bin"'
1165- )
1162+ local os_uname = vim .uv .os_uname ().sysname :lower ()
1163+ local os = os_uname :find (" win" ) and " win32" or os_uname
1164+ local download_path = ' ~/.cache/node_modules/@github/copilot-language-server/native/' .. os .. ' -x64/copilot-language-server'
1165+ -- local download_url = 'https://github.com/github/copilot-language-server-release/releases/download/1.397.0/copilot-language-server-' .. os .. '-x64-1.397.0.zip'
1166+
1167+ if vim .fn .executable (' copilot-language-server' ) == 0 then
1168+ sendSequence (' pixi g install pnpm; pnpm install --dir ~/.cache @github/copilot-language-server' , ' mkdir -p ~/.local/bin; cp ' .. download_path .. ' ~/.local/bin' )
1169+ -- sendSequence ( 'pixi exec curl -C- -o $HOME/.cache/copilot.zip -L' .. download_url, '7z x $HOME/.cache/copilot.zip -o"$HOME/.local/bin"')
1170+ end
11661171
11671172 vim .pack .add ({{ src = ' https://github.com/copilotlsp-nvim/copilot-lsp' , version = ' 884034b23c3716d55b417984ad092dc2b011115b' }})
1168- vim .opt .rtp :append (package_path .. " copilot-lsp" )
1169- vim .lsp .enable (" copilot_ls" )
1173+
11701174 vim .notify (" relaunch nvim after installation to login to copilot" )
11711175 end ,
11721176 { desc = " copilot-lsp install" } -- Copilot-NES is free and unlimited
@@ -1176,8 +1180,8 @@ if not vim.g.vscode then
11761180 " <leader>En" ,
11771181 function ()
11781182 vim .pack .add ({{ src = ' https://github.com/monkoose/neocodeium' , version = ' bfe790d78e66adaa95cb50a8c75c64a752336e9c' }})
1179- vim . opt . rtp : append ( package_path .. " neocodeium " )
1180- require ( " neocodeium " ). setup ( )
1183+
1184+ vim . notify ( " relaunch nvim " )
11811185 vim .notify (" to login to windsurf run ---> :NeoCodeium auth" )
11821186 end ,
11831187 { desc = " neocodeium install" }
@@ -1186,11 +1190,13 @@ if not vim.g.vscode then
11861190 " n" ,
11871191 " <leader>Es" ,
11881192 function ()
1189- sendSequence (' pixi g install pnpm; pnpm install -g @google/gemini-cli' )
1193+ if vim .fn .executable (' gemini' ) == 0 then
1194+ sendSequence (' pixi g install pnpm; pnpm install -g @google/gemini-cli' )
1195+ end
11901196
11911197 vim .pack .add ({{ src = ' https://github.com/folke/sidekick.nvim' , version = ' v2.1.0' }})
1192- vim . opt . rtp : append ( package_path .. " sidekick.nvim " )
1193- require ( " sidekick " ). setup ({ nes = { enabled = false } } )
1198+
1199+ vim . notify ( " relaunch nvim " )
11941200 end ,
11951201 { desc = " sidekick.nvim install" } -- Gemini is free and unlimited
11961202 )
0 commit comments