   :hook (typescript-mode . prettier-js-mode))
 
 ;; Language Server Protocol
-(use-package eglot
-  :ensure t)
-;; eglot temporary fix
-(defun project-root (project)
-  (car (project-roots project)))
-(add-hook 'go-mode-hook 'eglot-ensure)
+;; (use-package eglot
+;;   :ensure t)
+;; ;; eglot temporary fix
+;; (defun project-root (project)
+;;   (car (project-roots project)))
+;; (add-hook 'go-mode-hook 'eglot-ensure)
+
+;; if you want to change prefix for lsp-mode keybindings.
+(setq lsp-keymap-prefix "C-c l")
+(use-package lsp-mode
+    :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
+            (go-mode . lsp)
+            (typescript-mode . lsp)
+            ;; if you want which-key integration
+            (lsp-mode . lsp-enable-which-key-integration))
+    :config
+    (setq lsp-completion-provider :capf)
+    (setq lsp-idle-delay 0.500)
+    (setq lsp-ui-doc-enable nil)
+    (setq lsp-lens-enable nil)
+    (setq lsp-headerline-breadcrumb-enable nil)
+    (setq lsp-signature-render-documentation nil)
+    :commands lsp)
+
 
 
 ;;; Text Editing visual

;; formats the buffer before saving
;; (add-hook 'before-save-hook 'tide-format-before-save); using prettier for now
;; tide
(use-package tide
  :ensure t
  :after (typescript-mode company flycheck)
  :hook ((typescript-mode . tide-setup)
         (typescript-mode . tide-hl-identifier-mode)))
         ;; (before-save . ab/tslint-fix-file)) ;; prettier is better at this
;; prettier
(use-package prettier-js
  :ensure t

;;; auto tail log files
(add-to-list 'auto-mode-alist '("\\.log\\'" . auto-revert-mode))


;;; fine tuning
;;; gotten from https://emacs-lsp.github.io/lsp-mode/page/performance/
(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024)) ;; 1mb


;;; init.el ends here
(custom-set-variables
 ;; custom-set-variables was added by Custom.
