Everything is working perfectly, until saving a file for the first time, the syntax errors will not be highlight or omitted until typing C-x C-s . also the auto-completion will not work after the first save. any any suggestions how I to solve this.
before the first save, everything is good:
now saving for the fist time and after that removing the text, the highlighting will not be omitted:
typing C-x C-s and after that the highlighted syntax errors will be omitted:
writing some text (no syntax error will show)
typing C-x C-s again and all the syntax errors will be highlighted
The workspace directory of the jdtls is the same for the eclipse IDE installed on my PC.
and if there is a way to import an already existed maven project to lsp-java I would appreciate.
GNU Emacs 26.3
Linux 5.13.0-40-generic #45~20.04.1-Ubuntu SMP x86_64 GNU/Linux
the init.el file:
;; inhibit the splash screen
(setq inhibit-splash-screen t)
;; setting the window in the middle but wider
(setq initial-frame-alist '((top . 10) (left . 185)
(width . 110) (height . 50)))
;;hiding the tool bar
(tool-bar-mode -1)
;; auto-closing brackets
(electric-pair-mode 1)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(c-default-style
(quote
((c-mode . "linux")
(java-mode . "linux")
(awk-mode . "awk")
(other . "gnu"))))
'(lsp-java-workspace-dir "/home/abd/eclipse-workspace/")
'(package-selected-packages
(quote
(helm-lsp which-key lsp-ui company flycheck projectile use-package web-mode prettier mvn multiple-cursors lsp-javacomp lsp-java js2-mode gradle-mode emmet-mode eclim))))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
;; Add color formatting to *compilation* buffer
(add-hook 'compilation-filter-hook
(lambda () (ansi-color-apply-on-region (point-min) (point-max))))
(require 'emmet-mode)
;; Auto-start on any markup modes
(add-hook 'sgml-mode-hook 'emmet-mode)
;; enable Emmet's css abbreviation.
(add-hook 'css-mode-hook 'emmet-mode)
;; enable Emmet's nxml abbreviation.
(add-hook 'nxml-mode-hook 'emmet-mode)
(add-hook 'lsp-mode-hook
(lambda ()
(local-set-key [?\M-\r] 'lsp-execute-code-action)))
(add-hook 'lsp-mode-hook
(lambda ()
(local-set-key [?\M-b] 'lsp-java-build-project)))
(global-set-key [?\M-c] 'compile)
(global-set-key (kbd "<C-dead-circumflex>") 'treemacs)
;; multiple-cursors
(require 'multiple-cursors)
(condition-case nil
(require 'use-package)
(file-error
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
(setq use-package-always-ensure t)
(require 'use-package)))
(use-package projectile)
(use-package flycheck)
(use-package yasnippet :config (yas-global-mode))
(use-package lsp-mode :hook ((lsp-mode . lsp-enable-which-key-integration))
:config (setq lsp-completion-enable-additional-text-edit nil))
(use-package hydra)
(use-package company)
(use-package lsp-ui)
(use-package which-key :config (which-key-mode))
(use-package lsp-java :config (add-hook 'java-mode-hook 'lsp))
(use-package dap-mode :after lsp-mode :config (dap-auto-configure-mode))
(use-package dap-java :ensure nil)
(use-package helm-lsp)
(use-package helm
:config (helm-mode))
(use-package lsp-treemacs)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
Everything is working perfectly, until saving a file for the first time, the syntax errors will not be highlight or omitted until typing C-x C-s . also the auto-completion will not work after the first save. any any suggestions how I to solve this.
before the first save, everything is good:![Screenshot from 2022-05-04 10-24-08](https://user-images.githubusercontent.com/62235899/166647837-1f57a7dd-3c74-44b6-8a3c-220f0be6c0ef.png)
now saving for the fist time and after that removing the text, the highlighting will not be omitted:![Screenshot from 2022-05-04 10-26-06](https://user-images.githubusercontent.com/62235899/166647876-44202675-15ba-4001-8b5b-7cd509159f6a.png)
typing C-x C-s and after that the highlighted syntax errors will be omitted:![Screenshot from 2022-05-04 10-26-19](https://user-images.githubusercontent.com/62235899/166647918-62934ac0-f9b2-413b-b568-1edd0b868ef9.png)
writing some text (no syntax error will show)![Screenshot from 2022-05-04 10-26-40](https://user-images.githubusercontent.com/62235899/166648010-558ce304-ea87-4152-af29-0bf47f2224fc.png)
typing C-x C-s again and all the syntax errors will be highlighted
The workspace directory of the jdtls is the same for the eclipse IDE installed on my PC.
and if there is a way to import an already existed maven project to lsp-java I would appreciate.
GNU Emacs 26.3
Linux 5.13.0-40-generic #45~20.04.1-Ubuntu SMP x86_64 GNU/Linux
the init.el file: