pmizio / typescript-tools.nvim

⚡ TypeScript integration NeoVim deserves ⚡
MIT License
1.26k stars 36 forks source link

Q/A: TSToolsOrganizeImports, TSToolsOrganizeImports #236

Closed unrealphong closed 2 weeks ago

unrealphong commented 4 months ago

I configured as shown below but still cannot use this function when pressing the shortcut

Screenshot 2024-02-14 at 16 17 20 Screenshot 2024-02-14 at 16 16 59
unrealphong commented 4 months ago

Can you help me fix the above problem? Thanks

liangmiQwQ commented 4 months ago

the same problem

unrealphong commented 4 months ago

the same problem

LOL, I tried changing the import order of config files but that function doesn't work. I'm temporarily replacing it with format on save:

local autocmd = vim.api.nvim_create_autocmd
     autocmd('BufWritePre', {
       pattern = '*.ts,*.tsx,*.jsx,*.js',
        callback = function(args)
         vim.cmd 'TSToolsAddMissingImports sync'
          vim.cmd 'TSToolsOrganizeImports sync'
          require('conform').format { bufnr = args.buf }
        end,
      })
liangmiQwQ commented 4 months ago

I tried enter the command directly on the command line, but it isn't working,too

KostkaBrukowa commented 2 weeks ago

Is this still an issue? It works on my side. Can you paste your config and give some small example where I could reproduce it?