GithubHelp home page GithubHelp logo

Comments (14)

jcs090218 avatar jcs090218 commented on May 22, 2024

I think it was cause by the update functionality. Can you try removing the language server manually? It should located under ~/.emacs.d/.cache/lsp/ltex-ls. And install the language server once again, using command M-x lsp-isntall-server.

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

I actually have done that, but it is still not started.

from lsp-ltex.

jcs090218 avatar jcs090218 commented on May 22, 2024

Does it not installed?

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

It downloaded the tar file but did not unzip it. I unzipped the tarball, but the lsp does not run the server.

from lsp-ltex.

jcs090218 avatar jcs090218 commented on May 22, 2024

Hmmm... Can you eval the following snippet? (From L315-L322)

(let* ((tar (lsp-ltex--downloaded-extension-path))
              (dest (f-dirname tar))
              (output (f-join dest lsp-ltex--filename)))
         (if (lsp-ltex--execute "tar" "-xvzf" tar "-C" dest)
             (unless (lsp-ltex--execute (if (eq system-type 'windows-nt) "ren" "mv")
                                        output "latest")
               (error "Failed to rename version `%s` to latest" lsp-ltex-version))
           (error "Error during the unzip process: tar")))

This should just untar and rename the folder to latest. The server isn't starting because it is looking for the folder latest, and no longer the original folder name.

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

I tried it, and it seems nothing happened.
I have already had ltex-ls-12.3.0.tar.gz in my .cache/lsp/ltex-ls.
Can I just unzip the tarball and rename it to latest?

from lsp-ltex.

jcs090218 avatar jcs090218 commented on May 22, 2024

I tried it, and it seems nothing happened.

I have already had ltex-ls-12.3.0.tar.gz in my .cache/lsp/ltex-ls.

Can I just unzip the tarball and rename it to latest?

Yes, you could but you would not get the latest update by this package. Can you tell me what OS you are on? So I can solve it on the local machine.

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

Yes, my OS is Manjaro linux. Emacs is 27.2.

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

I just deleted all folders and files under ltex-ls and run lsp-install-server again.
This time I got

LSP :: Server ltex-ls install process failed with the following error message: (error Failed to rename version ‘12.3.0‘ to latest).

The tarball is unzipped, but the folder name is still ltex-ls-12.3.0.

from lsp-ltex.

jcs090218 avatar jcs090218 commented on May 22, 2024

The issue is the mv command, but I don't have a macOS at the moment. Can you try to message out the output variable? We need to make sure both paths (output and latest) to rename are correct.

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

I have Linux, not macOS.

The output variable is "~/.emacs.d/.cache/lsp/ltex-ls/ltex-ls-12.3.0".

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

I think I figure out what's going on.
The command mv path-to-dir latest does not work if the directory is not in the current directory.
Something like mv ~/.emacs.d/.cache/lsp/ltex-ls/ltex-ls-12.3.0 ~/.emacs.d/.cache/lsp/ltex-ls/latest works.

from lsp-ltex.

jcs090218 avatar jcs090218 commented on May 22, 2024

I have Linux, not macOS.

Oops, sorry I overlooked your message!

@linwaytin Thanks for the information! I have applied a fix in d9148a6. Evaluate the following to check to see if it works!

(let* ((tar (lsp-ltex--downloaded-extension-path))
              (dest (f-dirname tar))
              (output (f-join dest lsp-ltex--filename))
              (latest (f-join (f-dirname output) "latest")))
         (if (lsp-ltex--execute "tar" "-xvzf" tar "-C" dest)
             (unless (lsp-ltex--execute (if (eq system-type 'windows-nt) "move" "mv")
                                        output latest)
               (error "Failed to rename version `%s` to latest" lsp-ltex-version))
           (error "Error during the unzip process: tar")))

from lsp-ltex.

linwaytin avatar linwaytin commented on May 22, 2024

It works! Thank you for such a quick fix.

from lsp-ltex.

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.