spaceless.nvim
Lua port of https://github.com/thirtythreeforty/lessspace.vim
Strip trailing whitespace as you are editing.
Installation
use {
'lewis6991/spaceless.nvim',
config = function()
require'spaceless'.setup()
end
}
Automatically strip trailing whitespace as you are editing.
Lua port of https://github.com/thirtythreeforty/lessspace.vim
Strip trailing whitespace as you are editing.
use {
'lewis6991/spaceless.nvim',
config = function()
require'spaceless'.setup()
end
}
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?
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?
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.
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)
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.
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.