Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Hang when write-quit #4468

Closed
lukepighetti opened this issue Oct 25, 2022 · 23 comments
Closed

Hang when write-quit #4468

lukepighetti opened this issue Oct 25, 2022 · 23 comments
Milestone

Comments

@lukepighetti
Copy link

lukepighetti commented Oct 25, 2022

Summary

In some cases (Dart project with active LSP) if you try to :wq quit, Helix will hang for 3-5 seconds before quitting

Reproduction Steps

  • Open reasonably sized Dart project (~300K LOC / ~500 files)
  • :wq

Helix log

N/A

Platform

macOS

Terminal Emulator

iTerm Build 3.4.16

Helix Version

helix 22.08.1 (66276ce) (from brew)

@dead10ck
Copy link
Member

This is usually because helix waits for the LS to shut down gracefully before quitting. Do you see any error messages after helix quits?

@the-mikedavis
Copy link
Member

Also, what version are you running? The write path had big changes in #2267 after the latest release which may change the behavior (although I think that didn't change the waiting for the LS part as dead10ck says).

In the future please use the bug report template.

@lukepighetti
Copy link
Author

This is usually because helix waits for the LS to shut down gracefully before quitting. Do you see any error messages after helix quits?

I have seen the LSP didn't quit timeout error message, but not every time it happens. It also doesn't always happen with the same project. It seems to be fairly random. I have also been playing around with brew and latest master, but we can assume this issue is about the current brew version above.

@lukepighetti
Copy link
Author

Also, what version are you running? The write path had big changes in #2267 after the latest release which may change the behavior (although I think that didn't change the waiting for the LS part as dead10ck says).

In the future please use the bug report template.

helix 22.08.1 (66276ce)

@dead10ck
Copy link
Member

So I don't think this is necessarily a bug per se, because it's really in your interest to wait for your LS to shut down gracefully; otherwise, this could potentially lead to your project getting messed up. But there is more that could be done to help with the perception of what's going on. Currently the whole UI just appears to hang because it's happening after we've exited the main event loop that does all the rendering.

Perhaps we could use this issue to track improvements we could make. @archseer and I have discussed possibly moving the LSP shutdown procedure earlier, before it exits the rendering loop, and displaying a spinner and a message that the language servers are shutting down. We should also probably make the shutdown timeout configurable for those who would choose to prioritize shutting down more quickly over allowing the LS to shut down gracefully.

@archseer
Copy link
Member

Some ideas:

  • If the LSP isn't fully initialized yet, saving should skip formatting to avoid blocking
  • If the LSP isn't fully initialized yet then closing the editor shouldn't block?
  • Bring down the shutdown timeout to ~2s? Let's check how VSCode handles this

It's really annoying to open a rust file to change something, then :wq and the editor stalls for a few seconds.

@archseer
Copy link
Member

archseer commented Oct 26, 2022

Based on my measurements with rust-analyzer, :q seems to not block at all during the bootup process so the shutdown RPC call must be fast. For :wq it's waiting for the formatting to return, timeouting after 3 seconds, then just saving without formatting that causes all the blocking.

@archseer
Copy link
Member

This is also a bit harder to do with rust-analyzer which immediately responds to the initialization request, but then will block on the formatting request until it's able to fulfill it.

@CptPotato
Copy link
Contributor

This is also a bit harder to do with rust-analyzer which immediately responds to the initialization request, but then will block on the formatting request until it's able to fulfill it.

Not sure if this is related but the new rust-analyzer update mentions improvements for formatting requests during LSP startup.

@lukepighetti lukepighetti changed the title Hang when quitting Hang when write-quit Oct 26, 2022
@lukepighetti
Copy link
Author

lukepighetti commented Oct 26, 2022

Updated reproduction to reflect write-quit. This may be working as expected.

Perhaps a spinner to show activity would be helpful here to set expectations

@archseer
Copy link
Member

Not sure if this is related but the new rust-analyzer update mentions improvements for formatting requests during LSP startup.

That looks promising actually 👍🏻

@vanarok
Copy link
Contributor

vanarok commented Nov 9, 2022

My helix constantly hangs with efm-lsp and taplo

2022-11-09T12:04:57.848 helix_lsp::transport [INFO] taplo <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":{"prepareProvider":true},"documentLinkProvider":{},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"semanticTokensProvider":{"workDoneProgress":false,"legend":{"tokenTypes":["tomlArrayKey","tomlTableKey"],"tokenModifiers":["readonly"]},"range":false,"full":true}},"serverInfo":{"name":"Taplo","version":"0.5.0"}}}
2022-11-09T12:04:57.848 helix_lsp::transport [INFO] taplo <- {"capabilities":{"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentFormattingProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"foldingRangeProvider":true,"hoverProvider":true,"renameProvider":{"prepareProvider":true},"semanticTokensProvider":{"full":true,"legend":{"tokenModifiers":["readonly"],"tokenTypes":["tomlArrayKey","tomlTableKey"]},"range":false,"workDoneProgress":false},"textDocumentSync":1,"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}},"serverInfo":{"name":"Taplo","version":"0.5.0"}}
2022-11-09T12:04:57.848 helix_lsp::transport [INFO] taplo -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2022-11-09T12:04:57.848 helix_lsp::transport [INFO] taplo -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"toml","text":"[[language]]\nname = \"vue\"\nfile-types = ['vue']\nformatter = { command = 'prettier', args = [\"--parser\", \"vue\"] }\nroots = [\"package.json\", \"vite.config.js\"]\ninjection-regex = \"vue\"\nauto-format = true\nscope = \"text.html.vue\"\nlanguage-servers = [\n  { name = \"volar\", except-features = [\n    \"format\",\n  ] },\n  { name = 'eslint', except-features = [\n    'completion',\n  ] },\n]\nindent = { tab-width = 2, unit = \"  \" }\n\n[[grammar]]\nname = \"vue\"\nsource = { git = \"https://github.com/ikatyang/tree-sitter-vue\", rev = \"91fe2754796cd8fba5f229505a23fa08f3546c06\" }\n\n[language-server.volar]\ncommand = \"vue-language-server\"\nargs = [\"--stdio\"]\n\n[language-server.volar.config.typescript]\ntsdk = '/home/vanarok/.local/share/pnpm/global/5/node_modules/typescript/lib'\n\n[language-server.volar.config.languageFeatures]\nsemanticTokens = true\nreferences = true\ndefinition = true\ntypeDefinition = true\ncallHierarchy = true\nhover = true\nrename = true\nrenameFileRefactoring = true\nsignatureHelp = true\ncodeAction = true\ncompletion = { defaultTagNameCase = 'both', defaultAttrNameCase = 'kebabCase' }\nschemaRequestService = true\ndocumentHighlight = false\ndocumentLink = true\ncodeLens = true\ndiagnostics = true\n\n[language-server.volar.config.documentFeatures]\ndocumentColor = false\nselectionRange = true\nfoldingRange = true\nlinkedEditingRange = true\ndocumentSymbol = true\ndocumentFormatting = { defaultPrintWidth = 100 }\n\n[language-server.prettier]\ncommand = \"efm-langserver\"\n\n[language-server.prettier.config]\ndocumentFormatting = true\n\n[language-server.prettier.config.languages]\nvue = [{ formatCommand = \"prettierd '${INPUT}'\", formatStdin = true }]\n\n[language-server.eslint]\ncommand = \"vscode-eslint-language-server\"\nargs = [\"--stdio\"]\n\n[language-server.eslint.config]\nformat = true\nnodePath = \"\"\nonIgnoredFiles = \"off\"\npackageManager = \"yarn\"\nquiet = false\nrulesCustomizations = []\nrun = \"onType\"\nuseESLintClass = false\nvalidate = \"on\"\n\n[language-server.eslint.config.codeAction]\n[language-server.eslint.config.codeAction.disableRuleComment]\nenable = true\nlocation = \"separateLine\"\n\n[language-server.eslint.config.codeAction.showDocumentation]\nenable = true\n\n[language-server.eslint.config.codeActionOnSave]\nenable = true\nmode = \"all\"\n\n[language-server.eslint.config.workingDirectory]\nmode = \"location\"\n\n[[language]]\nname = \"html\"\nformatter = { command = 'prettier', args = [\"--parser\", \"html\"] }\nauto-format = true\n\n[[language]]\nname = \"json\"\nformatter = { command = 'prettier', args = [\"--parser\", \"json\"] }\nauto-format = true\n\n[[language]]\nname = \"css\"\nformatter = { command = 'prettier', args = [\"--parser\", \"css\"] }\nauto-format = true\nscope = \"source.css\"\ninjection-regex = \"css\"\nfile-types = [\"css\", \"scss\"]\nroots = []\nlanguage-servers = [{ name = \"stylelint\" }]\nindent = { tab-width = 2, unit = \"  \" }\n\n[language-server.stylelint]\ncommand = \"efm-langserver\"\n\n[language-server.stylelint.config]\ndocumentFormatting = true\n\n[language-server.stylelint.config.languages]\ncss = [\n  { lintCommand = \"stylelint --stdin --stdin-filename '${INPUT}' --formatter compact\", lintStdin = true, lintIgnoreExitCode = true, lintFormats = [\n    '%f: line %l, col %c, %tarning - %m',\n    '%f: line %l, col %c, %trror - %m',\n  ] },\n  { formatCommand = \"stylelint --fix --stdin --stdin-filename '${INPUT}'\", formatStdin = true },\n]\n\n[[language]]\nname = \"javascript\"\nformatter = { command = 'prettier', args = [\"--parser\", \"typescript\"] }\nauto-format = true\n\n[[language]]\nname = \"typescript\"\nformatter = { command = 'prettier', args = [\"--parser\", \"typescript\"] }\nauto-format = true\n\n[[language]]\nname = \"toml\"\nauto-format = true\n","uri":"file:///home/vanarok/Dotfiles/helix/languages.toml","version":0}}}
2022-11-09T12:04:57.848 helix_lsp::transport [INFO] taplo <- {"jsonrpc":"2.0","method":"workspace/configuration","id":0,"params":{"items":[{"section":"evenBetterToml"},{"scopeUri":"file:///home/vanarok/Dotfiles","section":"evenBetterToml"}]}}
2022-11-09T12:04:57.849 helix_lsp::transport [INFO] taplo -> {"jsonrpc":"2.0","result":[],"id":0}
2022-11-09T12:04:57.850 helix_lsp::transport [INFO] taplo <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/vanarok/Dotfiles/helix/languages.toml","diagnostics":[]}}
2022-11-09T12:04:57.850 helix_lsp::transport [INFO] taplo <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/vanarok/Dotfiles/helix/languages.toml","diagnostics":[]}}
2022-11-09T12:04:57.852 helix_lsp::transport [INFO] taplo <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/vanarok/Dotfiles/helix/languages.toml","diagnostics":[]}}
2022-11-09T12:04:58.883 helix_lsp::transport [INFO] taplo -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":1}
2022-11-09T12:05:01.884 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

efm-lsp

2022-11-09T12:32:55.071 helix_lsp::transport [INFO] stylelint <- {"id":0,"result":{"capabilities":{"textDocumentSync":1,"documentFormattingProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}}},"jsonrpc":"2.0"}
2022-11-09T12:32:55.071 helix_lsp::transport [INFO] stylelint <- {"capabilities":{"documentFormattingProvider":true,"textDocumentSync":1,"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}}}
2022-11-09T12:32:55.071 helix_lsp::transport [INFO] stylelint -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2022-11-09T12:32:55.071 helix_lsp::transport [INFO] stylelint -> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"documentFormatting":true,"languages":{"css":[{"lintCommand":"stylelint --stdin --stdin-filename '${INPUT}' --formatter compact","lintFormats":["%f: line %l, col %c, %tarning - %m","%f: line %l, col %c, %trror - %m"],"lintIgnoreExitCode":true,"lintStdin":true},{"formatCommand":"stylelint --fix --stdin --stdin-filename '${INPUT}'","formatStdin":true}]}}}}
2022-11-09T12:32:55.071 helix_lsp::transport [INFO] stylelint -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"css","text":"@font-face {\n    font-family: Rubik;\n    src: url(\"../fonts/Rubik-VariableFont_wght.ttf\");\n}\n\nhtml,\nbody,\ndiv,\nspan,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\nabbr,\naddress,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\nsamp,\nsmall,\nstrong,\nsub,\nsup,\nvar,\nb,\ni,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    outline: 0;\n    font-size: 100%;\n    vertical-align: baseline;\n    background: rgb(0 0 0 / 0%);\n    box-sizing: border-box;\n}\n\nbody {\n    line-height: 1;\n    overflow-y: scroll;\n}\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\nsection {\n    display: block;\n}\n\nnav ul {\n    list-style: none;\n}\n\nli[class] {\n    list-style: none;\n}\n\nblockquote,\nq {\n    quotes: none;\n}\n\nblockquote::before,\nblockquote::after,\nq::before,\nq::after {\n    content: \"\";\n    content: none;\n}\n\n.profile__user-content svg {\n    width: 66px;\n    height: 66px;\n    padding: 0;\n    margin-top: 30px;\n    margin-bottom: 22px;\n}\n\na {\n    margin: 0;\n    padding: 0;\n    font-size: 100%;\n    vertical-align: baseline;\n    background: rgba(0 0 0 0%);\n    text-decoration: none;\n}\n\nins {\n    background-color: #ff9;\n    color: #000;\n    text-decoration: none;\n}\n\nmark {\n    background-color: #ff9;\n    color: #000;\n    font-style: italic;\n    font-weight: bold;\n}\n\ndel {\n    text-decoration: line-through;\n}\n\nabbr[title],\ndfn[title] {\n    border-bottom: 1px dotted;\n    cursor: help;\n}\n\ntable {\n    border-collapse: collapse;\n    border-spacing: 0;\n}\n\nhr {\n    display: block;\n    height: 1px;\n    border: 0;\n    border-top: 1px solid #ccc;\n    margin: 1em 0;\n    padding: 0;\n}\n\ninput,\nselect {\n    vertical-align: middle;\n}\n\nlabel,\ninput {\n    display: block;\n}\n\nimg {\n    display: block;\n}\n\ninput,\nbutton,\ntextarea,\nselect {\n    font: inherit;\n}\n\n*::after,\n*::before {\n    box-sizing: inherit;\n}\n\n.container {\n    max-width: 1200px;\n    margin: 0 auto;\n}\n\n.register {\n    font-family: Rubik, sans-serif;\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    background-color: #fff;\n}\n\n.register__welcomeblock-inner {\n    max-width: 488px;\n    min-height: 100vh;\n    background-color: #29272b;\n    padding: 160px 70px 0;\n}\n\n.register__welcomeblock-text {\n    color: #fff;\n    font-size: 24px;\n    text-align: center;\n}\n\n.register__welcomeblock-img {\n    margin: 180px 0 auto;\n}\n\n.register__form {\n    width: 430px;\n    margin: 160px auto;\n    padding: 0 16px;\n}\n\n.register__form-title {\n    font-size: 24px;\n    color: #000;\n    font-weight: 600;\n}\n\n.register__input {\n    box-sizing: border-box;\n    display: block;\n    width: 100%;\n    padding: 16px 0 16px 20px;\n    border: 1px solid #e5eaf0;\n    border-radius: 8px;\n    margin: 40px 0 10px;\n}\n\n.profile__user-label {\n    width: 100%;\n    margin-top: 16px;\n}\n\n.register__label {\n    width: 100%;\n    font-size: 12px;\n    color: #898989;\n}\n\n.register__recovery-link {\n    display: block;\n    text-align: center;\n    color: #7c2eb5;\n    font-size: 12px;\n    text-decoration: none;\n}\n\n.register__recovery-link:hover {\n    color: #7c2eb5;\n    text-decoration: none;\n}\n\n.register__link {\n    color: #7c2eb5;\n    font-weight: 600;\n    font-size: 12px;\n    text-decoration: none;\n}\n\n.register__link:hover {\n    border-bottom: 1px solid #7c2eb5;\n    color: #7c2eb5;\n    text-decoration: none;\n}\n\n.register__privacy-policy-text {\n    font-weight: 400;\n    font-size: 12px;\n    line-height: 14px;\n    color: #898989;\n}\n\n.register__privacy-policy-link {\n    text-decoration: underline;\n    font-weight: 400;\n    font-size: 12px;\n    line-height: 14px;\n    color: #7c2eb5;\n}\n\n.register__privacy-policy-link:hover {\n    color: #7c2eb5;\n}\n\n.register__input-btn {\n    display: block;\n    width: 100%;\n    margin: 45px 0 35px;\n    border: none;\n    background-color: #7421b0;\n    color: #fff;\n    padding: 16px 0;\n    font-size: 16px;\n    border-radius: 8px;\n    cursor: pointer;\n    font-weight: 500;\n}\n\n.register__input-btn:hover {\n    background: #672597;\n}\n\n.register__input-btn__disabled {\n    background: #7421b0;\n    opacity: 0.4;\n}\n\n.register__decor {\n    text-align: center;\n    color: #c8cbce;\n    font-size: 16px;\n    margin-bottom: 36px;\n}\n\n.register__decor span {\n    background-color: #fff;\n    padding: 8px;\n}\n\n.register__decor-line {\n    border-bottom: 1px solid #c8cbce;\n    margin-top: -7px;\n    z-index: -1;\n}\n\n.register__form-btn {\n    font-weight: 600;\n    box-sizing: border-box;\n    display: block;\n    width: 100%;\n    background-color: #f4f4f5;\n    text-align: center;\n    color: #000;\n    font-size: 16px;\n    padding: 16px;\n    border-radius: 8px;\n    background-image: url(\"../js/assets/icon/google.svg\");\n    background-repeat: no-repeat;\n    background-position: 20px center;\n    text-decoration: none;\n}\n\n.register__form-btn:hover {\n    color: #7c2eb5;\n    text-decoration: none;\n}\n\n.register__form-btn + .register__form-btn {\n    margin-top: 16px;\n    background-image: url(\"../js/assets/icon/facebook.svg\");\n    background-repeat: no-repeat;\n    background-position: 20px center;\n}\n\n.register__text {\n    text-align: center;\n    color: #898989;\n    margin-top: 40px;\n    font-family: Rubik, sans-serif;\n    font-style: normal;\n    font-weight: 400;\n    font-size: 14px;\n    line-height: 17px;\n}\n\n.profile {\n    background-color: #f5f5f5;\n    min-height: 100vh;\n    font-family: Rubik, sans-serif;\n}\n\n.profile__header {\n    background-color: #fff;\n    margin-bottom: 40px;\n}\n\n.profile__logo {\n    background-image: url(\"../js/assets/profile-img/screenpixel-logo.svg\");\n    background-repeat: no-repeat;\n    width: 246px;\n    height: 36px;\n}\n\n.profile__header-inner {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n    -webkit-box-align: center;\n    -ms-flex-align: center;\n    align-items: center;\n    padding: 20px;\n}\n\n.profile__header-btn {\n    background-color: #7421b0;\n    color: #fff;\n    font-weight: 600;\n    padding: 12px 24px;\n    border-radius: 8px;\n    border: none;\n    text-decoration: none;\n}\n\n.profile__header-btn:hover {\n    color: #fff;\n    text-decoration: none;\n}\n\n.profile__user {\n    margin-right: 20px;\n}\n\n.profile__user-information {\n    background-color: #fff;\n    max-width: 285px;\n    height: 245px;\n    text-align: center;\n    border-radius: 8px;\n    margin-bottom: 20px;\n}\n\n.profile__user-email {\n    font-size: 14px;\n    font-weight: 600;\n    margin-bottom: 28px;\n}\n\n.profile__user-btn {\n    display: inline-block;\n    background-color: #f4f4f5;\n    color: #898989;\n    font-size: 14px;\n    font-weight: bold;\n    padding: 16px 85px;\n    border-radius: 8px;\n}\n\n.profile__user-btn:hover {\n    color: #7421b0;\n    text-decoration: none;\n}\n\n.profile__user-data {\n    width: 895px;\n    height: 100%;\n    background-color: #fff;\n    border-radius: 8px;\n    padding: 32px 24px 24px;\n}\n\n.profile__user-title {\n    font-size: 24px;\n    font-weight: 600;\n    margin-bottom: 36px;\n}\n\n.profile__user-input {\n    box-sizing: border-box;\n    display: block;\n    width: 100%;\n    padding: 16px 0 16px 20px;\n    border: 1px solid #e5eaf0;\n    border-radius: 8px;\n}\n\n.profile__user-input + .profile__user-input {\n    margin-top: 16px;\n}\n\n.profile__input-btn {\n    margin-top: 28px;\n    float: right;\n    border: none;\n    font-size: 14px;\n    color: #fff;\n    background-color: #7421b0;\n    border-radius: 8px;\n    padding: 12px 28px;\n    cursor: pointer;\n}\n\n.profile__input-btn-disabled {\n    opacity: 0.4;\n}\n\n.profile__menu-item--active {\n    background-color: #fff;\n    color: #7421b0;\n}\n\n.profile__menu-item--active svg {\n    fill: #7421b0;\n}\n\n.profile__menu-item {\n    width: 285px;\n    height: 56px;\n    border-radius: 8px;\n    font-size: 16px;\n    cursor: pointer;\n}\n\n.profile__menu-item + .profile__menu-item {\n    margin-top: 18px;\n}\n\n.profile__menu-item-wrapper {\n    font-weight: 600;\n    display: inline-block;\n    -webkit-box-align: center;\n    -ms-flex-align: center;\n    align-items: center;\n    padding: 21px 0 0 21px;\n}\n\n.profile__menu-item-wrapper svg {\n    margin-right: 17px;\n}\n\n.profile__user-wrapper {\n    padding: 0 20px;\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n}\n\n.profile__nav-inner {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    border-bottom: 1px solid #e5eaf0;\n}\n\n.profile__nav-item + .profile__nav-item {\n    margin-left: 22px;\n}\n\n.profile__nav-link {\n    font-size: 14px;\n    font-weight: 700;\n    color: #898989;\n    padding: 0 3px 12px;\n}\n\n.profile__nav-link:hover {\n    color: #7421b0;\n    text-decoration: none;\n}\n\n.profile__nav-link + .profile__nav-link {\n    margin-left: 12px;\n}\n\n.profile__nav-link--active {\n    color: #7421b0;\n    border-bottom: 2px solid #7421b0;\n    margin-bottom: -1.5px;\n}\n\n.profile__user-text {\n    margin: 24px 0 20px;\n    font-size: 14px;\n    font-weight: 600;\n}\n\n.profile__cards-properties {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n    background-color: #f5f6f8;\n    border-radius: 8px;\n}\n\n.profile__cards-properties-item {\n    padding: 16px 20px;\n    font-size: 14px;\n    color: #898989;\n    text-transform: uppercase;\n}\n\n.profile__cards-inner {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n    padding: 16px 20px;\n    border: 1px solid #e5eaf0;\n    border-radius: 8px;\n    margin-top: 12px;\n}\n\n.profile__cards-name {\n    font-size: 14px;\n    color: #000;\n}\n\n.profile__cards-num {\n    margin: 0 8px;\n    color: #898989;\n}\n\n.profile__cards-management {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n}\n\n.profile__cards-btn {\n    display: block;\n    font-size: 12px;\n    color: #7421b0;\n    margin-right: 12px;\n    margin-top: 12px;\n}\n\n.profile__cards-btn:hover {\n    color: #7421b0;\n    text-decoration: none;\n}\n\n.profile__cards-deadline {\n    font-size: 14px;\n    color: #000;\n}\n\n.profile__cards-info {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-align: start;\n    -ms-flex-align: start;\n    align-items: flex-start;\n    padding: 20px;\n}\n\n.profile__cards-text {\n    max-width: 288px;\n    font-size: 12px;\n}\n\n.profile__cards-none {\n    margin: 0 auto;\n    font-size: 14px;\n    color: #000;\n}\n\n.profile__plans-inner {\n    display: grid;\n    -ms-grid-columns: (1fr) [3];\n    grid-template-columns: repeat(3, 1fr);\n    -ms-grid-rows: (1fr) [2];\n    grid-template-rows: repeat(2, 1fr);\n}\n\n.profile__plans-text {\n    width: 245px;\n    font-size: 14px;\n    color: #898989;\n}\n\n.profile__category-wrapper {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n}\n\n.profile__category-content {\n    margin-bottom: 30px;\n}\n\n.profile__category {\n    text-align: center;\n}\n\n.profile__category--premium {\n    background-color: #29272a;\n    color: #fff;\n}\n\n.profile__category-rate {\n    padding: 12px 60px;\n    background-color: #f4f4f5;\n    border-radius: 22px;\n    font-size: 14px;\n    color: #898989;\n    margin-bottom: 16px;\n}\n\n.profile__category-rate--premium {\n    background-color: #423f44;\n    color: #fff;\n}\n\n.profile__category-price {\n    font-size: 36px;\n    margin-bottom: 12px;\n}\n\n.profile__category-deadline {\n    color: #898989;\n}\n\n.profile__notification {\n    margin-top: 30px;\n    margin-right: 30px;\n    position: fixed;\n    top: 0;\n    right: 0;\n}\n\n.profile__notification-inner {\n    background-color: #fff;\n    width: 285px;\n    height: 56px;\n    border-left: 6px solid #28b446;\n    border-radius: 6px;\n    box-shadow: 0 0 20px #f1f1f1;\n}\n\n.profile__notification-content {\n    display: flex;\n    align-items: center;\n    padding: 16px 0 16px 16px;\n}\n\n.profile__notification-text {\n    display: block;\n    margin-left: 12px;\n    font-size: 14px;\n}\n\n.profile__cards-item {\n    background-color: #fff;\n    border: 1px solid #e5eaf0;\n    border-radius: 8px;\n    margin-top: 20px;\n}\n\n.profile__cards-propertie {\n    background-color: #f5f6f8;\n    padding: 16px 0 16px 20px;\n    font-size: 14px;\n    text-transform: uppercase;\n    color: #898989;\n}\n\n.profile__cards-key {\n    font-size: 14px;\n    color: #000;\n    padding: 20px;\n}\n\n.profile__cards-key--default {\n    padding: 0;\n    width: 155px;\n}\n\n.profile__cards-info--default {\n    padding: 0;\n}\n\n.profile__cards-text--default {\n    max-width: 155px;\n    font-size: 12px;\n}\n\n.profile__cards-payment-inner {\n    padding: 20px 20px 25px;\n}\n\n.profile__cards-data {\n    margin-left: 12px;\n    width: 180px;\n}\n\n.billing {\n    font-family: Rubik, sans-serif;\n    box-sizing: border-box;\n    position: fixed;\n    width: 100%;\n    height: 100%;\n    background: rgb(0 0 0 / 50%);\n    z-index: 2;\n}\n\n.billing__notification-inner {\n    position: absolute;\n    left: 50%;\n    top: 50%;\n    transform: translate(-50%, -50%);\n    background-color: #fff;\n    min-width: 380px;\n    min-height: 162px;\n    border-radius: 8px;\n    text-align: center;\n    padding: 35px 0 15px;\n}\n\n.billing__notification-title {\n    font-size: 18px;\n}\n\n.billing__notification-text {\n    width: 250px;\n    margin: 0 auto;\n    margin-top: 17px;\n    font-size: 16px;\n    color: #898989;\n}\n\n.billing__notification-btn {\n    font-weight: bold;\n    padding: 12px 0;\n    background-color: #fff;\n    border-radius: 8px;\n    color: #7421b0;\n    border: 1px solid #7421b0;\n    width: 130px;\n    margin-top: 40px;\n    margin-right: 12px;\n    transition: all 0.3s;\n}\n\n.billing__notification-btn-cancel {\n    color: #fff;\n    background-color: #7421b0;\n}\n\n.billing__notification-btn:hover {\n    color: #fff;\n    background-color: #7421b0;\n}\n\n.billing__notification-btn-inner {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: center;\n    -ms-flex-pack: center;\n    justify-content: center;\n}\n\n.billing__modal-inner {\n    position: fixed;\n    background-color: #fff;\n    left: 50%;\n    top: 50%;\n    transform: translate(-50%, -50%);\n    min-width: 380px;\n    min-height: 238px;\n    border-radius: 8px;\n    text-align: center;\n    padding: 35px 20px 15px;\n}\n\n.billing__modal-title {\n    font-weight: bold;\n    font-size: 18px;\n}\n\n.billing__modal-btn-inner {\n    margin-top: 40px;\n}\n\n.billing__modal-close {\n    display: flex;\n    align-items: center;\n    cursor: pointer;\n    position: absolute;\n    top: 0;\n    right: 0;\n    width: 44px;\n    height: 44px;\n    background: #f7f7f8;\n    border-radius: 0 8px 0 0;\n}\n\n.billing__modal-close svg {\n    display: block;\n    background-color: #f7f7f8;\n    padding: 10px;\n    border-radius: 0 8px 0 0;\n}\n\n.billing__modal-back {\n    cursor: pointer;\n    position: absolute;\n    top: 0;\n    left: 0;\n}\n\n.billing__modal-back svg {\n    display: block;\n    background-color: #f7f7f8;\n    padding: 10px;\n    border-radius: 8px 0 0;\n}\n\n.billing__modal-btn {\n    font-weight: bold;\n    display: block;\n    background-color: #f4f4f5;\n    color: #000;\n    border-radius: 8px;\n    padding: 16px 0;\n    margin-top: 16px;\n}\n\n.billing__modal-btn:hover {\n    color: #7421b0;\n    text-decoration: none;\n}\n\n.billing__modal-text {\n    display: block;\n    margin: 0 auto;\n    width: 270px;\n    margin-top: 17px;\n    color: #898989;\n}\n\n.billing__modal-btn--active {\n    color: #fff;\n    background-color: #7421b0;\n}\n\n.billing__modal-input {\n    box-sizing: border-box;\n    display: block;\n    border: 1px solid #e5eaf0;\n    border-radius: 8px;\n    height: 52px;\n    outline-color: #ba90d8;\n    padding: 0 0 0 20px;\n}\n\n.billing__card-number {\n    width: 100%;\n    margin-top: 20px;\n}\n\n.billing__modal-cardinfo-inner {\n    margin: 16px 0 20px;\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n}\n\n.billing__card-expirationdate {\n    display: block;\n    width: 220px;\n    margin-right: 16px;\n}\n\n.billing__card-cvv {\n    width: 104px;\n}\n\n.billing__pay-btn {\n    width: 100%;\n    border: none;\n    background-color: #7421b0;\n    opacity: 0.4;\n    color: #fff;\n    padding: 16px 0;\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 16px;\n}\n\n.billing__modal-tarif-inner {\n    margin-top: 40px;\n}\n\n.billing__modal-tarifitem {\n    display: -webkit-box;\n    display: flexbox;\n    display: flex;\n    -webkit-box-pack: justify;\n    -ms-flex-pack: justify;\n    justify-content: space-between;\n    -webkit-box-align: center;\n    -ms-flex-align: center;\n    align-items: center;\n    border-bottom: 1px solid #e5eaf0;\n    padding-bottom: 10px;\n}\n\n.billing__modal-tarifitem + .billing__modal-tarifitem {\n    margin-top: 20px;\n}\n\n.billing__modal-tarifname {\n    font-weight: bold;\n    color: #898989;\n    font-size: 14px;\n}\n\n.billing__modal-tarifprice {\n    font-size: 16px;\n}\n@media screen and (max-width: 992px) {\n    body {\n        background-color: #f5f5f5;\n    }\n\n    .register {\n        display: block;\n    }\n\n    .register__welcomeblock-inner {\n        min-height: 100%;\n        min-width: 100%;\n        padding: 60px 0;\n    }\n\n    .register__welcomeblock-text {\n        width: 350px;\n        display: block;\n        margin: 0 auto;\n    }\n\n    .register__welcomeblock-img {\n        display: block;\n        margin: 0 auto;\n        margin-top: 60px;\n    }\n\n    .profile {\n        width: 100%;\n    }\n\n    .profile__header-inner {\n        padding: 20px;\n        margin: 0;\n    }\n\n    .profile__user {\n        margin: 0;\n    }\n\n    .profile__user-wrapper {\n        display: block;\n        padding: 0 20px;\n    }\n\n    .profile__user-information {\n        min-width: 100%;\n        height: 100%;\n    }\n\n    .profile__user-photo {\n        margin: 0;\n        width: 48px;\n        height: 48px;\n        display: inline-block;\n    }\n\n    .profile__user-content {\n        display: -webkit-box;\n        display: flexbox;\n        display: flex;\n        -webkit-box-align: center;\n        -ms-flex-align: center;\n        align-items: center;\n    }\n\n    .profile__user-content svg {\n        width: 48px;\n        height: 48px;\n        padding: 0;\n        margin: 0;\n    }\n\n    .profile__menu-item {\n        width: 100%;\n    }\n\n    .profile__menu-item--active {\n        width: 100%;\n    }\n\n    .profile__user-data {\n        width: 100%;\n        margin-top: 35px;\n        min-height: 380px;\n    }\n\n    .profile__data-inner {\n        width: 100%;\n        display: -webkit-box;\n        display: flexbox;\n        display: flex;\n        -webkit-box-pack: justify;\n        -ms-flex-pack: justify;\n        justify-content: space-between;\n        -webkit-box-align: center;\n        -ms-flex-align: center;\n        align-items: center;\n    }\n\n    .profile__user-email {\n        margin-left: 15px;\n        margin-bottom: 0;\n    }\n\n    .profile__user-inner {\n        display: -webkit-box;\n        display: flexbox;\n        display: flex;\n        -webkit-box-align: center;\n        -ms-flex-align: center;\n        align-items: center;\n        -webkit-box-pack: justify;\n        -ms-flex-pack: justify;\n        justify-content: space-between;\n        padding: 18px 20px;\n    }\n}\n@media screen and (max-width: 768px) {\n    .profile__user-inner {\n        display: -webkit-box;\n        display: flexbox;\n        display: flex;\n        -webkit-box-align: center;\n        -ms-flex-align: center;\n        align-items: center;\n        -webkit-box-pack: justify;\n        -ms-flex-pack: justify;\n        justify-content: space-between;\n        padding: 18px 20px;\n    }\n}\n@media screen and (max-width: 576px) {\n    .register__welcomeblock-text {\n        max-width: 328px;\n        display: block;\n        margin: 0 auto;\n    }\n\n    .register__form {\n        max-width: 328px;\n    }\n\n    .profile__logo {\n        width: 60px;\n    }\n\n    .profile__input-btn {\n        width: 100%;\n    }\n\n    .profile__user-btn {\n        padding: 16px 0;\n        width: 100%;\n    }\n\n    .profile__btn-wrapper {\n        margin-top: 28px;\n    }\n\n    .profile__user-inner {\n        display: block;\n        padding: 18px 20px;\n    }\n}\n\n.v-enter-active,\n.v-leave-active {\n    transition: opacity 0.2s ease;\n}\n\n.v-enter-from,\n.v-leave-to {\n    opacity: 0;\n}\n","uri":"file:///home/vanarok/Work/kwork/my.screenpixel.org/resources/css/app.css","version":0}}}
2022-11-09T12:32:55.927 helix_lsp::transport [INFO] stylelint <- {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/vanarok/Work/kwork/my.screenpixel.org/resources/css/app.css","diagnostics":[],"version":0},"jsonrpc":"2.0"}
2022-11-09T12:32:57.408 helix_lsp::transport [INFO] stylelint -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":1}
2022-11-09T12:32:57.409 helix_lsp::transport [ERROR] stylelint err: <- StreamClosed
2022-11-09T12:32:57.409 helix_lsp::transport [ERROR] stylelint err <- "2022/11/09 12:32:57 jsonrpc2 handler: sending response 1: jsonrpc2: connection is closed\n"
2022-11-09T12:32:57.409 helix_lsp::transport [ERROR] stylelint err <- "2022/11/09 12:32:57 efm-langserver: connections closed\n"
2022-11-09T12:32:57.409 helix_lsp::transport [ERROR] stylelint err: <- StreamClosed
2022-11-09T12:33:00.409 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

Terminal:

Error: Timed out waiting for language servers to shutdown

@josephcatrambone-crucible
Copy link

josephcatrambone-crucible commented Nov 9, 2022

EDIT: As pointed out by the-mikedavis, this is #3975. Disregard. Thanks!

I think I'm running into this. I have a CSV file with a lot of rows and hx seems to spinlock at 100% during a WQ, even if no 'real' formatting is taking place. Admittedly, the CSV has ~150,000 rows, but I was able to edit it just fine.

I've been waiting for wq to finish for about 17 minutes and I see from the tail of the file that it's stuck spinning after writing line 1301.

@the-mikedavis
Copy link
Member

If it's a large file and the language doesn't have a language server configured and you're running on 22.08.1 instead of master, that is most likely #3975 which was fixed in #2267

@vanarok
Copy link
Contributor

vanarok commented Nov 9, 2022

If it's a large file and the language doesn't have a language server configured and you're running on 22.08.1 instead of master, that is most likely #3975 which was fixed in #2267

With :q without saving I still have this hang.

@archseer archseer added this to the 22.11 milestone Nov 17, 2022
@archseer
Copy link
Member

@vanarok Can you retest on taplo/efm-lsp now that #4797 was merged?

@davethiede
Copy link

helix 22.08.1 (46eb185)
uname -a
Linux ruby 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux
taplo --version
taplo 0.8.0

I just tested taplo on a small Cargo.toml file and I get a Timed out message when quiting. there are no modifications made. just viewing the file. This isn't the only language server that has this issue.

hx Cargo.toml
--> :q
Error: Timed out waiting for language servers to shutdown

2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="initialize"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/foldingRange"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/documentSymbol"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/formatting"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/completion"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/hover"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/documentLink"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/semanticTokens/full"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/prepareRename"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="textDocument/rename"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="initialized"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="textDocument/didChange"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="textDocument/didOpen"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="textDocument/didSave"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="textDocument/didClose"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="workspace/didChangeConfiguration"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="workspace/didChangeWorkspaceFolders"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="taplo/convertToJson"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="taplo/convertToToml"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="taplo/listSchemas"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method="taplo/associatedSchema"\n"
2022-11-20T09:20:22.979 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method="taplo/associateSchema"\n"
2022-11-20T09:20:22.998 helix_lsp::transport [ERROR] err <- " INFO taplo: LSP server listening transport="stdio"\n"
2022-11-20T09:21:10.769 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

@vanarok
Copy link
Contributor

vanarok commented Nov 20, 2022

@vanarok Can you retest on taplo/efm-lsp now that #4797 was merged?

helix 22.08.1 (46eb185)

2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"initialize\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/foldingRange\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentSymbol\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/formatting\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/completion\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/hover\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentLink\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/semanticTokens/full\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/prepareRename\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/rename\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"initialized\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didOpen\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didChange\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didSave\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didClose\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeConfiguration\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeWorkspaceFolders\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToJson\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToToml\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/listSchemas\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/associatedSchema\"\n"
2022-11-20T22:02:17.020 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"taplo/associateSchema\"\n"
2022-11-20T22:02:17.021 helix_lsp::transport [ERROR] err <- " INFO taplo: LSP server listening transport=\"stdio\"\n"
2022-11-20T22:03:08.901 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

@the-mikedavis
Copy link
Member

the-mikedavis commented Nov 20, 2022

For taplo this looks like an upstream issue. Taplo is currently discarding LSP shutdown messages. We block awaiting the shutdown response before sending the exit notification but taplo doesn't currently respond to the shutdown request, so we time out. tamasfe/taplo#354

You can see in a verbose log that we wait for a while after the request to shutdown:

2022-11-20T12:32:10.728 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"processId":166572,"rootPath":"/home/michael/src/helix/hx","rootUri":"file:///home/michael/src/helix/hx","workspaceFolders":[{"name":"hx","uri":"file:///home/michael/src/helix/hx"}]},"id":0}
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"initialize\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/foldingRange\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentSymbol\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/formatting\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/completion\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/hover\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentLink\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/semanticTokens/full\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/prepareRename\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/rename\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"initialized\"\n"
2022-11-20T12:32:10.743 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didOpen\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didChange\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didSave\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didClose\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeConfiguration\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeWorkspaceFolders\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToJson\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToToml\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/listSchemas\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/associatedSchema\"\n"
2022-11-20T12:32:10.744 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"taplo/associateSchema\"\n"
2022-11-20T12:32:10.746 helix_lsp::transport [ERROR] err <- " INFO taplo: LSP server listening transport=\"stdio\"\n"
2022-11-20T12:32:11.734 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":{"prepareProvider":true},"documentLinkProvider":{},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"semanticTokensProvider":{"workDoneProgress":false,"legend":{"tokenTypes":["tomlArrayKey","tomlTableKey"],"tokenModifiers":["readonly"]},"range":false,"full":true}},"serverInfo":{"name":"Taplo","version":"0.6.0"}}}
2022-11-20T12:32:11.734 helix_lsp::transport [INFO] <- {"capabilities":{"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentFormattingProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"foldingRangeProvider":true,"hoverProvider":true,"renameProvider":{"prepareProvider":true},"semanticTokensProvider":{"full":true,"legend":{"tokenModifiers":["readonly"],"tokenTypes":["tomlArrayKey","tomlTableKey"]},"range":false,"workDoneProgress":false},"textDocumentSync":1,"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}},"serverInfo":{"name":"Taplo","version":"0.6.0"}}
2022-11-20T12:32:11.735 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2022-11-20T12:32:11.735 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"toml","text":"[workspace]\nmembers = [\n  \"helix-core\",\n  \"helix-view\",\n  \"helix-term\",\n  \"helix-tui\",\n  \"helix-lsp\",\n  \"helix-dap\",\n  \"helix-loader\",\n  \"xtask\",\n]\n\ndefault-members = [\n  \"helix-term\"\n]\n\n[profile.release]\nlto = \"thin\"\n# debug = true\n\n[profile.opt]\ninherits = \"release\"\nlto = \"fat\"\ncodegen-units = 1\n# strip = \"debuginfo\" # TODO: or strip = true\nopt-level = 3\n","uri":"file:///home/michael/src/helix/hx/Cargo.toml","version":0}}}
2022-11-20T12:32:11.735 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"workspace/configuration","id":0,"params":{"items":[{"section":"evenBetterToml"},{"scopeUri":"file:///home/michael/src/helix/hx","section":"evenBetterToml"}]}}
2022-11-20T12:32:11.743 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":[null,null],"id":0}
2022-11-20T12:32:11.746 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:32:11.746 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:32:12.317 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:32:14.617 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":1}
2022-11-20T12:32:17.617 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

Running with taplo built from that PR, :quit exits in a normal amount of time:

2022-11-20T12:35:20.569 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"processId":167615,"rootPath":"/home/michael/src/helix/hx","rootUri":"file:///home/michael/src/helix/hx","workspaceFolders":[{"name":"hx","uri":"file:///home/michael/src/helix/hx"}]},"id":0}
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"initialize\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/foldingRange\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentSymbol\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/formatting\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/completion\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/hover\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/documentLink\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/semanticTokens/full\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/prepareRename\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"textDocument/rename\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"initialized\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didOpen\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didChange\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didSave\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"textDocument/didClose\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeConfiguration\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"workspace/didChangeWorkspaceFolders\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToJson\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/convertToToml\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/listSchemas\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered request handler method=\"taplo/associatedSchema\"\n"
2022-11-20T12:35:20.585 helix_lsp::transport [ERROR] err <- " INFO taplo: registered notification handler method=\"taplo/associateSchema\"\n"
2022-11-20T12:35:20.587 helix_lsp::transport [ERROR] err <- " INFO taplo: LSP server listening transport=\"stdio\"\n"
2022-11-20T12:35:21.394 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":{"prepareProvider":true},"documentLinkProvider":{},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"semanticTokensProvider":{"workDoneProgress":false,"legend":{"tokenTypes":["tomlArrayKey","tomlTableKey"],"tokenModifiers":["readonly"]},"range":false,"full":true}},"serverInfo":{"name":"Taplo","version":"0.6.0"}}}
2022-11-20T12:35:21.395 helix_lsp::transport [INFO] <- {"capabilities":{"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","=","[","{",",","\""]},"documentFormattingProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"foldingRangeProvider":true,"hoverProvider":true,"renameProvider":{"prepareProvider":true},"semanticTokensProvider":{"full":true,"legend":{"tokenModifiers":["readonly"],"tokenTypes":["tomlArrayKey","tomlTableKey"]},"range":false,"workDoneProgress":false},"textDocumentSync":1,"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}},"serverInfo":{"name":"Taplo","version":"0.6.0"}}
2022-11-20T12:35:21.395 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2022-11-20T12:35:21.395 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"toml","text":"[workspace]\nmembers = [\n  \"helix-core\",\n  \"helix-view\",\n  \"helix-term\",\n  \"helix-tui\",\n  \"helix-lsp\",\n  \"helix-dap\",\n  \"helix-loader\",\n  \"xtask\",\n]\n\ndefault-members = [\n  \"helix-term\"\n]\n\n[profile.release]\nlto = \"thin\"\n# debug = true\n\n[profile.opt]\ninherits = \"release\"\nlto = \"fat\"\ncodegen-units = 1\n# strip = \"debuginfo\" # TODO: or strip = true\nopt-level = 3\n","uri":"file:///home/michael/src/helix/hx/Cargo.toml","version":0}}}
2022-11-20T12:35:21.396 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"workspace/configuration","id":0,"params":{"items":[{"section":"evenBetterToml"},{"scopeUri":"file:///home/michael/src/helix/hx","section":"evenBetterToml"}]}}
2022-11-20T12:35:21.404 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":[null,null],"id":0}
2022-11-20T12:35:21.407 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:35:21.407 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:35:21.975 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/michael/src/helix/hx/Cargo.toml","diagnostics":[]}}
2022-11-20T12:35:23.706 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":1}
2022-11-20T12:35:23.707 helix_lsp::transport [ERROR] err <- " INFO taplo: received shutdown request id=Number(1) method=shutdown\n"
2022-11-20T12:35:23.707 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":1,"result":null}
2022-11-20T12:35:23.707 helix_lsp::transport [INFO] <- null
2022-11-20T12:35:23.707 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"exit","params":null}

@vanarok
Copy link
Contributor

vanarok commented Nov 22, 2022

Sorry it took so long.

helix 22.08.1 (f538b69)

efm-ls:

2022-11-22T09:03:26.969 helix_view::theme [WARN] Theme: malformed hexcode: brown_dark
2022-11-22T09:03:31.171 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:31 efm-langserver: no configuration file\n"
2022-11-22T09:03:31.172 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:31 efm-langserver: reading on stdin, writing on stdout\n"
2022-11-22T09:03:31.895 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:31 jsonrpc2 handler: sending response 1: jsonrpc2: connection is closed\n"
2022-11-22T09:03:31.895 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:31 efm-langserver: connections closed\n"
2022-11-22T09:03:31.896 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-11-22T09:03:34.895 helix_term::application [ERROR] Timed out waiting for language servers to shutdown
2022-11-22T09:03:37.097 helix_view::theme [WARN] Theme: malformed hexcode: brown_dark
2022-11-22T09:03:37.100 helix_view::clipboard [INFO] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2022-11-22T09:03:40.916 helix_lsp::client [INFO] Using custom LSP config: {"documentFormatting":true,"languages":{"css":[{"lintCommand":"stylelint --stdin --stdin-filename '${INPUT}' --formatter compact","lintFormats":["%f: line %l, col %c, %tarning - %m","%f: line %l, col %c, %trror - %m"],"lintIgnoreExitCode":true,"lintStdin":true},{"formatCommand":"stylelint --fix --stdin --stdin-filename '${INPUT}'","formatStdin":true}]}}
2022-11-22T09:03:40.916 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"initializationOptions":{"documentFormatting":true,"languages":{"css":[{"lintCommand":"stylelint --stdin --stdin-filename '${INPUT}' --formatter compact","lintFormats":["%f: line %l, col %c, %tarning - %m","%f: line %l, col %c, %trror - %m"],"lintIgnoreExitCode":true,"lintStdin":true},{"formatCommand":"stylelint --fix --stdin --stdin-filename '${INPUT}'","formatStdin":true}]}},"processId":230622,"rootPath":"......","rootUri":"......","workspaceFolders":[{"name":"..........","uri":"........."}]},"id":0}
2022-11-22T09:03:40.917 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:40 efm-langserver: no configuration file\n"
2022-11-22T09:03:40.918 helix_lsp::transport [ERROR] err <- "2022/11/22 09:03:40 efm-langserver: reading on stdin, writing on stdout\n"
2022-11-22T09:03:40.918 helix_lsp::transport [INFO] <- {"id":0,"result":{"capabilities":{"textDocumentSync":1,"documentFormattingProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}}},"jsonrpc":"2.0"}
2022-11-22T09:03:40.918 helix_lsp::transport [INFO] <- {"capabilities":{"documentFormattingProvider":true,"textDocumentSync":1,"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}}}
2022-11-22T09:03:40.918 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2022-11-22T09:03:40.918 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"documentFormatting":true,"languages":{"css":[{"lintCommand":"stylelint --stdin --stdin-filename '${INPUT}' --formatter compact","lintFormats":["%f: line %l, col %c, %tarning - %m","%f: line %l, col %c, %trror - %m"],"lintIgnoreExitCode":true,"lintStdin":true},{"formatCommand":"stylelint --fix --stdin --stdin-filename '${INPUT}'","formatStdin":true}]}}}}
2022-11-22T09:03:40.918 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"css","text":"@import 'variables.scss';\n\n:root {\n  color-scheme: dark;\n}\n\nbody {\n  background-color: $black;\n}\n\n.purple-orange-gradient {\n  background: linear-gradient(90deg, #da499b, #ff7663 50%, #ffb35c);\n}\n\n.media-background {\n  background: conic-gradient(\n      rgba(0, 0, 0, 0.1) 0deg,\n      rgba(169, 169, 169, 0.07) 90deg,\n      rgba(169, 169, 169, 0.07) 90deg,\n      rgba(169, 169, 169, 0.07) 180deg,\n      rgba(169, 169, 169, 0.1) 180deg,\n      rgba(0, 0, 0, 0.15) 270deg,\n      rgba(169, 169, 169, 0.07) 270deg,\n      rgba(169, 169, 169, 0.07) 360deg\n    )\n    0 0/60px 60px round;\n}\n\n.overlay-shadow {\n  background: linear-gradient(\n    to bottom,\n    rgba(255, 255, 255, 0),\n    rgba(255, 255, 255, 0),\n    rgba(0, 0, 0, 0.9)\n  );\n}\n\n.fill-width {\n  width: 100%;\n}\n\n.absolute {\n  position: absolute;\n}\n\n.animation-hover {\n  transition: all 0.1s ease-in-out;\n  &:hover {\n    transform: scale(1.3);\n  }\n}\n\n.link {\n  text-decoration: none;\n  color: inherit;\n}\n\n.joinBtn {\n  background: linear-gradient(\n    310deg,\n    #7d5fee 0%,\n    #b72bff 33%,\n    #ff2eb0 66%,\n    #d7a039 100%\n  );\n}\n\n#dash-sidebar {\n  background: var(--v-blocks_darkwhite-base) !important;\n  max-height: calc(100vh - 56px) !important;\n  height: calc(100vh - 56px);\n  margin-top: 55px;\n  z-index: 8;\n\n  .v-navigation-drawer__border {\n    display: none;\n  }\n}\n\n#cookiePopup {\n  z-index: 99;\n  font-family: 'Roboto', sans-serif;\n  text-align: left !important;\n  padding: 0;\n  margin-bottom: 15px;\n  font-size: 14px !important;\n  font-weight: 400;\n  line-height: 1.2;\n  color: #222222;\n\n  .cookie__floating__buttons {\n    &__button--decline {\n      color: #272727;\n\n      &:hover {\n        color: white;\n        background: #272727;\n      }\n    }\n  }\n\n  a {\n    color: #4caf50;\n    text-decoration: underline;\n  }\n}\n\n.border-underline {\n  border-bottom: 6px solid;\n}\n\n.tag {\n  border: 1px solid;\n  border-radius: 3px;\n\n  &:hover {\n    color: $primary;\n  }\n}\n\n.absolute-center {\n  position: absolute;\n  top: 50%;\n  right: 50%;\n  transform: translate(50%, -50%);\n}\n\n.v-enter-active,\n.v-leave-active {\n  transition: opacity 0.5s ease;\n  transition-delay: 0.5s;\n}\n\n.v-enter-from,\n.v-leave-to {\n  opacity: 0;\n}\n\n.cfade-enter-active,\n.cfade-leave-active {\n  transition: opacity 0.2s;\n}\n\n.cfade-enter,\n.cfade-leave-to {\n  opacity: 0;\n  transition-delay: 1s;\n}\n","uri":"file:///.........","version":0}}}
2022-11-22T09:03:41.082 helix_lsp::transport [INFO] <- {"method":"textDocument/publishDiagnostics","params":{"uri":"........","diagnostics":[],"version":0},"jsonrpc":"2.0"}
2022-11-22T09:04:01.995 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didClose","params":{"textDocument":{"uri":"......"}}}
2022-11-22T09:04:03.747 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":1}
2022-11-22T09:04:03.748 helix_lsp::transport [ERROR] err <- "2022/11/22 09:04:03 jsonrpc2 handler: sending response 1: jsonrpc2: connection is closed\n"
2022-11-22T09:04:03.748 helix_lsp::transport [ERROR] err <- "2022/11/22 09:04:03 efm-langserver: connections closed\n"
2022-11-22T09:04:03.749 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-11-22T09:04:06.748 helix_term::application [ERROR] Timed out waiting for language servers to shutdown
2022-11-22T09:04:08.333 helix_view::theme [WARN] Theme: malformed hexcode: brown_dark
2022-11-22T09:04:08.338 helix_view::clipboard [INFO] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard

@the-mikedavis
Copy link
Member

Ah that's an interesting one: it looks like we send the shutdown request and the server just exits. The reply to shutdown seems to be discarded by the server since they consider the jsonrpc channel already closed. We can probably handle this by sending Errs for all pending_requests in the transport when we see that the stream is closed

@the-mikedavis
Copy link
Member

That behavior should probably be fixed upstream in efm-langserver (the spec says you should exit when you get the exit notification) but in general Helix should be closing outstanding requests when the language server exits anyways: #4852

@the-mikedavis
Copy link
Member

This issue covers a few cases now:

The remaining case is the hang from trying to auto-format while the server is initializing. For that we have #2059; I'll close in favor of that issue.

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

No branches or pull requests

8 participants