Neovim

496 readers
1 users here now

Neovim is a modal text editor forked off of Vim in 2014. Being modal means that you do not simply type text on screen, but the behavior and functionality of the editor changes entirely depending on the mode.

The most common and most used mode, the "normal mode" for Neovim is to essentially turn your keyboard in to hotkeys with which you can navigate and manipulate text. Several modes exist, but two other most common ones are "insert mode" where you type in text directly as if it was a traditional text editor, and "visual mode" where you select text.

Neovim seeks to enable further community participation in its development and to make drastic changes without turning it in to something that is "not Vim". Neovim also seeks to enable embedding the editor within GUI applications.

The Neovim logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 3 years ago
MODERATORS
51
 
 

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?

52
5
time tracking (self.neovim)
submitted 1 year ago* (last edited 1 year ago) by atomdmac to c/[email protected]
 
 

I've been using Wakatime recently and while I like the functionality quite a bit I don't really want to pay $15 per month to use it. It seems a little steep to me so I'm looking for free and open source alternatives. Does anyone here have one that they like?

Edit: I started messing with https://timetagger.app and writing a quick adapter to start/stop the clock from neovim. I've beentestingg it out over the last few days and so far, I really like it

53
17
This Week In Neovim Newsletter (this-week-in-neovim.org)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

Just wanted to share a newsletter that a Neovim community member has been putting out weekly. Content is categorised under Core and Plugin (hopefully self-explanatory). I usually find interesting things to learn about Neovim's core and API, or plugins to explore!

54
55
 
 

I've managed to put this together couple days back and thought I'd share, I expect I'm not the only person out there who likes neovim and switching light/dark modes. Cheers!

56
57
58
59
 
 

For any questions related to configuring Neovim with Lua or migrating over to Lua from Vimscript.

60
 
 

this is my config on moonscript

share your configs on lua, vimscript or on other languages in comments :^)

61
 
 

I gave it a go last night and it is way trickier then I expected. Simple things like setting options are not very convenient at the moment. I also tried to get packer.nvim running but the README was not very helpful.

Looks like I will be sticking with init.vim for some time.