LSP Mode
This commit is contained in:
parent
5754054eba
commit
d5d73ff33f
37
config.org
37
config.org
|
|
@ -405,6 +405,13 @@ Install the package, enable it and ensure that it always is installed, and then
|
||||||
:init
|
:init
|
||||||
(company-quickhelp-mode))
|
(company-quickhelp-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
**** Company Box
|
||||||
|
Company Box Mode is a mode that gives Company menu options icons.
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package company-box
|
||||||
|
:ensure t
|
||||||
|
:hook (company-mode . company-box-mode))
|
||||||
|
#+END_SRC
|
||||||
** Multiple Cursors
|
** Multiple Cursors
|
||||||
The Multiple Cursors package is pretty self explanatory, you can select and manipulate multiple lines of the same text at the same time, move the cursors in unison. Etc.
|
The Multiple Cursors package is pretty self explanatory, you can select and manipulate multiple lines of the same text at the same time, move the cursors in unison. Etc.
|
||||||
Install the package, enable it and ensure that it always is installed, and then bind the useful functions to a mnenomic key chord:
|
Install the package, enable it and ensure that it always is installed, and then bind the useful functions to a mnenomic key chord:
|
||||||
|
|
@ -426,13 +433,16 @@ Install the package, enable it and ensure that it always is installed, and then
|
||||||
("C-c e" . 'er/expand-region))
|
("C-c e" . 'er/expand-region))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** LSP Mode
|
** LSP Mode
|
||||||
LSP mode will give you IDE capabilities in Emacs, using Microsoft's Universal Language Server Protocol. The same one that VSCode uses for linting, autocompletion. Etc.
|
LSP mode will give you IDE capabilities in Emacs, using Microsoft's
|
||||||
Install the package, enable it and ensure that it always is installed, add a hook to make sure it only is activated on Programming Related Major Modes, and set a keychord for the custom prefix.
|
Universal Language Server Protocol. The same one that VSCode uses for
|
||||||
+BEGIN_SRC emacs-lisp
|
linting, autocompletion. Etc. Install the package, enable it and
|
||||||
|
ensure that it always is installed, add a hook to make sure it only is
|
||||||
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
|
activated on Programming Related Major Modes, and set a keychord for
|
||||||
(setq lsp-keymap-prefix "s-l")
|
the custom prefix. Please check
|
||||||
|
`https://github.com/emacs-lsp/lsp-mode#installation` for instructions
|
||||||
|
on how to install the Programming Language Servers that you want.
|
||||||
|
*** Lsp Mode
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
|
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
|
||||||
|
|
@ -440,10 +450,13 @@ Install the package, enable it and ensure that it always is installed, add a hoo
|
||||||
;; if you want which-key integration
|
;; if you want which-key integration
|
||||||
(lsp-mode . lsp-enable-which-key-integration))
|
(lsp-mode . lsp-enable-which-key-integration))
|
||||||
:commands lsp)
|
:commands lsp)
|
||||||
+END_SRC
|
|
||||||
|
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
|
||||||
|
(setq lsp-keymap-prefix "s-l")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Configuration
|
*** Configuration
|
||||||
+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; optionally
|
;; optionally
|
||||||
(use-package lsp-ui :commands lsp-ui-mode
|
(use-package lsp-ui :commands lsp-ui-mode
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
@ -454,11 +467,11 @@ Install the package, enable it and ensure that it always is installed, add a hoo
|
||||||
;; if you are ivy user
|
;; if you are ivy user
|
||||||
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol
|
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol
|
||||||
:ensure t)
|
:ensure t)
|
||||||
(use-package lsp-treemacs :commands lsp-treemacs-errors-list
|
;;(use-package lsp-treemacs :commands lsp-treemacs-errors-list
|
||||||
:ensure t)
|
;; :ensure t)
|
||||||
|
|
||||||
;; optionally if you want to use debugger
|
;; optionally if you want to use debugger
|
||||||
(use-package dap-mode
|
(use-package dap-mode
|
||||||
:ensure t)
|
:ensure t)
|
||||||
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
|
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
|
||||||
+END_SRC
|
#+END_SRC
|
||||||
|
|
|
||||||
2
init.el
2
init.el
|
|
@ -55,7 +55,7 @@
|
||||||
'(objed-cursor-color "#874804")
|
'(objed-cursor-color "#874804")
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(quote
|
(quote
|
||||||
(bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package)))
|
(omnisharp csharp-mode bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package)))
|
||||||
'(pdf-view-midnight-colors (quote ("#655370" . "#fbf8ef")))
|
'(pdf-view-midnight-colors (quote ("#655370" . "#fbf8ef")))
|
||||||
'(rustic-ansi-faces
|
'(rustic-ansi-faces
|
||||||
["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"])
|
["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue