dhall-lang / vscode-dhall-lsp-server

VSCode pluging that provides LSP support for the Dhall programming language
MIT License
17 stars 8 forks source link

Don't automatically open `Dhall LSP` Output Panel #37

Closed bgolding355 closed 2 years ago

bgolding355 commented 2 years ago

Currently, the output is constantly automatically opening itself and displaying warnings that do not seem to matter.

For example:

[Error - 11:38:55 a.m.] lsp:no handler for:  SCancelRequest
[Error - 11:40:52 a.m.] lsp:no handler for:  SCancelRequest
[Error - 11:40:53 a.m.] lsp:no handler for:  SCancelRequest
[Error - 11:40:54 a.m.] lsp:no handler for:  SCancelRequest

This is a bit annoying. It would be useful to have some way of hiding this

SnO2WMaN commented 2 years ago

I have a similar problem about STextDocumentDidChange, in dhall-lsp-server 1.0.16

bgolding355 commented 2 years ago

@SnO2WMaN did you manage to find any workaround for this?

SnO2WMaN commented 2 years ago

This problem is still unresolved, and I get frequent crashes associated with this problem (I'd like to start an Issue soon), does anyone know the proper haskell-lsp-server and vscode extension version pair?

sjakobi commented 2 years ago

CC @Gabriella439.

I'm still largely unfamiliar with LSP and therefore not of much help with this issue.

@bgolding355, @SnO2WMaN, would you possibly be interested in helping with maintenance on dhall-lsp-server and/or this plugin? I think it's been a bit under-maintained for a while.

SnO2WMaN commented 2 years ago

@sjakobi

I am interested in dhall itself, and it is quite stressful to not be able to write it satisfactorily in VSCode, so I am open to contributing to its maintenance, but I do not have much knowledge around VSCode and LSP...

PanAeon commented 2 years ago

This problem is still unresolved, and I get frequent crashes associated with this problem (I'd like to start an Issue soon), does anyone know the proper haskell-lsp-server and vscode extension version pair?

This extension doesn't contain any specific logic except finding dhall-lsp-server executable and setting up editor commands. So it's version doesn't matter much, users should just use the latest version. This is really a blessing as developers don't have to dive into unpure typescript code each time the server is released.

Gabriella439 commented 2 years ago

@bgolding355: How did you install dhall-lsp-server?

SnO2WMaN commented 2 years ago

As mentioned in the Issue above, perhaps this problem can be fixed with this fix https://github.com/dhall-lang/dhall-haskell/commit/f45042ba1438d471c5ecaa2d0e38d309fa028adc It is possible that the problem has been fixed. In other words, by building and specifying this version of dhall-lsp-server myself, Output no longer opens automatically and no longer crashes frequently.

bgolding355 commented 2 years ago

@Gabriella439 I believe that I installed it with cabal.

I will try @SnO2WMaN's suggestion. Assuming this works, https://github.com/dhall-lang/vscode-dhall-lsp-server#installation should be updated to say which versions of dhall-lsp-server are compatible

Gabriella439 commented 2 years ago

@bgolding355: Could you try downloading dhall-lsp-server from our release page:

https://github.com/dhall-lang/dhall-haskell/releases

bgolding355 commented 2 years ago

@Gabriella439 downloading from dhall-lang works. Thanks

coderfromhere commented 2 years ago

I'm still seeing the following errors in the output which automatically switches my tabs from a terminal to the output view:

..Dhall LSP Server has been started..
[Error - 12:33:15 PM] lsp:no handler for:  SInitialized
[Error - 12:33:15 PM] lsp:no handler for:  SWorkspaceDidChangeConfiguration
[Error - 12:34:15 PM] lsp:no handler for:  SCancelRequest
[Error - 12:34:21 PM] lsp:no handler for:  STextDocumentDidChange
[Error - 12:34:22 PM] lsp:no handler for:  STextDocumentDidChange

dhall-lsp-server is installed via Nix, the latest 1.1.1 release.

VS Code folks suggest it's always about a plugin https://github.com/microsoft/vscode/issues/34221

Gabriella439 commented 2 years ago

Hmmm, I'm not able to reproduce with dhall-lsp-server-1.1.1. For reference, here is the Nix configuration I used to test it:

let
  nixpkgs = builtins.fetchTarball {
    url    = "https://github.com/NixOS/nixpkgs/archive/09c32b0bda4db98d6454e910206188e85d5b04cc.tar.gz";
    sha256 = "1w7bkh13mdwm5cssqfbg4b9wfscsbm5l666r0sr2j8jnsr94kn7j";
  };

  config = {
    allowUnfree = true;
  };

  overlay = pkgsNew: pkgsOld: {
    vscode-with-extensions = pkgsOld.vscode-with-extensions.override {
      vscodeExtensions = [
        pkgsNew.vscode-extensions.dhall.dhall-lang
        pkgsNew.vscode-extensions.dhall.vscode-dhall-lsp-server
      ];
    };
  };

  pkgs = import nixpkgs { inherit config; overlays = [ overlay ]; };

in
  { inherit (pkgs)
      dhall-lsp-server
      vscode-with-extensions
    ;
  }

My best guess is that it has something to do with the VSCode plugin rather than dhall-lsp-server.