diff options
| author | ache <ache@ache.one> | 2026-02-19 18:44:33 +0100 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-02-19 18:44:33 +0100 |
| commit | 362b4a83c33f5ff30d3dbc3d3d0b996286fae444 (patch) | |
| tree | e4e1581d47dc04cb4e0081ee4c4dd16e3d4708fa /lua | |
| parent | exp: Experiment with treesitter fold (diff) | |
fix: LUA formatting
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/ache/plugins/alternate-toggler.lua | 4 | ||||
| -rw-r--r-- | lua/ache/plugins/image-nvim.lua | 25 | ||||
| -rw-r--r-- | lua/ache/plugins/linting.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/llm/cursortab.lua | 16 | ||||
| -rw-r--r-- | lua/ache/plugins/llm/model.lua | 148 | ||||
| -rw-r--r-- | lua/ache/plugins/lsp/blink.lua_dont | 58 | ||||
| -rw-r--r-- | lua/ache/plugins/lsp/rustowl.lua_ | 5 | ||||
| -rw-r--r-- | lua/ache/plugins/molten-nvim.lua | 47 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/ayu.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/cyberdream.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/github-nvim-theme.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/jellybeans.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/material.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/night-owl.lua | 2 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/nightfox.lua | 2 |
15 files changed, 235 insertions, 84 deletions
diff --git a/lua/ache/plugins/alternate-toggler.lua b/lua/ache/plugins/alternate-toggler.lua index ab9dfe1..936739c 100644 --- a/lua/ache/plugins/alternate-toggler.lua +++ b/lua/ache/plugins/alternate-toggler.lua @@ -2,11 +2,11 @@ return { "rmagatti/alternate-toggler", - enabled = true, + enabled = true, config = function() require("alternate-toggler").setup({ alternates = { - ["true"] = "false", + ["true"] = "false", ["oui"] = "non", ["Oui"] = "Non", ["OUI"] = "NON", diff --git a/lua/ache/plugins/image-nvim.lua b/lua/ache/plugins/image-nvim.lua new file mode 100644 index 0000000..5648672 --- /dev/null +++ b/lua/ache/plugins/image-nvim.lua @@ -0,0 +1,25 @@ +--[[ +--This plugin prints images inside Neovim. +--]] + +return { + -- See the image.nvim `README` for more information about configuring this plugin + "3rd/image.nvim", + enabled = true, + version = "1.1.0", + opts = { + backend = "kitty", -- Whatever backend you would like to use + integrations = { + markdown = { + enabled = false, + only_render_image_at_cursor = true, + }, + }, + max_width = 100, + max_height = 12, + max_height_window_percentage = math.huge, + max_width_window_percentage = math.huge, + window_overlap_clear_enabled = true, -- Toggles images when windows are overlapped + window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, + }, +} diff --git a/lua/ache/plugins/linting.lua b/lua/ache/plugins/linting.lua index 03441d5..920aa0d 100644 --- a/lua/ache/plugins/linting.lua +++ b/lua/ache/plugins/linting.lua @@ -8,7 +8,7 @@ -- return { "mfussenegger/nvim-lint", - enabled = true, + enabled = true, event = { "BufReadPre", "BufNewFile" }, config = function() local lint = require("lint") diff --git a/lua/ache/plugins/llm/cursortab.lua b/lua/ache/plugins/llm/cursortab.lua new file mode 100644 index 0000000..45a1aac --- /dev/null +++ b/lua/ache/plugins/llm/cursortab.lua @@ -0,0 +1,16 @@ +return { + "leonardcser/cursortab.nvim", + build = "cd server && go build", + enabled = false, + config = function() + require("cursortab").setup({ + provider = "sweep", + provider_url = "http://192.168.1.11:8000", + provider_model = "sweep-next-edit-1.5b", + max_context_tokens = 0, -- Max tokens to send as context (0 = no limit) + provider_temperature = 0.0, + provider_max_tokens = 512, + provider_top_k = 10, + }) + end, +} diff --git a/lua/ache/plugins/llm/model.lua b/lua/ache/plugins/llm/model.lua index 20ccb10..bf67689 100644 --- a/lua/ache/plugins/llm/model.lua +++ b/lua/ache/plugins/llm/model.lua @@ -1,81 +1,81 @@ return { - "gsuuon/model.nvim", - enabled = true, + "gsuuon/model.nvim", + enabled = true, - -- Don't need these if lazy = false - cmd = { "M", "Model", "Mchat" }, - init = function() - vim.filetype.add({ - extension = { - mchat = "mchat", - }, - }) - end, - ft = "mchat", + -- Don't need these if lazy = false + cmd = { "M", "Model", "Mchat" }, + init = function() + vim.filetype.add({ + extension = { + mchat = "mchat", + }, + }) + end, + ft = "mchat", - keys = { - { "<C-m>d", ":Mdelete<cr>", mode = "n" }, - { "<C-m>s", ":Mselect<cr>", mode = "n" }, - { "<C-m><space>", ":Mchat<cr>", mode = "n" }, - }, - config = function(_, opts) - local ollama = require("model.providers.ollama") - local model = require("model") - local starters = require("model.prompts.chats") - local qflist = require("model.util.qflist") + keys = { + { "<C-m>d", ":Mdelete<cr>", mode = "n" }, + { "<C-m>s", ":Mselect<cr>", mode = "n" }, + { "<C-m><space>", ":Mchat<cr>", mode = "n" }, + }, + config = function(_, opts) + local ollama = require("model.providers.ollama") + local model = require("model") + local starters = require("model.prompts.chats") + local qflist = require("model.util.qflist") - model.setup({ - chats = { - ["codellama:qfix"] = vim.tbl_deep_extend("force", starters["together:codellama"], { - system = "You are an intelligent programming assistant", - create = function() - return qflist.get_text() - end, - }), - ["ollama:mistral"] = vim.tbl_deep_extend("force", starters["ollama:starling"], {}), - }, - prompts = { - ["ollama:starling"] = { - provider = ollama, - params = { - model = "starling-lm", - }, - builder = function(input) - return { - prompt = "GPT4 Correct User: " .. input .. "<|end_of_turn|>GPT4 Correct Assistant: ", - } - end, - }, - ["ollama:mistral"] = { - provider = ollama, - params = { - model = "mistral", - }, - builder = function(input) - return { - prompt = input, - params = { - model = "mistral", - }, - } - end, - }, - }, - }) - end, + model.setup({ + chats = { + ["codellama:qfix"] = vim.tbl_deep_extend("force", starters["together:codellama"], { + system = "You are an intelligent programming assistant", + create = function() + return qflist.get_text() + end, + }), + ["ollama:mistral"] = vim.tbl_deep_extend("force", starters["ollama:starling"], {}), + }, + prompts = { + ["ollama:starling"] = { + provider = ollama, + params = { + model = "starling-lm", + }, + builder = function(input) + return { + prompt = "GPT4 Correct User: " .. input .. "<|end_of_turn|>GPT4 Correct Assistant: ", + } + end, + }, + ["ollama:mistral"] = { + provider = ollama, + params = { + model = "mistral", + }, + builder = function(input) + return { + prompt = input, + params = { + model = "mistral", + }, + } + end, + }, + }, + }) + end, - -- To override defaults add a config field and call setup() + -- To override defaults add a config field and call setup() - -- config = function() - -- require('model').setup({ - -- prompts = {..}, - -- chats = {..}, - -- .. - -- }) - -- - -- require('model.providers.llamacpp').setup({ - -- binary = '~/path/to/server/binary', - -- models = '~/path/to/models/directory' - -- }) - --end + -- config = function() + -- require('model').setup({ + -- prompts = {..}, + -- chats = {..}, + -- .. + -- }) + -- + -- require('model.providers.llamacpp').setup({ + -- binary = '~/path/to/server/binary', + -- models = '~/path/to/models/directory' + -- }) + --end } diff --git a/lua/ache/plugins/lsp/blink.lua_dont b/lua/ache/plugins/lsp/blink.lua_dont new file mode 100644 index 0000000..3368545 --- /dev/null +++ b/lua/ache/plugins/lsp/blink.lua_dont @@ -0,0 +1,58 @@ +--[ +-- A plugin for fuzzy completion using lsp. +--] + +return { + "saghen/blink.cmp", + enable = false, + -- optional: provides snippets for the snippet source + dependencies = { "rafamadriz/friendly-snippets" }, + + -- use a release tag to download pre-built binaries + version = "1.*", + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) + -- 'super-tab' for mappings similar to vscode (tab to accept) + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + keymap = { preset = "default" }, + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + }, + + -- (Default) Only show the documentation popup when manually triggered + completion = { documentation = { auto_show = false } }, + + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` + -- + -- See the fuzzy documentation for more information + fuzzy = { implementation = "prefer_rust_with_warning" }, + }, + opts_extend = { "sources.default" }, +} diff --git a/lua/ache/plugins/lsp/rustowl.lua_ b/lua/ache/plugins/lsp/rustowl.lua_ new file mode 100644 index 0000000..8f6e431 --- /dev/null +++ b/lua/ache/plugins/lsp/rustowl.lua_ @@ -0,0 +1,5 @@ +return { + "cordx56/rustowl", + enabled = false, + dependencies = { "neovim/nvim-lspconfig" }, +} diff --git a/lua/ache/plugins/molten-nvim.lua b/lua/ache/plugins/molten-nvim.lua new file mode 100644 index 0000000..44792fc --- /dev/null +++ b/lua/ache/plugins/molten-nvim.lua @@ -0,0 +1,47 @@ +--[[ +-- This plugin can execute Python code inside Neovim. +-- It can be used to enhance the Python Notebook edition from Neovim. +--]] + +return { + "benlubas/molten-nvim", + enabled = true, + version = "^1.0.0", -- Use version <2.0.0 to avoid breaking changes + dependencies = { "3rd/image.nvim" }, + build = ":UpdateRemotePlugins", + init = function() + -- This is an example, not a default. Please see the `README` for more configuration options + vim.g.molten_output_win_max_height = 12 + + -- This guide will be using image.nvim + -- Don't forget to setup and install the plugin if you want to view image outputs + vim.g.molten_image_provider = "image.nvim" + + -- Optional, I like wrapping. Works for virtual text and the output window + vim.g.molten_wrap_output = true + + -- Output as virtual text. Allows outputs to always be shown, works with images, but can be buggy with longer images + vim.g.molten_virt_text_output = true + + -- This will make it so the output shows up below the \`\`\` cell delimiter + vim.g.molten_virt_lines_off_by_1 = true + + vim.keymap.set("n", "<leader>ne", ":MoltenEvaluateOperator<CR>", { desc = "Evaluate operator", silent = true }) + vim.keymap.set( + "n", + "<leader>nos", + ":noautocmd MoltenEnterOutput<CR>", + { desc = "open output window", silent = true } + ) + + vim.keymap.set("n", "<leader>nr", ":MoltenReevaluateCell<CR>", { desc = "Re-eval cell", silent = true }) + vim.keymap.set( + "v", + "<leader>nR", + ":<C-u>MoltenEvaluateVisual<CR>gv", + { desc = "execute visual selection", silent = true } + ) + vim.keymap.set("n", "<leader>noh", ":MoltenHideOutput<CR>", { desc = "Close output window", silent = true }) + vim.keymap.set("n", "<leader>nmd", ":MoltenDelete<CR>", { desc = "Delete Molten cell", silent = true }) + end, +} diff --git a/lua/ache/plugins/themes/ayu.lua b/lua/ache/plugins/themes/ayu.lua index 75071e5..7780cd0 100644 --- a/lua/ache/plugins/themes/ayu.lua +++ b/lua/ache/plugins/themes/ayu.lua @@ -1,6 +1,6 @@ return { "Shatur/neovim-ayu", - enabled = true, + enabled = true, lazy = true, config = function() local colors = require("ayu.colors") diff --git a/lua/ache/plugins/themes/cyberdream.lua b/lua/ache/plugins/themes/cyberdream.lua index b3775e7..5361e8c 100644 --- a/lua/ache/plugins/themes/cyberdream.lua +++ b/lua/ache/plugins/themes/cyberdream.lua @@ -1,6 +1,6 @@ return { "scottmckendry/cyberdream.nvim", - enabled = true, + enabled = true, lazy = true, config = function() -- This is optional diff --git a/lua/ache/plugins/themes/github-nvim-theme.lua b/lua/ache/plugins/themes/github-nvim-theme.lua index 60fea21..4b4da1d 100644 --- a/lua/ache/plugins/themes/github-nvim-theme.lua +++ b/lua/ache/plugins/themes/github-nvim-theme.lua @@ -1,6 +1,6 @@ return { "projekt0n/github-nvim-theme", - enabled = true, + enabled = true, lazy = true, config = function() require("github-theme").setup({}) diff --git a/lua/ache/plugins/themes/jellybeans.lua b/lua/ache/plugins/themes/jellybeans.lua index 50973a6..6d9ae3e 100644 --- a/lua/ache/plugins/themes/jellybeans.lua +++ b/lua/ache/plugins/themes/jellybeans.lua @@ -1,7 +1,7 @@ return { "metalelf0/jellybeans-nvim", lazy = true, - enabled = true, + enabled = true, dependencies = { "rktjmp/lush.nvim" }, opts = {}, config = function() diff --git a/lua/ache/plugins/themes/material.lua b/lua/ache/plugins/themes/material.lua index a9e7dc8..82ffc66 100644 --- a/lua/ache/plugins/themes/material.lua +++ b/lua/ache/plugins/themes/material.lua @@ -1,6 +1,6 @@ return { "marko-cerovac/material.nvim", - enabled = true, + enabled = true, lazy = true, config = function() vim.g.material_style = "palenight" diff --git a/lua/ache/plugins/themes/night-owl.lua b/lua/ache/plugins/themes/night-owl.lua index 44a71f7..90ce45e 100644 --- a/lua/ache/plugins/themes/night-owl.lua +++ b/lua/ache/plugins/themes/night-owl.lua @@ -1,6 +1,6 @@ return { "oxfist/night-owl.nvim", - enabled = true, + enabled = true, lazy = true, config = function() -- load the colorscheme here diff --git a/lua/ache/plugins/themes/nightfox.lua b/lua/ache/plugins/themes/nightfox.lua index 5b47df1..485e283 100644 --- a/lua/ache/plugins/themes/nightfox.lua +++ b/lua/ache/plugins/themes/nightfox.lua @@ -1,6 +1,6 @@ return { "EdenEast/nightfox.nvim", - enabled = true, + enabled = true, lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- default priority is 50 config = function() |