Giter Site home page Giter Site logo

Comments (5)

iquiw avatar iquiw commented on July 20, 2024

I agree we need better handling in such case by ghc-mod, by company-ghc, or both.
I have no specific idea for now though.

As for the last question, company-dabbrev-code might help, which is included in company-mode.
Quote from docstring:

dabbrev-like `company-mode' back-end for code.
The back-end looks for all symbols in the current buffer that aren't in
comments or strings."

See https://github.com/iquiw/company-ghc#4note for the example setting.

from company-ghc.

mwotton avatar mwotton commented on July 20, 2024

beautiful, that did the trick. Unfortunately it seems to extend it to all buffers - ie, anything that's in any currently open buffer is a target, which isn't quite what I want. Still, too many options is better than not enough. Thanks!

from company-ghc.

iquiw avatar iquiw commented on July 20, 2024

company-backends can be buffer local.
If you set it by e.g. M-: (setq-local company-backends '(company-dabbrev-code)), it won't affect to other buffers.

from company-ghc.

iquiw avatar iquiw commented on July 20, 2024

Sorry, I misunderstood your comment.

from company-ghc.

iquiw avatar iquiw commented on July 20, 2024

I think company-dabbrev-code-other-buffers can control the behavior though I have not tried it.

from company-ghc.

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.