From 86f4bc28568c8891d933d8586100e1534d3b800c Mon Sep 17 00:00:00 2001 From: KeksNino Date: Tue, 11 Aug 2026 00:30:31 +0200 Subject: [PATCH] bunch of small tweaks + stylua fmt --- init.lua | 12 +- lazy-lock.json | 20 +- lua/chadrc.lua | 7 +- lua/configs/conform.lua | 13 +- lua/configs/lspconfig.lua | 26 +-- lua/mappings.lua | 39 ++-- lua/options.lua | 14 +- lua/plugins/init.lua | 444 +++++++++++++++++++++----------------- 8 files changed, 306 insertions(+), 269 deletions(-) diff --git a/init.lua b/init.lua index 93f4e72..0a35d3d 100755 --- a/init.lua +++ b/init.lua @@ -1,7 +1,6 @@ vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46/" vim.g.mapleader = " " -vim.wo.number = true -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then @@ -10,9 +9,6 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Load lazy.nvim configuration -local lazy_config = require("configs.lazy") - -- Load plugins require("lazy").setup({ -- NvChad plugins @@ -27,16 +23,16 @@ require("lazy").setup({ { import = "plugins" }, }) -local cmp = require'cmp' +local cmp = require 'cmp' -- cmp autocomplete cmp.setup({ sources = { - { name = 'nvim_lsp' }, + { name = 'nvim_lsp' }, }, mapping = { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), }, }) diff --git a/lazy-lock.json b/lazy-lock.json index 6198733..4746436 100755 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,7 +3,7 @@ "CopilotChat.nvim": { "branch": "main", "commit": "f0c2a23ab79dc295f5e0eef0d8b587a39020c852" }, "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, "NvChad": { "branch": "v2.5", "commit": "add44b952d631981614bbb8cfc6f7002f296dfe6" }, - "base46": { "branch": "v3.0", "commit": "e2f24c072b75f504d60f016ea3c2e846cb48eefa" }, + "base46": { "branch": "v3.0", "commit": "2ffb8eda35cfb3547d0d7dce30f4f2f0f674c4d7" }, "boole.nvim": { "branch": "main", "commit": "7b4a3dae28e3b2497747aa840439e9493cabdc49" }, "cmp-async-path": { "branch": "main", "commit": "98185a91d49ff5dd249aebf2f7456e18063fa2a0" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, @@ -12,9 +12,10 @@ "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, "copilot-cmp": { "branch": "master", "commit": "d0c70ddb8d0c3d012d4331a50000cd2e3c7d561c" }, - "copilot.lua": { "branch": "master", "commit": "2a849bc7bec4d175524c332c20d48ca9ece735df" }, + "copilot.lua": { "branch": "master", "commit": "0f616b9a51cb9e2498834dfd99f6da6966158eba" }, "cord.nvim": { "branch": "master", "commit": "8f081613c1314a0d6f38839c2788216621efb4d9" }, "crates.nvim": { "branch": "main", "commit": "694357861ec9ebf12475ddcdd04ea45a0923c32d" }, + "flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, @@ -24,29 +25,30 @@ "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, - "neogit": { "branch": "master", "commit": "2043096b7ae81e8350ec8cceb3e7ab08dca1dcfe" }, + "neogit": { "branch": "master", "commit": "37e0f22a2345bad1bffe01b31970885882f46275" }, "neoscroll.nvim": { "branch": "master", "commit": "c8d29979cb0cb3a2437a8e0ae683fd82f340d3b8" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, "nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" }, "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" }, - "nvim-lspconfig": { "branch": "master", "commit": "d592c1e6ad9a0a01b3d5ed3f0345d68407167181" }, + "nvim-lspconfig": { "branch": "master", "commit": "b7b920947f21339ee41fbb38c79d6445e12900aa" }, "nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" }, "nvim-tree.lua": { "branch": "master", "commit": "7ff7040bf6c246671eb55cb1727de4fd9f92a106" }, - "nvim-treesitter": { "branch": "main", "commit": "a45a920ec04cda5624f6dea0ff6454c81c3ad2d5" }, + "nvim-treesitter": { "branch": "main", "commit": "0f32dff7f19476629c77467f887b95e5e2d33509" }, "nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" }, "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, - "rustaceanvim": { "branch": "main", "commit": "746d84daa3678397e7b9595b86db30b3e7af7c28" }, + "rustaceanvim": { "branch": "main", "commit": "f62e76d8aa3ee5f90f0e36f10800ac8be83f7e36" }, "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, - "suda.vim": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" }, "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" }, "transparent.nvim": { "branch": "main", "commit": "e00ca1cf09caef575edf8da7e5a8b9193893b4c7" }, - "ui": { "branch": "v3.0", "commit": "23b99ce715ace72372f28e34807fd1e19023da42" }, + "ui": { "branch": "v3.0", "commit": "f22719026b94d02ce44c66c0059b89d927d942a0" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, + "vim-suda": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" }, "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, + "yazi.nvim": { "branch": "main", "commit": "8d6c25cb4e7c5702d6cd5a263cb36129fa78aa4c" } } diff --git a/lua/chadrc.lua b/lua/chadrc.lua index de5b6b0..70c5fa1 100755 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -1,14 +1,15 @@ --- This file needs to have same structure as nvconfig.lua +-- This file needs to have same structure as nvconfig.lua -- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua --- Please read that file to know all available options :( +-- Please read that file to know all available options :( ---@type ChadrcConfig local M = {} M.base46 = { - -- theme = "chadwal", + -- theme = "chadwal", theme = "tokyodark", transparency = true, + cursorline = true, } diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua index e844856..d68b74a 100755 --- a/lua/configs/conform.lua +++ b/lua/configs/conform.lua @@ -1,15 +1,16 @@ local options = { formatters_by_ft = { - lua = { "stylua" }, + -- lua = { "stylua" }, -- css = { "prettier" }, -- html = { "prettier" }, + nix = { "nixfmt" }, }, - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_fallback = true, + }, } return options diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index 063befe..783a074 100755 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -19,6 +19,7 @@ require("mason-tool-installer").setup({ "isort", "mypy", "pylint", + "slint-lsp", }, }) @@ -42,7 +43,7 @@ vim.lsp.config("lua_ls", { Lua = { workspace = { library = { - "/usr/share/hypr/stubs", + "/run/current-system/sw/share/hypr/stubs", }, }, }, @@ -63,10 +64,11 @@ vim.lsp.config("nixd", { }, options = { nixos = { - expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.nixos.options', + expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options', }, home_manager = { - expr = '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.nixos.options.home-manager.users.type.getSubOptions []', + expr = + '(builtins.getFlake "/home/user/nix-config").nixosConfigurations.desktop.options.home-manager.users.type.getSubOptions []', }, }, }, @@ -75,16 +77,16 @@ vim.lsp.config("nixd", { vim.lsp.config("basedpyright", { cmd = { "/run/current-system/sw/bin/basedpyright-langserver", "--stdio" }, - settings = { - pyright = { - disableOrganizeImports = true - }, - basedpyright = { - analysis = { - typeCheckingMode = "standard" - } - } + settings = { + pyright = { + disableOrganizeImports = true + }, + basedpyright = { + analysis = { + typeCheckingMode = "standard" + } } + } }) vim.filetype.add({ diff --git a/lua/mappings.lua b/lua/mappings.lua index 0e0bb3b..9081f62 100755 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,37 +1,27 @@ require "nvchad.mappings" local map = vim.keymap.set -local Snacks = require ("snacks") +local Snacks = require "snacks" map("i", "jk", "") -vim.api.nvim_del_keymap('n', '') +vim.api.nvim_del_keymap("n", "") -vim.keymap.set("n", "qs", function() require("persistence").select() end) +vim.keymap.set("n", "qs", function() + require("persistence").select() +end) vim.g.VM_maps = vim.g.VM_maps or {} -vim.g.VM_maps[''] = '(VM-Find-Subword-Under)' -vim.keymap.set("n", "", ':CopilotChatOpen', { noremap = true, silent = true }) -vim.keymap.set("n", "", "", { noremap = true, silent = true}) - --- vim.keymap.set("n", "t", function() --- local word = vim.fn.expand("") --- if word == "true" then --- vim.cmd("normal! ciwfalse") --- elseif word == "false" then --- vim.cmd("normal! ciwtrue") --- end --- end, { noremap = true, silent = true }) - --- vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) --- vim.keymap.set('n', '', ':tabprev', { noremap = true, silent = true }) --- vim.keymap.set('n', 'tn', ':tabnew', { noremap = true, silent = true }) --- vim.keymap.set('n', 'tc', ':tabclose', { noremap = true, silent = true }) +vim.g.VM_maps[""] = "(VM-Find-Subword-Under)" +vim.keymap.set("n", "", ":CopilotChatOpen", { noremap = true, silent = true }) +vim.keymap.set("n", "", "", { noremap = true, silent = true }) vim.keymap.set("n", "", "resize +2", { desc = "Increase Window Height" }) vim.keymap.set("n", "", "resize -2", { desc = "Decrease Window Height" }) vim.keymap.set("n", "", "vertical resize +2", { desc = "Increase Window Width" }) vim.keymap.set("n", "", "vertical resize -2", { desc = "Decrease Window Width" }) +vim.keymap.set("n", "yp", function() vim.fn.setreg('+', vim.fn.expand('%:p:.')) end, { desc = 'Copy file path' }) + vim.keymap.set("x", "<", "", ">gv") @@ -43,9 +33,12 @@ vim.keymap.set("v", "d", '"_d', { noremap = true }) vim.keymap.set("n", "k", vim.diagnostic.open_float) vim.keymap.del("n", "e") -vim.keymap.set("n", "e", function() Snacks.explorer.open() end, { desc = "File Explorer" }) -vim.keymap.set("n", "", function() Snacks.bufdelete() end, { desc = "Close Buffer" }) +vim.keymap.set("n", "e", function() + Snacks.explorer.open() +end, { desc = "File Explorer" }) --- map({ "n", "i", "v" }, "", " w ") +vim.keymap.set("n", "", function() + Snacks.bufdelete() +end, { desc = "Close Buffer" }) map("n", "rg", "Telescope live_grep", { desc = "telescope live grep" }) diff --git a/lua/options.lua b/lua/options.lua index a119f4b..1f2ce8e 100755 --- a/lua/options.lua +++ b/lua/options.lua @@ -3,8 +3,12 @@ require "nvchad.options" require("oil").setup({ default_file_explorer = true, + view_options = { + show_hidden = true, + }, }) + local alpha = function() return string.format("%x", math.floor(255 * vim.g.transparency or 0.8)) end @@ -38,13 +42,13 @@ require('boole').setup({ decrement = '' }, allow_caps_additions = { - {'enable', 'disable'}, - {'true', 'false'} + { 'enable', 'disable' }, + { 'true', 'false' } } }) require('neoscroll').setup({ - mappings = { -- Keys to be mapped to their corresponding default scrolling animation + mappings = { -- Keys to be mapped to their corresponding default scrolling animation '', '', '', '', '', '', @@ -54,12 +58,12 @@ require('neoscroll').setup({ stop_eof = true, -- Stop at when scrolling downwards respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further - duration_multiplier = 1.0, -- Global duration multiplier + duration_multiplier = 0.8, -- Global duration multiplier easing = 'linear', -- Default easing function pre_hook = nil, -- Function to run before the scrolling animation starts post_hook = nil, -- Function to run after the scrolling animation ends performance_mode = false, -- Disable "Performance Mode" on all buffers. ignored_events = { -- Events ignored while scrolling - 'WinScrolled', 'CursorMoved' + 'WinScrolled', 'CursorMoved' }, }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3d2eed8..1ec0dc4 100755 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,215 +1,253 @@ +require "yazi" return { - -- LSP / Mason - {"williamboman/mason-lspconfig.nvim", opts = {}}, - {"WhoIsSethDaniel/mason-tool-installer.nvim"}, - { - "stevearc/conform.nvim", - -- event = 'BufWritePre', -- uncomment for format on save - opts = require "configs.conform" + -- LSP / Mason + { "williamboman/mason-lspconfig.nvim", opts = {} }, + { "WhoIsSethDaniel/mason-tool-installer.nvim" }, + { + "stevearc/conform.nvim", + event = "BufWritePre", -- uncomment for format on save + opts = require "configs.conform", + }, + -- Misc + { + "vyfor/cord.nvim", + opts = { + display = { + theme = "atom", + }, }, - -- Misc - { - "vyfor/cord.nvim", - opts = { - display = { - theme = "atom" - } - } + }, + { "nvim-tree/nvim-tree.lua", enabled = false }, + { "nat-418/boole.nvim", lazy = false }, + { "lambdalisue/vim-suda", lazy = false }, + { "numToStr/Comment.nvim", lazy = true }, + { "tpope/vim-fugitive", lazy = false }, + { "stevearc/oil.nvim", lazy = false }, + { "NeogitOrg/neogit", lazy = false }, + -- { + -- 'uZer/pywal16.nvim', + -- -- for local dev replace with: + -- -- dir = '~/your/path/pywal16.nvim', + -- config = function() + -- vim.cmd.colorscheme("pywal16") + -- end, + -- }, + { + "folke/persistence.nvim", + event = "BufReadPre", + config = true, + }, + { + "MeanderingProgrammer/render-markdown.nvim", + }, + { + "karb94/neoscroll.nvim", + lazy = true, + opts = { + hide_cursor = true, + stop_eof = true, + respect_scrolloff = true, + cursor_scrolls_alone = true, }, - { "nvim-tree/nvim-tree.lua", enabled = false }, - -- Basic plugins - {"nat-418/boole.nvim", lazy = false}, - {"lambdalisue/suda.vim", lazy = false}, - {"numToStr/Comment.nvim", lazy = true}, - -- { "mg979/vim-visual-multi", lazy = false}, - {"tpope/vim-fugitive", lazy = false}, - {"stevearc/oil.nvim", lazy = false}, - {"NeogitOrg/neogit", lazy = false}, - -- { - -- 'uZer/pywal16.nvim', - -- -- for local dev replace with: - -- -- dir = '~/your/path/pywal16.nvim', - -- config = function() - -- vim.cmd.colorscheme("pywal16") - -- end, - -- }, - { - "folke/persistence.nvim", - event = "BufReadPre", - config = true + }, + { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + keys = { + { + "s", + mode = { "n", "x", "o" }, + function() + require("flash").jump() + end, + desc = "Flash", + }, + { + "S", + mode = { "n", "x", "o" }, + function() + require("flash").treesitter() + end, + desc = "Flash Treesitter", + }, + { + "r", + mode = "o", + function() + require("flash").remote() + end, + desc = "Remote Flash", + }, + { + "R", + mode = { "o", "x" }, + function() + require("flash").treesitter_search() + end, + desc = "Treesitter Search", + }, + { + "", + mode = { "c" }, + function() + require("flash").toggle() + end, + desc = "Toggle Flash Search", + }, }, - { - "MeanderingProgrammer/render-markdown.nvim" + }, + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + bigfile = { enabled = true }, + dashboard = { enabled = true }, + explorer = { + enabled = false, + auto_close = true, + }, + indent = { enabled = false }, + input = { enabled = true }, + picker = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + scope = { enabled = true }, + -- scroll = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, }, - { - "karb94/neoscroll.nvim", - lazy = true, - opts = { - hide_cursor = true, - stop_eof = true, - respect_scrolloff = true, - cursor_scrolls_alone = true - } - }, - { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - bigfile = {enabled = true}, - dashboard = {enabled = true}, - explorer = { - enabled = false, - auto_close = true - }, - indent = {enabled = false}, - input = {enabled = true}, - picker = {enabled = true}, - notifier = {enabled = true}, - quickfile = {enabled = true}, - scope = {enabled = true}, - -- scroll = { enabled = true }, - statuscolumn = {enabled = true}, - words = {enabled = true} - } - }, - { - "nvim-treesitter/nvim-treesitter", - lazy = true, - branch = "main", - build = ":TSUpdate" - }, - { - "xiyaowong/transparent.nvim", - lazy = false, - priority = 1000, - }, - { - "mfussenegger/nvim-dap", - config = function() - local dap, dapui = require("dap"), require("dapui") - dap.listeners.before.attach.dapui_config = function() - dapui.open() - end - dap.listeners.before.launch.dapui_config = function() - dapui.open() - end - dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() - end - dap.listeners.before.event_exited.dapui_config = function() - dapui.close() - end - end - }, - { - "rcarriga/nvim-dap-ui", - dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"}, - config = function() - require("dapui").setup() - end - }, - -- AI + }, + { + "nvim-treesitter/nvim-treesitter", + lazy = true, + branch = "main", + build = ":TSUpdate", + }, + { + "mfussenegger/nvim-dap", + config = function() + local dap, dapui = require "dap", require "dapui" + dap.listeners.before.attach.dapui_config = function() + dapui.open() + end + dap.listeners.before.launch.dapui_config = function() + dapui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + dapui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + dapui.close() + end + end, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, + config = function() + require("dapui").setup() + end, + }, + -- AI - { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - lazy = true, - config = function() - require("copilot").setup( - { - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { - accept = "", - dismiss = "" - } - }, - filetypes = { - python = true, - javascript = true, - typescript = true, - lua = true, - cpp = true, - rust = true, - ["*"] = false - } - } - ) - end - }, - { - "jvune0/copilot-cmp", - after = {"copilot.lua", "nvim-cmp"}, -- Ensure it loads after copilot and nvim-cmp - config = function() - require("copilot_cmp").setup() - end - }, - { - "CopilotC-Nvim/CopilotChat.nvim", - branch = "main", - dependencies = { - {"zbirenbaum/copilot.lua"}, - {"nvim-lua/plenary.nvim"} + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + lazy = true, + config = function() + require("copilot").setup { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept = "", + dismiss = "", + }, }, - show_diff = { - full_diff = true + filetypes = { + python = true, + javascript = true, + typescript = true, + lua = true, + cpp = true, + rust = true, + ["*"] = false, }, - opts = { - model = "claude-sonnet-4.6", - context = "buffer", - border = "rounded", - show_help = false, - window = { - layout = "float", - width = 0.6, - height = 0.6 - }, - mappings = { - submit_prompt = { - insert = "" - } - } - }, - build = nil -- Disable the build step + } + end, + }, + { + "jvune0/copilot-cmp", + after = { "copilot.lua", "nvim-cmp" }, -- Ensure it loads after copilot and nvim-cmp + config = function() + require("copilot_cmp").setup() + end, + }, + { + "CopilotC-Nvim/CopilotChat.nvim", + branch = "main", + dependencies = { + { "zbirenbaum/copilot.lua" }, + { "nvim-lua/plenary.nvim" }, }, - -- RUST + show_diff = { + full_diff = true, + }, + opts = { + model = "claude-sonnet-4.6", + context = "buffer", + border = "rounded", + show_help = false, + window = { + layout = "float", + width = 0.6, + height = 0.6, + }, + mappings = { + submit_prompt = { + insert = "", + }, + }, + }, + build = nil, -- Disable the build step + }, + -- RUST - { - "mrcjkb/rustaceanvim", - lazy = false, - config = function() - local extension_path = vim.fn.expand("$HOME/.local/share/nvim/mason/packages/codelldb/extension") - local codelldb_path = extension_path .. "adapter/codelldb" - local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib" - local cfg = require("rustaceanvim.config") + { + "mrcjkb/rustaceanvim", + lazy = false, + config = function() + local extension_path = vim.fn.expand "$HOME/.local/share/nvim/mason/packages/codelldb/extension" + local codelldb_path = extension_path .. "adapter/codelldb" + local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib" + local cfg = require "rustaceanvim.config" - vim.g.rustaceanvim = { - dap = { - adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path) - } - } - end - }, - { - "rust-lang/rust.vim", - ft = "rust", - init = function() - vim.g.rustfmt_autosave = 1 - end - }, - { - "saecki/crates.nvim", - ft = {"toml"}, - config = function() - require("crates").setup {} - require("cmp").setup.buffer( - { - sources = {{name = "crates"}} - } - ) - end - } + vim.g.rustaceanvim = { + dap = { + adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path), + }, + } + end, + }, + { + "rust-lang/rust.vim", + ft = "rust", + init = function() + vim.g.rustfmt_autosave = 1 + end, + }, + { + "saecki/crates.nvim", + ft = { "toml" }, + config = function() + require("crates").setup {} + require("cmp").setup.buffer { + sources = { { name = "crates" } }, + } + end, + }, }