pmizio / typescript-tools.nvim

⚡ TypeScript integration NeoVim deserves ⚡
MIT License
1.45k stars 40 forks source link

Is it possible to change the value for includePackageJsonAutoImports? #257

Open tamorim opened 5 months ago

tamorim commented 5 months ago

I'm trying to turn off the includePackageJsonAutoImports but I'm not sure how to do that. I was following the configuration guide on the README but it doesn't seem to work.

This is my current configuration:

  {
    'pmizio/typescript-tools.nvim',
    dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
    opts = {
      settings = {
        tsserver_file_preferences = {
          includePackageJsonAutoImports = 'off',
          includeCompletionsForModuleExports = false,
          includeCompletionsForImportStatements = false,
          allowIncompleteCompletions = false,
        },
      },
      on_attach = function(client)
        client.server_capabilities.semanticTokensProvider = nil
      end,
    },
  }
KostkaBrukowa commented 3 months ago

Can you give me an example on how to test it? Something that works in e.g. visual studio code and doesn't work with typescript-tools? I gave this option a look but I don't really know on how to test if it works or not Because the setup you have looks OK, and I've logged the code and those options are sent to tsserver