fannheyward / coc-biome

Biome extension for coc.nvim
MIT License
23 stars 1 forks source link

Creates `biome-logs/` and `biome-socket-1.4.1` in each relative directory if no `TMPDIR` envvar set #11

Closed tony closed 8 months ago

tony commented 8 months ago

Mirror of https://github.com/biomejs/biome/issues/306#issuecomment-1872071405

Summary

This happens when no TMPDIR is set.

Debug info

Example codebase

biome logs

Logs: server.log.2023-12-29-13.txt

vim

vim --version ``` ❯ vim --version VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 04 2023 12:42:16) Included patches: 1-1672, 1729, 1747, 2107, 1840, 1846-1848, 1857-1858, 1873, 1969, 1992, 2010, 2068, 2106, 2108-2112, 2121 Modified by team+vim@tracker.debian.org Compiled by team+vim@tracker.debian.org Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_urxvt -tag_any_white +arabic +find_in_path +mouse_xterm +tcl +autocmd +float +multi_byte +termguicolors +autochdir +folding +multi_lang +terminal -autoservername -footer -mzscheme +terminfo -balloon_eval +fork() +netbeans_intg +termresponse +balloon_eval_term +gettext +num64 +textobjects -browse -hangul_input +packages +textprop ++builtin_terms +iconv +path_extra +timers +byte_offset +insert_expand +perl +title +channel +ipv6 +persistent_undo -toolbar +cindent +job +popupwin +user_commands -clientserver +jumplist +postscript +vartabs -clipboard +keymap +printer +vertsplit +cmdline_compl +lambda +profile +vim9script +cmdline_hist +langmap -python +viminfo +cmdline_info +libcall +python3 +virtualedit +comments +linebreak +quickfix +visual +conceal +lispindent +reltime +visualextra +cryptv +listcmds +rightleft +vreplace +cscope +localmap +ruby +wildignore +cursorbind +lua +scrollbind +wildmenu +cursorshape +menu +signs +windows +dialog_con +mksession +smartindent +writebackup +diff +modify_fname +sodium -X11 +digraphs +mouse -sound -xfontset -dnd -mouseshape +spell -xim -ebcdic +mouse_dec +startuptime -xpm +emacs_tags +mouse_gpm +statusline -xsmp +eval -mouse_jsbterm -sun_workshop -xterm_clipboard +ex_extra +mouse_netterm +syntax -xterm_save +extra_search +mouse_sgr +tag_binary -farsi -mouse_sysmouse -tag_old_static system vimrc file: "/etc/vim/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-Oyvm4I/vim-9.0.1672=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/vim-Oyvm4I/vim-9.0.1672=/usr/src/vim-2:9.0.1672-1ubuntu2.2 -DSYS_VIMRC_FILE=\"/etc/vim/vimrc\" -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\" -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.11/config-3.11-x86_64-linux-gnu -lpython3.11 -ldl -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-3.1 -lm -L/usr/lib ```

coc info

CocInfo ``` ## versions vim version: VIM - Vi IMproved 9.0 9002121 node version: v20.8.0 coc.nvim version: 0.0.82-f82e420 2023-12-18 16:28:32 +0800 coc.nvim directory: ~/.vim/plugged/coc.nvim term: tmux platform: linux ## coc.nvim log 2023-12-29T07:20:37.979 INFO (pid:21596) [extension:coc-git] - Looking for git in: git 2023-12-29T07:20:38.001 WARN (pid:21596) [workspace] - Extension "coc-lists" registered synchronized autocmd "VimLeavePre", which could be slow. 2023-12-29T07:20:38.028 INFO (pid:21596) [plugin] - coc.nvim initialized with node: v20.8.0 after 277 2023-12-29T07:20:39.108 INFO (pid:21596) [configurations] - Add folder configuration from file: ~/projects/cv/.vim/coc-settings.json 2023-12-29T07:20:39.178 INFO (pid:21596) [services] - service tsserver started 2023-12-29T07:20:39.484 INFO (pid:21596) [attach] - receive notification: highlight [] 2023-12-29T07:20:39.606 INFO (pid:21596) [services] - LanguageClient biome state change: stopped => starting 2023-12-29T07:20:39.711 INFO (pid:21596) [services] - LanguageClient biome state change: starting => running 2023-12-29T07:20:39.716 INFO (pid:21596) [services] - service biome started 2023-12-29T07:20:46.733 INFO (pid:21596) [attach] - receive notification: showInfo [] ```

Biome logs

via :CocCommand workspace.showOutput ``` [Trace - 07:15:19.959] Sending request 'initialize - (0)'. Params: { "processId": 15799, "rootPath": "~/projects/cv", "rootUri": "file://~/projects/cv", "capabilities": { "workspace": { "applyEdit": true, "workspaceEdit": { "documentChanges": true, "resourceOperations": [ "create", "rename", "delete" ], "failureHandling": "undo", "normalizesLineEndings": true, "changeAnnotationSupport": { "groupsOnLabel": false } }, "didChangeConfiguration": { "dynamicRegistration": true }, "didChangeWatchedFiles": { "dynamicRegistration": true, "relativePatternSupport": true }, "codeLens": { "refreshSupport": true }, "executeCommand": { "dynamicRegistration": true }, "configuration": true, "fileOperations": { "dynamicRegistration": true, "didCreate": true, "didRename": true, "didDelete": true, "willCreate": true, "willRename": true, "willDelete": true }, "semanticTokens": { "refreshSupport": true }, "inlayHint": { "refreshSupport": true }, "inlineValue": { "refreshSupport": true }, "diagnostics": { "refreshSupport": 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 ] }, "resolveSupport": { "properties": [ "location.range" ] } }, "workspaceFolders": true }, "textDocument": { "publishDiagnostics": { "relatedInformation": true, "versionSupport": true, "tagSupport": { "valueSet": [ 1, 2 ] }, "codeDescriptionSupport": true, "dataSupport": true }, "synchronization": { "dynamicRegistration": true, "willSave": true, "willSaveWaitUntil": true, "didSave": true }, "completion": { "dynamicRegistration": true, "contextSupport": true, "completionItem": { "snippetSupport": true, "commitCharactersSupport": true, "documentationFormat": [ "markdown", "plaintext" ], "deprecatedSupport": true, "preselectSupport": true, "insertReplaceSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "resolveSupport": { "properties": [ "documentation", "detail", "additionalTextEdits" ] }, "labelDetailsSupport": true, "insertTextModeSupport": { "valueSet": [ 1, 2 ] } }, "completionItemKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] }, "insertTextMode": 2, "completionList": { "itemDefaults": [ "commitCharacters", "editRange", "insertTextFormat", "insertTextMode" ] } }, "hover": { "dynamicRegistration": true, "contentFormat": [ "markdown", "plaintext" ] }, "signatureHelp": { "dynamicRegistration": true, "contextSupport": true, "signatureInformation": { "documentationFormat": [ "markdown", "plaintext" ], "activeParameterSupport": true, "parameterInformation": { "labelOffsetSupport": true } } }, "references": { "dynamicRegistration": true }, "definition": { "dynamicRegistration": true, "linkSupport": true }, "documentHighlight": { "dynamicRegistration": 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 ] }, "hierarchicalDocumentSymbolSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "labelSupport": true }, "codeAction": { "dynamicRegistration": true, "isPreferredSupport": true, "disabledSupport": true, "dataSupport": true, "honorsChangeAnnotations": false, "resolveSupport": { "properties": [ "edit" ] }, "codeActionLiteralSupport": { "codeActionKind": { "valueSet": [ "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" ] } } }, "codeLens": { "dynamicRegistration": true }, "formatting": { "dynamicRegistration": true }, "rangeFormatting": { "dynamicRegistration": true }, "onTypeFormatting": { "dynamicRegistration": true }, "rename": { "dynamicRegistration": true, "prepareSupport": true, "honorsChangeAnnotations": true, "prepareSupportDefaultBehavior": 1 }, "documentLink": { "dynamicRegistration": true, "tooltipSupport": true }, "typeDefinition": { "dynamicRegistration": true, "linkSupport": true }, "implementation": { "dynamicRegistration": true, "linkSupport": true }, "declaration": { "dynamicRegistration": true, "linkSupport": true }, "colorProvider": { "dynamicRegistration": true }, "foldingRange": { "dynamicRegistration": true, "rangeLimit": 5000, "lineFoldingOnly": true, "foldingRangeKind": { "valueSet": [ "comment", "imports", "region" ] }, "foldingRange": { "collapsedText": false } }, "selectionRange": { "dynamicRegistration": true }, "callHierarchy": { "dynamicRegistration": true }, "linkedEditingRange": { "dynamicRegistration": true }, "semanticTokens": { "dynamicRegistration": true, "tokenTypes": [ "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "decorator", "operator" ], "tokenModifiers": [ "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" ], "formats": [ "relative" ], "requests": { "range": true, "full": { "delta": true } }, "multilineTokenSupport": false, "overlappingTokenSupport": false, "serverCancelSupport": true, "augmentsSyntaxTokens": true }, "inlayHint": { "dynamicRegistration": true, "resolveSupport": { "properties": [ "tooltip", "textEdits", "label.tooltip", "label.location", "label.command" ] } }, "inlineValue": { "dynamicRegistration": true }, "diagnostic": { "dynamicRegistration": true, "relatedDocumentSupport": true }, "typeHierarchy": { "dynamicRegistration": true } }, "window": { "showMessage": { "messageActionItem": { "additionalPropertiesSupport": true } }, "showDocument": { "support": true }, "workDoneProgress": true }, "general": { "regularExpressions": { "engine": "ECMAScript", "version": "ES2020" }, "markdown": { "parser": "marked", "version": "4.0.10" }, "positionEncodings": [ "utf-16" ], "staleRequestSupport": { "cancel": true, "retryOnContentModified": [ "textDocument/inlayHint", "textDocument/semanticTokens/full", "textDocument/semanticTokens/range", "textDocument/semanticTokens/full/delta" ] } } }, "trace": "verbose", "workspaceFolders": [ { "uri": "file://~/projects/cv", "name": "cv" } ], "locale": "C", "clientInfo": { "name": "coc.nvim", "version": "0.0.82" }, "workDoneToken": "a8fb554d-fa7b-49e0-8a26-27777910880d" } [Trace - 07:15:19.966] Received response 'initialize - (0)' in 7ms. Result: { "capabilities": { "codeActionProvider": true, "positionEncoding": "utf-16", "textDocumentSync": 2 }, "serverInfo": { "name": "biome_lsp", "version": "1.4.1" } } [Trace - 07:15:19.967] Sending notification 'initialized'. Params: {} [Trace - 07:15:19.970] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file://~/projects/cv/packages/react/src/App.tsx", "languageId": "typescriptreact", "version": 1, "text": "import React from \"react\";\n\nimport { observer } from \"mobx-react-lite\";\n\nimport * as mobxLib from \"@tony/cv-lib/search/mobx\";\n\nimport { Charts } from \"./Charts\";\nimport { MobxProvider, useMst } from \"./mobx\";\nimport { Results } from \"./Results\";\nimport { Settings } from \"./Settings\";\nimport { TopNav } from \"./TopNav/TopNav\";\n\nimport \"@tony/cv-ui/styles/style.css\";\n\nconst { state: cvState } = mobxLib;\n\nconst AppContainer: React.FC<{ children: React.ReactNode }> = ({\n children,\n}) => {\n return (\n
\n \n \n {children}\n \n
\n );\n};\n\nexport interface CVDominantLanguageCSS extends React.CSSProperties {\n \"--cv-dominant-language-color\": React.CSSProperties[\"color\"];\n \"--cv-dominant-language-background\": React.CSSProperties[\"backgroundColor\"];\n}\n\nconst DominantLanguageCSSVariable: React.FC = observer(() => {\n const cvState = useMst();\n const dominantLanguage = cvState.dominantLanguage;\n\n return dominantLanguage ? (\n \n ) : null;\n});\n\nconst App: React.FC = observer(() => {\n // window.cvState = cvState;\n\n return (\n \n {cvState.ui.isLoading ? (\n
Loading CV Data
\n ) : (\n <>\n \n \n \n \n \n )}\n
\n );\n});\n\nexport default App;\n" } } [Trace - 07:15:19.971] Received request 'workspace/configuration - (0)'. Params: { "items": [ { "section": "biome" } ] } [Trace - 07:15:19.972] Sending response 'workspace/configuration - (0)'. Processing request took 1ms Result: [ { "enable": true, "bin": null, "requireConfiguration": true, "trace": { "server": "verbose" } } ] [Trace - 07:15:19.974] Received notification 'textDocument/publishDiagnostics'. Params: { "diagnostics": [], "uri": "file://~/projects/cv/packages/react/src/App.tsx", "version": 1 } [Trace - 07:15:19.974] Received notification 'window/logMessage'. Params: { "message": "Server initialized with PID: 16274", "type": 3 } [Info - 07:15:19.974] Server initialized with PID: 16274 [Trace - 07:15:19.974] Received request 'client/unregisterCapability - (1)'. Params: { "unregisterations": [ { "id": "biome_did_change_extension_settings", "method": "workspace/didChangeConfiguration" }, { "id": "biome_range_formatting", "method": "textDocument/rangeFormatting" }, { "id": "biome_on_type_formatting", "method": "textDocument/onTypeFormatting" }, { "id": "biome_rename", "method": "textDocument/rename" }, { "id": "biome_formatting", "method": "textDocument/formatting" }, { "id": "biome_did_change_workspace_settings", "method": "workspace/didChangeWatchedFiles" } ] } [Trace - 07:15:19.975] Sending response 'client/unregisterCapability - (1)'. Processing request took 0ms No result returned. [Trace - 07:15:19.975] Received request 'client/registerCapability - (2)'. Params: { "registrations": [ { "id": "biome_did_change_extension_settings", "method": "workspace/didChangeConfiguration" }, { "id": "biome_range_formatting", "method": "textDocument/rangeFormatting" }, { "id": "biome_on_type_formatting", "method": "textDocument/onTypeFormatting", "registerOptions": { "documentSelector": null, "firstTriggerCharacter": "}", "moreTriggerCharacter": [ "]", ")" ] } }, { "id": "biome_formatting", "method": "textDocument/formatting" }, { "id": "biome_did_change_workspace_settings", "method": "workspace/didChangeWatchedFiles", "registerOptions": { "watchers": [ { "globPattern": "~/projects/cv/biome.json", "kind": 7 }, { "globPattern": "~/projects/cv/rome.json", "kind": 7 } ] } } ] } [Trace - 07:15:19.976] Sending response 'client/registerCapability - (2)'. Processing request took 1ms No result returned. [Trace - 07:15:19.977] Received notification 'textDocument/publishDiagnostics'. Params: { "diagnostics": [], "uri": "file://~/projects/cv/packages/react/src/App.tsx", "version": 1 } [Trace - 07:15:58.242] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file://~/projects/cv/packages/react/src/TopNav/TopNav.tsx", "languageId": "typescriptreact", "version": 1, "text": "import React from \"react\";\n\nimport \"./TopNav.css\";\n\nimport { ColorSchemeToggle } from \"./ColorScheme\";\n\nexport const TopNav: React.FC = () => (\n \n);\n" } } [Trace - 07:15:58.251] Received notification 'textDocument/publishDiagnostics'. Params: { "diagnostics": [], "uri": "file://~/projects/cv/packages/react/src/TopNav/TopNav.tsx", "version": 1 } [Trace - 07:16:01.305] Sending notification 'textDocument/didSave'. Params: { "textDocument": { "uri": "file://~/projects/cv/packages/react/src/TopNav/TopNav.tsx", "version": 1 } } [Trace - 07:16:07.746] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file://~/projects/cv/.vim/coc-settings.json", "languageId": "json", "version": 1, "text": "{\n \"[markdown][javascript][typescript][typescriptreact]\": {\n \"coc.preferences.formatOnSave\": true\n },\n \"prettier.enable\": false,\n \"eslint.enable\": false,\n \"biome.enable\": true\n}\n" } } [Trace - 07:16:07.753] Received notification 'textDocument/publishDiagnostics'. Params: { "diagnostics": [], "uri": "file://~/projects/cv/.vim/coc-settings.json", "version": 1 } ```

Recreation steps

  1. Clone https://github.com/tony/cv
  2. yarn
  3. Open App.tsx with coc-biome enabled
  4. biome-socket-1.4.1 and biome-logs/ are automatically created