Skip Navigation
Unixporn @lemmy.ml domsch @lemmy.ml
[Plasma] Basic Light(ly) Setup

Nothing too fancy. Just Lightly Application style, Colorscheme and decorations plus a Panel setup "inspired by MacOS". Wallpaper

3
Adding a Session list to sidebar-nvim

So, instead of running to reddit, i'll give this a shot here. I'm in the process of making my own NeoVim Configuration from scratch. One of the tools i use is sidebar-nvim . This allows me to make my own Sections. I'm pretty new to lua and have never dabbled in plugin programming before. Through reading the source of sidebar-nvim and neovim-session-manager I have gotten to a point where i get a list of my sessions in the sidebar. ``` local session_manager = require("session_manager.utils") local sessions = session_manager.get_sessions() local dirs = {} local filenames = {}

for _, file, _ in pairs(sessions) do local directory = session_manager.shorten_path(file.dir) table.insert(dirs, directory) table.insert(filenames, file.filename) end

local section = { title = "Sessions", icon = " ", draw = function() return dirs end, bindings = { ["l"] = function(line, col) local filename = filenames[line] session_manager.load_session(filename, false)

end, } }

return { "sidebar-nvim/sidebar.nvim", config = function() require("sidebar-nvim").setup({ open = true, side = "right", sections = { "datetime", "symbols", section, "git", "todos", "diagnostics" }, }) end }

``` The thing that isn't working is the "bindings". session_manager.load_session takes the filename out of the original sessions table. I have no clue how the original structure looks. My attempt currently returns an empty value. Anyone have an idea how to access the data i need to get the session loaded properly?

0
For everyone new to Lemmy, how are you finding the experience?
  • I'll be honest. While I like the idea of decentralized social stiff, its also a huge issue. First you have to choose an instance, which isn't too bad, but you can't move. I hear Lemmy.ml being under pressure and I want to move somewhere else to help.with that. My account is 4 years old though and I can take nothing with me. Additionally this means all my content is on one instance. If that ever goes down, the network as a whole my keep existing, but my user and all I've put into Lemmy will be gone. And while I trust Lemmy instances more than reddit in terms of privacy, I'm not so sure when it comes to uptime and longevity. Finally, the whole concept of decentralized is hard to wrap my head around. My instance being separate from others but still being subscribed to communities of other instances feels unintuitive. Its the she issue I have with mastodon. I keep loosing track of instances, communities, apps etc. All with different names and logins etc.

    For now, I'm trying to get used to Lemmy and just search for communities I'm subscribed to on reddit and see how it goes. It definitely works well enough. Just some conceptual issues I might have to get used to.

  • What distro(s) do you use?
  • With Debian 12 being out, I'm back to Debian and for good this time. We got the last plasma 5 and the inclusion of nonfree firmware on theisoo makes it easier to install. After all these years, Debian still feels like home.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DO
    domsch @lemmy.ml
    Posts 2
    Comments 3