Archived entries from file /home/ape/dotfiles/emacs.org
Provides language backend to company-mode.
(use-package lsp-mode
:commands (lsp)
:hook ((sh-mode . lsp-mode)
(python-mode . lsp-mode)
(c-mode . lsp-mode)
(c++-mode . lsp-mode)
(markdown-mode . lsp-mode)
(cmake-mode . lsp-mode))
:init
(setq lsp-keymap-prefix "C-c l") ;; or "C-l"
:custom ((lsp-idle-delay 0.5)) ;; 0.5 is the defualt
:config
(lsp-enable-which-key-integration t)
;; Annoying stuff (uncomment to turn off)
;; (setq lsp-enable-links nil)
;; (setq lsp-signature-render-documentation nil)
(setq lsp-headerline-breadcrumb-enable nil)
;; (setq lsp-ui-doc-enable nil)
;; (setq lsp-completion-enable-additional-text-edit nil)
;; `-background-index' requires clangd v8+!
(setq lsp-clients-clangd-args '("-j=4" "-background-index" "-log=error"))
)The last line concerning cangd comes from mortens.dev.
Provides additional lsp information to the company-mode box. The mode provides info when hoovered by mouse. lsp-ui documentation
Note: Functions also display the proceeding C++ function comments as documentation
(use-package lsp-ui
:after lsp
:hook (lsp-mode . lsp-ui-mode)
:custom
(lsp-ui-doc-position 'bottom))lsp-ivy integrates Ivy with lsp-mode to make it easy to search for things by name in your code. When you run these commands, a prompt will appear in the minibuffer allowing you to type part of the name of a symbol in your code. Results will be populated in the minibuffer so that you can find what you’re looking for and jump to that location in the code upon selecting the result.
Try these commands with M-x:
lsp-ivy-workspace-symbol- Search for a symbol name in the current project workspacelsp-ivy-global-workspace-symbol- Search for a symbol name in all active project workspaces.
(use-package lsp-ivy
:after lsp)Shows file contents: classes functions etc
- See lsp-treemacs-references
(use-package lsp-treemacs
:after lsp)Like lsp-mode but for debuggers.
(use-package dap-mode
:after lsp
:commands dap-mode)(use-package flycheck
:hook ((emacs-lisp-mode . flycheck-mode))
:diminish flycheck-mode
:after lsp)Gives warning on startup for login. lsp-grammarly doc
(use-package lsp-grammarly
:ensure t
:hook (text-mode . (lambda ()
(require 'lsp-grammarly)
(lsp))))Works w/o being logged in. flycheck-grammarly doc
(use-package flycheck-grammarly
:config
(setq flycheck-grammarly-check-time 0.8))- The modeline, when un-selected, has the same background as files, making it hard to delineation between vertically split windows.
(use-package doom-themes
:defer t )
(defun jmn-load-dark+()
"Theme for very light time"
(interactive)
(disable-theme (car custom-enabled-themes))
(load-theme 'doom-dark+ t)
(set-face-background 'line-number
(face-attribute 'default :background))
;; default does not change filename settings when modified
(set-face-foreground 'doom-modeline-buffer-modified "red")
(with-eval-after-load 'org
;; (set-face-foreground 'org-priority (face-foreground font-lock-builtin-face))
(setq org-todo-keyword-faces
`(("NEXT" . ,(face-foreground font-lock-function-name-face))
("HOLD" . "dark orange")))))Reference and https://github.com/jkitchin/scimax Cannot get zmq (Jupyter dependency) to work currently
(use-package jupyter
:after (org))
(org-babel-do-load-languages 'org-babel-load-languages
(append org-babel-load-languages
'((jupyter . t))))If I use EIN, add the setting for displaying the figures inline.
(use-package ein
:commands (ein:notebooklist-open)
;; :config
;; (require 'ein-loaddefs)
;; (require 'ein)
;; (define-key ein:notebook-mode-map (kbd "<C-tab>") 'my-function)
)In EIN video, Miller says that the completion is based on auto-complete rather than company. So here we are going to try to get completion setup for EIN.
Also, in EIN github, Miller says that EIN is an elpy module, so maybe we need elpy for completion?