Giter Site home page Giter Site logo

company-async-files's Introduction

Company Async Files

company-mode has a builtin company-files backend that allows for file autocompletion. However this backend is synchronous, and therefore can block the UI and leads to freezes. In my case working with large slow file systems this made company-files completley unusable, Especially with M-x shell which relies heavily on file path completion.

company-async-files provides the same completion as company-files, but asynchronously uses find in the background to get the candidates. This ensures that your user thread is never blocked by your completion backend, which is the way it should be. As an added bonus, this backend will display information about the current candidate in the minbuffer echo area.

compatibility

Since this backend relies on GNU find, it is not compatible with Windows and does not yet support TRAMP.

usage

Add company-async-files to company-backends afte installing this package. company-async-files is smart enough to know when the symbol at point is a valid filename. Therefore it is safe to use at the begining of company-backends as the first backend for completion.

customization

By default, company-async-files tries to provide two levels deep for completion candidates. However this depth search can take too long to be usefull when working on large filesystems. Therefore the depth search will be cancelled after company-async-files-depth-search-timeout (which defaults to 500 ms). If timeout occurs, company-async-files will only provide candiates in the immediate directory. This timeout value can be customized to suite your preference.

company-async-files's People

Contributors

celeritascelery avatar jsmestad avatar tjhinckl avatar

Watchers

 avatar  avatar

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.