Neovim

1954 readers
31 users here now

founded 1 year ago
MODERATORS
1
 
 

I made a small plugin that other people might find handy. It checks if the file open in the current buffer has write access and if not, prompts for sudo (or any other command at your choice) and copies the file.

No longer do you need to care about forgetting to use sudoedit or anything else, just edit the files you want to edit! This could change the world!!1!

But in all seriousness, this is my first neovim plugin and I barely spent an hour on it but it's simple and it gets the job done. It scratches a minor itch and maybe you'll also find it useful.

2
 
 

This is parrot.nvim, the ultimate stochastic parrot to support your text editing inside Neovim.

Frank Röder started this repository because a perplexity subscription provides $5 of API credits every month for free. Instead of letting them go to waste, he modified his favorite GPT plugin, gp.nvim, to meet his needs - a new Neovim plugin was born! 🔥

Unlike gp.nvim, parrot.nvim prioritizes a seamless out-of-the-box experience by simplifying functionality and focusing solely on text generation, excluding the integration of DALLE and Whisper.

Features

  • Persistent conversations as markdown files stored within the Neovim standard path or a user-defined location
  • Custom hooks for inline text editing with predefined prompts
  • Support for multiple providers:
  • Custom agent definitions to determine specific prompt and API parameter combinations, similar to GPTs
  • Flexible support for providing API credentials from various sources, such as environment variables, bash commands, and your favorite password manager CLI
3
 
 

I'm normally a straight vim user (just out of habit, no particular preference) and I'm giving neovim a spin. So far I like it but...

For the love of all that's holy, how do I disable automatic indentation?

I have noautoindent set, nosmartindent set, filetype indent off, but neovim keeps inserting indentations. The only thing that works is setting paste on, but that's not the right solution to this problem.

Please help. This is driving me nuts!

4
5
 
 

I'm on NixOS and slowly working through neovim config.

I have treesitter installed with all grammars and it's set up in lua. When I run :TSymbols, it pops open a window showing -----treesitter-----, but no symbols are shown from the (python) code I have open.

All of the setup is put in place by the config flake I'm using, but I don't think there's any additional stuff to add for symbols to work. The treesitter section in the resulting init.lua from nix looks like this:

require('nvim-treesitter.configs').setup({
      ["context_commentstring"] = { ["enable"] = false },
      ["highlight"] = { ["enable"] = true },
      ["incremental_selection"] = {
        ["enable"] = false,
        ["keymaps"] = {
          ["init_selection"] = "gnn",
          ["node_decremental"] = "grm",
          ["node_incremental"] = "grn",
          ["scope_incremental"] = "grc"
        }
      },
      ["indent"] = { ["enable"] = false },
      ["refactor"] = {
        ["highlight_current_scope"] = { ["enable"] = false },
        ["highlight_definitions"] = {
          ["clear_on_cursor_move"] = true,
          ["enable"] = false
        },
        ["navigation"] = {
          ["enable"] = false,
          ["keymaps"] = {
            ["goto_definition"] = "gnd",
            ["goto_next_usage"] = "<a-*>",
            ["goto_previous_usage"] = "<a-#>",
            ["list_definitions"] = "gnD",
            ["list_definitions_toc"] = "gO"
          }
        },
        ["smart_rename"] = {
          ["enable"] = false,
          ["keymaps"] = { ["smart_rename"] = "grr" }
        }
      }
    })
6
7
8
9
 
 

Hi everyone,
could someone help a desperate student to turn off the 'Possible spelling mistake found' in LaTeX files with the vimtex plugin. It's been 3h now and I still dont have any idea on how to turn this off (or at least change the language, but knowing how to do both would be really cool). I tried everything I could, still don't kow where this is from.
Help would be really appreciated.
Thanks in advance.

10
1
Neovim on Fedora (fedoramagazine.org)
submitted 3 months ago by [email protected] to c/[email protected]
11
 
 

kitty-scrollback.nvim v5.0.0 is officially released! Check out the announcement here

What is kitty-scrollback.nvim?

A Neovim plugin (and Kitty Kitten) that allows you to navigate your Kitty scrollback buffer to quickly search, copy, and execute commands in Neovim.

demo

Check out the README for detailed information, the Wiki for additional configurations, and Advanced Configuration Examples for more demos!

What changed?

See Migrating to v5.0.0 for the detailed migration guide.

  • kitty-scrollback.nvim v5.0.0 uses Kitty's builtin --bracketed-paste option when sending commands to Kitty. The --bracketed-paste option was added in Kitty 0.32.2. If you are using an older version of Kitty, then upgrade to the latest version or at least 0.32.2.
  • Alternatively, if you are unable to upgrade Kitty, then you can still use tag v4.3.6 of kitty-scrollback.nvim.
  • See kitten-send-text for more information on the --bracketed-paste option.

Other minor version updates

  • Added experimental tmux support in v4.0.3! See tmux (🧪 experimental ) for setup instructions.
  • A handful of bug fixes and smaller features, see the CHANGELOG for more information.

What's next?

The next feature I plan to work on is adding command-line editing support (see #253). I also plan to complete the work necessary to move tmux support from experimental to stable.

If you have any questions, comments, or feedback feel free to create an issue or open a discussion.

12
1
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 
 

Personal simple statusbar script. https://gitlab.com/-/snippets/3715695

Works best with Humanoid colors.

13
14
15
 
 

Hey everyone,

I wanted to use Neovim for writing SystemVerilog, but found that there were very few examples or discussions around how to get common plugins like lspconfig, nvim-lint, and nvim-treesitter working together. After building a configuration that works for me, I thought I would share it as an example for others in the future.

You can find it here: https://github.com/thecooldaniel/nvim-config-systemverilog

Hope it helps someone and feedback/contribution is very welcome.

16
 
 

The presenter compares some of the functionality to Leap.nvim

17
 
 

Update: Based on the discussion here and in other places I added the following (well, technically I did something different in my colorscheme, but in the end it translates to that)

vim.api.nvim_set_hl(0, 'Normal', {})

This reverts the weird text and background colors to the previous behavior of ... not setting them.


With update 0.10 Neovim behavior changed regarding text color and background color.

I use a color theme that does not set those and previously this worked perfectly fine. Neovim simply used the font color defined in the terminal and had a transparent background.

Now the background is #14161b and the font color is #e0e2ea. Neither of the colors is configured ANYWHERE in my whole setup. Neither in the colorscheme, nor in my terminal configuration, nor in my Neovim configuration.

Is there a sane way to revert this to the old behavior? (i.e. use the font color configured in the terminal’s configuration and use transparent background.)

18
 
 

So I've just started using the native LSP inlay hints. I was wondering, does anybody know how to move the inlay hints to the end of the line, instead of in the middle of the line? Matter of preference I suppose, but I find it clutters the line too much.

19
 
 

I am trying to install Astro Vim and after installation, I get prompted with a big block of lua errors. I asked some chatbot for what this might mean and it said that it's probably due to an outdated version of nvim... I got the latest 0.10.0 stable. Does someone know on why this might be happening? I get a very similar error when installing nvchad. Here is the output from nvim once I open it

Error detected while processing /home/marty/.config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.uri' not found:
        no field package.preload['vim.uri']
        no file './vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri.lua'
        no file '/usr/local/share/lua/5.1/vim/uri/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri/init.lua'
        no file './vim/uri.so'
        no file '/usr/local/lib/lua/5.1/vim/uri.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim/uri.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './vim.so'
        no file '/usr/local/lib/lua/5.1/vim.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        vim/loader.lua: in function <vim/loader.lua:0>
        [C]: at 0x5586658aa190
        [C]: in function 'require'
        vim/_init_packages.lua: in function '__index'
        ...marty/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:61: in function 'setup'
        /home/marty/.config/nvim/lua/lazy_setup.lua:1: in main chunk
        [C]: in function 'require'
        /home/marty/.config/nvim/init.lua:18: in main chunk
E484: Can't open file /usr/local/share/nvim/syntax/syntax.vim
20
21
 
 

In the command-line window the command line can be edited just like editing text in any window. It is a special kind of window, because you cannot leave it in a normal way.

There are two ways to open the command-line window:

  1. From Command-line mode, use the key specified with the 'cedit' option (default CTRL-F).

  2. From Normal mode, use the "q:", "q/" or "q?" command.

  • This starts editing an Ex command-line ("q:") or search string ("q/" or "q?"). Note that this is not possible while recording is in progress (the "q" stops recording then).

When the window opens it is filled with the command-line history. The last line contains the command as typed so far. The left column will show a character that indicates the type of command-line being edited

22
 
 

It's been several months since my initial symbols-outline.nvim fork decision post on reddit. It's continued to receive updates and fixes, and yesterday I've finally released the first, initial version of outline.nvim. The full details of all changes since fork detach, and since initial forking can be found in the changelog.

23
24
 
 

When im using the edit mode with nvchad, sometimes (especially when i press the space or enter keys) an error apear saying Multiple different client offset_encodings detected, this is not supported yet, any idea why does this happen?

25
view more: next ›