summaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorAlex Pickering <alex@cogarr.net>2025-11-03 13:40:43 -0600
committerAlex Pickering <alex@cogarr.net>2025-11-03 13:40:43 -0600
commit5ff315f499a2442b2139f08b0db1e851926d8401 (patch)
treec8519652da69620ed5e21bebf2430402b39e2432 /nvim
parent117ba1112cf67ba1d397d14a7ff09a416d6b5a6c (diff)
downloaddotfiles-5ff315f499a2442b2139f08b0db1e851926d8401.tar.gz
dotfiles-5ff315f499a2442b2139f08b0db1e851926d8401.tar.bz2
dotfiles-5ff315f499a2442b2139f08b0db1e851926d8401.zip
Add more configsHEADmaster
Add configs for * Bat * Karabiner Elements * mcphub And update the neovim config.
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.vim105
1 files changed, 49 insertions, 56 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index ccc3490..22eef03 100644
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -133,11 +133,11 @@ Plug 'nomnivore/ollama.nvim'
Plug 'nvim-lualine/lualine.nvim'
" Magenta.nvim is one ai agent
-" Plug 'dlants/magenta.nvim', {'do': 'npm install --frozen-lockfile'}
+ Plug 'dlants/magenta.nvim', {'do': 'npm install --frozen-lockfile'}
" Avante.nvim is another that integrates better with ollama
-Plug 'MunifTanjim/nui.nvim'
-Plug 'MeanderingProgrammer/render-markdown.nvim'
-Plug 'yetone/avante.nvim', { 'branch': 'main', 'do': 'make' }
+"Plug 'MunifTanjim/nui.nvim'
+"Plug 'MeanderingProgrammer/render-markdown.nvim'
+"Plug 'yetone/avante.nvim', { 'branch': 'main', 'do': 'make' }
" Oh boy windsurf
Plug 'Exafunction/windsurf.vim', { 'branch': 'main' }
@@ -224,7 +224,7 @@ let mapleader=";"
"Fuzzy git checkout branch
noremap <leader>c :call fzf#run(fzf#wrap({'sink': 'Git checkout', 'left':'20%', 'source': 'git branch \| tr -d " "' }))<Cr>
-noremap <leader>a :call fzf#run(fzf#wrap({'sink': 'git checkout', 'left':'50%', 'source': 'ag --nogroup --column --color --', 'preview-window':'up','preview':expand('<sfile>:p:h:h:h').'/bin/preview.sh'}))<Cr>
+"noremap <leader>a :call fzf#run(fzf#wrap({'sink': 'git checkout', 'left':'50%', 'source': 'ag --nogroup --column --color --', 'preview-window':'up','preview':expand('<sfile>:p:h:h:h').'/bin/preview.sh'}))<Cr>
" which-key, helps finding keybinds
noremap <leader>w lua require("which-key").show({})
@@ -324,6 +324,14 @@ function! s:Terminal()
endfunction
noremap <C-t> :call <SID>Terminal()<CR>
+function! s:Lint()
+ if filereadable(".lint")
+ execute feedkeys(";y:vsplit\<CR>term://./lint " + expand("%") + "\<CR>")
+ else
+ execute feedkeys(":vsplit\<CR>:terminal\<CR>i")
+ endif
+endfunction
+
"Find and open in a new tab
noremap <C-f> :Ag<Cr>
@@ -419,7 +427,7 @@ lua << EOF
vim.keymap.set("n", "<f1>", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
end,
})
- vim.lsp.config.lua_ls.setup{
+ vim.lsp.config("lua_ls", {
settings={
Lua={
runtime={
@@ -436,8 +444,9 @@ lua << EOF
}
}
}
- }
- vim.lsp.config.harper_ls.setup {
+ })
+ vim.lsp.enable("lua_ls")
+ vim.lsp.config("harper_ls", {
settings = {
["harper-ls"] = {
linters = {
@@ -446,7 +455,8 @@ lua << EOF
}
}
}
- }
+ })
+ vim.lsp.enable("harper_ls")
EOF
if filereadable(".lspconfig")
@@ -572,56 +582,38 @@ EOF
" MCP-hub
lua<< EOF
- require("mcphub").setup()
+ --require("mcphub").setup()
EOF
" Magenta.nvim
lua << EOF
---[=[
-require('magenta').setup({
- profiles = {
- {
- name = "local-llama3.1:8b",
- provider = "ollama",
- model = "llama3.1:8b"
- },
- {
- name = "local-llama3.2:latest",
- provider = "ollama",
- model = "llama3.2:latest"
- },
- {
- name = "local-llama3.3:latest",
- provider = "ollama",
- model = "llama3.3:latest"
- },
- {
- name = "local-qwen3:8b",
- provider = "ollama",
- model = "qwen3:8b"
- },
- {
- name = "local-qwen3:32b",
- provider = "ollama",
- model = "qwen3:32b"
- },
- {
- name = "local-qwen3:30b",
- provider = "ollama",
- model = "qwen3:30b"
- },
- {
- name = "local-deepseek",
- provider = "ollama",
- model = "deepseek-r1:latest"
- },
- {
- name = "claude-35",
- provider = "anthropic",
- model = "claude-3.5-haiku-latest",
- apiKeyEnvVar="ANTHROPIC_API_KEY"
- }
+local profiles = {
+ {
+ name = "claude-4.5-sonnet",
+ provider = "anthropic",
+ model = "claude-sonnet-4-5",
+ apiKeyEnvVar="ANTHROPIC_API_KEY"
},
+ {
+ name = "claude-3.5-haiku",
+ provider = "anthropic",
+ model = "claude-3-5-haiku",
+ apiKeyEnvVar="ANTHROPIC_API_KEY"
+ }
+}
+local pd = vim.system({"ollama", "list"}, {text = true}):wait()
+for line in pd.stdout:gmatch("[^\n]+") do
+ local model = line:match("^(%S+)")
+ if model ~= "NAME" then
+ table.insert(profiles, {
+ name = "local-" .. model,
+ provider = "ollama",
+ model = model
+ })
+ end
+end
+require('magenta').setup({
+ profiles = profiles,
picker = "telescope",
mcpServers = {
--[[
@@ -653,11 +645,11 @@ require('magenta').setup({
"^find .*$",
},
})
-]=]
EOF
-autocmd! User avante.nvim
+"autocmd! User avante.nvim
lua << EOF
+--[[
require('avante').setup{
provider = "ollama",
providers = {
@@ -688,6 +680,7 @@ require('avante').setup{
"bash", -- Built-in terminal access
}
}
+]]
EOF
" Acrisure