diff --git a/dot_tmux.conf b/dot_tmux.conf index 59443a8..0e138c4 100644 --- a/dot_tmux.conf +++ b/dot_tmux.conf @@ -61,6 +61,7 @@ set -g status-interval 5 ##set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]' #set -g status-justify centre # center align window list #set -g status-style fg=white,bg=default +set -g status-position top ## default window title colors #set-window-option -g window-status-style fg=white,bg=default,dim diff --git a/dot_vim/after/ftplugin/qf.vim b/dot_vim/after/ftplugin/qf.vim index 895d7ac..0f10635 100644 --- a/dot_vim/after/ftplugin/qf.vim +++ b/dot_vim/after/ftplugin/qf.vim @@ -1,3 +1,2 @@ nmap { (qf_previous_file) nmap } (qf_next_file) -nmap dd .Reject diff --git a/dot_vim/lua/avante_setup.lua b/dot_vim/lua/avante_setup.lua index effb86b..21a8ec3 100644 --- a/dot_vim/lua/avante_setup.lua +++ b/dot_vim/lua/avante_setup.lua @@ -2,18 +2,16 @@ require("avante_lib").load() require("avante").setup({ provider = "ollama", auto_suggestions_provider = "ollama", + cursor_applying_provider = "ollama", behavior = { auto_suggestions = false, + enable_cursor_planning_mode = true, }, hints = { enabled = false, }, - vendors = { - ollama = { - endpoint = "http://127.0.0.1:11434/v1", - model = "qwen2.5-coder:7b", - __inherited_from = "openai", - api_key_name = "", - }, + ollama = { + endpoint = "http://127.0.0.1:11434", + model = "phi4:14b", }, }) diff --git a/dot_vim/nvim.lua b/dot_vim/nvim.lua index c954d23..4007c04 100644 --- a/dot_vim/nvim.lua +++ b/dot_vim/nvim.lua @@ -62,16 +62,14 @@ nvim_lsp.rust_analyzer.setup({ }) nvim_lsp.gopls.setup({ on_attach = function(client, bufnr) - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - --tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', }, - tokenTypes = { 'namespace' }, - tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', - 'modification', 'documentation', 'defaultLibrary', - }, - } - } + --client.server_capabilities.semanticTokensProvider = { + --full = true, + --legend = { + ----tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', }, + --tokenTypes = { 'namespace' }, + --tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', 'modification', 'documentation', 'defaultLibrary' }, + --} + --} end, capabilities = default_capabilities, settings = { @@ -342,17 +340,17 @@ require('trouble').setup { jump = { "o", "" }, -- jump to the diagnostic or open / close folds --open_split = { "" }, -- open buffer in new split --open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = {}, -- open buffer in new tab - jump_close = { "" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location + open_tab = {}, -- open buffer in new tab + jump_close = { "" }, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds + open_folds = { "zR", "zr" }, -- open all folds toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j" -- next item + previous = "k", -- previous item + next = "j" -- next item }, } @@ -445,15 +443,19 @@ require('telescope').setup { -- Treesitter -- -require 'nvim-treesitter.configs'.setup { +require 'nvim-treesitter.configs'.setup({ -- One of "all", "maintained" (parsers with maintainers), or a list of languages ensure_installed = { "c", "cpp", "css", + "cue", "dockerfile", "fish", "go", + "gomod", + "gosum", + "gotmpl", "haskell", "html", "javascript", @@ -465,6 +467,7 @@ require 'nvim-treesitter.configs'.setup { "python", "query", "rust", + "starlark", "terraform", "toml", "tsx", @@ -504,7 +507,7 @@ require 'nvim-treesitter.configs'.setup { playground = { enable = true, disable = {}, - updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code + updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code persist_queries = false, -- Whether the query persists across vim sessions keybindings = { toggle_query_editor = 'o', @@ -519,7 +522,7 @@ require 'nvim-treesitter.configs'.setup { show_help = '?', }, } -} +}) require "neogen".setup {} @@ -623,9 +626,65 @@ end require("hoversplit").setup({}) +require("quicker").setup() + +vim.keymap.set("n", "q", function() + require("quicker").toggle() +end, { + desc = "Toggle quickfix", +}) + --require("murdock") --require("ollama_setup") --require("gen_setup") require("lir_setup") require("lualine_setup") -require("avante_setup") +--require("avante_setup") +--require("gen").setup({ +--model = "gemma3:12b-it-qat", +--init = nil, +--}) +require("smear_cursor").setup({ + --stiffness = 0.8, + --trailing_stiffness = 0.5, + --distance_stop_animating= 0.5, +}) + +require("parrot").setup({ + providers = { + ollama = {} + }, + chat_user_prefix = "Chat: ", + llm_prefix = "LLM: ", + hooks = { + CompleteFullContext = function(prt, params) + local template = [[ + I have the following code from {{filename}}: + + ```{{filetype}} + {{filecontent}} + ``` + + Please look at the following section specifically: + ```{{filetype}} + {{selection}} + ``` + + Goal: {{command}} + + Respond just with the snippet of code that should be inserted. + + + ]] + local model_obj = prt.get_model("command") + prt.Prompt(params, prt.ui.Target.append, model_obj, nil, template) + end, + }, +}) + +vim.diagnostic.config({ + virtual_text = false, + signs = true, + update_in_insert = false, + underline = true, +}) diff --git a/dot_vimrc b/dot_vimrc index 2bc7ef4..c43afea 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -110,7 +110,7 @@ Plug 'scrooloose/nerdcommenter' Plug 'mhinz/vim-signify' Plug 'nvim-lualine/lualine.nvim' Plug 'linrongbin16/lsp-progress.nvim' -Plug 'airblade/vim-rooter' +"Plug 'airblade/vim-rooter' Plug 'majutsushi/tagbar' Plug 'dcampos/nvim-snippy' Plug 'dcampos/cmp-snippy' @@ -122,6 +122,7 @@ Plug 'tpope/vim-abolish' " Plugins for syntax Plug 'lunaru/vim-less' Plug 'hylang/vim-hy', {'for': 'hy'} +Plug 'habamax/vim-asciidoctor' Plug 'jneen/ragel.vim' Plug 'NoahTheDuke/vim-just' Plug 'leafOfTree/vim-svelte-plugin' @@ -130,7 +131,7 @@ Plug 'Shougo/context_filetype.vim' Plug 'fedorenchik/AnsiEsc' Plug 'hwayne/tla.vim' Plug 'zchee/vim-goasm' -Plug 'cappyzawa/starlark.vim' +"Plug 'cappyzawa/starlark.vim' " Plugins that autocomplete Plug 'neovim/nvim-lspconfig' @@ -181,9 +182,14 @@ Plug 'danymat/neogen' Plug 'stevearc/dressing.nvim' Plug 'MunifTanjim/nui.nvim' Plug 'zbirenbaum/copilot.lua' -Plug 'yetone/avante.nvim', {'branch': 'main', 'do': 'make'} +"Plug 'yetone/avante.nvim', {'branch': 'main', 'do': 'make'} +"Plug 'David-Kunz/gen.nvim' +Plug 'ibhagwan/fzf-lua' +Plug 'frankroeder/parrot.nvim' Plug 'edolphin-ydf/goimpl.nvim' +Plug 'stevearc/quicker.nvim' +Plug 'sphamba/smear-cursor.nvim' call plug#end() @@ -292,9 +298,9 @@ let g:tagbar_autoclose = 1 let g:tagbar_compact = 1 " * vim-rooter -let g:rooter_cd_cmd="lcd" -let g:rooter_manual_only = 1 -set autochdir +"let g:rooter_cd_cmd="lcd" +"let g:rooter_manual_only = 1 +"set autochdir " " * FZF let g:rg_command = ' @@ -462,7 +468,7 @@ au FileType coq nmap a :CoqToCursor au FileType coq imap a :CoqToCursor " I don't know how I came up with gt for opening the tree, but it stuck. -nmap gt :edit . +nmap gt :edit %:h nmap gb :TagbarToggle "nnoremap gx :Kwbd " :Kwbd (defined below) really kills a buffer dead, and closes the window. @@ -526,8 +532,9 @@ nnoremap fp :lprev nnoremap lua require('telescope.builtin').git_files{} nnoremap ag lua require('telescope.builtin').live_grep{ word_match = "-w", only_sort_text = true, cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1], search = ''} nnoremap aw lua require('telescope.builtin').grep_string{ word_match = "-w", only_sort_text = true, cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]} -nnoremap q lua require('telescope.builtin').quickfix{} +"nnoremap q lua require('telescope.builtin').quickfix{} nnoremap ff lua require('telescope.builtin').quickfix{} +nnoremap ar lua require('telescope.builtin').resume{} nnoremap o lua require('telescope.builtin').buffers{initial_mode = "insert"} nnoremap lua require('telescope.builtin').buffers{prompt_prefix = " "}