company-lsp icon indicating copy to clipboard operation
company-lsp copied to clipboard

company-lsp invokes completion on floating point numbers

Open CSRaghunandan opened this issue 6 years ago • 4 comments

This is quite annoying, when I'm typing a floating point number which is above the minimum prefix length for company completions, company starts auto completing after I type a .

This will trigger other company-backends like company-dabbrev-code or company-yasnippet (if you've it enabled) or company-keyword.

Is there anyway I can get company to avoid completion on numbers?

CSRaghunandan avatar Jun 23 '18 06:06 CSRaghunandan

Also there're at least 2 places where completion doesn't work well (here for c++ with cquery):

  1. Completion triggers when I type : after private, public, protected keywords in class definition, but it should not cause the most common pattern is
public:<enter>

and after <enter> is pressed, some random completion string is inserted instead of newline 2. Completion doesn't trigger for includes when I use double quotes, but it works fine for angle brackets includes

ddovod avatar Sep 28 '18 10:09 ddovod

  1. Completion doesn't trigger for includes when I use double quotes, but it works fine for angle brackets includes

This might be an issue with company-lsp. Could be an issue with cquery or your cmake/compile_commands.json configuration.

CSRaghunandan avatar Sep 28 '18 10:09 CSRaghunandan

This might be an issue with company-lsp. Could be an issue with cquery or your cmake/compile_commands.json configuration.

Accidentally found out the problem. The completion doesn't trigger when I'm typing inside closed double quotes. But it works inside double angle brackets for system includes.

No completion:

#include "SomeHea|"

Works fine (suggests includes):

#include "SomeHea|

Also works fine for both cases:

#include <SomeHea|
#include <SomeHea|>

ddovod avatar Oct 25 '18 10:10 ddovod

company-lsp disables completion in strings by default per #44. Looks like it's time to revisit the decision. Whether in-string completion is desired or not is language specific, or even semantic specific. Maybe providing a customizable option for whether or not to ignore string is the only viable solution?

tigersoldier avatar Nov 05 '18 05:11 tigersoldier