Code Monkey home page Code Monkey logo

Comments (7)

rchl avatar rchl commented on June 21, 2024

Many things could be the reason. Enable LSP logs in your editor and provide them here after reproducing the issue.

from typescript-language-server.

zlxbuzz avatar zlxbuzz commented on June 21, 2024

Many things could be the reason. Enable LSP logs in your editor and provide them here after reproducing the issue.

When I switch back to the previous TypeScript file, tsserver doesn't detect any code changes. There are no messages in LspLog. At 18:21:21, executing LspRestart resulted in the following output. Other LSPs like css-lsp and json-lsp don't have this issue. I manage my plugins using lazy.nvim.
LspLog:

  [WARN][2023-11-16 17:43:24] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 6): "
  [WARN][2023-11-16 17:49:23] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 7): "
  [WARN][2023-11-16 17:50:35] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 7): "
  [WARN][2023-11-16 17:50:41] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 7): "
  [WARN][2023-11-16 17:50:53] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 7): "
  [START][2023-11-16 18:21:21] LSP logging initiated
  [WARN][2023-11-16 18:21:21] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 9): "
  [WARN][2023-11-16 18:22:46] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 9): "
  [WARN][2023-11-16 18:25:57] .../lua/vim/lsp.lua:1637  "buf_attach_client called on unloaded buffer (id: 9): "

from typescript-language-server.

rchl avatar rchl commented on June 21, 2024

There are logs if your LSP is working.
There will be things logged when opening, editing and all other actions that you do.
I'm asking you to provide the full LSP logs from the time you open the project to the point where you've reproduced the issue.

And I don't know what the:

[WARN][2023-11-16 17:43:24] .../lua/vim/lsp.lua:1637 "buf_attach_client called on unloaded buffer (id: 6

means since that's specific to your editor and not the LSP protocol.

from typescript-language-server.

zlxbuzz avatar zlxbuzz commented on June 21, 2024

Afterward, I made some attempts and found that when I use version 4.0.0 of the typescript-language-server, the issue no longer occurs. However, when I switch to version 4.1.0 or above, the previous problem arises again. So, I'm wondering if the new versions have made some modifications.

from typescript-language-server.

rchl avatar rchl commented on June 21, 2024

Obviously new versions have new changes.

I've asked about logs. That's the fastest way I can help you.

from typescript-language-server.

zlxbuzz avatar zlxbuzz commented on June 21, 2024

Obviously new versions have new changes.

I've asked about logs. That's the fastest way I can help you.

Sorry, I checked the Lsp log, but it's too large to pinpoint the issue. I identified the problem through a minimal code configuration. I found that when I set 'set nohidden', the issue arises. However, when I use 'set hidden', the problem disappears. So, could it be a problem caused by buffers?

from typescript-language-server.

rchl avatar rchl commented on June 21, 2024

I don't know what set hidden does. You might want to ask the neovim community or whoever maintains the typescript integration with neovim.

from typescript-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.