From e4efa6b2092f00092cafc85d3abd50c821bef429 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Fri, 11 Apr 2025 09:34:43 -0500 Subject: [PATCH] avante --- config/.config/nvim/lazy-lock.json | 89 ++++- config/.config/zsh-abbr/user-abbreviations | 1 + vim/.vim/lua/plugins/blink.lua | 395 +++++++++++---------- vim/.vim/lua/plugins/conform.lua | 164 ++++----- vim/.vim/lua/plugins/lsp.lua | 157 ++++---- vim/.vim/lua/plugins/minuet.lua | 44 +++ zsh/.bash_profile | 2 + 7 files changed, 508 insertions(+), 344 deletions(-) create mode 100644 vim/.vim/lua/plugins/minuet.lua diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index 57d2f1e..7159f2a 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -1,3 +1,90 @@ { - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" } + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "ableton.nvim": { "branch": "main", "commit": "9666549abddffea7f57f90757e481b434bbe4b5d" }, + "actions-preview.nvim": { "branch": "master", "commit": "4ab7842eb6a5b6d2b004f8234dcf33382a0fdde2" }, + "aerial.nvim": { "branch": "master", "commit": "44684bf429dc40e97a6d00ffa09043ac3f692186" }, + "asyncrun.vim": { "branch": "master", "commit": "e17c49c67d1dd847cd1d7d6077a7168816f546cc" }, + "auto-session": { "branch": "main", "commit": "0a1318557c03845f2e0dde347bc54507d1d8c34d" }, + "bevy_inspector.nvim": { "branch": "master", "commit": "627d172ce0ef65c52e10cdb0c38bd5b301d90b3c" }, + "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" }, + "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, + "crates.nvim": { "branch": "main", "commit": "a63681f36d06cf733ccbd296481957fb1efa6d09" }, + "dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" }, + "debugprint.nvim": { "branch": "main", "commit": "196d33d4026436f7eddc67136e98515d62259947" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "firenvim": { "branch": "master", "commit": "c4ab7d2aeb145cd93db8660cb134f771722f2b5e" }, + "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "gdrama-syntax.vim": { "branch": "main", "commit": "004eda58d6e3ce3d1b46bbf257bd99784c475a0e" }, + "git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" }, + "grug-far.nvim": { "branch": "main", "commit": "082f97122dd59d816a9a7b676d2b2f86a8ab6ed9" }, + "headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" }, + "hlchunk.nvim": { "branch": "main", "commit": "19bf4090ab8619fffe07b73a4f92348324f35c98" }, + "java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" }, + "kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, + "lualine.nvim": { "branch": "master", "commit": "1ba400068bc178eb698b96ecfde82db59e7a7b8f" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, + "mini.notify": { "branch": "main", "commit": "f4e892533c8821bc5e0f373b353022a42bd465f7" }, + "minuet-ai.nvim": { "branch": "main", "commit": "eb282c9baeb60d11319ff3d42e7c2da784044456" }, + "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, + "neo-tree.nvim": { "branch": "main", "commit": "5224467c6a49a6c77b8a8333f4d9af0abc788e10" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, + "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, + "nvim-jdtls": { "branch": "master", "commit": "2f7bff9b8d2ee1918b36ca55f19547d9d335a268" }, + "nvim-lint": { "branch": "master", "commit": "e7b4ffa6ab763af012e38b21af2c9159f10d2d33" }, + "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, + "nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" }, + "nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" }, + "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, + "oldworld.nvim": { "branch": "main", "commit": "da084c76391d2cdef2e692f9312e2e7d73634a1d" }, + "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "ec1a2431f8872f650a85ed71c24f0715df2e49c2" }, + "paint.nvim": { "branch": "main", "commit": "ef6f717a8669619ebbd098fb72f85115d64c6c92" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, + "refactoring.nvim": { "branch": "master", "commit": "2be7ea3f10b7e59658f5abf6dffc50b5d61964d6" }, + "ron.vim": { "branch": "master", "commit": "f749e543975a82e8dd9a6e7df9600a1c098ae800" }, + "rustaceanvim": { "branch": "master", "commit": "3f327d15a3c1ed48b1e1087e16873a28a39768c2" }, + "tagalong.vim": { "branch": "main", "commit": "5a2bbf2b1d5b657685a49d48d98a4aa921c1fde3" }, + "telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" }, + "telescope-import.nvim": { "branch": "main", "commit": "6fd69447679a99b463025e7f2f787e8b185dd740" }, + "telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" }, + "telescope-recent-files": { "branch": "main", "commit": "eb190c0baded1cbfa9d8767c817b054377683163" }, + "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, + "text-case.nvim": { "branch": "main", "commit": "e898cfd46fa6cde0e83abb624a16e67d2ffc6457" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "e563f38d6c3f705a8735b2a21ee987e092d072d0" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tree-sitter-gdscript": { "branch": "master", "commit": "48b49330888a4669b48619b211cc8da573827725" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, + "vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" }, + "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, + "vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" }, + "vim-better-whitespace": { "branch": "master", "commit": "86a0579b330b133b8181b8e088943e81c26a809e" }, + "vim-conjoin": { "branch": "master", "commit": "2ea3b8ed994d12bbf255825d973d865621c64860" }, + "vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" }, + "vim-glsl": { "branch": "master", "commit": "40dd0b143ef93f3930a8a409f60c1bb85e28b727" }, + "vim-godot": { "branch": "master", "commit": "1c8385789f7f4558bdbbf6e75033b34b4727944b" }, + "vim-illuminate": { "branch": "master", "commit": "19cb21f513fc2b02f0c66be70107741e837516a1" }, + "vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" }, + "vim-matchup": { "branch": "master", "commit": "ea2ff43e09e68b63fc6d9268fc5d82d82d433cb3" }, + "vim-signify": { "branch": "master", "commit": "8670143f9e12ed1cd3c9b2c54f345cdd9a4baac3" }, + "vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" }, + "vim-tmux-focus-events": { "branch": "master", "commit": "b1330e04ffb95ede8e02b2f7df1f238190c67056" }, + "vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" }, + "vim-tmux-syntax": { "branch": "master", "commit": "1b6a6a5beb96fa232c8d35d305f77496b12678a9" }, + "vimux": { "branch": "master", "commit": "7db6b2f79d432ee3820668b1d4625311dbe1d0ad" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "yankwin.vim": { "branch": "master", "commit": "d3e3bbb0f785115c2f24b44ddf12e9378a1c1266" }, + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/config/.config/zsh-abbr/user-abbreviations b/config/.config/zsh-abbr/user-abbreviations index 451aaee..2905c74 100644 --- a/config/.config/zsh-abbr/user-abbreviations +++ b/config/.config/zsh-abbr/user-abbreviations @@ -4,5 +4,6 @@ abbr "bq"="blaze query" abbr "br"="blaze run" abbr "bt"="blaze test" abbr "ds_clean"="find ./ -name \".DS_Store\" -depth -exec rm {} \;" +abbr "gdvim"="nvim --listen /tmp/godot.pipe" abbr "mux"="tmuxinator" abbr "replace_string"="replace_string --disable_p4 \"%\" \"%\"" diff --git a/vim/.vim/lua/plugins/blink.lua b/vim/.vim/lua/plugins/blink.lua index 2598b7a..7d5bba1 100644 --- a/vim/.vim/lua/plugins/blink.lua +++ b/vim/.vim/lua/plugins/blink.lua @@ -1,99 +1,111 @@ local use_google = require("utils").use_google local flags = require("utils").flags - local kind_icons = { - -- LLM Provider icons - claude = "󰋦", - openai = "󱢆", - codestral = "󱎥", - gemini = "", - nvim_ciderlsp = "󱜚", - Groq = "", - Openrouter = "󱂇", - Ollama = "󰳆", - ["Llama.cpp"] = "󰳆", - Deepseek = "", + -- LLM Provider icons + claude = "󰋦", + openai = "󱢆", + codestral = "󱎥", + gemini = "", + nvim_ciderlsp = "󱜚", + Groq = "", + Openrouter = "󱂇", + Ollama = "󰳆", + ["Llama.cpp"] = "󰳆", + Deepseek = "", } return { - { - "milanglacier/minuet-ai.nvim", - cond = not use_google(), - config = function() - require("minuet").setup({ - provider = "gemini", - provider_options = { - gemini = { - optional = { - generationConfig = { - maxOutputTokens = 256, - }, - safetySettings = { - { - -- HARM_CATEGORY_HATE_SPEECH, - -- HARM_CATEGORY_HARASSMENT - -- HARM_CATEGORY_SEXUALLY_EXPLICIT - category = "HARM_CATEGORY_DANGEROUS_CONTENT", - -- BLOCK_NONE - threshold = "BLOCK_ONLY_HIGH", - }, - }, - }, - }, - }, - -- Your configuration options here - virtualtext = { - auto_trigger_ft = {}, - keymap = { - -- accept whole completion - accept = "", - -- accept one line - accept_line = "", - -- accept n lines (prompts for number) - -- e.g. "A-z 2 CR" will accept 2 lines - accept_n_lines = "", - -- Cycle to prev completion item, or manually invoke completion - prev = "", - -- Cycle to next completion item, or manually invoke completion - next = "", - dismiss = "", - }, - }, - }) - end, - }, - { - "saghen/blink.compat", - -- use the latest release, via version = '*', if you also use the latest release for blink.cmp - version = "*", - -- lazy.nvim will automatically load the plugin when it's required by blink.cmp - lazy = true, - -- make sure to set opts so that lazy.nvim calls blink.compat's setup - cond = flags.blink, - opts = { - impersonate_nvim_cmp = true, - debug = true, - }, - }, - { - "saghen/blink.cmp", - lazy = false, -- lazy loading handled internally - cond = flags.blink, - dependencies = { - "chrisgrieser/cmp-nerdfont", - "hrsh7th/cmp-nvim-lsp", - "mikavilpas/blink-ripgrep.nvim", - "moyiz/blink-emoji.nvim", - "rafamadriz/friendly-snippets", -- optional: provides snippets for the snippet source - "saghen/blink.compat", - }, - version = "v0.*", -- use a release tag to download pre-built binaries - -- build = 'cargo build --release', + { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, -- Never set this value to "*"! Never! + opts = { + -- add any opts here + -- for example + provider = "openai", + openai = { + endpoint = "https://api.openai.com/v1", + model = "gpt-4o", -- your desired model (or use gpt-4o, etc.) + timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models + temperature = 0, + max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models) + --reasoning_effort = "medium", -- low|medium|high, only used for reasoning models + }, + }, + -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` + build = "make", + -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "Kaiser-Yang/blink-cmp-avante", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + --- The below dependencies are optional, + "echasnovski/mini.pick", -- for file_selector provider mini.pick + "nvim-telescope/telescope.nvim", -- for file_selector provider telescope + "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions + "ibhagwan/fzf-lua", -- for file_selector provider fzf + "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons + "zbirenbaum/copilot.lua", -- for providers='copilot' + { + -- support for image pasting + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, + }, + { + -- Make sure to set this up properly if you have lazy=true + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, + }, + { + "saghen/blink.compat", + -- use the latest release, via version = '*', if you also use the latest release for blink.cmp + version = "*", + -- lazy.nvim will automatically load the plugin when it's required by blink.cmp + lazy = true, + cond = flags.blink, + -- make sure to set opts so that lazy.nvim calls blink.compat's setup + opts = { + impersonate_nvim_cmp = true, + debug = true, + }, + }, + { + "saghen/blink.cmp", + lazy = false, -- lazy loading handled internally + cond = flags.blink, + dependencies = { + "chrisgrieser/cmp-nerdfont", + "hrsh7th/cmp-nvim-lsp", + "mikavilpas/blink-ripgrep.nvim", + "moyiz/blink-emoji.nvim", + "rafamadriz/friendly-snippets", -- optional: provides snippets for the snippet source + "saghen/blink.compat", + }, + version = "v0.*", -- use a release tag to download pre-built binaries + -- build = 'cargo build --release', - - ---@module 'blink.cmp' - ---@type blink.cmp.Config - opts = { + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { -- stylua: ignore keymap = { preset = "none", @@ -110,105 +122,120 @@ return { [""] = { "scroll_documentation_up", "fallback" }, [""] = { "scroll_documentation_down", "fallback" }, }, - appearance = { - use_nvim_cmp_as_default = true, - nerd_font_variant = "normal", - kind_icons = kind_icons, - }, - sources = { - default = function(ctx) - local providerToEnable = { - "lsp", - "path", - "snippets", - "ripgrep", - "emoji", - "nerdfont", - "buffer", - } - if use_google() then - table.insert(providerToEnable, "nvim_ciderlsp") - else - table.insert(providerToEnable, "minuet") - end - return providerToEnable - end, - providers = { - lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 }, - -- dont show LuaLS require statements when lazydev has items - lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } }, - ripgrep = { - module = "blink-ripgrep", - name = "Ripgrep", - -- the options below are optional, some default values are shown - ---@module "blink-ripgrep" - ---@type blink-ripgrep.Options - opts = { - prefix_min_len = 3, - context_size = 5, - max_filesize = "1M", - additional_rg_options = {}, - }, - }, - -- https://github.com/moyiz/blink-emoji.nvim - emoji = { - module = "blink-emoji", - name = "Emoji", - score_offset = 15, -- the higher the number, the higher the priority - opts = { insert = true }, -- Insert emoji (default) or complete its name - }, - buffer = { - name = "Buffer", - enabled = true, - max_items = 3, - module = "blink.cmp.sources.buffer", - min_keyword_length = 4, - score_offset = 15, -- the higher the number, the higher the priority - }, - -- compat sources - nerdfont = { - name = "nerdfont", - module = "blink.compat.source", - }, - minuet = { - name = "minuet", - module = "minuet.blink", - score_offset = 100, -- Gives minuet higher priority among suggestions - }, - nvim_ciderlsp = { - name = "nvim_ciderlsp", - module = "blink.compat.source", - score_offset = 100, - }, - }, - }, - -- experimental signature help support - signature = { enabled = true }, - completion = { - -- Recommended to avoid unnecessary request - trigger = { prefetch_on_insert = false }, - list = { + appearance = { + use_nvim_cmp_as_default = true, + nerd_font_variant = "normal", + kind_icons = kind_icons, + }, + sources = { + default = function(ctx) + local providerToEnable = { + "lsp", + "path", + "snippets", + "ripgrep", + "emoji", + "nerdfont", + "buffer", + } + if use_google() then + table.insert(providerToEnable, "nvim_ciderlsp") + table.insert(providerToEnable, "buganizer") + else + table.insert(providerToEnable, "avante") + table.insert(providerToEnable, "minuet") + end + return providerToEnable + end, + providers = { + lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 }, + -- dont show LuaLS require statements when lazydev has items + lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } }, + ripgrep = { + module = "blink-ripgrep", + name = "Ripgrep", + -- the options below are optional, some default values are shown + ---@module "blink-ripgrep" + ---@type blink-ripgrep.Options + opts = { + prefix_min_len = 3, + context_size = 5, + max_filesize = "1M", + additional_rg_options = {}, + }, + score_offset = 20, -- the higher the number, the higher the priority + }, + -- https://github.com/moyiz/blink-emoji.nvim + emoji = { + module = "blink-emoji", + name = "Emoji", + score_offset = 1, -- the higher the number, the higher the priority + opts = { insert = true }, -- Insert emoji (default) or complete its name + }, + buffer = { + name = "Buffer", + enabled = true, + max_items = 3, + module = "blink.cmp.sources.buffer", + min_keyword_length = 4, + score_offset = 15, -- the higher the number, the higher the priority + }, + -- compat sources + nerdfont = { + name = "nerdfont", + module = "blink.compat.source", + score_offset = 1, -- the higher the number, the higher the priority + }, + minuet = { + name = "minuet", + module = "minuet.blink", + score_offset = 100, -- Gives minuet higher priority among suggestions + }, + avante = { + module = 'blink-cmp-avante', + name = 'Avante', + opts = { + -- options for blink-cmp-avante + } + }, + nvim_ciderlsp = { + name = "nvim_ciderlsp", + module = "blink.compat.source", + score_offset = 100, + }, + buganizer = { + name = "nvim_buganizer", + module = "blink.compat.source", + }, + }, + }, + -- experimental signature help support + signature = { enabled = true }, + completion = { + -- Recommended to avoid unnecessary request + trigger = { prefetch_on_insert = false }, + list = { -- stylua: ignore selection = { preselect = function(ctx) return ctx.mode ~= 'cmdline' end, auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end, }, - }, - documentation = { - auto_show = true, - }, - -- Displays a preview of the selected item on the current line - ghost_text = { - enabled = true, - }, - trigger = { - show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" }, - }, - }, - }, + }, + documentation = { + auto_show = true, + }, + -- Displays a preview of the selected item on the current line + ghost_text = { + enabled = true, + }, + trigger = { + show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" }, + }, + }, + }, - -- allows extending the providers array elsewhere in your config - -- without having to redefine it - opts_extend = { "sources.default" }, - }, + -- allows extending the providers array elsewhere in your config + -- without having to redefine it + opts_extend = { "sources.default" }, + }, } diff --git a/vim/.vim/lua/plugins/conform.lua b/vim/.vim/lua/plugins/conform.lua index 5f9b72e..b3300a3 100644 --- a/vim/.vim/lua/plugins/conform.lua +++ b/vim/.vim/lua/plugins/conform.lua @@ -1,90 +1,90 @@ local use_google = require("utils").use_google return { - { - "stevearc/conform.nvim", - event = { "BufWritePre" }, - cmd = { "ConformInfo", "FormatDisable", "FormatEnable" }, - keys = { + { + "stevearc/conform.nvim", + event = { "BufWritePre" }, + cmd = { "ConformInfo", "FormatDisable", "FormatEnable" }, + keys = { -- stylua: ignore { "fmt", function() require("conform").format({ async = true, lsp_fallback = true }) end, mode = "", desc = "Format buffer", }, - { "fj", ":%!python -m json.tool" }, - }, - config = function() - vim.g.disable_autoformat = false - vim.api.nvim_create_user_command("FormatDisable", function(args) - if args.bang then - -- FormatDisable! will disable formatting just for this buffer - vim.b.disable_autoformat = true - else - vim.g.disable_autoformat = true - end - end, { - desc = "Disable autoformat-on-save", - bang = true, - }) - vim.api.nvim_create_user_command("FormatEnable", function() - vim.b.disable_autoformat = false - vim.g.disable_autoformat = false - end, { - desc = "Re-enable autoformat-on-save", - }) + { "fj", ":%!python -m json.tool" }, + }, + config = function() + vim.g.disable_autoformat = false + vim.api.nvim_create_user_command("FormatDisable", function(args) + if args.bang then + -- FormatDisable! will disable formatting just for this buffer + vim.b.disable_autoformat = true + else + vim.g.disable_autoformat = true + end + end, { + desc = "Disable autoformat-on-save", + bang = true, + }) + vim.api.nvim_create_user_command("FormatEnable", function() + vim.b.disable_autoformat = false + vim.g.disable_autoformat = false + end, { + desc = "Re-enable autoformat-on-save", + }) - vim.api.nvim_create_autocmd("BufWritePre", { - pattern = "*", - callback = function(args) - if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then - return - end - require("conform").format({ bufnr = args.buf }) - end, - }) + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*", + callback = function(args) + if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then + return + end + require("conform").format({ bufnr = args.buf }) + end, + }) - vim.api.nvim_create_user_command("Format", function(args) - local range = nil - if args.count ~= -1 then - local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] - range = { - start = { args.line1, 0 }, - ["end"] = { args.line2, end_line:len() }, - } - end - require("conform").format({ async = true }) - end, { range = true }) - end, - -- This will provide type hinting with LuaLS - ---@module "conform" - ---@type conform.setupOpts - opts = { - log_level = vim.log.levels.DEBUG, - formatters_by_ft = { - rust = { "rustfmt" }, - -- Conform will run multiple formatters sequentially - -- go = { "goimports", "gofmt" }, - -- Use a sub-list to run only the first available formatter - lua = { "stylua" }, - -- Conform will run multiple formatters sequentially - python = { "isort" }, - -- Use a sub-list to run only the first available formatter - javascript = { "prettier" }, - gdscript = { "gdformat" }, - ron = { "ronfmt" }, - dashboard = {}, - -- Use the "*" filetype to run formatters on all filetypes. - -- ["*"] = { "codespell" }, - -- Use the "_" filetype to run formatters on filetypes that don't - -- have other formatters configured. - ["_"] = { "trim_whitespace" }, - }, - formatters = { - -- ronfmt = { - -- command = "ronfmt", - -- args = { "-d", "$FILENAME" }, - -- }, - gdformat = { - prepend_args = { "-l", "100" }, - }, - }, - }, - }, + vim.api.nvim_create_user_command("Format", function(args) + local range = nil + if args.count ~= -1 then + local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] + range = { + start = { args.line1, 0 }, + ["end"] = { args.line2, end_line:len() }, + } + end + require("conform").format({ async = true }) + end, { range = true }) + end, + -- This will provide type hinting with LuaLS + ---@module "conform" + ---@type conform.setupOpts + opts = { + log_level = vim.log.levels.DEBUG, + formatters_by_ft = { + rust = { "rustfmt" }, + -- Conform will run multiple formatters sequentially + -- go = { "goimports", "gofmt" }, + -- Use a sub-list to run only the first available formatter + lua = { "stylua" }, + -- Conform will run multiple formatters sequentially + python = { "isort" }, + -- Use a sub-list to run only the first available formatter + javascript = { "prettier" }, + gdscript = { "gdformat" }, + ron = { "ronfmt" }, + dashboard = {}, + -- Use the "*" filetype to run formatters on all filetypes. + -- ["*"] = { "codespell" }, + -- Use the "_" filetype to run formatters on filetypes that don't + -- have other formatters configured. + ["_"] = { "trim_whitespace" }, + }, + formatters = { + -- ronfmt = { + -- command = "ronfmt", + -- args = { "-d", "$FILENAME" }, + -- }, + gdformat = { + prepend_args = { "-l", "100" }, + }, + }, + }, + }, } diff --git a/vim/.vim/lua/plugins/lsp.lua b/vim/.vim/lua/plugins/lsp.lua index a35297f..7def01f 100644 --- a/vim/.vim/lua/plugins/lsp.lua +++ b/vim/.vim/lua/plugins/lsp.lua @@ -12,49 +12,49 @@ end return { - { - "kosayoda/nvim-lightbulb", - commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49", - event = { "LspAttach" }, - opts = { - autocmd = { enabled = true }, - virtual_text = { - enabled = true, - text = " 󱐋", - hl = "DiagnosticWarn", - }, - sign = { enabled = false }, - }, - }, - { - "L3MON4D3/LuaSnip", - build = "make install_jsregexp", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - dependencies = { "rafamadriz/friendly-snippets" }, - }, - { - "ray-x/go.nvim", - dependencies = { -- optional packages - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter", - }, - -- cond = not use_google(), - config = function() - local capabilities = flags.blink - and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) - or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) - capabilities.offsetEncoding = { "utf-16" } - require("go").setup({ - lsp_cfg = { capabilities = capabilities }, - lsp_keymaps = false, - lsp_inlay_hints = { - enable = not use_google(), -- doesn't work with ciderlsp - }, - }) - -- Run gofmt + goimports on save + { + "kosayoda/nvim-lightbulb", + commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49", + event = { "LspAttach" }, + opts = { + autocmd = { enabled = true }, + virtual_text = { + enabled = true, + text = " 󱐋", + hl = "DiagnosticWarn", + }, + sign = { enabled = false }, + }, + }, + { + "L3MON4D3/LuaSnip", + build = "make install_jsregexp", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + dependencies = { "rafamadriz/friendly-snippets" }, + }, + { + "ray-x/go.nvim", + dependencies = { -- optional packages + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + -- cond = not use_google(), + config = function() + local capabilities = flags.blink + and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) + or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) + capabilities.offsetEncoding = { "utf-16" } + require("go").setup({ + lsp_cfg = { capabilities = capabilities }, + lsp_keymaps = false, + lsp_inlay_hints = { + enable = not use_google(), -- doesn't work with ciderlsp + }, + }) + -- Run gofmt + goimports on save local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) vim.api.nvim_create_autocmd("BufWritePre", { @@ -97,41 +97,44 @@ return { local lspconfig = require("lspconfig") local lsp_configs = require("lspconfig.configs") - lsp_configs.ciderlsp = { - default_config = { - cmd = { - "/google/bin/releases/cider/ciderlsp/ciderlsp", - "--tooltag=nvim-lsp", - "--noforward_sync_responses", - }, - filetypes = { - "c", - "cpp", - "java", - "kotlin", - "objc", - "proto", - "textproto", - "go", - "python", - "bzl", - "typescript", - }, - offset_encoding = "utf-8", - root_dir = lspconfig.util.root_pattern(".citc"), - settings = {}, - }, - } + lsp_configs.ciderlsp = { + default_config = { + cmd = { + "/google/bin/releases/cider/ciderlsp/ciderlsp", + "--tooltag=nvim-lsp", + "--noforward_sync_responses", + }, + filetypes = { + "c", + "cpp", + "java", + "kotlin", + "objc", + "proto", + "textproto", + "go", + "python", + "bzl", + "typescript", + }, + offset_encoding = "utf-8", + root_dir = lspconfig.util.root_pattern(".citc"), + settings = {}, + }, + } - if use_google() then - lspconfig.ciderlsp.setup({}) - end + if use_google() then + lspconfig.ciderlsp.setup({}) + end - require("lspconfig").gdscript.setup({}) - vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) - vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]]) + lspconfig.gdscript.setup({}) + -- require('lspconfig').gdscript.setup { cmd = { "ncat", "localhost", "6005" }, root_dir = function() + -- return vim.fs.dirname(vim.fs.find('project.godot', { upward = true })[1]) + -- end + -- } - require("lspconfig").gdshader_lsp.setup({}) - end, - }, + vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) + vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4 wrap]]) + end, + }, } diff --git a/vim/.vim/lua/plugins/minuet.lua b/vim/.vim/lua/plugins/minuet.lua new file mode 100644 index 0000000..18a7241 --- /dev/null +++ b/vim/.vim/lua/plugins/minuet.lua @@ -0,0 +1,44 @@ +return { + 'milanglacier/minuet-ai.nvim', + config = function() + require('minuet').setup { + provider = 'gemini', + provider_options = { + gemini = { + optional = { + generationConfig = { + maxOutputTokens = 256, + }, + safetySettings = { + { + -- HARM_CATEGORY_HATE_SPEECH, + -- HARM_CATEGORY_HARASSMENT + -- HARM_CATEGORY_SEXUALLY_EXPLICIT + category = 'HARM_CATEGORY_DANGEROUS_CONTENT', + -- BLOCK_NONE + threshold = 'BLOCK_ONLY_HIGH', + }, + }, + }, + }, + }, + virtualtext = { + auto_trigger_ft = {}, + keymap = { + -- accept whole completion + accept = '', + -- accept one line + accept_line = '', + -- accept n lines (prompts for number) + -- e.g. "A-z 2 CR" will accept 2 lines + accept_n_lines = '', + -- Cycle to prev completion item, or manually invoke completion + prev = '', + -- Cycle to next completion item, or manually invoke completion + next = '', + dismiss = '', + }, + } + } + end, +} diff --git a/zsh/.bash_profile b/zsh/.bash_profile index 964a32a..2b549aa 100644 --- a/zsh/.bash_profile +++ b/zsh/.bash_profile @@ -26,3 +26,5 @@ fi if [ -f ~/.bashrc ]; then . ~/.bashrc; fi . "$HOME/.cargo/env" + +ulimit -n 10240