Code Monkey home page Code Monkey logo

Comments (5)

rranelli avatar rranelli commented on July 22, 2024

I'm not very familiar with company myself (just switched after a long time with ac-mode) but I will try to take a look at this problem as soon as possible.

from alchemist.el.

jtmoulia avatar jtmoulia commented on July 22, 2024

@semanticart company-mode should continue to the next backend if the current backend doesn't return a match. So! something is broken. I don't know if it'll matter, but what value do you have alchemist-project-compile-when-needed set to?

Hey @rranelli -- I was playing with company-mode the other day and can look into this.

from alchemist.el.

semanticart avatar semanticart commented on July 22, 2024

Thanks, guys. I'm not setting that variable anywhere.

alchemist-project-compile-when-needed is a variable defined in alchemist-project.el'.
Its value is nil`

setting it to t does not appear to change anything

from alchemist.el.

jtmoulia avatar jtmoulia commented on July 22, 2024

Looking through the doc for the company-backends var (super useful), turns out I was wrong when I said company-mode should go to the next backend of the current backend doesn't return a match. It looks like company will only go to the next backend if the current backend returns nil as the completion prefix.

If it's in an elixir buffer, alchemist's company backend uses alchemist-help--exp-at-point to get the prefix, which will return whatever string is under the cursor. So, in an elixir buffer it won't move on to the next backend.

A simple solution: you can use the interactive command company-other-backend to skip the current backend. It's not as easy as company doing it for you, but if you bind it to a key it shouldn't be too bad.

Alternatively the alchemist backend's prefix command could have more logic for when to return nil, but unless it actually checks candidates (bad. would block.) it won't do what you want.

from alchemist.el.

semanticart avatar semanticart commented on July 22, 2024

Thanks @jtmoulia. I'll probably take the reverse approach and remove alchemist-company from the backend list and invoke it via keypress.

from alchemist.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.