gemini fix

This commit is contained in:
yaso 2026-06-30 08:48:52 +02:00
parent bda1f54de9
commit ffd426471d
3 changed files with 53 additions and 21 deletions

View file

@ -3,14 +3,26 @@ return {
"LunarVim/bigfile.nvim", "LunarVim/bigfile.nvim",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
opts = { opts = {
filesize = 0.01, -- 10 KiB (your hive_adapters.g.dart sits right around here) -- Fallback size if the function doesn't intercept it
pattern = { "*.g.dart", "hive_registrar.g.dart" }, -- Force override on generated Dart files filesize = 2,
-- Use a detection function to unconditionally catch generated files
pattern = function(bufnr, _)
local buf_name = vim.api.nvim_buf_get_name(bufnr)
if buf_name:match("%.g%.dart$") or buf_name:match("hive_registrar%.g%.dart$") then
-- 1. Hard-disable Autopairs for this specific buffer
vim.api.nvim_buf_set_var(bufnr, "autopairs_enabled", false)
-- 2. Prevent the Copilot server from attaching and tracking
vim.api.nvim_buf_set_var(bufnr, "copilot_enabled", 0)
return true
end
end,
features = { features = {
"indent_blankline", -- Disables heavy indentation lines "indent_blankline", -- Disables heavy indentation lines
"lsp", -- Strips LSP diagnostics and semantic tokens for this buffer "lsp", -- Strips LSP diagnostics and semantic tokens for this buffer
"treesitter", -- Completely disables treesitter parsing/highlighting "treesitter", -- Completely disables treesitter parsing/highlighting
"syntax", -- Drops standard heavy syntax engines "syntax", -- Drops standard heavy syntax engines
"matchparen", -- Stops Neovim from trying to match deeply nested brackets "matchparen", -- Stops Neovim from trying to match deeply nested brackets
}, },
}, },
config = function(_, opts) config = function(_, opts)

View file

@ -17,7 +17,7 @@ return {
config = function() config = function()
local autopairs = require("nvim-autopairs") local autopairs = require("nvim-autopairs")
autopairs.setup({ autopairs.setup({
check_ts = true, check_ts = false,
ts_config = { ts_config = {
lua = { "string" }, lua = { "string" },
dart = { "string_literal" } dart = { "string_literal" }

View file

@ -1,15 +1,35 @@
return { return {
'nvim-telescope/telescope.nvim', version = '*', 'nvim-telescope/telescope.nvim',
dependencies = { version = '*',
'nvim-lua/plenary.nvim', dependencies = {
-- optional but recommended 'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, -- optional but recommended
}, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
config = function() },
local builtin = require('telescope.builtin') config = function()
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) local telescope = require('telescope')
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' }) local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) telescope.setup({
end defaults = {
-- The "vimgrep_arguments" here are what make Telescope lag-free
-- when working with large generated codebases.
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
"--glob=!**/*.g.dart", -- Ignore all .g.dart files
"--glob=!**/hive_registrar.g.dart", -- Specifically ignore your registry
},
},
})
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
end
} }