neoclide / coc-highlight

Document highlight and document colors LSP support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error opening file in `git` directory: `Error: No Project`

rollschild opened this issue · comments

Having the following error message (:messages) in neovim:

[coc.nvim] Error on 'highlight': Error processing request. No Project.
Error: No Project.
    at Object.ThrowNoProject (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:92289:23)
    at ProjectService.getDefaultProjectForFile (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:94518:46)
    at IOSession.Session.getFileAndProjectWorker (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:96934:87)
    at IOSession.Session.getFileAndProject (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:96919:29)
    at IOSession.Session.getDocumentHighlights (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:96692:31)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:96233:61)
    at /Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:97580:88
    at IOSession.Session.executeWithRequestId (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:97571:28)
    at IOSession.Session.executeCommand (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:97580:33)
    at IOSession.Session.onMessage (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:97600:35)
    at Interface.<anonymous> (/Users/gs069673/git-repos/techportal/node_modules/typescript/lib/tsserver.js:98831:27)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:280:10)
    at Interface._normalWrite (readline.js:422:12)
    at Socket.ondata (readline.js:139:10)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:597:20)

To reproduce:
(I have NERDTree enabled by default)

  1. Go into a Git project root directory and do $ nvim. (I set in my .vimrc that $ nvim alone will open the directory in NERDTree)
  2. Pick a file by moving your cursor onto a file node inside the NERDTree buffer.
  3. Open the file by hitting Enter on the file node inside NERDTree.
  4. You will notice that there's part of the error message showing at the bottom, in the Vim command area.
  5. Do a :messages you will see the whole error messages that I pasted above.

NeoVim 0.3.7;
macOS 10.14.5;

Please help. Thanks a lot.

More details: this only happened today, after I updated all NeoVim/Vim extensions.

Try upgrade your coc-tssever extension to 1.3.6

I had not thought about older extensions conflicting with coc-highlight... But yes, I did a :CocInstall coc-tsserver (re-install actually I guess?) and it solved my issue. No errors for now. Please close this issue. Thank you so much.