Coder Social home page Coder Social logo

tycho.nvim's People

Contributors

hkupty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tycho.nvim's Issues

Goals & non-goals

Hey!

I'd like to discuss where this should be going eventually, so we can work out how the api should look like and such. I'm not intimately familiar with mappings, but I went through https://neovim.io/doc/user/map.html for some overview. Quite some things.

So, as a first goal I'd define this:

Provide a lua api to the map family where {rhs} is a lua function

If {rhs}, isn't a lua function, it's already pretty usable from vim.api.nvim_command. I assume we can limit ourselves to <Cmd> mappings, because the lua function can easily check for the mode and do nothing if inappropriate. Or is that assuming too much? Am I missing something?

So in it's simplest incarnation, the following should work imho (name of course non-final):

vim.lua_api.lua_map("<F2>", my_lua_function)

Thoughts:

  • See which of "buffer", "nowait", "silent", "script", "expr" and
    "unique" we need to incorporate, and in which way. My first intuition is an optional array of strings.
    • Maybe we should forego "" and make a different function vim.lua_api.buf_lua_map where you can choose the buffer (default current; maybe that's not great because "" works on the curbuf, so we'd need to change that temporarily).
    • "script" and "expr" don't make sense in our scope, right?
  • Do we need a variant of "SID" to prevent name conflicts? Not sure what that does when used from nvim_command. Same about "Plug".

You said something about reuseability, which is why you set up things the way you did. Can you elaborate on that? I did not really understand what you were after.

My pretty limited imagination says that the next step would be to provide something similiar for user commands, but let's take one step after the other :)

Archiving

I'm archiving this repository to keep the reference and discussion. I couldn't really devote the right time to it and neovim took a really nice path forward with lua support without needing the investments I was willing to make.

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.