Code Monkey home page Code Monkey logo

Comments (7)

purcell avatar purcell commented on June 30, 2024

See #106 and (subsequently) 3f042ec.

from elm-mode.

purcell avatar purcell commented on June 30, 2024

Perhaps that provides a bit of context about what the trade-offs might be.

from elm-mode.

schoettl avatar schoettl commented on June 30, 2024

So eglot and elm lang server really need that for completion to work? I mean, model.state are actually two symbols, not one?

And can these programs complete JD.decode if JD is an import Json.Decoder as JD?

Do these programs also have a "jump to definition" that works with dot being a symbol constituent?

from elm-mode.

purcell avatar purcell commented on June 30, 2024

So eglot and elm lang server really need that for completion to work?

Yes, as far as I remember.

I'm not working with Elm much these days, so maybe try applying your suggested change and see what works or perhaps doesn't with elm-language-server.

from elm-mode.

schoettl avatar schoettl commented on June 30, 2024

I currently don't have time to investigate elm-language-servers behavior – I don't use it myself. I'll fix this in my own emacs config for now.

I'd suggest we leave this issue open as reference for others.

Generally, I think it's better to define the syntax entries semantically correct, i.e. "." not being a symbol constituent because most of the time it isn't. To be honest, I can hardly imagine that the language server needs multiple identifiers to be understood as one term for completion to work.

from elm-mode.

purcell avatar purcell commented on June 30, 2024

semantically correct "." not being a symbol constituent because most of the time it isn't.

In Maybe.map, the . is a symbol constituent. One would reasonably expect symbol-at-point to return Maybe.map there, not map.

I can hardly imagine that the language server needs multiple identifiers to be understood as one term for completion to work

Really? For the backend to know whether to correctly complete "ma" to "map" or something else, it needs to know whether or not that string is a prefixed symbol like Maybe.ma.

But yes, needs some testing before we can know if a change is warranted.

from elm-mode.

schoettl avatar schoettl commented on June 30, 2024

Hm, I would have seen Maybe.map as two identifiers i.e. two symbols: Maybe the identifier for the module and map the identifier for the function within the module. I thought most IDE integration tools are context-aware to a degree.

from elm-mode.

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.