Git Product home page Git Product logo

spaceless.nvim's Issues

Argument "start" is higher than "end"

With the new commit 9c8cbff I get an error when launching a telescope search (any sort of telescope thing, even just :Telescope)

Error detected while processing TextChanged Autocommands for "*":
Error executing lua callback: .../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:46: Argument "start" is higher than "end"
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        .../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:46: in function 'stripWhitespace'
        .../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:56: in function <.../.local/share/nvim/lazy/spaceless.nvim/lua/spacel
ess.lua:53>

I've pinned back down to the previous commit 4012c77 and the error doesn't reproduce, so I think it's something in the new commit, but I'm not sure what exactly.

Adding a FOSS license

Hi, I love and use this plug-in every day. All the other whitespace stripping plug-ins I've tried would modify the whole file, it's nice that this plug-in only modifies the lines that you touch. My workplace is cautious about allowing code without a LICENSE file and it'd be a big help if this plug-in could use a FOSS license. I'm sure others in the same position and would appreciate it too. Could a FOSS license please be added if this plug-in is meant for public use?

Weird 'Deprecated' warning appearing when setting up plugin

Hi, Lewis. First of all, the plugin is flawless as far as my usage goes. Thank you for creating it.

Secondly, this thing is not an actual 'issue' per se because it doesn't affect the functionality. I am just asking out of curiosity.

This is how I setup the plugin and as you can see, lua_ls shows a warning:

image

When I looked into the actual plugin files, I found the line in picture below is what causing this warning because if I delete this line, save the file and go back to my plugin setup file, the warning goes away.

image

I would just like to know why this behaviour occurs and especially whether this is an intended behaviour or not.

Thanks again for the plugin as well as for reading through this message. ❤️

Play nicely with numToStr/Comment.nvim

When using this plugin with numToStr/Comment.nvim, the mapping gcO or gcA to open a comment above or below the current line don't work properly.

Eg in lua:

Actual: string -- is inserted
Expected: string -- is inserted (as it is with the plugin disabled)

White/Blacklisting filetypes

Would you consider porting the thirtythreeforty/lessspace.vim logic for white/blacklisting?

Or would such a thing be better accomplished by some autocmd filetype detection magic?

LessSpace{Disable,Enable,Toggle}

I would like to be able to temporarily enable / disable this plugin, and looking through the code I couldn't work out how.

Would you consider adding LessSpace{Disable,Enable,Toggle} commands for individual buffers?

They may be a pre-requisite for auto enable/disable by autocmd in #7.

Error: `attempt to compare nil with number` in Telescope prompt

I get the following error when opening the Telescope prompt:

Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: .../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:61: attempt to compare nil with number
stack traceback:
        .../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:61: in function <.../.local/share/nvim/lazy/spaceless.nvim/lua/spaceless.lua:55>
        ...ocal/share/nvim/lazy/spaceless.nvim/plugin/spaceless.lua:12: in function <...ocal/share/nvim/lazy/spaceless.nvim/plugin/spaceless.lua:11>

Looks like #2/#5 would be a workaround if merged.

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.