Coder Social home page Coder Social logo

jabs.nvim's Introduction

Welcome to my own little plane of Oblivion! ๐Ÿช

My name is Mateus Begnini Melchiades and I am a Software Developer and Researcher in Machine Learning. My main field of study is centered around Option discovery in Reinforcement Learning, but I also work on projects related to NLP and Neural Networks. I work as a Software Developer at SAP Labs Latin America, where I develop backend services related to Data Science. I also hold a bachelor's degree in Computer Science from the University of Vale do Rio dos Sinos (UNISINOS), with an outstanding student award from the Brazilian Computing Society (SBC).

On my spare time, I use my programming skills to create and contribute to open-source projects mostly related to Linux. I spend most of this time improving Vanilla OS, which I act as Contributors Leader.

The programming languages I usually work with are (in order of familiarity):

  • Python (including popular libraries like Pandas, Numpy, PyTorch, ...)
  • Go
  • C
  • Lua
  • Bash
  • Rust
  • Vala

My creations

  • JABS.nvim: A minimal buffer switcher window for Neovim written in Lua.
  • tree-sitter-vala: A tree-sitter implementation for the Vala programming language.
  • Albius: An installer backend focused on immutable Linux distributions, but suitable for all distros (part of Vanilla OS)

Larger projects I contribute to

  • Vanilla OS Contributors Leader: I develop and improve system applications like ABroot and Apx, as well as GNOME-related projects for better integration with the OS. My role in the project also involves managing incoming contributions and making sure our applications work as expected.

Research papers I worked at:

  • Co-author of "FastIoT - A Compression Model for Displaying a Huge Volume of IoT data in Web Environments" (publication pending)
  • Main author of "Anticipating faults by predicting non-linearity of environment variables with neural networks: a case study in semiconductor manufacturing" (accepted for presentation at LXAI @ ICML 2021)
  • Co-author of "MoStress: a Sequence Model for Stress Classification" in 2022 International Joint Conference on Neural Networks (IJCNN), Padova, Italy, 2022.

jabs.nvim's People

Contributors

64-bitman avatar hampustagerud avatar jeff-dh avatar matbme avatar maxverevkin avatar raafatturki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jabs.nvim's Issues

Error when opening JABS

I get the following error when I try to open jabs:

Error in packer_compiled: ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:82: Vim(lua):E5108: Error executing lua ...l/share/nvim/site/pack/packer/opt/JABS.nvim/lua/jabs.lua:289: One of 'relative' and 'external' must be used

Here's my packer configuration:

    use({ "matbme/JABS.nvim", opt = true, cmd = { "JABSOpen" } })

And my vim version:

NVIM v0.5.0
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdi
agnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim/src/neovim-0.5.0/build/config -I/build/neovim/src/neovim-0.5.0/src -I/usr/include -I/build/neovim/src/neovim-0.5.0/build/src/nvim/auto -I/build/neovim/src/neovim-0.5.0/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Error when disabling `hidden` option; Error when seting `%` in `shada`

neovim 0.7.0

I experience a couple of situations where JABS fails to launch properly.

  • One is when I have disabled the hidden nvim option.
  • The other is when I set % in the shada option. % makes it so that when I launch nvim without a file it remembers the buffers from previous time. Of course I have to launch it like that to produce the problem.
    The error looks like this:
    2022-06-03-175606

api.nvim_buf_add_highlight somehow fails to set the highlights and that brakes the rest of JABS. When I remove that function and related things, JABS seems to work fine (but the text disappears of course).
I don't know enough about coding to tell you more.

renumber the buffers

I have no idea why the buffers in vim and neovim have so ridiculous buffer number,
but if I want to switch to a buffer by typing it's number, I don't want to type 53 or some other huge number.

If the numbers of the buffer coud stay one-digit (nobody use more that 9 buffers so often), it would be really nice !

[Discussion] expJABS

(Since discussion are disabled this becomes an issue... ;)

As you noticed, I worked on (a) JABS (branch/fork) in the last couple of days. The result is what I call expJABS at the moment.
The question to me is how to go on with (exp)JABS at this state, because expJABS code differs heavily from the regular JABS code.

To give you a brief heads up this is the introduction to the expJABS README

experimental JABS is an experimental branch / fork of JABS. It started
as a branch to fix a couple of issues and turned into an refactored and
extended version of JABS. It's backwards compatible and looks and behaves
(almost) exactly the same as regular JABS.

expJASB differs to regular JABS in the following points:

 - aggressively refactored to gain better maintanability and extendibility:
    - used lua-patterns and vim-api to replace homebrewed solutions
    - stateless (no global state)

- added features:
    - sort files by most recently used (merge into JABS/master)
    - improved positioning (merged into JABS/master)
    - show closed (unlisted) buffers and restore them
    - wipe a buffer if a closed (unlisted) buffer gets deleted again
    - switch to buffers when they are already open
    - help popup
    - highlight the filename seperately
    - mouse support for selecting buffers

- fixed some bugs and issues.....

- changed some default values

and a showcase:

I'd like to maintain expJABS and like to share it, but I don't know how a coexistence with JABS could look like. That's what this discussion is supposed to be about.

Would you mind having a look at it?

Do you have any ideas / opinions about it?

PS: https://github.com/jeff-dh/expJABS.nvim that's the branch I'm talking about ;)

JABS wont open on latest neovim version - must specify width

Using the default config I cannot open jabs.

E5108: Error executing lua ...share/nvim/site/pack/packer/start/JABS.nvim/lua/jabs.lua:332: Must specify 'width'
stack traceback:
        [C]: in function 'nvim_open_win'
        ...share/nvim/site/pack/packer/start/JABS.nvim/lua/jabs.lua:332: in function 'open'
        [string ":lua"]:1: in main chunk
NVIM v0.8.0-dev+285-g52623ce93
Build type: Release
LuaJIT 2.1.0-beta3

Error when file name has certain characters

I'm sorry to bother you again, but I have found an other bug:
When opening buffers with file names that have certain characters in them I get the following:
s
I have tested with some characters (not that many) and looks like -, +, % produce this problem. There could be more, but that should be enough to prove the point.
- is a very common file name character...

Calling :JABSOpen when there is already a JABS window opens another JABS window

Calling :JABSOpen when there is already a JABS window opens another JABS window, and this can cause some weird effects. If :JABSOpen is called multiple times in a non-floating window, multiple JABS windows are opened in the same position. If :JABSOpen is called inside a JABS window (which can happen if a keybinding mapped to :JABSOpen is pressed multiple times), another JABS window is opened in a position one line and one column off from the original position.
Maybe :JABSOpen can be changed to something that toggles the JABS window (:JABSToggle)?

When previewing a file and closing jabs afterwards the first window get focused

  • start nvim and open at least 2 windows
  • switch to a window that's not the first window
  • open jabs and preview a file
  • close preview and jabs with q (without opening a file)

---> the first window will be the current window afterwards

a call similar to: api.nvim_set_current_win(M.back_win) when closing jabs should fix the issue

Idea: Select previous buffer by default

Hi,

Just an idea, but when opening the list, it would be nice if the previously selected buffer is already highlighted.

This will allow for fast switching between 2 files while still having the option to go to another.

Thanks for the great plugin!

[Feature Request] Go to currently opened buffer

As an example, in the setup below, I have a couple of buffers opened: init.vim, mappings.lua (in the second tab), plugins_portable.lua, and plugins_complete.lua (in the first tab). init.vim is currently focused.

image

If I press Enter in mappings.lua, it'll open it in the current window, overriding init.vim. Same for any other buffer. It'll open the buffer in the current window focused (which happens to be init.vim).

My feature request, is that I could press a key (perhaps g), and I could go to that buffer's window if it's already opened. In the example above, pressing g on mapping.lua would jump to the second window, as it's already opened there. Pressing g on plugins_portable.lua would jump to the first tab, first window (where it's currently opened), etc.

This would make navigating between currently opened buffers very convenient.

Error on open

Hello,
i wanted to try out this plugin but it behaves very strangely.

  1. open neovim without arguments - it opens a readonly scratchpad (my custom dashboard). :ls will show nothing
    1.1. execute :JABSOpen
    1.1 error in jabs.lua:141: attempt to index local 'linenr' (a nil value)

  2. open three buffers via :e ...
    1.1. execute :JABSOpen
    1.1 error in jabs.lua:130: attempt to concatenate local 's' (a table value)

  3. open two buffers via :e ...
    1.1. execute :JABSOpen
    1.1. no error

At some point, i got an error in jabs.lua: 186: Invalid window id after reopening it.
At some point, i also got an error after opening buffers via TeleScope...

Versions:

  • NVIM v0.6.0-dev+43-g02bf251bb
  • JABS.nvim #7588207

Close JABS' window on focus change

When user focuses outside of JABS' window, it should be closed.

This can happen:

  • when mouse is enabled and user clicks outside of JABS' window
  • by hitting CTRL-W_CTRL-W
  • ...

[Feature request] Single key switching

Could it be possible to extend the plugin to allow switching to a different buffer with a single (or almost single) key press?

I imagine that instead of displaying buffer numbers the plugin could display labels (from the set provided by the users) next to each buffer item. Typing j would for example open first buffer, but using a modifier like SHIFT+j would open it in the vertical split.

Restore Deleted Buffers

It would be nice if it was possible to restore buffers deleted with JABS(undo and redo). See this Stack Overflow answer on how to restore buffers manually.

Opening the preview window overwrites keymap for 'q'

When you open the preview window in JABS the keymap for q get's overwritten for that buffer. That's hard coded:

-- function M.previewBuf()
    [...]
    -- Close preview with "q"
    api.nvim_buf_set_keymap(buf, "n", "q",
        [[:lua require'jabs'.closePreviewBuf()<CR>]],
        { nowait = true, noremap = true, silent = true })
    [...]

The mapping still exists after the preview window is closed and if you open the same buffer in a different window -- for editing -- the mapping is still active (and calls closePreviewBuf).

If q would not be mapped to any other command this might not be toooooo bad, but q is mapped to start a recording by default and that's not possible anymore.......

calling :JABSOpen when JABS window is already opened breaks the plugin

neovim version = v0.9.0

Hello,
When I call :JABSOpen when the JABS window is already opened, it breaks the entire plugin (I have to restart nvim for it work again) and gives me this error:

E5108: Error executing lua /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:557: Invalid buffer id: 2                                                 
stack traceback:                                                                                                                                                
        [C]: in function 'nvim_buf_delete'                                                                                                                      
        /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:557: in function 'close'                                                                     
        /home/canada/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:621: in function 'open'                                                                      
        [string ":lua"]:1: in main chunk       

from this issue #9 :JABSOpen should toggle but that doesn't work for me

Getting this error while opening JABS!

E5108: Error executing lua /Users/user/.vim/plugged/JABS.nvim/lua/jabs.lua:100: attempt to concatenate local 'symbol' (a โ”‚
nil value)   

If i press enter it takes me to an empty pane.

Autocmd for automatic centering of window doesn't work when jumping buffers with JABS

Hello, thanks for the wonderful plugin.

I have an autocommand that center the window each time I switch buffer:

vim.api.nvim_create_autocmd("BufWinEnter", {
	pattern = "*",
	callback = function()
		vim.cmd("normal! zz")
	end,
})

Which works every time I use bnext and brev, but it doesn't when I jump with JABS.

Can you please give me a hand on this? I have been struggling for quite some time.

Keep up with the excellent work!

Switch to buffers with number

This is a feature request:
It would be really nice if the buffers in the list were numbered (with number that make sense, 0 to n-1 for exemple).

And you just would need to type the corresponding number to switch.

I didn't see any plugin that do that, it would be really cool !

Feature request: Highlight filename

Hello,

Awesome project!

Sometimes it takes a while to focus on the file name after opening the panel, is it possible to create custom highlight for file name?

Thanks!

E5108: Error executing lua ... Invalid 'group': 'JABS'

Hello,
i have a problem with JABS, when i run it (like :JABSOpen), i get an error.

For plugins i use Lazy.

This is my neovim lua config for JABS:

...
{"matbme/JABS.nvim",
	keys = {
		{ "<leader>b", "<cmd>JABSOpen<CR>" },
	},
	config = function ()
		require("jabs").setup ({
			position = {"center", "center"},
			border = 'single',
			keymap = {
				close = "d",
				h_split = "h",
				v_split = "v",
				preview = "p",
			},
			use_devicons = true
		})
end},
...

This is error message:

E5108: Error executing lua ~/.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:546: Invalid 'group': 'JABS'                
stack traceback:
        [C]: in function 'nvim_clear_autocmds'
        ~.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:546: in function 'close'
        ~.local/share/nvim/lazy/JABS.nvim/lua/jabs.lua:621: in function 'open'
        [string ":lua"]:1: in main chunk

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.