domsch

joined 5 years ago
[–] domsch@lemmy.ml 2 points 1 year ago

Oh man, i can't believe it was only me being off by one. I'm pretty surprised i got as far as i did, considering my lua knowledge boils down to some config functions in Lazy Packages.

I appreciate you looking into this. This works perfectly. I'll probably play around with coloring stuff a bit, but the functionality works.

 

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

 

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?

[–] domsch@lemmy.ml 2 points 1 year ago (1 children)

Totally this. Not just confusion. What if Lemmy.ml shuts down one day because who ever hosts it doesn't want to anymore? All I have done on Lemmy will be wiped. Makes me hesitent to actually go in 100%.

[–] domsch@lemmy.ml 11 points 1 year ago (4 children)

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.

[–] domsch@lemmy.ml 3 points 1 year ago

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.