sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin
MIT License
136 stars 11 forks source link

LSP-typescript crashing. #63

Closed Mishra-Suraj closed 3 years ago

Mishra-Suraj commented 3 years ago

I am using latest LSP-typescript and LSP packages on Sublime Text 4107 linux. LSP-typescript keeps on crashing when I open a particular project and works for other projects. I am using Node Version Manager (nvm) for managing node installation.

Here's the link for the project which crashes LSP-typescript - https://gitlab.com/Suraj-Mishra/tookforms-react/-/tree/redux-toolkit | Branch - redux-toolkit.

Sublime Text preferences

{
    // "block_caret": true,
    "bold_folder_labels": true,
    "color_scheme": "Packages/Theme - Gravity/One Dark Gravity.sublime-color-scheme",
    "font_face": "Victor Mono",
    "font_options": [
        // "gray_antialias",
        // "subpixel_antialias",
        "bold"
    ],
    "rulers": [
        120
    ],
    "word_wrap": true,
    "wrap_width": 120,
    "font_size": 13,
    "gn_hide_tab_close": true,
    "gn_hide_tab_dropdown": true,
    "gn_overlay_scroll_bars": true,
    "gn_sidebar_box": true,
    "gn_title_bar": true,
    "gnwidg1": true,
    "gnwidgo": true,
    // "highlight_line": true,
    "highlight_modified_tabs": true,
    "caret_style": "phase",
    "line_padding_top": 5,
    "line_padding_bottom": 5,
    "ignored_packages": [
        "Six",
        "Vintage",
        "Vintageous",
    ],
    "install_prereleases": [
        "NeoVintageous"
    ],
    "indent_guide_options": [
        "draw_active_single",
        "solid"
    ],
    "match_brackets_angle": true,
    "neovintageous_build_version": 11100,
    "save_on_focus_lost": true,
    "theme": "Cyanide.sublime-theme",
    "trim_trailing_white_space_on_save": true,
    "ui_scale": 1.2,
    "vintageous_use_ctrl_keys": null,
    "vintageous_use_super_keys": null,
    "auto_complete_commit_on_tab": true,
    "auto_complete_with_fields": true,
    "auto_complete_cycle": true,
    // "auto_hide_menu": true,
    // "auto_hide_tabs": true,
    // "auto_hide_status_bar": true,
    "adaptive_dividers": true,
    "remember_full_screen": true,
    "show_project_first": true,
    // "auto_complete_trailing_symbols": true,
    // "typescript_auto_format": true,
    // "typescript_auto_indent": true,
    // "node_path": "/home/tux/.nvm/versions/node/v16.0.0/include/node",
    "only_show_lsp_completions": true,
    "vintageous_default_mode": "insert",
}

Console Output

startup, version: 4107 linux x64 channel: stable
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: /home/tux
packages path: /home/tux/.config/sublime-text-3/Packages
state path: /home/tux/.config/sublime-text-3/Local
zip path: /opt/sublime_text/Packages
zip path: /home/tux/.config/sublime-text-3/Installed Packages
ignored_packages: ["Six", "Vintage", "Vintageous"]
UI scale: 1.2
pre session restore time: 0.662318
startup time: 1.06954
git: located Sublime Merge installed at /opt/sublime_merge
git: using configuration from system git install
git: tracking working dir /home/tux/Projects/nextjs/coming-from-svelte
first paint time: 1.12628
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading python 3.3 plugin 0_package_control_loader.00-package_control
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading python 3.3 plugin 0_package_control_loader.01-pygments
reloading python 3.3 plugin 0_package_control_loader.01-sublime_lib
reloading plugin Default.save_on_focus_lost
reloading python 3.3 plugin 0_package_control_loader.10-lsp_utils
reloading python 3.3 plugin 0_package_control_loader.10-shellenv
reloading python 3.3 plugin 0_package_control_loader.10-wcwidth
reloading python 3.3 plugin 0_package_control_loader.40-ptyprocess
reloading python 3.3 plugin 0_package_control_loader.50-backrefs
reloading plugin Default.scroll
reloading python 3.3 plugin 0_package_control_loader.50-bracex
reloading python 3.3 plugin 0_package_control_loader.50-markupsafe
reloading python 3.3 plugin 0_package_control_loader.50-pymdownx
reloading plugin Default.set_unsaved_view_name
reloading python 3.3 plugin 0_package_control_loader.50-pyte
reloading python 3.3 plugin 0_package_control_loader.50-python-markdown
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.50-requests
reloading python 3.3 plugin 0_package_control_loader.51-python-jinja2
reloading python 3.3 plugin 0_package_control_loader.55-jsonschema
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin ayu.activation
reloading plugin Default.settings
reloading python 3.3 plugin ayu.Icons
reloading python 3.3 plugin BracketHighlighter.bh_core
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin A File Icon.plugin
reloading plugin NeoVintageous.plugin
reloading plugin Debugger.__init__
reloading plugin Debugger.start
reloading python 3.3 plugin BracketHighlighter.bh_logging
reloading python 3.3 plugin BracketHighlighter.bh_plugin
reloading python 3.3 plugin BracketHighlighter.bh_popup
reloading python 3.3 plugin BracketHighlighter.bh_regions
reloading python 3.3 plugin BracketHighlighter.bh_remove
reloading python 3.3 plugin BracketHighlighter.bh_rules
reloading python 3.3 plugin BracketHighlighter.bh_search
reloading python 3.3 plugin BracketHighlighter.bh_swapping
reloading python 3.3 plugin BracketHighlighter.bh_wrapping
reloading python 3.3 plugin BracketHighlighter.support
reloading python 3.3 plugin LSP-css.plugin
reloading python 3.3 plugin LSP-html.plugin
reloading python 3.3 plugin LSP-json.plugin
reloading python 3.3 plugin LSP-typescript.plugin
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
reloading python 3.3 plugin Package Control.Package Control
reloading python 3.3 plugin Rust Enhanced.cargo_build
reloading python 3.3 plugin Rust Enhanced.SyntaxCheckPlugin
reloading python 3.3 plugin Rust Enhanced.toggle_setting
reloading python 3.3 plugin RustFmt.difflib
reloading python 3.3 plugin RustFmt.RustFmt
reloading python 3.3 plugin SideBarEnhancements.SideBar
reloading python 3.3 plugin SideBarEnhancements.SideBarAPI
reloading python 3.3 plugin SideBarEnhancements.SideBarDefaultDisable
reloading python 3.3 plugin SublimeLinter-eslint.linter
reloading python 3.3 plugin SublimeLinter.__init__
reloading python 3.3 plugin SublimeLinter._init
reloading python 3.3 plugin SublimeLinter.active_linters_view
reloading python 3.3 plugin SublimeLinter.busy_indicator_view
reloading python 3.3 plugin SublimeLinter.goto_commands
reloading python 3.3 plugin SublimeLinter.highlight_view
reloading python 3.3 plugin SublimeLinter.log_handler
reloading python 3.3 plugin SublimeLinter.message_view
reloading python 3.3 plugin SublimeLinter.panel_view
reloading python 3.3 plugin SublimeLinter.quick_actions
reloading python 3.3 plugin SublimeLinter.status_bar_view
reloading python 3.3 plugin SublimeLinter.sublime_linter
reloading python 3.3 plugin Sync Settings.1_reloader
reloading python 3.3 plugin Sync Settings.SyncSettings
reloading python 3.3 plugin Terminus.main
reloading python 3.3 plugin Guna.Guna
reloading python 3.3 plugin Quokka.quokka
plugins loaded
[warning]: TypeScript package not found, Quokka TypeScript support is not enabled.
Debugger: startup
auto
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Quokka.sublime-settings
generating syntax summary
Package Control: No updated packages
Saving the session file took longer than expected. This may result in slowdowns and is usually caused by large unsaved files, large number of selections or misbehaving plugins. (build: 0ms, encode: 0ms, write: 1285ms)
Unable to open /home/tux/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",
    // "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ]
  },
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}

package.json

{
    "name": "with-firebase-authentication",
    "version": "1.0.0",
    "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "export": "next export",
        "test": "jest --env=jsdom"
    },
    "dependencies": {
        "@babel/preset-env": "^7.14.4",
        "@reduxjs/toolkit": "^1.5.1",
        "axios": "^0.21.1",
        "firebase": "^8.2.7",
        "firebase-admin": "^9.5.0",
        "firebase-functions": "^3.13.1",
        "immer": "^9.0.2",
        "js-cookie": "2.2.1",
        "localforage": "^1.9.0",
        "luxon": "^1.26.0",
        "next": "^10.2.0",
        "next-firebase-auth": "^0.13.0-alpha.0",
        "nookies": "^2.5.2",
        "react": "^17.0.1",
        "react-dom": "^17.0.1",
        "react-double-marquee": "^1.1.0",
        "react-error-boundary": "^3.1.1",
        "react-firebaseui": "^5.0.2",
        "react-loader-spinner": "^4.0.0",
        "react-redux": "^7.2.4",
        "react-test-renderer": "^17.0.2",
        "react-textarea-autosize": "^8.3.1",
        "swr": "^0.5.6",
        "uuid": "^8.3.2"
    },
    "license": "MIT",
    "devDependencies": {
        "@babel/preset-react": "^7.13.13",
        "@testing-library/dom": "^7.31.0",
        "@testing-library/jest-dom": "^5.12.0",
        "@testing-library/react": "^11.2.7",
        "@types/js-cookie": "^2.2.6",
        "@types/luxon": "^1.26.5",
        "@types/node": "^15.0.1",
        "@types/react": "^17.0.4",
        "@types/uuid": "^8.3.0",
        "babel-jest": "^27.0.2",
        "identity-obj-proxy": "^3.0.0",
        "jest": "^27.0.3",
        "typescript": "^4.2.4"
    }
}

Sorry for those gigantic blocks. I don't know if there are any other logs that I can post here.

Thanks

rchl commented 3 years ago
Mishra-Suraj commented 3 years ago
* Which file do you have to open for it to crash?

Any file inside pages.

* What's the crash message exactly?

LSP-typescript has crashed, would you like to restart the server. (Or something like that)

* How does the server log look like (see https://lsp.sublimetext.io/troubleshooting/#self-help-instructions)?

For some unknown reason the server has stopped crashing and now it's working fine. Only thing I changed was remove a couple of test files, jest config files and babelrc file and a couple of npm packages. So I can't reproduce the issue and get server logs and crash message. Thanks for the help though.

Mishra-Suraj commented 3 years ago

LSP is crashing again. Here's the lsp log -

LSP-typescript: /home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25
LSP-typescript:             this.reject(new Error(this.operation + " timeout"));
LSP-typescript:                         ^
LSP-typescript: 
LSP-typescript: Error: compilerOptionsForInferredProjects timeout
LSP-typescript:     at Timeout.<anonymous> (/home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25:25)
LSP-typescript:     at listOnTimeout (node:internal/timers:557:17)
LSP-typescript:     at processTimers (node:internal/timers:500:7)

Edit - Well it's not crashing always. It's crashing randomly. As far as I can understand I am not doing anything different anytime.

rchl commented 3 years ago

It appears to be timing out handling the compilerOptionsForInferredProjects command. That asks typescript to read the project settings or something like that. It's timing out after 20 seconds.

Maybe there is some problem with your tsconfig.json.

If you execute npx tsc in that project, does it show any fatal errors?

Mishra-Suraj commented 3 years ago

Nope. No errors at all. I am using Nestjs for backend and Nextjs for frontend. the tsconfig that's inside backend directory was auto generated by nestjs. Here's the whole code -

Frontend

https://gitlab.com/Suraj-Mishra/tookforms-react

Backend

https://gitlab.com/Suraj-Mishra/Tookforms-backend

Also it crashes totally random times. And restarting the server doesn't helps. It crashes again with the generic LSP-typescript crashed and if you would like to restart server.

rchl commented 3 years ago

Can you enable server communication logging (https://lsp.sublimetext.io/troubleshooting/#self-help-instructions) and paste the log when the problem triggers?

Mishra-Suraj commented 3 years ago

I am waiting for it to crash again. I'll post the log right away. I can't produce any logs till then sorry.

rchl commented 3 years ago

compilerOptionsForInferredProjects, I believe, happens only server initialisation. So unless you are also getting other errors, this should only happen on init (switching projects, opening new window, etc...).

Mishra-Suraj commented 3 years ago

You are absolutely right. That's exactly what happens. Here's the logs -

:: --> LSP-typescript initialize(1): {'initializationOptions': {}, 'processId': 2967, 'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'capabilities': {'textDocument': {'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'didSave': True, 'willSave': True}, 'references': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'versionSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'snippetSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}, 'deprecatedSupport': True}}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}}, 'codeAction': {'dynamicRegistration': True, 'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'resolveSupport': {'properties': ['edit']}}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentSymbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True}}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'workspace': {'executeCommand': {}, 'configuration': True, 'symbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}}, 'applyEdit': True, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'experimental': {}}}
:: <<< LSP-typescript 1: {'capabilities': {'documentSymbolProvider': True, 'completionProvider': {'triggerCharacters': ['.', '"', "'", '/', '@', '<'], 'resolveProvider': True}, 'hoverProvider': True, 'callsProvider': True, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'didClose': {}, 'save': {}}, 'documentHighlightProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'workspaceSymbolProvider': True, 'definitionProvider': True, 'foldingRangeProvider': True, 'typeDefinitionProvider': True, 'documentFormattingProvider': True, 'documentRangeFormattingProvider': True, 'renameProvider': True, 'codeActionProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'implementationProvider': True, 'referencesProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'languageId': 'typescript', 'text': 'import { Injectable } from \'@nestjs/common\';\nimport { Model } from \'mongoose\';\nimport { UserDto } from \'./dto/create-test.dto\';\nimport { userDocument } from \'./schemas/create-test.schema\';\nimport { InjectModel } from \'@nestjs/mongoose\'\n\n@Injectable()\nexport class UsersService {\n\n  constructor(\n    @InjectModel("Post") private readonly userModel: Model<userDocument>,\n  ) { }\n\n  async createTest(UserDto: UserDto): Promise<UserDto> {\n    const createdUser = new this.userModel(UserDto);\n    return createdUser.save()\n  }\n\n  async updateTest(emailId, data) {\n    const update = await this.userModel.updateOne({ email: emailId, data: {} }, data);\n    return update;\n  }\n}\n', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.service.ts', 'version': 4}}
LSP-typescript: /home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25
LSP-typescript:             this.reject(new Error(this.operation + " timeout"));
LSP-typescript:                         ^
LSP-typescript: 
LSP-typescript: Error: compilerOptionsForInferredProjects timeout
LSP-typescript:     at Timeout.<anonymous> (/home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25:25)
LSP-typescript:     at listOnTimeout (node:internal/timers:557:17)
LSP-typescript:     at processTimers (node:internal/timers:500:7)
:: --> LSP-typescript initialize(1): {'initializationOptions': {}, 'processId': 2967, 'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'capabilities': {'textDocument': {'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'didSave': True, 'willSave': True}, 'references': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'versionSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'snippetSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}, 'deprecatedSupport': True}}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}}, 'codeAction': {'dynamicRegistration': True, 'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'resolveSupport': {'properties': ['edit']}}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentSymbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True}}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'workspace': {'executeCommand': {}, 'configuration': True, 'symbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}}, 'applyEdit': True, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'experimental': {}}}
:: <<< LSP-typescript 1: {'capabilities': {'documentSymbolProvider': True, 'completionProvider': {'triggerCharacters': ['.', '"', "'", '/', '@', '<'], 'resolveProvider': True}, 'hoverProvider': True, 'callsProvider': True, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'didClose': {}, 'save': {}}, 'documentHighlightProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'workspaceSymbolProvider': True, 'definitionProvider': True, 'foldingRangeProvider': True, 'typeDefinitionProvider': True, 'documentFormattingProvider': True, 'documentRangeFormattingProvider': True, 'renameProvider': True, 'codeActionProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'implementationProvider': True, 'referencesProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'languageId': 'typescript', 'text': 'import { Injectable } from \'@nestjs/common\';\nimport { Model } from \'mongoose\';\nimport { UserDto } from \'./dto/create-test.dto\';\nimport { userDocument } from \'./schemas/create-test.schema\';\nimport { InjectModel } from \'@nestjs/mongoose\'\n\n@Injectable()\nexport class UsersService {\n\n  constructor(\n    @InjectModel("Post") private readonly userModel: Model<userDocument>,\n  ) { }\n\n  async createTest(UserDto: UserDto): Promise<UserDto> {\n    const createdUser = new this.userModel(UserDto);\n    return createdUser.save()\n  }\n\n  async updateTest(emailId, data) {\n    const update = await this.userModel.updateOne({ email: emailId, data: {} }, data);\n    return update;\n  }\n}\n', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.service.ts', 'version': 4}}
LSP-typescript: /home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25
LSP-typescript:             this.reject(new Error(this.operation + " timeout"));
LSP-typescript:                         ^
LSP-typescript: 
LSP-typescript: Error: compilerOptionsForInferredProjects timeout
LSP-typescript:     at Timeout.<anonymous> (/home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25:25)
LSP-typescript:     at listOnTimeout (node:internal/timers:557:17)
LSP-typescript:     at processTimers (node:internal/timers:500:7)
:: --> LSP-typescript initialize(1): {'initializationOptions': {}, 'processId': 2967, 'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'capabilities': {'textDocument': {'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'didSave': True, 'willSave': True}, 'references': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'versionSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'snippetSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}, 'deprecatedSupport': True}}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}}, 'codeAction': {'dynamicRegistration': True, 'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'resolveSupport': {'properties': ['edit']}}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentSymbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True}}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'workspace': {'executeCommand': {}, 'configuration': True, 'symbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}}, 'applyEdit': True, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'experimental': {}}}
:: <<< LSP-typescript 1: {'capabilities': {'documentSymbolProvider': True, 'completionProvider': {'triggerCharacters': ['.', '"', "'", '/', '@', '<'], 'resolveProvider': True}, 'hoverProvider': True, 'callsProvider': True, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'didClose': {}, 'save': {}}, 'documentHighlightProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'workspaceSymbolProvider': True, 'definitionProvider': True, 'foldingRangeProvider': True, 'typeDefinitionProvider': True, 'documentFormattingProvider': True, 'documentRangeFormattingProvider': True, 'renameProvider': True, 'codeActionProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'implementationProvider': True, 'referencesProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'languageId': 'typescript', 'text': 'import { Injectable } from \'@nestjs/common\';\nimport { Model } from \'mongoose\';\nimport { UserDto } from \'./dto/create-test.dto\';\nimport { userDocument } from \'./schemas/create-test.schema\';\nimport { InjectModel } from \'@nestjs/mongoose\'\n\n@Injectable()\nexport class UsersService {\n\n  constructor(\n    @InjectModel("Post") private readonly userModel: Model<userDocument>,\n  ) { }\n\n  async createTest(UserDto: UserDto): Promise<UserDto> {\n    const createdUser = new this.userModel(UserDto);\n    return createdUser.save()\n  }\n\n  async updateTest(emailId, data) {\n    const update = await this.userModel.updateOne({ email: emailId, data: {} }, data);\n    return update;\n  }\n}\n', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.service.ts', 'version': 4}}
LSP-typescript: /home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25
LSP-typescript:             this.reject(new Error(this.operation + " timeout"));
LSP-typescript:                         ^
LSP-typescript: 
LSP-typescript: Error: compilerOptionsForInferredProjects timeout
LSP-typescript:     at Timeout.<anonymous> (/home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/15.14.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25:25)
LSP-typescript:     at listOnTimeout (node:internal/timers:557:17)
LSP-typescript:     at processTimers (node:internal/timers:500:7)
:: --> LSP-typescript initialize(1): {'initializationOptions': {}, 'processId': 2967, 'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'capabilities': {'textDocument': {'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'didSave': True, 'willSave': True}, 'references': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'publishDiagnostics': {'codeDescriptionSupport': True, 'relatedInformation': True, 'dataSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'versionSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'snippetSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}, 'deprecatedSupport': True}}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}}, 'codeAction': {'dynamicRegistration': True, 'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'resolveSupport': {'properties': ['edit']}}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'documentSymbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True}}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'workspace': {'executeCommand': {}, 'configuration': True, 'symbol': {'dynamicRegistration': True, '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]}, 'tagSupport': {'valueSet': [1]}}, 'applyEdit': True, 'workspaceFolders': True, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'experimental': {}}}
:: <<< LSP-typescript 1: {'capabilities': {'documentSymbolProvider': True, 'completionProvider': {'triggerCharacters': ['.', '"', "'", '/', '@', '<'], 'resolveProvider': True}, 'hoverProvider': True, 'callsProvider': True, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'didClose': {}, 'save': {}}, 'documentHighlightProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'workspaceSymbolProvider': True, 'definitionProvider': True, 'foldingRangeProvider': True, 'typeDefinitionProvider': True, 'documentFormattingProvider': True, 'documentRangeFormattingProvider': True, 'renameProvider': True, 'codeActionProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'implementationProvider': True, 'referencesProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'languageId': 'typescript', 'text': 'import { Injectable } from \'@nestjs/common\';\nimport { Model } from \'mongoose\';\nimport { UserDto } from \'./dto/create-test.dto\';\nimport { userDocument } from \'./schemas/create-test.schema\';\nimport { InjectModel } from \'@nestjs/mongoose\'\n\n@Injectable()\nexport class UsersService {\n\n  constructor(\n    @InjectModel("Post") private readonly userModel: Model<userDocument>,\n  ) { }\n\n  async createTest(UserDto: UserDto): Promise<UserDto> {\n    const createdUser = new this.userModel(UserDto);\n    return createdUser.save()\n  }\n\n  async updateTest(emailId, data) {\n    const update = await this.userModel.updateOne({ email: emailId, data: {} }, data);\n    return update;\n  }\n}\n', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.service.ts', 'version': 4}}

Thanks

rchl commented 3 years ago

Can't say much more about than that it just timeouts (>20s) during initialize request.

Just gonna mention two things:

That indicates that your session file either got pretty big in size or that your drive is pretty slow or maybe has issues. You should check at least the size of your session file in Local/Session.sublime_session. Mine is 5MB with 5 windows open. If it's unusually large then fixing that might help this issue also.

Mishra-Suraj commented 3 years ago

I think that was it. I downgraded my node version from latest to LTS and the server has stopped crashing. Here's my today's log -

:: --> LSP-typescript initialize(1): {'initializationOptions': {}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'capabilities': {'experimental': {}, 'workspace': {'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'applyEdit': True, 'executeCommand': {}, 'configuration': True, 'symbol': {'tagSupport': {'valueSet': [1]}, 'dynamicRegistration': True, '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]}}, 'workspaceFolders': True}, 'window': {'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}, 'workDoneProgress': True}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}}, 'textDocument': {'colorProvider': {'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'parameterInformation': {'labelOffsetSupport': True}}, 'dynamicRegistration': True}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [1, 2]}, 'versionSupport': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'documentSymbol': {'tagSupport': {'valueSet': [1]}, 'dynamicRegistration': True, '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]}, 'hierarchicalDocumentSymbolSupport': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'completionItem': {'deprecatedSupport': True, 'snippetSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'tagSupport': {'valueSet': [1]}}, 'dynamicRegistration': True, '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]}}, 'rangeFormatting': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'didSave': True, 'willSave': True, 'dynamicRegistration': True, 'willSaveWaitUntil': True}, 'codeAction': {'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}}, 'documentHighlight': {'dynamicRegistration': True}}}, 'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'processId': 12175, 'workspaceFolders': [{'name': 'coming-from-svelte', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte'}, {'name': 'frontend', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend'}]}
:: <<< LSP-typescript 1: {'capabilities': {'typeDefinitionProvider': True, 'workspaceSymbolProvider': True, 'implementationProvider': True, 'documentHighlightProvider': True, 'completionProvider': {'triggerCharacters': ['.', '"', "'", '/', '@', '<'], 'resolveProvider': True}, 'hoverProvider': True, 'foldingRangeProvider': True, 'codeActionProvider': True, 'renameProvider': True, 'documentSymbolProvider': True, 'callsProvider': True, 'referencesProvider': True, 'documentRangeFormattingProvider': True, 'documentFormattingProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'save': {}, 'didOpen': {}}, 'definitionProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'version': 0, 'languageId': 'typescript', 'text': 'import { Module } from \'@nestjs/common\';\nimport { UsersService } from \'./users.service\';\nimport { UsersController } from \'./users.controller\';\nimport { MongooseModule } from \'@nestjs/mongoose\';\nimport { UserSchema, User } from \'./schemas/create-test.schema\'\n@Module({\n  imports: [MongooseModule.forFeature([{ name: "Post", schema: UserSchema }])],\n  controllers: [UsersController],\n  providers: [UsersService]\n})\nexport class UsersModule { }\n', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}}
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}
:: --> LSP-typescript textDocument/codeAction(2): {'range': {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}}
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}
:: <<< LSP-typescript 2: []
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [{'range': {'start': {'line': 4, 'character': 21}, 'end': {'line': 4, 'character': 25}}, 'code': 6133, 'source': 'typescript', 'severity': 4, 'message': "'User' is declared but its value is never read."}], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}
:: --> LSP-typescript textDocument/documentHighlight(3): {'position': {'line': 11, 'character': 0}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}}
:: --> LSP-typescript textDocument/codeAction(4): {'range': {'start': {'line': 11, 'character': 0}, 'end': {'line': 11, 'character': 0}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/users.module.ts'}}
:: <<< LSP-typescript 3: []
:: <<< LSP-typescript 4: []

Closing this issue for now. Thanks for the help.

Mishra-Suraj commented 3 years ago

It was crashing again with same issues in log. Session.sublime.session size was 254kb for two windows. I have removed all plugins except LSP, bracket highlighter and Gravity theme. I am using LSP-html, LSP-eslint, LSP-json, LSP-typescript and LSP-css .I'll monitor it for a couple of days before closing this issue.

rchl commented 3 years ago

So another plugin blocking the async thread for too long could also cause this. Or like I said, just a slow file system but it would have to be quite extremely slow to block for 20s.

Mishra-Suraj commented 3 years ago

I think I found the culprit. It wasn't another plugin blocking the thread. LSP-typescript was looking for tsconfig.json in a wrong directory. Take a look at this -

This was the log file when I launched my sublime text from Krunner -

:: --> LSP-typescript initialize(1): {'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'initializationOptions': {}, 'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'executeCommand': {}, 'applyEdit': True, 'configuration': True, 'symbol': {'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, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True}, 'textDocument': {'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'snippetSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}}}, 'documentSymbol': {'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, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'documentHighlight': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'willSave': True, 'didSave': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'versionSupport': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [2, 1]}}}, 'experimental': {}, 'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'processId': 8198}
:: <<< LSP-typescript 1: {'capabilities': {'documentRangeFormattingProvider': True, 'callsProvider': True, 'documentHighlightProvider': True, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', '"', "'", '/', '@', '<']}, 'definitionProvider': True, 'renameProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'typeDefinitionProvider': True, 'foldingRangeProvider': True, 'referencesProvider': True, 'codeActionProvider': True, 'workspaceSymbolProvider': True, 'documentSymbolProvider': True, 'implementationProvider': True, 'hoverProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'didOpen': {}, 'save': {}}, 'documentFormattingProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'text': 'import { Type } from "class-transformer";\nimport { IsString, IsNotEmpty, ValidateNested, IsNumber, IsEnum, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, Validate, ValidationOptions, registerDecorator } from "class-validator";\n\n// @ValidatorConstraint({ name: \'customText\', async: false })\n// export class IsKeyValuePairValidate implements ValidatorConstraintInterface {\n// \tvalidate(columnValue: Object, args: ValidationArguments): boolean {\n// \t\tconsole.log("obj ====> ", typeof args.property === \'string\');\n// \t\tconsole.log("col =====> ", columnValue)\n// \t\tconst data1 = Object.keys(args.object).filter((item) => item !== "");\n// \t\tconst data2 = Object.keys(args.object);\n// \t\tconsole.log(data1.length, data2.length)\n// \t\t// console.log(data1);\n// \t\tif (typeof args.property === \'string\' && data1.length === data2.length) {\n// \t\t\tconsole.log(true);\n// \t\t\treturn true;\n// \t\t} else {\n// \t\t\tconsole.log(false);\n// \t\t\treturn false;\n// \t\t}\n// \t}\n// }\n\nexport function IsKeyValuePairValidate(property: string, validationOptions?: ValidationOptions) {\n\treturn function(object: Object, propertyName: string) {\n\t\tregisterDecorator({\n\t\t\tname: \'isLongerThan\',\n\t\t\ttarget: object.constructor,\n\t\t\tpropertyName: propertyName,\n\t\t\tconstraints: [property],\n\t\t\toptions: validationOptions,\n\t\t\tvalidator: {\n\t\t\t\tvalidate(value: any, args: ValidationArguments) {\n\t\t\t\t\tconsole.log("value =====> ", value);\n\t\t\t\t\tconsole.log(\'args =====> \', args);\n\t\t\t\t\tconsole.log(args.property === \'string\');\n\t\t\t\t\tconsole.log(args.property.length > 0);\n\t\t\t\t\tif (typeof args.property === \'string\' && args.property.length > 0) {\n\t\t\t\t\t\tconsole.log(true);\n\t\t\t\t\t\treturn true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log(false);\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t};\n}\n\nexport enum UserAnswer {\n\tcorrect,\n\twrong\n}\n\nclass Info {\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly title: string\n\n\t@IsNotEmpty()\n\t@IsNumber()\n\treadonly score: number\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly description: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly dateOfCreation: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly time: string\n}\n\nclass OptionItem {\n\n\t@IsNotEmpty()\n\t@IsEnum(UserAnswer)\n\treadonly answer: UserAnswer\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly description: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly id: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly option: string\n}\n\nclass Option {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => OptionItem)\n\treadonly option: OptionItem[]\n}\n\nclass Options {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Option)\n\treadonly options: Option[]\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly question: string\n}\n\n// class Page {\n// \t@ValidateNested({ each: true })\n// \t@IsNotEmpty()\n// \t@Type(() => Options)\n// \treadonly [key: string]: Options\n// }\n\nexport class TestDto {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Info)\n\treadonly info: Info\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Options)\n\treadonly McqStore: Options[]\n}\n\nexport class CreateTestDto {\n\n\t@IsNotEmpty()\n\t@IsString()\n\t// @IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\treadonly testName: string\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => TestDto)\n\treadonly data: TestDto\n}\n\nexport class UserDto {\n\n\t// @IsNotEmpty()\n\t@IsString()\n\t// @Validate(IsKeyValuePairValidate, { message: \'no can do\' })\n\t// @IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\t@IsNotEmpty()\n\treadonly email: string\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => CreateTestDto)\n\treadonly data: CreateTestDto[]\n}\n\nexport class TestContainerDto {\n\t// @IsNotEmpty()\n\t@ValidateNested({ each: true })\n\t@Type(() => UserDto)\n\t@IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\treadonly Test: UserDto[]\n}', 'languageId': 'typescript', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts', 'version': 0}}
:: --> LSP-eslint initialize(1): {'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'initializationOptions': {}, 'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'executeCommand': {}, 'applyEdit': True, 'configuration': True, 'symbol': {'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, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True}, 'textDocument': {'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'snippetSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}}}, 'documentSymbol': {'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, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'documentHighlight': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'willSave': True, 'didSave': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'versionSupport': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [2, 1]}}}, 'experimental': {}, 'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'processId': 8198}
LSP-eslint: ESLint server running in node v16.3.0
:: <-  LSP-eslint window/logMessage: {'message': 'ESLint server running in node v16.3.0', 'type': 3}
:: <<< LSP-eslint 1: {'capabilities': {'workspace': {'workspaceFolders': {'supported': True}}, 'codeActionProvider': {'codeActionKinds': ['quickfix', 'source.fixAll.eslint']}, 'executeCommandProvider': {'commands': ['eslint.applySingleFix', 'eslint.applySuggestion', 'eslint.applySameFixes', 'eslint.applyAllFixes', 'eslint.applyDisableLine', 'eslint.applyDisableFile', 'eslint.openRuleDoc']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'didOpen': {}, 'save': {'includeText': False}}}}
::  -> LSP-eslint initialized: {}
::  -> LSP-eslint workspace/didChangeConfiguration: {'settings': {'probe': ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'html', 'vue', 'markdown'], 'format': False, 'run': 'onType', 'quiet': False, 'nodePath': None, 'rulesCustomizations': [], 'options': {}, 'onIgnoredFiles': 'off', 'packageManager': 'npm', 'codeAction': {'showDocumentation': {'enable': True}, 'disableRuleComment': {'enable': True, 'location': 'separateLine'}}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'validate': ['javascript', 'javascriptreact']}}
:: <-- LSP-eslint client/registerCapability(0): {'registrations': [{'id': '1863f389-1ac7-46e6-8013-c698a46296bc', 'registerOptions': {}, 'method': 'workspace/didChangeConfiguration'}]}
:: >>> LSP-eslint 0: None
:: <-- LSP-eslint client/registerCapability(1): {'registrations': [{'id': '8a475243-cb80-4769-bcf6-cf097a736d08', 'registerOptions': {}, 'method': 'workspace/didChangeWorkspaceFolders'}]}
:: >>> LSP-eslint 1: None
::  -> LSP-eslint textDocument/didOpen: {'textDocument': {'text': 'import { Type } from "class-transformer";\nimport { IsString, IsNotEmpty, ValidateNested, IsNumber, IsEnum, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, Validate, ValidationOptions, registerDecorator } from "class-validator";\n\n// @ValidatorConstraint({ name: \'customText\', async: false })\n// export class IsKeyValuePairValidate implements ValidatorConstraintInterface {\n// \tvalidate(columnValue: Object, args: ValidationArguments): boolean {\n// \t\tconsole.log("obj ====> ", typeof args.property === \'string\');\n// \t\tconsole.log("col =====> ", columnValue)\n// \t\tconst data1 = Object.keys(args.object).filter((item) => item !== "");\n// \t\tconst data2 = Object.keys(args.object);\n// \t\tconsole.log(data1.length, data2.length)\n// \t\t// console.log(data1);\n// \t\tif (typeof args.property === \'string\' && data1.length === data2.length) {\n// \t\t\tconsole.log(true);\n// \t\t\treturn true;\n// \t\t} else {\n// \t\t\tconsole.log(false);\n// \t\t\treturn false;\n// \t\t}\n// \t}\n// }\n\nexport function IsKeyValuePairValidate(property: string, validationOptions?: ValidationOptions) {\n\treturn function(object: Object, propertyName: string) {\n\t\tregisterDecorator({\n\t\t\tname: \'isLongerThan\',\n\t\t\ttarget: object.constructor,\n\t\t\tpropertyName: propertyName,\n\t\t\tconstraints: [property],\n\t\t\toptions: validationOptions,\n\t\t\tvalidator: {\n\t\t\t\tvalidate(value: any, args: ValidationArguments) {\n\t\t\t\t\tconsole.log("value =====> ", value);\n\t\t\t\t\tconsole.log(\'args =====> \', args);\n\t\t\t\t\tconsole.log(args.property === \'string\');\n\t\t\t\t\tconsole.log(args.property.length > 0);\n\t\t\t\t\tif (typeof args.property === \'string\' && args.property.length > 0) {\n\t\t\t\t\t\tconsole.log(true);\n\t\t\t\t\t\treturn true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log(false);\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t};\n}\n\nexport enum UserAnswer {\n\tcorrect,\n\twrong\n}\n\nclass Info {\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly title: string\n\n\t@IsNotEmpty()\n\t@IsNumber()\n\treadonly score: number\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly description: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly dateOfCreation: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly time: string\n}\n\nclass OptionItem {\n\n\t@IsNotEmpty()\n\t@IsEnum(UserAnswer)\n\treadonly answer: UserAnswer\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly description: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly id: string\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly option: string\n}\n\nclass Option {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => OptionItem)\n\treadonly option: OptionItem[]\n}\n\nclass Options {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Option)\n\treadonly options: Option[]\n\n\t@IsNotEmpty()\n\t@IsString()\n\treadonly question: string\n}\n\n// class Page {\n// \t@ValidateNested({ each: true })\n// \t@IsNotEmpty()\n// \t@Type(() => Options)\n// \treadonly [key: string]: Options\n// }\n\nexport class TestDto {\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Info)\n\treadonly info: Info\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => Options)\n\treadonly McqStore: Options[]\n}\n\nexport class CreateTestDto {\n\n\t@IsNotEmpty()\n\t@IsString()\n\t// @IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\treadonly testName: string\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => TestDto)\n\treadonly data: TestDto\n}\n\nexport class UserDto {\n\n\t// @IsNotEmpty()\n\t@IsString()\n\t// @Validate(IsKeyValuePairValidate, { message: \'no can do\' })\n\t// @IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\t@IsNotEmpty()\n\treadonly email: string\n\n\t@ValidateNested({ each: true })\n\t@IsNotEmpty()\n\t@Type(() => CreateTestDto)\n\treadonly data: CreateTestDto[]\n}\n\nexport class TestContainerDto {\n\t// @IsNotEmpty()\n\t@ValidateNested({ each: true })\n\t@Type(() => UserDto)\n\t@IsKeyValuePairValidate(\'something\', { message: \'no can do\' })\n\treadonly Test: UserDto[]\n}', 'languageId': 'typescript', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts', 'version': 0}}
:: <-- LSP-eslint workspace/configuration(2): {'items': [{'scopeUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts', 'section': ''}]}
:: >>> LSP-eslint 2: [{'workspaceFolder': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, 'format': False, 'run': 'onType', 'quiet': False, 'nodePath': None, 'rulesCustomizations': [], 'options': {}, 'onIgnoredFiles': 'off', 'packageManager': 'npm', 'codeAction': {'showDocumentation': {'enable': True}, 'disableRuleComment': {'enable': True, 'location': 'separateLine'}}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'validate': 'probe'}]
:: <-- LSP-eslint eslint/confirmESLintExecution(3): {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts', 'libraryPath': '/home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js', 'scope': 'local'}
:: >>> LSP-eslint 3: 4
LSP-eslint: ESLint library loaded from: /home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js
:: <-  LSP-eslint window/logMessage: {'message': 'ESLint library loaded from: /home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js', 'type': 3}
:: <-  LSP-eslint textDocument/publishDiagnostics: {'diagnostics': [{'message': "Parsing error: Cannot read file '/home/tux/Projects/nextjs/coming-from-svelte/tsconfig.json'.", 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}, 'severity': 1, 'source': 'eslint'}], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts'}
:: --> LSP-typescript textDocument/codeAction(2): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts'}, 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}}
:: --> LSP-eslint textDocument/codeAction(2): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts'}, 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}}
:: <-  LSP-eslint eslint/status: {'state': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/users/dto/create-test.dto.ts'}
:: <<< LSP-eslint 2: []
LSP-typescript: /home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/16.3.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25
LSP-typescript:             this.reject(new Error(this.operation + " timeout"));
LSP-typescript:                         ^
LSP-typescript: 
LSP-typescript: Error: compilerOptionsForInferredProjects timeout
LSP-typescript:     at Timeout.<anonymous> (/home/tux/.cache/sublime-text-3/Package Storage/LSP-typescript/16.3.0/typescript-language-server/node_modules/typescript-language-server/lib/utils.js:25:25)
LSP-typescript:     at listOnTimeout (node:internal/timers:557:17)
LSP-typescript:     at processTimers (node:internal/timers:500:7)
:: --> LSP-typescript initialize(1): {'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'initializationOptions': {}, 'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'executeCommand': {}, 'applyEdit': True, 'configuration': True, 'symbol': {'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, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True}, 'textDocument': {'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'snippetSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}}}, 'documentSymbol': {'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, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'documentHighlight': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'willSave': True, 'didSave': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'versionSupport': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [2, 1]}}}, 'experimental': {}, 'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte', 'name': 'coming-from-svelte'}, {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/frontend', 'name': 'frontend'}], 'processId': 8198}
:: <<< LSP-typescript 1: {'capabilities': {'documentRangeFormattingProvider': True, 'callsProvider': True, 'documentHighlightProvider': True, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', '"', "'", '/', '@', '<']}, 'definitionProvider': True, 'renameProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'typeDefinitionProvider': True, 'foldingRangeProvider': True, 'referencesProvider': True, 'codeActionProvider': True, 'workspaceSymbolProvider': True, 'documentSymbolProvider': True, 'implementationProvider': True, 'hoverProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'didOpen': {}, 'save': {}}, 'documentFormattingProvider': True}}
::  -> LSP-typescript initialized: {}

Look at the directory where LSP-typescript was looking for tsconfig.json - rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte'

There's no tsconfig file in that folder.


Now here's the log when I manually went to the folder where tsconfig file is present and opened sublime text through subl .

:: --> LSP-typescript initialize(1): {'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend', 'initializationOptions': {}, 'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'executeCommand': {}, 'applyEdit': True, 'configuration': True, 'symbol': {'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, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True}, 'textDocument': {'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'snippetSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}}}, 'documentSymbol': {'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, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'documentHighlight': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'willSave': True, 'didSave': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'versionSupport': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [2, 1]}}}, 'experimental': {}, 'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte/backend', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend', 'name': 'backend'}], 'processId': 8198}
:: <<< LSP-typescript 1: {'capabilities': {'documentRangeFormattingProvider': True, 'callsProvider': True, 'documentHighlightProvider': True, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.', '"', "'", '/', '@', '<']}, 'definitionProvider': True, 'renameProvider': True, 'executeCommandProvider': {'commands': ['_typescript.applyWorkspaceEdit', '_typescript.applyCodeAction', '_typescript.applyRefactoring', '_typescript.organizeImports', '_typescript.applyRenameFile']}, 'typeDefinitionProvider': True, 'foldingRangeProvider': True, 'referencesProvider': True, 'codeActionProvider': True, 'workspaceSymbolProvider': True, 'documentSymbolProvider': True, 'implementationProvider': True, 'hoverProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '<']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'didOpen': {}, 'save': {}}, 'documentFormattingProvider': True}}
::  -> LSP-typescript initialized: {}
::  -> LSP-typescript textDocument/didOpen: {'textDocument': {'text': "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n", 'languageId': 'typescript', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts', 'version': 0}}
:: --> LSP-eslint initialize(1): {'rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend', 'initializationOptions': {}, 'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'executeCommand': {}, 'applyEdit': True, 'configuration': True, 'symbol': {'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, 'tagSupport': {'valueSet': [1]}}, 'workspaceFolders': True}, 'textDocument': {'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}}, 'codeAction': {'dataSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.organizeImports']}}}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'dynamicRegistration': True, '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]}, 'completionItem': {'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'snippetSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}}}, 'documentSymbol': {'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, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}}, 'documentHighlight': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'rename': {'prepareSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'synchronization': {'dynamicRegistration': True, 'willSaveWaitUntil': True, 'willSave': True, 'didSave': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'codeLens': {'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'relatedInformation': True, 'versionSupport': True, 'codeDescriptionSupport': True, 'tagSupport': {'valueSet': [2, 1]}}}, 'experimental': {}, 'general': {'markdown': {'version': '3.2.2', 'parser': 'Python-Markdown'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showDocument': {'support': True}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}}}, 'rootPath': '/home/tux/Projects/nextjs/coming-from-svelte/backend', 'clientInfo': {'version': '1.6.0', 'name': 'Sublime Text LSP'}, 'workspaceFolders': [{'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend', 'name': 'backend'}], 'processId': 8198}
LSP-eslint: ESLint server running in node v16.3.0
:: <-  LSP-eslint window/logMessage: {'message': 'ESLint server running in node v16.3.0', 'type': 3}
:: <<< LSP-eslint 1: {'capabilities': {'workspace': {'workspaceFolders': {'supported': True}}, 'codeActionProvider': {'codeActionKinds': ['quickfix', 'source.fixAll.eslint']}, 'executeCommandProvider': {'commands': ['eslint.applySingleFix', 'eslint.applySuggestion', 'eslint.applySameFixes', 'eslint.applyAllFixes', 'eslint.applyDisableLine', 'eslint.applyDisableFile', 'eslint.openRuleDoc']}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didClose': {}, 'didOpen': {}, 'save': {'includeText': False}}}}
::  -> LSP-eslint initialized: {}
::  -> LSP-eslint workspace/didChangeConfiguration: {'settings': {'probe': ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'html', 'vue', 'markdown'], 'format': False, 'run': 'onType', 'quiet': False, 'nodePath': None, 'rulesCustomizations': [], 'options': {}, 'onIgnoredFiles': 'off', 'packageManager': 'npm', 'codeAction': {'showDocumentation': {'enable': True}, 'disableRuleComment': {'enable': True, 'location': 'separateLine'}}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'validate': ['javascript', 'javascriptreact']}}
::  -> LSP-eslint textDocument/didOpen: {'textDocument': {'text': "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n", 'languageId': 'typescript', 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts', 'version': 0}}
:: <-- LSP-eslint client/registerCapability(0): {'registrations': [{'id': 'f505cc89-772a-4265-aec4-dbb2e8d562ea', 'registerOptions': {}, 'method': 'workspace/didChangeConfiguration'}]}
:: >>> LSP-eslint 0: None
:: <-- LSP-eslint client/registerCapability(1): {'registrations': [{'id': 'bed0126e-e473-4c32-9c6f-79c3c6c56278', 'registerOptions': {}, 'method': 'workspace/didChangeWorkspaceFolders'}]}
:: >>> LSP-eslint 1: None
:: <-- LSP-eslint workspace/configuration(2): {'items': [{'scopeUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts', 'section': ''}]}
:: >>> LSP-eslint 2: [{'workspaceFolder': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend', 'name': 'backend'}, 'format': False, 'run': 'onType', 'quiet': False, 'nodePath': None, 'rulesCustomizations': [], 'options': {}, 'onIgnoredFiles': 'off', 'packageManager': 'npm', 'codeAction': {'showDocumentation': {'enable': True}, 'disableRuleComment': {'enable': True, 'location': 'separateLine'}}, 'codeActionOnSave': {'mode': 'all', 'enable': True}, 'validate': 'probe'}]
:: <-- LSP-eslint eslint/confirmESLintExecution(3): {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts', 'libraryPath': '/home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js', 'scope': 'local'}
:: >>> LSP-eslint 3: 4
LSP-eslint: ESLint library loaded from: /home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js
:: <-  LSP-eslint window/logMessage: {'message': 'ESLint library loaded from: /home/tux/Projects/nextjs/coming-from-svelte/backend/node_modules/eslint/lib/api.js', 'type': 3}
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: --> LSP-typescript textDocument/codeAction(2): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}}
:: --> LSP-eslint textDocument/codeAction(2): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}}
:: <<< LSP-typescript 2: []
:: <-  LSP-eslint textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: <-  LSP-eslint eslint/status: {'state': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: <<< LSP-eslint 2: []
::  -> LSP-typescript textDocument/didChange: {'contentChanges': [{'text': '  ', 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}, 'rangeLength': 0}], 'textDocument': {'version': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
::  -> LSP-eslint textDocument/didChange: {'contentChanges': [{'text': '  ', 'range': {'end': {'character': 0, 'line': 0}, 'start': {'character': 0, 'line': 0}}, 'rangeLength': 0}], 'textDocument': {'version': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
:: --> LSP-typescript textDocument/documentHighlight(3): {'position': {'character': 2, 'line': 0}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
:: <-  LSP-eslint textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: --> LSP-typescript textDocument/codeAction(4): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 2, 'line': 0}, 'start': {'character': 2, 'line': 0}}}
:: --> LSP-eslint textDocument/codeAction(3): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 2, 'line': 0}, 'start': {'character': 2, 'line': 0}}}
:: <-  LSP-eslint eslint/status: {'state': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: <<< LSP-eslint 3: []
:: <<< LSP-typescript 3: []
:: <<< LSP-typescript 4: []
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: --> LSP-typescript textDocument/documentHighlight(5): {'position': {'character': 1, 'line': 0}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
:: --> LSP-typescript textDocument/codeAction(6): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 1, 'line': 0}, 'start': {'character': 1, 'line': 0}}}
:: --> LSP-eslint textDocument/codeAction(4): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 1, 'line': 0}, 'start': {'character': 1, 'line': 0}}}
:: <<< LSP-typescript 5: []
:: <<< LSP-eslint 4: []
:: <<< LSP-typescript 6: []
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
::  -> LSP-typescript textDocument/didChange: {'contentChanges': [{'text': '``', 'range': {'end': {'character': 1, 'line': 0}, 'start': {'character': 1, 'line': 0}}, 'rangeLength': 0}], 'textDocument': {'version': 2, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
::  -> LSP-eslint textDocument/didChange: {'contentChanges': [{'text': '``', 'range': {'end': {'character': 1, 'line': 0}, 'start': {'character': 1, 'line': 0}}, 'rangeLength': 0}], 'textDocument': {'version': 2, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
:: --> LSP-typescript textDocument/documentHighlight(7): {'position': {'character': 2, 'line': 0}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
:: <-  LSP-eslint textDocument/publishDiagnostics: {'diagnostics': [{'message': "Parsing error: ';' expected.", 'range': {'end': {'character': 3, 'line': 0}, 'start': {'character': 3, 'line': 0}}, 'severity': 1, 'source': 'eslint'}], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: --> LSP-typescript textDocument/codeAction(8): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 2, 'line': 0}, 'start': {'character': 2, 'line': 0}}}
:: --> LSP-eslint textDocument/codeAction(5): {'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}, 'range': {'end': {'character': 2, 'line': 0}, 'start': {'character': 2, 'line': 0}}}
:: <-  LSP-eslint eslint/status: {'state': 1, 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
:: <<< LSP-eslint 5: []
:: <<< LSP-typescript 7: []
:: <<< LSP-typescript 8: []
:: <-  LSP-typescript textDocument/publishDiagnostics: {'diagnostics': [{'message': "';' expected.", 'code': 1005, 'range': {'end': {'character': 10, 'line': 0}, 'start': {'character': 4, 'line': 0}}, 'severity': 1, 'source': 'typescript'}], 'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}
::  -> LSP-typescript textDocument/didSave: {'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}
::  -> LSP-eslint textDocument/didSave: {'textDocument': {'uri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend/src/app.service.ts'}}

Here LSP is looking in rootUri': 'file:///home/tux/Projects/nextjs/coming-from-svelte/backend There's a tsconfig.json present in that directory.

I never paid attension how it worked. I just thought it works. And note to self - Post working directory structure along with the logs.

image image

I am going to monitor it for a couple of days before closing this issue.

rchl commented 3 years ago

It all looks as expected regarding the root path. It shouldn't timeout when tsconfig is missing though. It should default to some (poor) values. Also you switched to node 16 which i would not recommend. Have you tried with node 14?

Mishra-Suraj commented 3 years ago

Yes I did. I use NVM so it's easy to jump between versions. I am on LTS (14) now. Aah sorry, NVM switched back to node 16. I have switched it back to 14.

Mishra-Suraj commented 3 years ago

image image

Downgraded to node 14, removed all plugins except lsp, restarted my computer, checked again if I am on node 14. And problem still persists. The images above are the ones I took 2 minutes ago.

Edit - I restarted the server by clicking on restart lsp button. LSP started and didn't crash this time. But I am pretty sure it will crash again randomly. I mean sometimes it doesn't crashes when I restart LSP, but sometimes it does. Totally random. It has happened before a million times.

rchl commented 3 years ago

It looks like the requests to the typescript service just take a long time to complete which makes it time out.

In one of the logs above it's the textDocument/codeAction(2) request that times out so it's not always during initialize.

I feel that your project is quite big and the initial request that builds the database is taking too long. I think the solution would be either to increase the timeout value (it's not possible right now but see https://github.com/theia-ide/typescript-language-server/issues/82 for discussion on that) or limit the scope of the project (the include array in tsconfig.json).

rchl commented 3 years ago

Of course a faster machine and/or disk should help also. Are you using SSD or normal hard drive?

Mishra-Suraj commented 3 years ago

I am using a hard drive. Here is the benchmark - image

Mishra-Suraj commented 3 years ago

https://www.typescriptlang.org/tsconfig#skipLibCheck <----- Can this help?

rchl commented 3 years ago

Worth a try I guess. You could experiment with difference settings and running npx tsc manually in the project to see if it improves the time of processing the whole project.

Basically if npx tsc takes more than 20sec to complete then that will more or less also affect the typescript LSP.

(I'm just not sure if tsc makes use of some caching in which case that might skew results).

Mishra-Suraj commented 3 years ago

npx tsc took 5 seconds to compile. But I think I have fixed the issue. I am not entirely sure though. Here's what I did.

  1. Remove LSP and it's language implementations like LSP-typescript, LSP-eslint etc using Package Control.
  2. Go to ~/.config/.sublime-text-3(Yes that's what the name of the directory is, not 4)/Packages and remove sublime_lib, lsp_utils directories.
  3. Go to ~/.config/.sublime-text-3(Yes that's what the name of the directory is, not 4)/Packages and remove all LSP related settings files.
  4. Open sublime text.
  5. Install LSP and it's implementations.

It might work. But again, I am not sure if the issue is fixed completely.


I am going to monitor this issue for a couple of days. If it doesn't returns then I'll close this issue.

P.S I am on Ubuntu, so the directory paths might be different for your distro or OS (Windows / MacOS)

Edit - I removed and reinstalled Sublime text before doing all that.

Mishra-Suraj commented 3 years ago

It's crashing again. I don't know man I am giving up. I'll have to move to other editors. I don't know what more I can do about this.

rchl commented 3 years ago

I've just realised that that timeout that you are hitting was removed already on master branch. It just that it wasn't released yet - https://github.com/theia-ide/typescript-language-server/commit/b9cf57816ca07b9b3f3631130b7b5250b0db7ced

Mishra-Suraj commented 3 years ago

Thank you! I am moving to neovim for now. I'll move back to sublime after that release comes out of beta. Thanks a lot. Closing this issue for now.

rchl commented 3 years ago

Unless neovim is based on VSCode (I think it isn't) then you most likely hit the same issues since all editors use the same typescript-language-server to provide JS/TS features.

Mishra-Suraj commented 3 years ago

Right. I didn't think of that. I'll have to move to vscode then.