Skip to content

Commit

Permalink
fix(dart): disable treesitter textobjects for Dart
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Sep 18, 2024
1 parent 84ecff9 commit e7e63af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/pack/dart/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ return {
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "dart" })
end

-- HACK: Disables the select treesitter textobjects because the Dart treesitter parser is very inefficient. Hopefully this gets fixed and this block can be removed in the future.
-- Reference: https://github.com/AstroNvim/AstroNvim/issues/2707
local select = vim.tbl_get(opts, "textobjects", "select")
if select then select.disable = require("astrocore").list_insert_unique(select.disable, { "dart" }) end
end,
},
{
Expand Down

0 comments on commit e7e63af

Please sign in to comment.