sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cant get to run organize imports and add missing Imports on save

titoBouzout opened this issue · comments

commented

Im very puzzled, organize imports and add missing imports is not working when I save.

LSP.sublime-settings looks like

	"lsp_code_actions_on_save": {
		"source.fixAll": true,
		"source.organizeImports.ts": true,
		"source.addMissingImports.ts": true,
		"source.fixAll.ts": true
	}

I see LSP-typescript on the statusbar, the file extension is "js" and the syntax is "JSX". I tried some variations but still is not working.

Any ideas?

Seeing a communication log might help with analyzing it - https://lsp.sublimetext.io/troubleshooting/#self-help-instructions.

If that fails, a project that reproduces the issue might be needed.

Here is the repro repo:

https://github.com/predragnikolic/bug-org-import

LSP-sublime-settings:

{
	"lsp_code_actions_on_save": {
		// "source.fixAll": true,
		"source.organizeImports": true,
		"source.addMissingImports": true
	},
...

When pressing save I can see in the sublime console that lsp_save was called,
but the code actions on save for source.organizeImports and source.addMissingImports were not run.

Here are the logs:

:: --> LSP-eslint initialize(1): {'capabilities': {'general': {'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'workspace': {'didChangeWatchedFiles': {'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'codeLens': {'refreshSupport': True}, 'workspaceFolders': True, 'applyEdit': True, 'semanticTokens': {'refreshSupport': True}, 'symbol': {'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'configuration': True, 'executeCommand': {}}, 'window': {'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'workDoneProgress': True}, 'textDocument': {'completion': {'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'documentationFormat': ['markdown', 'plaintext'], 'snippetSupport': True, 'deprecatedSupport': True, 'tagSupport': {'valueSet': [1]}, 'labelDetailsSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'insertTextMode': 2, 'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, 'dynamicRegistration': True}, 'publishDiagnostics': {'tagSupport': {'valueSet': [1, 2]}, 'dataSupport': True, 'versionSupport': True, 'relatedInformation': True, 'codeDescriptionSupport': True}, 'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'didSave': True, 'willSave': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'semanticTokens': {'multilineTokenSupport': True, 'augmentsSyntaxTokens': True, 'overlappingTokenSupport': False, 'tokenTypes': ['struct', 'type', 'event', 'parameter', 'namespace', 'class', 'function', 'modifier', 'variable', 'macro', 'operator', 'enum', 'number', 'typeParameter', 'interface', 'method', 'comment', 'enumMember', 'keyword', 'string', 'property', 'regexp'], 'formats': ['relative'], 'requests': {'range': True, 'full': {'delta': True}}, 'tokenModifiers': ['declaration', 'readonly', 'deprecated', 'documentation', 'abstract', 'async', 'defaultLibrary', 'definition', 'modification', 'static'], 'dynamicRegistration': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dataSupport': True, 'resolveSupport': {'properties': ['edit']}, 'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': True}}}, 'rootPath': '/Users/codetribe/Documents/sandbox/import-example', 'workspaceFolders': [{'uri': 'file:///Users/codetribe/Documents/sandbox/import-example', 'name': 'import-example'}], 'processId': 27526, 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.16.1'}, 'rootUri': 'file:///Users/codetribe/Documents/sandbox/import-example', 'initializationOptions': {}}
LSP-eslint: ESLint server running in node v16.14.2
:: <-  LSP-eslint window/logMessage: {'type': 3, 'message': 'ESLint server running in node v16.14.2'}
:: <<< LSP-eslint 1: {'capabilities': {'textDocumentSync': {'save': {'includeText': False}, 'didClose': {}, 'didOpen': {}, 'change': {'syncKind': 2}}, 'workspace': {'workspaceFolders': {'supported': True}}, 'executeCommandProvider': {'commands': ['eslint.applySingleFix', 'eslint.applySuggestion', 'eslint.applySameFixes', 'eslint.applyAllFixes', 'eslint.applyDisableLine', 'eslint.applyDisableFile', 'eslint.openRuleDoc']}, 'codeActionProvider': {'codeActionKinds': ['quickfix', 'source.fixAll.eslint']}}}
::  -> LSP-eslint initialized: {}
::  -> LSP-eslint workspace/didChangeConfiguration: {'settings': {'nodePath': None, 'format': False, 'options': {}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'probe': ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'html', 'vue', 'markdown'], 'validate': ['javascript', 'javascriptreact'], 'quiet': False, 'run': 'onType', 'codeAction': {'disableRuleComment': {'location': 'separateLine', 'enable': True}, 'showDocumentation': {'enable': True}}, 'onIgnoredFiles': 'off', 'rulesCustomizations': [], 'packageManager': 'npm', 'useESLintClass': False}}
:: <-- LSP-eslint client/registerCapability(0): {'registrations': [{'method': 'workspace/didChangeConfiguration', 'registerOptions': {}, 'id': '68bd4b4e-26f2-440c-b38b-c67ed6a8880b'}]}
:: >>> LSP-eslint 0: None
:: <-- LSP-eslint client/registerCapability(1): {'registrations': [{'method': 'workspace/didChangeWorkspaceFolders', 'registerOptions': {}, 'id': '0fef6c10-ca90-44e5-a8e6-5576d857bcfb'}]}
:: >>> LSP-eslint 1: None
::  -> LSP-eslint textDocument/didOpen: {'textDocument': {'text': 'import { A_HELLO } from "./a_hello";\n\nA_HELLO\nB_HELLO', 'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'version': 0, 'languageId': 'typescript'}}
:: --> LSP-typescript initialize(1): {'capabilities': {'general': {'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'workspace': {'didChangeWatchedFiles': {'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'codeLens': {'refreshSupport': True}, 'workspaceFolders': True, 'applyEdit': True, 'semanticTokens': {'refreshSupport': True}, 'symbol': {'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'configuration': True, 'executeCommand': {}}, 'window': {'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'workDoneProgress': True}, 'textDocument': {'completion': {'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'documentationFormat': ['markdown', 'plaintext'], 'snippetSupport': True, 'deprecatedSupport': True, 'tagSupport': {'valueSet': [1]}, 'labelDetailsSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'insertTextMode': 2, 'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, 'dynamicRegistration': True}, 'publishDiagnostics': {'tagSupport': {'valueSet': [1, 2]}, 'dataSupport': True, 'versionSupport': True, 'relatedInformation': True, 'codeDescriptionSupport': True}, 'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'synchronization': {'willSaveWaitUntil': True, 'didSave': True, 'willSave': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'semanticTokens': {'multilineTokenSupport': True, 'augmentsSyntaxTokens': True, 'overlappingTokenSupport': False, 'tokenTypes': ['struct', 'type', 'event', 'parameter', 'namespace', 'class', 'function', 'modifier', 'variable', 'macro', 'operator', 'enum', 'number', 'typeParameter', 'interface', 'method', 'comment', 'enumMember', 'keyword', 'string', 'property', 'regexp'], 'formats': ['relative'], 'requests': {'range': True, 'full': {'delta': True}}, 'tokenModifiers': ['declaration', 'readonly', 'deprecated', 'documentation', 'abstract', 'async', 'defaultLibrary', 'definition', 'modification', 'static'], 'dynamicRegistration': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dataSupport': True, 'resolveSupport': {'properties': ['edit']}, 'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': True}}}, 'rootPath': '/Users/codetribe/Documents/sandbox/import-example', 'workspaceFolders': [{'uri': 'file:///Users/codetribe/Documents/sandbox/import-example', 'name': 'import-example'}], 'processId': 27526, 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.16.1'}, 'rootUri': 'file:///Users/codetribe/Documents/sandbox/import-example', 'initializationOptions': {'preferences': {'includeAutomaticOptionalChainCompletions': True, 'includeCompletionsWithSnippetText': True, 'includeCompletionsWithInsertText': True, 'allowRenameOfImportPath': True, 'displayPartsForJSDoc': True, 'allowTextChangesInNewFiles': True, 'includeCompletionsForModuleExports': True, 'includeCompletionsForImportStatements': True, 'generateReturnInDocTemplate': True, 'allowIncompleteCompletions': True}, 'maxTsServerMemory': 0, 'plugins': [], 'logVerbosity': 'off', 'npmLocation': ''}}
:: <-- LSP-eslint workspace/configuration(2): {'items': [{'scopeUri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'section': ''}]}
:: >>> LSP-eslint 2: [{'nodePath': None, 'format': False, 'options': {}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'validate': 'probe', 'quiet': False, 'run': 'onType', 'codeAction': {'disableRuleComment': {'location': 'separateLine', 'enable': True}, 'showDocumentation': {'enable': True}}, 'onIgnoredFiles': 'off', 'workspaceFolder': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example', 'name': 'import-example'}, 'rulesCustomizations': [], 'packageManager': 'npm', 'useESLintClass': False}]
LSP-typescript: [lspserver] Using Typescript version (workspace) 4.6.3 from path "/Users/codetribe/Documents/sandbox/import-example/node_modules/typescript/lib/tsserver.js"
:: <-  LSP-typescript window/logMessage: {'type': 3, 'message': '[lspserver] Using Typescript version (workspace) 4.6.3 from path "/Users/codetribe/Documents/sandbox/import-example/node_modules/typescript/lib/tsserver.js"'}
:: <<< LSP-typescript 1: {'capabilities': {'implementationProvider': True, 'callsProvider': True, 'documentHighlightProvider': True, 'documentRangeFormattingProvider': True, 'textDocumentSync': {'save': {}, 'didClose': {}, 'didOpen': {}, 'change': {'syncKind': 2}}, 'hoverProvider': True, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', '"', "'", '/', '@', '<']}, 'documentSymbolProvider': True, 'semanticTokensProvider': {'documentSelector': None, 'range': True, 'legend': {'tokenModifiers': ['declaration', 'static', 'async', 'readonly', 'defaultLibrary', 'local'], 'tokenTypes': ['class', 'enum', 'interface', 'namespace', 'typeParameter', 'type', 'parameter', 'variable', 'enumMember', 'property', 'function', 'member']}, 'full': True}, 'workspaceSymbolProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'codeActionProvider': True, 'renameProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'documentFormattingProvider': True, 'typeDefinitionProvider': True, 'foldingRangeProvider': True, 'referencesProvider': True, 'definitionProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript workspace/didChangeConfiguration: {'settings': {'javascript': {'inlayHints': {'includeInlayEnumMemberValueHints': False, 'includeInlayVariableTypeHints': False, 'includeInlayParameterNameHintsWhenArgumentMatchesName': False, 'includeInlayFunctionLikeReturnTypeHints': False, 'includeInlayFunctionParameterTypeHints': False, 'includeInlayParameterNameHints': 'none', 'includeInlayPropertyDeclarationTypeHints': False}, 'format': {'insertSpaceAfterCommaDelimiter': True, 'insertSpaceBeforeTypeAnnotation': False, 'insertSpaceAfterSemicolonInForStatements': True, 'trimTrailingWhitespace': True, 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces': False, 'placeOpenBraceOnNewLineForControlBlocks': False, 'placeOpenBraceOnNewLineForFunctions': False, 'insertSpaceBeforeAndAfterBinaryOperators': True, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis': False, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces': True, 'semicolons': 'ignore', 'insertSpaceAfterKeywordsInControlFlowStatements': True, 'insertSpaceBeforeFunctionParenthesis': False, 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces': False, 'insertSpaceAfterTypeAssertion': False, 'insertSpaceAfterFunctionKeywordForAnonymousFunctions': True, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets': False, 'insertSpaceAfterOpeningAndBeforeClosingEmptyBraces': False, 'insertSpaceAfterConstructor': False}}, 'typescript': {'inlayHints': {'includeInlayEnumMemberValueHints': False, 'includeInlayVariableTypeHints': False, 'includeInlayParameterNameHintsWhenArgumentMatchesName': False, 'includeInlayFunctionLikeReturnTypeHints': False, 'includeInlayFunctionParameterTypeHints': False, 'includeInlayParameterNameHints': 'none', 'includeInlayPropertyDeclarationTypeHints': False}, 'format': {'insertSpaceAfterCommaDelimiter': True, 'insertSpaceBeforeTypeAnnotation': False, 'insertSpaceAfterSemicolonInForStatements': True, 'trimTrailingWhitespace': True, 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces': False, 'placeOpenBraceOnNewLineForControlBlocks': False, 'placeOpenBraceOnNewLineForFunctions': False, 'insertSpaceBeforeAndAfterBinaryOperators': True, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis': False, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces': True, 'semicolons': 'ignore', 'insertSpaceAfterKeywordsInControlFlowStatements': True, 'insertSpaceBeforeFunctionParenthesis': False, 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces': False, 'insertSpaceAfterTypeAssertion': False, 'insertSpaceAfterFunctionKeywordForAnonymousFunctions': True, 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets': False, 'insertSpaceAfterOpeningAndBeforeClosingEmptyBraces': False, 'insertSpaceAfterConstructor': False}}, 'diagnostics': {'ignoredCodes': []}}}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'text': 'import { A_HELLO } from "./a_hello";\n\nA_HELLO\nB_HELLO', 'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'version': 0, 'languageId': 'typescript'}}
:: --> LSP-typescript typescript/inlayHints(2): {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: <<< LSP-typescript 2: {'inlayHints': []}
:: --> LSP-typescript textDocument/documentHighlight(3): {'position': {'character': 7, 'line': 3}, 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: --> LSP-typescript textDocument/codeAction(4): {'range': {'start': {'character': 7, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: --> LSP-eslint textDocument/codeAction(2): {'range': {'start': {'character': 7, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: <<< LSP-typescript 3: []
:: <<< LSP-eslint 2: []
:: <<< LSP-typescript 4: []
:: <-  LSP-typescript textDocument/publishDiagnostics: {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'diagnostics': [{'range': {'start': {'character': 0, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'severity': 1, 'tags': [], 'message': "Cannot find name 'B_HELLO'. Did you mean 'A_HELLO'?", 'source': 'typescript', 'code': 2552}]}
:: --> LSP-typescript textDocument/codeAction(5): {'range': {'start': {'character': 0, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'context': {'diagnostics': [{'range': {'start': {'character': 0, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'severity': 1, 'tags': [], 'message': "Cannot find name 'B_HELLO'. Did you mean 'A_HELLO'?", 'source': 'typescript', 'code': 2552}]}, 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: --> LSP-eslint textDocument/codeAction(3): {'range': {'start': {'character': 0, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
:: <<< LSP-eslint 3: []
:: <<< LSP-typescript 5: [{'title': 'Add import from "./b_hello"', 'kind': 'quickfix', 'command': {'title': 'Add import from "./b_hello"', 'arguments': [{'documentChanges': [{'edits': [{'range': {'start': {'character': 0, 'line': 1}, 'end': {'character': 0, 'line': 1}}, 'newText': 'import { B_HELLO } from "./b_hello";\n'}], 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'version': 0}}]}], 'command': '_typescript.applyWorkspaceEdit'}}, {'title': "Change spelling to 'A_HELLO'", 'kind': 'quickfix', 'command': {'title': "Change spelling to 'A_HELLO'", 'arguments': [{'documentChanges': [{'edits': [{'range': {'start': {'character': 0, 'line': 3}, 'end': {'character': 7, 'line': 3}}, 'newText': 'A_HELLO'}], 'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'version': 0}}]}], 'command': '_typescript.applyWorkspaceEdit'}}, {'title': 'Move to a new file', 'kind': 'refactor.move', 'command': {'title': 'Move to a new file', 'arguments': [{'file': '/Users/codetribe/Documents/sandbox/import-example/src/index.ts', 'action': 'Move to a new file', 'refactor': 'Move to a new file', 'startOffset': 1, 'startLine': 4, 'endOffset': 8, 'endLine': 4}], 'command': '_typescript.applyRefactoring'}}]
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///Users/codetribe/Documents/sandbox/import-example/src/index.ts'}}

That looks like some old version of LSP-typescript you are using there.
Not convinced it's the same as the initial issue.

That looks like some old version of LSP-typescript you are using there.

Yes, you are right. :) I was on an old branch...

By using the lastest LSP-typescript I do not see the issue.

@titoBouzout feel free to provide a repro example.
I will find the time to look at this :)

@titoBouzout reopen this if you still experience it.