- 
                Notifications
    You must be signed in to change notification settings 
- Fork 90
Description
Describe the bug
When completing in a Java buffer and not using tab-indent-mode, auto completion always triggers immediately.
Maybe there is some workaround for this. For now I'll disable auto-completion for java-mode.
To Reproduce
Use this slightly altered version of lsp-start-plain to also set up company and disable tabs:
(require 'package)
(make-directory "/tmp/lsp-test" t)
(setq debug-on-error t
      no-byte-compile t
      byte-compile-warnings nil
      inhibit-startup-screen t
      package-archives '(("melpa" . "https://melpa.org/packages/")
                         ("gnu" . "https://elpa.gnu.org/packages/"))
      package-user-dir "/tmp/lsp-test"
      custom-file (expand-file-name "custom.el" package-user-dir))
;; (delete-file package-user-dir)
(let* ((pkg-list '(lsp-mode
		   lsp-ui
		   yasnippet
		   lsp-java
		   lsp-treemacs
		   flycheck
		   ;; For this problem.
		   company)))
  (package-initialize)
  (package-refresh-contents)
  (mapc (lambda (pkg)
          (unless (package-installed-p pkg)
            (package-install pkg))
          (require pkg))
        pkg-list)
  (yas-global-mode)
  ;; Don't use tabs
  (setq-default indent-tabs-mode nil)
  (add-hook 'prog-mode-hook 'lsp)
  ;; (add-hook 'kill-emacs-hook `(lambda ()
  ;; (delete-directory ,package-user-dir t)))
  )Save the file in a directory (I use ~/.emacs.d/lsp/init.el) and then start emacs with emacs --init-directory ~/.emacs.d/lsp.
Find a Java file, go to some line that has some level of indentation, hit return to open a new line, type a single char: it will immediately trigger completion.
Now re-enable indent-tabs-mode, and do the same: it will only trigger completion after three chars (the default for company-minimum-prefix-width).