Giter VIP home page Giter VIP logo

nvim-luapad's Introduction

Hello everyone! I'm Rafał 👋

  • For the past decade, I have primarily been a backend developer (Ruby on Rails for life!), but I've had plenty of adventures with frontend:

  • Vue, React, Svelte, jQuery - you name it! I even remember CoffeeScript! Although not very well. 🤔

  • Lua fanboy and proud Neovim user. I've also made some plugins myself.

  • From time to time, I try my hand at C (love/hate relationship with ATTiny13 μC), Go, and Rust.


📔 Feel free to check out my blog posts: here.


Ruby JavaScript Lua Go C

nvim-luapad's People

Contributors

ck3d avatar jacobsimpson avatar oeyoews avatar rafcamlet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nvim-luapad's Issues

preview window size

How can I change the preview window size?

:set previewheight=100
does not work

Do not wipe Luapad buffers

Could you add and option to allow Luapad buffers be hidden? I just lost some amount of
work because of forget that Luapad buffers wipe when become hidden and switch the buffer
in a window.

I can make it manualy with next autocommand:

vim.api.nvim_create_autocmd('BufEnter', {                                                
   pattern = '*_Luapad.lua',                                                             
   command = 'setlocal bufhidden=hide'                                                   
})                                                                                       

But it will be more consistent if there was such an option.

Changing config after starting luapad instance?

Hey @rafcamlet. Thank you for this plugin, it has saved me a lot of time.

Regarding the new v2 API, are we able to change the settings for the current luapad instance after it has been started with require('luapad').attach({}) or require('luapad/evaluator'):new{}:start()??

The only way I've been able to change config values for eval_on_change, eval_on_move is at nvim startup with:
require 'luapad'.config{ eval_on_move = true }

Unless I'm missing something?

Plugin does not work at all if installed system-wide

This definition of path function, which is used to generate path to temporary
lua file does not work if plugin is installed into system-wide (or, to be more
precise, in read-only) directory.

local function path(...)
  local str = debug.getinfo(2, "S").source:sub(2)
  root = str:match(("(.*)lua%sluapad.lua"):format(sep))
  return root .. table.concat({...}, (sep))
end

In which case create_file would raise error about fd being nil, since
vim.loop.fs_open returns (descriptor, error) pair, and returns nil descriptor
on failure.

local function create_file(f)
  local fd = vim.loop.fs_open(f, "w", 438)
  vim.loop.fs_close(fd)
end

Probably the simplest fix to the problem would be to use normal temporary
directory, random file name and 0600 file mode. I can make pull request with
these changes, and it will work on Unix. I have zero knowledge about Windows.

"File no longer available" every time I launch a Luapad

Every time I invoke :Luapad, after a moment, I get an error like this:

E211: File "~/.local/share/nvim/plugged/nvim-luapad/tmp/Luapad_2.lua" no longer available

Any idea what could be causing this, or how I could avoid it?

Activate luapad in current buffer

Hi there, I've been using luapad for few days now, and I got to say, it saved tone of reloads and print statements. And also it helping understand my code better.

I wonder if its possible to have luapad activated in current buffer/file. I found having to copy things back and forth between luapad buffer and the buffer I'm working on is a bit annoying.
Thanks!!

CursorHold issues

FYI, CursorHold is a bit bugged in neovim: neovim/neovim#12587

There's a plugin that fixes these issues. Since Luapad (partly) depends on CursorHold it might be a good idea to inform users about the issue and workaround.

Completion not working for vim.bo.<Tab>

I'm not sure if this is particular to my config, but I get the error below when I try to run :vim.bo.

image

I just wanted to lyk! Thanks for the amazing plugin.

Is there a way to add default abbreviation or open luapad with common local variables?

Hi @rafcamlet , hope your having an awesome weekend.

I noticed that I'm heavily some abbreviation like vim.fn = vfn or p = require'pkg', and when I want to test something from my code into luapad I often do :%s/vfn/vim.fn/ge<cr>, which is a bit of a drudgery, given the fact that I close and open luapad a lot.

Is there a way to add default abbreviation, or make luapad launch with a set of local abbreviation or require statement.

Thanks

Remove gifs/ next step.

To complete remove 'gifs/' Install git-filter-repo.
Copy this repository to new folders, and run this commands.

'''bash
git filter-repo --invert-paths --path gifs/ --force
'''

This command will remove gifs/ from history. I recommend doing it only with a copy of the repository!

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.