Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.11 KB | None | 0 0
  1. (use-package lsp-mode
  2.     :ensure t
  3.     :defer t
  4.     :commands lsp
  5.     :hook
  6.         (python-mode . lsp)
  7.         (rust-mode . lsp)
  8.         (java-mode . lsp)
  9.     :config
  10.         ;(setq lsp-log-io t)
  11.         (setq lsp-prefer-flymake nil
  12.               lsp-restart 'auto-restart
  13.               lsp-enable-snippet nil
  14.               lsp-enable-xref t
  15.               lsp-keep-workspace-alive t
  16.               lsp-enable-on-type-formatting t
  17.               lsp-imenu-show-container-name t
  18.               lsp-enable-file-watchers t
  19.               lsp-eldoc-render-all nil
  20.               lsp-enable-symbol-highlighting nil
  21.               lsp-signature-render-all nil
  22.               lsp-enable-imenu t)
  23.        
  24. )
  25.  
  26. (use-package company
  27.     :ensure t
  28.     :diminish
  29.     :config
  30.         (setq company-minimum-prefix-length 1
  31.               company-auto-complete nil
  32.               tab-always-indent 'complete
  33.               company-idle-delay .2
  34.               company-require-match nil
  35.               company-tooltip-limit 15
  36.               company-tooltip-align-annotations t)
  37.         (setq company-global-modes '(not shell-mode eshell))
  38.        
  39.         (global-company-mode t)
  40.         (define-key company-active-map (kbd "TAB") 'company-complete-common-or-cycle)
  41.         (define-key company-active-map (kbd "<tab>") 'company-complete-common-or-cycle)
  42.         (define-key company-active-map (kbd "S-TAB") 'company-select-previous)
  43.         (define-key company-active-map (kbd "<backtab>") 'company-select-previous)
  44. )
  45.  
  46. (use-package company-lsp
  47.     :ensure t
  48.     :defer t
  49.     :diminish
  50.     :requires company
  51.     :commands (company-lsp)
  52.     :hook (python-mode-hook . company-lsp)
  53.     :init (push 'company-lsp company-backends)
  54.     :config
  55.         (setq company-transformers nil
  56.               company-lsp-enable-snippet nil
  57.               company-lsp-cache-candidates nil
  58.               company-lsp-async t
  59.               )
  60. )
  61.  
  62. (use-package lsp-ui
  63.     :ensure t
  64.     :after lsp
  65.     :diminish
  66.     :commands (lsp-ui-mode)
  67.     :config
  68.         (setq lsp-ui-doc-enable nil
  69.               lsp-ui-sideline-enable nil
  70.               lsp-ui-doc-position 'bottom
  71.               lsp-ui-doc-use-childframe t
  72.               lsp-ui-doc-aligment 'frame
  73.               lsp-ui-doc-delay 5)
  74. )
  75.  
  76. (use-package pyvenv
  77.     :ensure t
  78.     :defer t
  79.     :diminish
  80.     :config
  81.         (setenv "WORKON_HOME" pyworkon-venvs-folder)
  82.         (setq pyvenv-mode-line-indicator '(pyvenv-virtual-env-name ("[venv:" pyvenv-virtual-env-name "] ")))
  83.         (pyvenv-mode t)
  84. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement