Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Autocompletion of variables in LESS not working properly #411

Closed
mikemcbride opened this issue Apr 22, 2015 · 15 comments
Closed

Autocompletion of variables in LESS not working properly #411

mikemcbride opened this issue Apr 22, 2015 · 15 comments

Comments

@mikemcbride
Copy link

When I am writing in a LESS file I am unable to autocomplete on variable names. For example, if my variable name is @primaryColor, if I type @prima then press tab, I get @prima: instead of it completing @primaryColor.

@joefitzgerald
Copy link
Contributor

@mmcbride1007 have you tried setting Default Provider to symbol?

@mikemcbride
Copy link
Author

I had not, but I just tried (changed preference and reloaded Atom) and got the same result.

@joefitzgerald
Copy link
Contributor

Pictures tell a thousand words. Got any screenshots? What version of autocomplete-plus and atom are you using?

@joefitzgerald
Copy link
Contributor

The ultimate solution here is for someone (hello @kevinsawicki?) to write a LESS provider for autocomplete-plus, similar to the CSS provider: https://github.com/atom/autocomplete-css. Alternatively, autocomplete-css seems to cater (at least partially) to scss, so perhaps it would be helpful to extend autocomplete-css to work on .less files also.

@joefitzgerald
Copy link
Contributor

I think the reason you're having an issue with @prima with SymbolProvider and FuzzyProvider is related to #333 and #395.

@mikemcbride
Copy link
Author

Sure, here's a gif. I'm running Atom 0.193.0 and Autocomplete-plus 2.12.0

autocomplete-less

@joefitzgerald
Copy link
Contributor

Could you also please post the output of apm list?

@joefitzgerald
Copy link
Contributor

... And how much of a burden would it be to post a gist with the contents of that file? Not essential, but certainly helpful.

@joefitzgerald
Copy link
Contributor

/cc @benogle

@mikemcbride
Copy link
Author

That particular one is a work file but I can put something together and show the contents of that where I'm getting the error too. apm list gives me:

Built-in Atom packages (85)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

/Users/mcbridem/.atom/packages (8)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

@joefitzgerald
Copy link
Contributor

What happens if you disable:

  • angularjs
  • emmet
  • less-autocompile
  • vim-mode

Do things start working as expected then? If so, try enabling them one-by-one (disabling the others) until you can identify the conflicting package. I'm particularly interested in emmet and vim-mode.

Oh, make sure you restart after disabling them, just in case one of them is misbehaving in their deactivate function.

@mikemcbride
Copy link
Author

Cool, I'll check that. I disabled vim-mode thinking that might do it a while ago but no luck. Emmet very well might be the culprit... stay tuned

@mikemcbride
Copy link
Author

Yep, the emmet package seems to be causing it. Good to know. Is this something we try to fix? Should I open an issue on that repo instead?

@joefitzgerald
Copy link
Contributor

I suspect this has something to do with a conflict on the keybinding. I assume you're using tab for both emmet and autocomplete-plus. You have a few options. You can switch the keybinding of either emmet or autocomplete-plus away from tab. Or you can use the rather interesting solution in #86 to use both together.

@mikemcbride
Copy link
Author

Thanks a ton! Yeah I am using tab on both. I'll check that out 😄

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

No branches or pull requests

2 participants