basic lsp config, add python to lsp config

This commit is contained in:
KemoNine 2023-07-27 17:04:25 -04:00
parent 554d5e62c2
commit a7b0aa02ca
2 changed files with 20 additions and 2 deletions

3
.gitignore vendored
View File

@ -15,4 +15,5 @@ code/projects
**/projectile.cache
**/.persistent-scratch*
**/url
**/eshell
**/eshell
**/.lsp-session*

View File

@ -73,7 +73,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; additional packages
(add-to-list 'package-selected-packages
'(helm-lsp lsp-ui lsp-mode json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
'(helm-xref helm-lsp lsp-ui lsp-mode json-mode python-mode powershell rust-mode origami go-mode yaml-mode lua-mode)
)
(when (not kmn/is-dayjob)
(add-to-list 'package-selected-packages
@ -89,6 +89,23 @@
; tab line via centaur tabs
(centaur-tabs-mode t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; lsp-mode
(use-package lsp-mode
:init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "C-SPC")
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
(python-mode . lsp-deferred)
;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp lsp-deferred)
;; optionally
(use-package lsp-ui :commands lsp-ui-mode)
;; if you are helm user
(use-package helm-lsp :commands helm-lsp-workspace-symbol)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; programming
; code folding