Giter VIP home page Giter VIP logo

Comments (9)

Hi-Angel avatar Hi-Angel commented on June 21, 2024 1

The regression was introduced in 9b3a921

CC: @razzmatazz the author of the commit

UPD: reverting the commit fixes the problem

from lsp-mode.

Hi-Angel avatar Hi-Angel commented on June 21, 2024

Ha! I couldn't figure out by code of lsp-mode, it's quite complicated. But I executed a bpftrace to print new processes while executing a lsp and found this:

pid: 40505, comm: emacs, args: /bin/zsh -c dotnet tool list -g
pid: 40505, comm: zsh, args: dotnet tool list -g

so lsp is starting this tool. Apparently it assumes the tool will print if csharp-ls exists, but that doesn't happen, its output is empty. Even though csharp-ls does exist 😊 Looking at lsp-csharp.el it seems like the test for just checking if csharp-ls binary is present is missing. So that needs to be fixed.

from lsp-mode.

psibi avatar psibi commented on June 21, 2024

This looks suspicious:

Command "semgrep lsp" is not present on the path.

Can you try setting this configuration and try again:

(setq lsp-disabled-clients '(semgrep-ls))

from lsp-mode.

Hi-Angel avatar Hi-Angel commented on June 21, 2024

Can you try setting this configuration and try again:

(setq lsp-disabled-clients '(semgrep-ls))

Didn't help, lsp still says csharp-ls is not installed and asks if I want it to be installed

from lsp-mode.

psibi avatar psibi commented on June 21, 2024

What is the output of which csharp-ls ?

And can you check the variable exec-path and see the directory where csharp-ls is present exists in this variable.

from lsp-mode.

Hi-Angel avatar Hi-Angel commented on June 21, 2024

What is the output of which csharp-ls ?

/usr/bin/csharp-ls

And can you check the variable exec-path and see the directory where csharp-ls is present exists in this variable.

Yes, it enlists /usr/bin


As I mentioned in my comment above, I think the problem simply comes down to lsp-csharp.el lacking the search by the name of csharp-ls (and omnisharp for that matter).

from lsp-mode.

psibi avatar psibi commented on June 21, 2024

Ah, I missed that comment. I see what you mean.

from lsp-mode.

Hi-Angel avatar Hi-Angel commented on June 21, 2024

It seems that there is actually a code that supposed to search it by name, it's in the function lsp-csharp--cls-make-launch-cmd. However adding a (print "here") inside it and evaluating the function and then trying to run lsp on C# file does not show a print "hello" in the *Messages* buffer. So for some reason this function simply does not get run.

from lsp-mode.

Hi-Angel avatar Hi-Angel commented on June 21, 2024

So, I am not good in lsp-mode internals, but I would seem to me there is a bug on this line.

It would seem that the original author assumed that function (lsp-stdio-connection) tests its args in order to find executable. But it works a bit different way. All in all, the first function that is actually supposed to return /usr/bin/csharp-ls does not get run.

At least that's my interpretation of the situation.

from lsp-mode.

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.