Skip to content

Commit

Permalink
Remove some unused dev in docker settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahobson committed Oct 14, 2023
1 parent 7eeebb5 commit 32d5178
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@

(use-package graphql-mode)

;; typescript-language-server checks to see if the client process id
;; is still alive, and that doesn't work inside a docker container
(defun my-emacs-pid (orig-emacs-pid &rest args)
"Hack for lsp typescript-language-server inside docker or returning ORIG-EMACS-PID (as ARGS)."
(if (and lsp--cur-workspace (not (file-exists-p "nix")))
1
(apply orig-emacs-pid args)))

;; lsp now tries to find the tsserver, which we have in docker
(defun my-tsserver-path (path)
"Hack for lsp tsserver inside docker using PATH."
(let ((default-directory (projectile-project-root)))
(file-truename path)))

(use-package lsp-pyright
:ensure t
:hook (python-mode . (lambda ()
Expand All @@ -109,7 +95,6 @@
(setq lsp-prefer-flymake nil)
(setq read-process-output-max (* 1024 1024))
(setq gc-cons-threshold 1600000)
(advice-add 'emacs-pid :around #'my-emacs-pid)
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.pre-commit-cache\\'")
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.gopath\\'")
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.npmglobal\\'")
Expand All @@ -129,12 +114,6 @@
(setq lsp-sqls-connections
'(((driver . "postgresql") (dataSourceName . "host=127.0.0.1 port=5432 user=postgres dbname=dev_db sslmode=disable"))))

;; (eval-after-load 'lsp-clients
;; '(progn
;; (plist-put lsp-deps-providers :docker (list :path #'my-tsserver-path))
;; (lsp-dependency 'typescript `(:docker
;; "./node_modules/typescript/bin/tsserver"))))

:commands lsp lsp-deferred)
(use-package lsp-ui
:commands lsp-ui-mode)
Expand Down

0 comments on commit 32d5178

Please sign in to comment.