lewis6991 / spaceless.nvim Goto Github PK
View Code? Open in Web Editor NEWAutomatically strip trailing whitespace as you are editing.
Automatically strip trailing whitespace as you are editing.
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.
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)
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:
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.
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. ❤️
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>
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?
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.