emacs-lsp / lsp-docker

Scripts and configurations to leverage lsp-mode in docker environment
GNU General Public License v3.0
241 stars 34 forks source link

Unable to get setup working with Emacs 29 #84

Open cphoward opened 6 months ago

cphoward commented 6 months ago

Doing

git clone https://github.com/emacs-lsp/lsp-docker    

and

docker pull emacslsp/lsp-docker-langservers

with

;; Uncomment the next line if you are using this from source
;; (add-to-list 'load-path "<path-to-lsp-docker-dir>")
(require 'lsp-docker)

(defvar lsp-docker-client-packages
    '(lsp-css lsp-clients lsp-bash lsp-go lsp-pylsp lsp-html lsp-typescript
      lsp-terraform lsp-clangd))

(setq lsp-docker-client-configs
    '((:server-id bash-ls :docker-server-id bashls-docker :server-command "bash-language-server start")
      (:server-id clangd :docker-server-id clangd-docker :server-command "clangd")
      (:server-id css-ls :docker-server-id cssls-docker :server-command "css-languageserver --stdio")
      (:server-id dockerfile-ls :docker-server-id dockerfilels-docker :server-command "docker-langserver --stdio")
      (:server-id gopls :docker-server-id gopls-docker :server-command "gopls")
      (:server-id html-ls :docker-server-id htmls-docker :server-command "html-languageserver --stdio")
      (:server-id pylsp :docker-server-id pyls-docker :server-command "pylsp")
      (:server-id ts-ls :docker-server-id tsls-docker :server-command "typescript-language-server --stdio")))

(require 'lsp-docker)
(lsp-docker-init-clients
  :path-mappings '(("my/paths" . "/projects"))
  :client-packages lsp-docker-client-packages
  :client-configs lsp-docker-client-configs)

does not work. lsp correctly sets up the project, but the container fails to start and crashes with error 126.

Relevant Error Messages:

Warning (initialization): An error occurred while loading ‘/Users/caseyhoward/.emacs.d/init.el’:

: No such client dockerfile-ls

Commenting out the dockerfile-ls line:

 Warning (initialization): An error occurred while loading ‘/Users/caseyhoward/.emacs.d/init.el’:

: No such client ts-ls

Commenting out that line loads the init file correctly.

However, opening a python file results in

image

Everything seems to work but the VM will not start correctly (after several restarts of both the container and the docker backend).