return { "nvim-treesitter/nvim-treesitter", cond = function() return vim.fn.executable "nix" == 1 end, version = false, build = ":TSUpdate", event = { "BufReadPre", "BufNewFile" }, dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" }, config = function(_, opts) if type(opts.ensure_installed) == "table" then -- @type table local added = {} opts.ensure_installed = vim.tbl_filter(function(lang) if added[lang] then return false end added[lang] = true return true end, opts.ensure_installed) end require("nvim-treesitter.configs").setup(opts) end, opts = { auto_install = true, highlight = { enable = true, disable = { "fortran" }, additional_vim_regex_highlighting = false, }, incremental_selection = { enable = true, keymaps = { init_selection = "gnn", node_incremental = "gnr", scope_incremental = "gnc", node_decremental = "gnm", }, }, indent = { enable = true, }, refactor = { smart_rename = { enable = true, keymaps = { smart_rename = "grr", }, }, navigation = { enable = true, keymaps = { goto_definition_lsp_fallback = "gnd", }, }, }, }, }