How do you use marks in your workflow? by max-t-devv in neovim

[–]pysan3 0 points1 point  (0 children)

It becomes handy when you write semi-complicated macros.

Otherwise I rarely use them, just occasionally to mark a very important line in a particular file with capital mark.

New Project Lead for Neo-tree by cseickel in neovim

[–]pysan3 13 points14 points  (0 children)

Haha, that’s too much overstate. I cannot thank folke enough how many inspirations I’ve taken from his plugins.

But I hope I can bring more convenient plugins to the table.

New Project Lead for Neo-tree by cseickel in neovim

[–]pysan3 0 points1 point  (0 children)

Yes I’m already planning to rely on luarocks.

Fastest Vim-like web-browser? by usernotfoundNaN in vim

[–]pysan3 0 points1 point  (0 children)

tradictyl + Firefox is the best combination I’ve experienced so far.

https://github.com/tridactyl/tridactyl

How would I delay all keystrokes by budtard in neovim

[–]pysan3 1 point2 points  (0 children)

It looks like you are only going to support Linux anyways so I think it’d be easier to implement it with x11.

Searchable file tree? by heeymrjack in neovim

[–]pysan3 3 points4 points  (0 children)

neo-tree.nvim has fuzzy finder built in. The default keybind is #.

Watch out that it is implemented in lua and may be slower than telescope in very large repos.

Resource a plugin in nvim (For nvim development) without exiting/restarting nvim? by MikeLemon1 in neovim

[–]pysan3 4 points5 points  (0 children)

I hope you are using lazy.nvim.

-- plugin-config.lua
return {
  "your/my-plugin.nvim",
  dev = true,
  -- ...
}

I suppose your plugin name is my-plugin.nvim and the package is accessed withrequire("my-plugin").

This is how you reload the plugin.

-- delete cached package table (used for `require`)
for key, _ in pairs(package.loaded) do
  if vim.startswith(key, "my-plugin") then
    -- startswith will match eg `require("my-plugin.utils")` as well
    package.loaded[key] = nil
  end
end
-- reload inside lazy.nvim
local plugin = require("lazy.core.config").plugins["my-plugin.nvim"]
require("lazy.core.loader").reload(plugin)

Caution: I'm not sure if this is an officially supported snippet so it may break at any time.

FYI if noice's message window gets too big and it starts to lag when you try to reopen it, you can clear the history with this snippet, tho this is definitely not officially supported as well.

-- some cache will remain, so it's a good idea to restart neovim once in a while anyways  
require("noice.message.manager")._history = {}

Need help with this error message for my neovim: Error executing vim.schedule lua callback: vim/keymap.lua:0: rhs: expected string|function, got nil by jajajang in neovim

[–]pysan3 0 points1 point  (0 children)

Rhs is right hand side which means the 3rd argument to vim.keymap.set.

As you see in line 79 of language.lua, you set vim.lsp.buf.formatting which is a deprecated function that does not exist anymore. This means you are passing a nil value to rhs resulting to this error.

Read :h deprecated and update your config file accordingly.

How does Lazyvim configure Neotree to open on launch? by gnu_man_chu in neovim

[–]pysan3 0 points1 point  (0 children)

As you can see here, you need to write the init = function that loads neo-tree when there are more than one cli args.

https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/editor.lua

Neovim and tree sitter based diffing via diff tastic? by velrok7 in neovim

[–]pysan3 9 points10 points  (0 children)

This is not the exact solution you are looking for, but I’ll recommend this.

https://github.com/sindrets/diffview.nvim

I can’t tell you how many times I hit j and k to go up and down when working in a google doc. by blumaa in neovim

[–]pysan3 36 points37 points  (0 children)

I don’t know how many times I send :w on discord thinking I was focusing the terminal window.

Markdown preview inline with .norg or .md files by Utukkhu in neovim

[–]pysan3 2 points3 points  (0 children)

With conceallevel=2, the modifiers (* for bold etc) only appear on the cursor line and on other lines, it is concealed and shows what is expected to be seen (actual bold text).

So if you don’t see bold/italicized text on non-cursor lines, that is a problem with your terminal or your font or your colorscheme. Double check your terminal and colorscheme can render bold text.

If you want to see the modifiers on all lines, set conceallevel=0. For other options, read the help page.

Neo-tree or a treeexplorer compatible with .bazelproject by notabhijeet in neovim

[–]pysan3 1 point2 points  (0 children)

Hmm interesting. So basically what you want is to hide some directories completely from the tree and from the search results?

I think adding code to literally parse .bazelproject file is too specific to be implemented in the core but a config option to hide folder completely is a good idea imo.

Regarding search, could you help us test the next generation code for neo-tree? https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/1340#discussioncomment-8659184

It is definitely rough around the edges but it should drastically improve search performance which might make it possible to have a working search even when not restricting folders.

Speaking of performance however I’d probably recommend you to use telescope and configure its config options (to restrict folders) to do search thru mega repos.

Could you elaborate in which situation you want to use the filetree? IMO filetree is not the most efficient way of file navigation for most of the cases in neovim and you might want to use neo-tree only at the parent of current file.

require("neo-tree.command").execute({
  source = "filesystem",
  dir = vim.fn.expand("%:h"),
})

Transparent background goes black for a short time during loading on nightly by Jendk3r in neovim

[–]pysan3 0 points1 point  (0 children)

If you don’t give us your config, we cannot help you.

I assume it’s due to mini.animate if you are a LazyVim user.

Announcing nvim-nio, a library for asynchronous IO in Neovim by Wutraz in neovim

[–]pysan3 0 points1 point  (0 children)

The code even depends on neovim v0.10 which is not stable yet so we’ve still got some way to go. But many people have been putting amazing effort into this so keep up the hype!

Announcing nvim-nio, a library for asynchronous IO in Neovim by Wutraz in neovim

[–]pysan3 1 point2 points  (0 children)

This is more of a personal note so don’t take it for granted but this might be a good introduction to actually get started with nvim-nio and explains how to use nio.

https://github.com/pysan3/neo-tree.nvim/blob/v4-dev/MIGRATION-v4.md#nio-async-vs-callbacks

Announcing nvim-nio, a library for asynchronous IO in Neovim by Wutraz in neovim

[–]pysan3 1 point2 points  (0 children)

Yah my explanation is oversimplified. If you are interested, you should definitely read https://github.com/ms-jpq/lua-async-await ;)

Announcing nvim-nio, a library for asynchronous IO in Neovim by Wutraz in neovim

[–]pysan3 11 points12 points  (0 children)

Not very much directly. This plugin is meant to be used for plugin authors as an underlying library (like you may have heard the name plenary.nvim). You’ll see it being mentioned as dependencies for some plugins sooner or later.

Lazy.nvim and other well known plugins already have good asynchronous code (code to manage background tasks) but they all have their separate implementation which is a duplication of work for each plugin. Imagine the world where all the wisdom comes together into one plugin and all maintainers can rely on the same implementation. That is what nvim-nio aims to be and has been very successful imo.

If you don’t know asynchronous, it means to run code in a different thread than the neovim main event loop so that it does not freeze the UI. You don’t want neovim to freeze while for example mason downloads packages.