Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tamorim opened this issue Apr 8, 2024 · 1 comment
Open

Comments

@tamorim
Copy link

tamorim commented Apr 8, 2024

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,
    },
  }
@tamorim tamorim changed the title Is it possible to change the value for the includePackageJsonAutoImport? Is it possible to change the value for includePackageJsonAutoImport? Apr 8, 2024
@tamorim tamorim changed the title Is it possible to change the value for includePackageJsonAutoImport? Is it possible to change the value for includePackageJsonAutoImports? Apr 8, 2024
@KostkaBrukowa
Copy link
Collaborator

KostkaBrukowa commented Jun 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants