Giter Site home page Giter Site logo

prior art as a reference about reedline HOT 2 OPEN

nushell avatar nushell commented on August 23, 2024
prior art as a reference

from reedline.

Comments (2)

fdncred avatar fdncred commented on August 23, 2024 1

treesitter would be an interesting experiment, as you've outlined it.

an LSP would be cool indeed. we definitely want to add a LSP to nushell but we're not there yet. luckily, we have @jntrnr who worked on rust's RLS, i believe. we just need a jt.clone() function to get everything done.

from reedline.

nixypanda avatar nixypanda commented on August 23, 2024

One of the ways I can think of achieving this is by using treesitter. With that, we should have even better highlighting, considering it can do syntax highlighting based on an AST instead of regex-based highlighting (which ig is the popular option at present).

I don't really know how to integrate treesitter with reedline (that is something we will need to figure out).
Though I would wager the harder part would have been writing the parser for nu-shell. (Luckily for us it already exists - https://github.com/LhKipp/tree-sitter-nu).
And for other popular languages, there are already parsers, so if bash/fish/sh or any other shells decide to use reedline they should get this for little work.
Note: in addition to syntax highlighting we can also get stuff like

  • context-aware rename
  • text objects (like block, function, etc), (e.g. someone using vim mode can do stuff like cib which can mean change in block)
  • etc.

Absolutely random thought: as for the drop-down menu, I don't really know how to achieve this with the UI, but if we want to do something overkill we can integrate an LSP client (https://github.com/ebkalderon/tower-lsp) to readline so that it can do anything that an editor can.
Now the creation of a language server is going to be hard, but my assumption is that the nu-shell folks might already be thinking about it as it can add editor support for almost all the ones that people use.

from reedline.

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.