Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insertion not deleting text entered to get candidates #113

Open
seanhagen opened this issue May 16, 2019 · 3 comments
Open

Insertion not deleting text entered to get candidates #113

seanhagen opened this issue May 16, 2019 · 3 comments

Comments

@seanhagen
Copy link

Just updated emacs to these versions:

  company-lsp           20190505.615
  company               20190430.1852

And some weird behavior is happening now -- the letters I type before selecting a completion candidate are not replaced by the selected candidate.

I'll post my configs below, but here are the steps to reproduce:

Step 1

Start typing something that brings up a list of completion candidates
step1

Step 2

Type the first few characters of one of the candidates
step2

Step 3

Select a candidate
step3
See the extra Co at the end of the line? That's what was typed in before selecting the candidate. Seems like company isn't replacing what was typed, just inserting.

Config

This is happening with the gopls server.

This is using company, company-lsp, and lsp ( don't know if this is because of lsp or something else, but I figured I'd post that config too:

(use-package lsp-mode
  :ensure t
  :commands lsp
  :defer t
  :config
  (setq lsp-eldoc-enable-hover t
        lsp-eldoc-enable-signature-help t
        lsp-eldoc-prefer-signature-help t
        lsp-response-timeout 5)
  :init
  (setq lsp-prefer-flymake :none))

(use-package lsp-ui
  :ensure t
  :defer t
  :commands lsp-ui-mode
  :config
  (setq lsp-ui-doc-enable nil
        lsp-ui-peek-enable nil
        lsp-ui-sideline-enable nil
        lsp-ui-peek-always-show nil))

(use-package company-lsp
  :ensure t
  :defer t
  :commands company-lsp)

(use-package company
  :demand
  :diminish company-mode
  :init
  (global-company-mode 1)
  :config
  (global-company-mode 1)
  (setq company-idle-delay 0.1
        company-tooltip-limit 20
        company-minimum-prefix-length 2
        company-echo-delay 0
        company-begin-commands '(self-insert-command)
        company-tooltip-flip-when-above t
        company-backends (delete 'company-dabbrev company-backends))
  :bind ("C-<tab>" . company-complete))

And from where stuff changed by customize-group gets saved:

 '(company-backends
   (quote
    (company-go company-irony-c-headers company-c-headers company-arduino company-tern company-irony-c-headers company-c-headers company-arduino company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-files
                (company-dabbrev-code company-gtags company-etags company-keywords)
                company-oddmuse)))
 '(company-go-gocode-command "/home/sean/Code/Go/bin/gocode")
 '(company-go-show-annotation t)
 '(company-idle-delay 0.7)
 '(company-lsp-enable-recompletion t)
 '(company-quickhelp-delay 0.2)

 '(lsp-clients-go-library-directories (quote ("/usr" "/usr/local/go")))
 '(lsp-clients-go-server "/home/sean/Code/Go/bin/gopls")
 '(lsp-go-executable-path "/home/sean/Code/Go/bin")
 '(lsp-prefer-flymake :none)
 '(lsp-response-timeout 5)
 '(lsp-ui-doc-enable nil)
 '(lsp-ui-doc-use-childframe nil)
 '(lsp-ui-doc-use-webkit nil)
 '(lsp-ui-imenu-enable nil)
 '(lsp-ui-peek-enable nil)
 '(lsp-ui-sideline-delay 1)
 '(lsp-ui-sideline-enable nil)

This may be the same issue as #107?

@seanhagen
Copy link
Author

Actually, found this exact problem on the gopls issue tracker: golang/go#32078

@yyoncho
Copy link
Contributor

yyoncho commented May 16, 2019

install yasnippet. If you use the latest lsp-mode it will yield a warning if you have the snippets enabled but no yasnippet installed.

@dgutov
Copy link

dgutov commented May 17, 2019

Maybe whatever code that checks lsp-enable-snippets should also check whether yasnippet is installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants