Comments (5)
yeah, i see this too.
from lsp.
This is a major issue that really affects user experience. I will need to address it first, thanks for bringing it up.
from lsp.
If you can point me to the section to stare at I'd be happy to give a fix a go.
from lsp.
Wow, that would have been amazing, thanks @BAXTER001 ! The func in question is in fmt.go@PrintColumns(filename, description string).
There is this complication that I use colorstring library that converts colour tags within the string into escape characters to show coloured text in shell:
fmt.Println(colorstring.Color("[blue]Hello [red]World!"))
These colour tags skew off the string lengths. Not sure how to bypass that easily at this stage. Maybe use other shell coloring library with a different syntax?
Maybe add a new ShellString
type:
type struct ShellString {
s string
color string
}
func (s ShellString) String() string {
return colorstring.Color("["+s.color+"]"+ s.s)
}
func (s ShellString) Length() string {
return strings.RuneCountInString(s.s)
}
I think that would be the most idiomatic go way (see e.g. NullString in database/sql
package) but that is quite a lot of refactoring.
from lsp.
While we are at it, we can also make it support general number of columns, not just two. Something like PrintColumns(columns []string)
instead of PrintColumns(filename, description string)
.
Should have done this right at the time. But nooo 😜
from lsp.
Related Issues (15)
- Help option HOT 2
- panic: runtime error: invalid memory address or nil pointer dereference HOT 4
- Create --help flag HOT 2
- Don't print headings for empty sections
- Hope some day I can `brew install lsp`
- Installation problem HOT 3
- AUR Package for lsp. HOT 1
- Need to link file after install HOT 2
- No way to hide hidden files HOT 7
- Usage information HOT 1
- `lsp -pt` Is not consistent HOT 1
- lsp -l cannot take an argument HOT 2
- Some text is invisible in my terminal HOT 1
- list of files inaccurate HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.