Start adding lsp integration to emacs.

This commit is contained in:
jgrogan 2024-06-07 10:38:09 +01:00
parent fa30149008
commit 3a32b78c29
3 changed files with 69 additions and 1 deletions

View file

@ -27,7 +27,9 @@
(use-package markdown-mode
:ensure t
:mode ("README\\.md\\'" . gfm-mode)
:init (setq markdown-command "pandoc"))
:init
(setq markdown-command "pandoc")
(setq markdown-max-image-size '(500 . 300)))
(use-package projectile
:diminish projectile-modex
@ -44,3 +46,8 @@
(setq vc-follow-symlinks t)
(use-package auctex
:config
(setq TeX-auto-save t)
(setq TeX-parse-self t)
)

View file

@ -11,6 +11,9 @@
;; line numbers
(global-display-line-numbers-mode 1)
;; word wrap over lines
(global-visual-line-mode t)
;; Add small window fringes
(set-fringe-mode 10)

View file

@ -8,4 +8,62 @@
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package lsp-mode
:commands (lsp lsp-deferred)
:init
(setq lsp-keymap-prefix "C-c l") ;; Or 'C-l', 's-l'
:config
(lsp-enable-which-key-integration t)
)
(use-package lsp-ui
:hook (lsp-mode . lsp-ui-mode)
:custom
(lsp-ui-doc-position 'bottom))
(use-package lsp-treemacs
:after lsp)
(use-package lsp-ivy
:after lsp)
(use-package dap-mode
;; Uncomment the config below if you want all UI panes to be hidden by default!
;; :custom
;; (lsp-enable-dap-auto-configure nil)
;; :config
;; (dap-ui-mode 1)
:commands dap-debug
:config
;; Set up Node debugging
(require 'dap-python)
;; (dap-python-setup) ;; Automatically installs Node debug adapter if needed
;; Bind `C-c l d` to `dap-hydra` for easy access
(general-define-key
:keymaps 'lsp-mode-map
:prefix lsp-keymap-prefix
"d" '(dap-hydra t :wk "debugger")))
(use-package python-mode
:ensure nil
:hook (python-mode . lsp-deferred)
:custom
;; NOTE: Set these if Python 3 is called "python3" on your system!
(python-shell-interpreter "python3")
(dap-python-executable "python3")
(dap-python-debugger 'debugpy)
:config
(require 'dap-python))
(use-package pyvenv
:after python-mode
:config
(pyenv-mode 1))
(use-package php-mode
:ensure t
)
(provide 'jg-dev)