manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.45k stars 208 forks source link

Cannot be used along with Helm's `display-buffer-in-own-frame` feature #1035

Closed hexclover closed 1 month ago

hexclover commented 1 month ago

I use Emacs 29.4 (PGTK variant) under Plasma Wayland on NixOS (will try to reproduce on other distros when I have time). When I load both Helm and lsp-bridge, Helm's helm-display-buffer-in-own-frame (which pops up a new frame to ask for completion) cannot work, but produces an error: Wrong type argument: window-live-p, nil:

image

This is the normal behavior (can be reproduced by not loading lsp-bridge in the attached init.el):

image

flake.nix:

{
  description = "A very basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs =
    { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in
    { 
      devShells.${system}.default = pkgs.mkShell {
        packages = with pkgs; [
          ((emacsPackagesFor emacs29-pgtk).emacsWithPackages (epkgs: with epkgs; [ helm lsp-bridge ]))

        ];
      };
    };
}

init.el:

(package-initialize)

(use-package helm
  :ensure t
  :bind (("M-x" . helm-M-x))
  :custom
  (helm-mode t)
  :config
  (setq helm-display-function 'helm-display-buffer-in-own-frame))

(use-package lsp-bridge)
manateelazycat commented 1 month ago

I don't use helm, can't help you.