ryanoneill / treble.nvim Goto Github PK
View Code? Open in Web Editor NEWCustom telescope.nvim buffer picker Neovim plugin inspired by bufferline.nvim
License: MIT License
Custom telescope.nvim buffer picker Neovim plugin inspired by bufferline.nvim
License: MIT License
Reproduction Steps:
:BufferLineMoveNext
or :BufferLineMovePrev
commands (The order in Bufferline should now be 1. lib.rs and 2. frame.rs.)Expected in Treble Picker:
2. frame.rs
1. lib.rs
Actual in Treble Picket:
2. lib.rs
1. frame.rs
Most of Treble's functionality can be or should be testable. It's only shuffling and transforming data between bufferline
and telescope
, yet how it does so, and the expected results thereof, should be testable. Do it.
Buffers without a name in Neovim display as "[No Name]" within the bufferline
. Currently they display as an empty string when the treble
buffer picker is opened. treble
should be changed to display these no named buffers as "[No Name]" to match bufferline
.
A :checkhealth treble
implementation was added in #3, however the plugin documentation has yet to be updated to indicate so.
Treble will not work properly is the bufferline
or telescope
dependencies are not properly installed. However, the absence of those plugins should not prevent treble from loading at all.
A few notes:
The code for the 3 column widths (buffer number, icon, and buffer name) are currently statically sized at 5, 5, and 40 respectively. This was done to make initial development of the plugin easier and to remove unnecessary complexity at the time.
The downside to this is that the spacing between columns is wonky and buffer names can be unceremoniously cut off when there is space remaining to display them.
The widths should be adjusted dynamically based on the size of the elements and the size of the display (if feasible).
The checkhealth command should more straightforwardly indicate that required dependencies are missing instead of erroring out and presenting a stack trace. Currently the following prints out when bufferline
is missing:
- ERROR Failed to run healthcheck for "treble" plugin. Exception:
function health#check, line 25
Vim(eval):E5108: Error executing lua /home/ryano/workspace/treble.nvim/lua/treble/health.lua:6: module 'bufferline' not found:
no field package.preload['bufferline']
cache_loader: module bufferline not found
cache_loader_lib: module bufferline not found
no file './bufferline.lua'
no file '/home/ryano/workspace/neovim/.deps/usr/share/luajit-2.1.0-beta3/bufferline.lua'
no file '/usr/local/share/lua/5.1/bufferline.lua'
no file '/usr/local/share/lua/5.1/bufferline/init.lua'
no file '/home/ryano/workspace/neovim/.deps/usr/share/lua/5.1/bufferline.lua'
no file '/home/ryano/workspace/neovim/.deps/usr/share/lua/5.1/bufferline/init.lua'
no file './bufferline.so'
no file '/usr/local/lib/lua/5.1/bufferline.so'
no file '/home/ryano/workspace/neovim/.deps/usr/lib/lua/5.1/bufferline.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/home/ryano/workspace/treble.nvim/lua/treble/health.lua:6: in function 'check_for_plugin'
/home/ryano/workspace/treble.nvim/lua/treble/health.lua:17: in function 'check'
[string "luaeval()"]:1: in main chunk
Cutting this down to module bufferline not found
or similar would be sufficient.
There are currently installation instructions for Lazy, since I'm currently using Lazy as my own plugin manager. However, Packer is very popular within the community and so it makes sense to include documentation for how to add the plugin within Packer as well.
The :checkhealth
command has the ability to run healthchecks for Neovim as well as plugins. As an example, to run a health check for Treble
if implemented, a user would need to run the following:
:checkhealth treble
According to the Neovim documentation, running :checkhealth foo
will make a call to require("foo.health").check()
See the health_dev
section of the documentation for more details on the implementation required for a plugin's :checkhealth
command.
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.