mirror of
				https://github.com/larstvei/dot-emacs.git
				synced 2025-11-04 01:20:11 +00:00 
			
		
		
		
	LSP mode
This commit is contained in:
		
							parent
							
								
									eb85be84ea
								
							
						
					
					
						commit
						ef2f89b752
					
				
							
								
								
									
										20
									
								
								init.org
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								init.org
									
									
									
									
									
								
							@ -203,6 +203,8 @@
 | 
				
			|||||||
             helm-swoop           ; Efficiently hopping squeezed lines
 | 
					             helm-swoop           ; Efficiently hopping squeezed lines
 | 
				
			||||||
             jedi                 ; Python auto-completion for Emacs
 | 
					             jedi                 ; Python auto-completion for Emacs
 | 
				
			||||||
             js2-mode             ; Improved JavaScript editing mode
 | 
					             js2-mode             ; Improved JavaScript editing mode
 | 
				
			||||||
 | 
					             lsp-mode             ; LSP mode
 | 
				
			||||||
 | 
					             lsp-java             ; Java support for lsp-mode
 | 
				
			||||||
             magit                ; control Git from Emacs
 | 
					             magit                ; control Git from Emacs
 | 
				
			||||||
             markdown-mode        ; Emacs Major mode for Markdown-formatted files
 | 
					             markdown-mode        ; Emacs Major mode for Markdown-formatted files
 | 
				
			||||||
             maude-mode           ; Emacs mode for the programming language Maude
 | 
					             maude-mode           ; Emacs mode for the programming language Maude
 | 
				
			||||||
@ -809,6 +811,17 @@
 | 
				
			|||||||
   #+END_SRC
 | 
					   #+END_SRC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Mode specific
 | 
					* Mode specific
 | 
				
			||||||
 | 
					** LSP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   LSP mode works really well, especially with languages like Java, which
 | 
				
			||||||
 | 
					   traditionally has had quite poor Emacs support.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   #+BEGIN_SRC emacs-lisp
 | 
				
			||||||
 | 
					   (with-eval-after-load 'lsp-mode
 | 
				
			||||||
 | 
					     (define-key lsp-mode-map (kbd "C-c f") lsp-command-map)
 | 
				
			||||||
 | 
					     (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration))
 | 
				
			||||||
 | 
					   #+END_SRC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
** Compilation
 | 
					** Compilation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   I often run ~latexmk -pdf -pvc~ in a compilation buffer, which recompiles
 | 
					   I often run ~latexmk -pdf -pvc~ in a compilation buffer, which recompiles
 | 
				
			||||||
@ -980,11 +993,8 @@
 | 
				
			|||||||
   activated.
 | 
					   activated.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   #+BEGIN_SRC emacs-lisp
 | 
					   #+BEGIN_SRC emacs-lisp
 | 
				
			||||||
   (defun java-setup ()
 | 
					   (add-hook 'java-mode-hook 'lsp)
 | 
				
			||||||
     (abbrev-mode t)
 | 
					   (add-hook 'java-mode-hook 'yas-minor-mode)
 | 
				
			||||||
     (setq-local compile-command (concat "javac " (buffer-name))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   (add-hook 'java-mode-hook 'java-setup)
 | 
					 | 
				
			||||||
   #+END_SRC
 | 
					   #+END_SRC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
** Assembler
 | 
					** Assembler
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user