Neovim

cross-posted from: https://lemm.ee/post/44036825 > I was recently watching a tsoding stream when he was singing huge praises for the compilation mode in emacs, so I created a plug in to do essentially the same thing in neovim. Feel free to test it and share feedback. > > [error-jump](https://github.com/Dr-42/error-jump.nvim)

5
0
github.com

This is [parrot.nvim](https://github.com/frankroeder/parrot.nvim), the ultimate [stochastic parrot](https://en.wikipedia.org/wiki/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: + [Anthropic API](https://www.anthropic.com/api) + [perplexity.ai API](https://blog.perplexity.ai/blog/introducing-pplx-api) + [OpenAI API](https://platform.openai.com/) + Local and offline serving via [ollama](https://github.com/ollama/ollama) - Custom agent definitions to determine specific prompt and API parameter combinations, similar to [GPTs](https://openai.com/index/introducing-gpts/) - Flexible support for providing API credentials from various sources, such as environment variables, bash commands, and your favorite password manager CLI

1
0
https://neovim.io/news/2023/08

Bram is one of my heroes. That’s literal and recursive: when I say it, internally I check before making a frivolous claim, which is a feature of this particular role-model; “What would Bram do?” is a fixture in me which informs my choices. Those who studied vim_dev and the Vim source and docs, accumulated treasure from a stream of copious messages and spare impressions. But also from what he omitted: he never appealed to sensationalism or personal judgements. Even when treated rudely, Bram usually responded only to advance his understanding of a problem to solve. Bram was one of those humans quietly providing deep value to the universe, but there was no parade and little celebrity. Bram was anchored to reality, directly interested in results and adjusting what produced them. The “Problem/Solution” mantra in his commit messages is simple yet profoundly effective. He used that approach to help people in Uganda, managing resources directly instead of abstractly. Bram’s principles (as I observed them) extended beyond mere technical craftsmanship. The ability to adopt a position of modesty is a mind-trick that channels an endeavor through a “narrow waist”, a voluntary constraint. That lens can create a more composable and powerful result. Plugins like unimpaired riff on the theme. And this touches on a central point: the main utility—not ideology, but utility—of “lifestyle software” like Emacs and Vim, is that the ecosystem is alive, and has escape velocity, so its momentum is self-perpetuated. Neovim has always been intentionally positioned as a derivative of Vim, which means simultaneously it both continues and diverges from Vim. I’m convinced that forks create energy rather than destroy it. So although we can’t deliver Vim without Bram, we can continue some essential parts: Maintenance: Experimentation is good, and the world needs creative destruction and playful failures. But Neovim does not represent lust for the new (“neomania”). Documentation: the habits of Vim documentation are obvious, this is one of the biggest gains that Nvim acquired by building on vim. Extensibility: Bram’s own Agide project aspired to a similar sort of extensibility as Neovim: Agide is not a monolitic application. Separate tools can be plugged in. Thus you are not forced to use one editor. … Each tool implements part of the plugin interface. Embedding: Vim’s :help design-not for most of its life proclaimed this tenet of Neovim: Vim is not a shell or an Operating System. … This should work the other way around: Use Vim as a component from a shell or in an IDE. And another thing: Bram didn’t take himself too seriously. He had his own sense of humor. Neovim is a monument to Vim and Bram. We should be pragmatic, not dogmatic; we should remember what the goal is, and compare our actions to the results. — Justin M. Keyes

29
0

Hi I've been looking at nyoom.nvim and it alters the UI of telescope (see screenshot) I was just wondering how this is possible? I looked d through the codebase but couldn't find anything other than the setting of colours? Here is the repo: https://github.com/nyoom-engineering/nyoom.nvim

17
1
neovim
Neovim snake_cased 8mo ago 100%
Plugin UI

Is there a Lazy UI for managing Plugins not directly in a Text File, but something more akin to VSCode's Extensions view?

5
2

hello :)) I hope this post is okay. I just wanted to share, that I've created a new community on lemmy for talking about the modal text-editor Kakoune (inspired by vim). It is located at [!kakoune@discuss.tchncs.de](https://discuss.tchncs.de/c/kakoune) and you're welcome to join whether you're using kakoune already or just want to learn about it :))

8
0

It's possible to install lsp for a language and then export all .local and .config neovim folder to use it as portable install in another closed env?

2
5

I decided I was ready to move on from distributions like LunarVim and based my config on kickstart.nvim. I've fixed it up a lot with additional stuff for me and I'm mostly pretty happy with it. The default keymappings aren't my favorite though. No shade on the kickstart team, they just don't fit the way I think. I'm trying to decide what a good organization strategy might be. What keymappings strategies are out there to get some organization or intuitive groupings?

11
4

I'm planning to remove my roles as a moderator and am looking for (hopefully) more than just one moderator to take care of this community. If you're willing to help foster this community then reply in this thread. It should also be noted that [!neovim@programming.dev](https://programming.dev/c/neovim) already has an established mod team and it would probably be a good idea focus efforts there, but nevertheless in the spirit of decentralization it would be good to make this place more actively moderated.

22
2

The example below is not working (error is given when neovim is opened not recognising $env_var) how can I let him recognise the env_var? g = { name = "+grep", a = { "Telescope grep_string", "Grep on all dirs" }, s = { "Telescope grep_string search_dirs={"$env_var/dir1/dir2/dir3/"} cr>", "Grep on dir" }, }, Thanks

3
7
github.com

Hi! My plugin [modicator.nvim](https://github.com/mawkler/modicator.nvim) now has support for [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) out of the box. Modicator is a plugin that changes the color of the cursor's line number based on the Vim mode, just like statusline plugins like lualine do. The lualine integration only gets loaded if the plugin gets detected, so it should have no effect on your startup time. ![modicator.nvim's lualine integration](https://github.com/mawkler/modicator.nvim/assets/15816726/dee0ae61-1435-45cc-98e2-89fd8b46d8a7)

17
1

Hello Everyone, i'd like to ask for your opinion on the following issue: i've created my own knowledge base based on asciidoc, with some custom shell scripts and a go application for creating backlinks, tags etc. I've chosen this way, as most solitions are based on markdown, which is not standarized and very limited compared to asciidoc, especially from a dev pov. All my editing, searching etc. is done via neovim, which is very comfortable. However, i'd like to improve the user experience with the setup, as i'd also like to see the rendered version, especially when adding mermaid diagrams and other things. I've tried some plugins for the browser, which render the view and update automatically, however they are not in sync with my nvim, so i have to scroll on every save, if i want to see the rendered version. That's not ideal. Any ideas? Ideally I'd like some kind of application template, where i can embed a terminal / neovim and a webbrowser, ideally linked via lua scripting, so it integrates nicely. It can also be a completely separate application like anytype, however i've not seen anything that has a proper vim-like module editing support & allows for asciidoc rendering instead of markdown.

11
4

Sometimes when I am using goto definition I get errors like this one ``` E5108: Error executing lua: ...t_nvimeitLsr/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1964: Invalid window id: 1000 stack traceback: [C]: in function 'nvim_win_get_buf' ...t_nvimeitLsr/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1964: in function 'make_position_params' ...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:147: in function 'v' ...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:391: in function 'v' .../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:541: in function 'lsp_definitions' /home/user/.config/nvim/lua/user/plugins/ide/lspconfig.lua:80: in function ``` What could be the cause of an error like this? Whenever this happens I have to restart nvim. the config in `lspconfig.lua:79` looks like this: ``` opts.desc = "LSP: Jump to definition of symbol" keymap.set("n", "gd", function() telescope.lsp_definitions(ivy) end, opts) ``` Any ideas?

5
0

Most of you might know already but I just found out about this today because I needed it. I had thought there's just no way to use escape in norm commands. So I had this file with list of items which were mostly separated by newlines but some of them were separated by spaces so I had to clean it up. It looked something like this: ``` begin A begin B begin C begin D begin E begin F begin G begin H ``` and I needed it to be like this: ``` begin A begin B begin C begin D begin E begin F begin G begin H ``` The beginning of every item was the same string of characters which was helpful. So I had an idea but it required the use of escape in a norm command. I was about to think of some other way that doesn't require escape but then decided to google it and find out if there was a way to use escape. To my surprise it was possible! Why I haven't thought of this before? So this is what I came up with: ```:g/.*begin/norm /begin^[hr^M``` So the ```^[``` is an escape and you get it with C-v Esc. Simple as that. The command to organize my list isn't perfect though as it has to be run few times to go through every item but it was enough for my purposes. TL;DR: Press C-v Esc in command line mode to get escape.

10
3
dotfyle.com

Floating LSP windows now use Treesitter highlighting, VimConf 2023, better template strings, inline LSP references, Kitty integration, and Neovim config for Python development

20
2

I am new lemmy user and I wanted to whether there are different nvim communities or same ones like, 1. https://lemmy.world/c/neovim@sopuli.xyz 2. https://programming.dev/c/neovim

13
8
m.youtube.com

cross-posted from: https://discuss.tchncs.de/post/3664526 > The native Inlay Hints feature is enabled in the nightly version of Neovim. The feature will be part of the v0.10 release once it is available.

15
0

Neovim v0.9.2 is now available This is the first Neovim release since Bram Moolenaar passed away and the archival/deprecation of both null-ls.nvim and packer.nvim. Is anyone running into any issues with this release (particularly if you use null-ls or packer)? How are the Neovim distros (eg - NvChad, AstroNvim, LazyVim, LunarVim, etc.) performing after the update? [https://github.com/neovim/neovim/releases/tag/v0.9.2](https://github.com/neovim/neovim/releases/tag/v0.9.2) [\#nvim](https://fosstodon.org/tags/nvim) [#Neovim](https://fosstodon.org/tags/Neovim) [#NvChad](https://fosstodon.org/tags/NvChad) [#AstroVim](https://fosstodon.org/tags/AstroVim) [#LazyVim](https://fosstodon.org/tags/LazyVim) [#LunarVim](https://fosstodon.org/tags/LunarVim) [@neovim](https://sopuli.xyz/c/neovim)

41
11

I'm trying to use LazyVim https://www.lazyvim.org/ to create and edit ansible playbooks and roles, but for the live of my I don't understand how to enable ansible-language-server. The installation of lazyvim went flawless and after starting nvim I used the command :Mason to install: * ansible-language-server * ansible-lint * yaml-language-server * yamllint but still, when opening a task or playbook file in nvim, i don't get any of that cool features like snippets and automatic syntax checking like I hoped. Can anyone give me a hint how to enable those? Mason says the plugins are installed, is it only a problem of nvim not recognizing the filetype as ansible? Do I need to enable some plugins via .config/nvim/lua/plugins? I'm out of my element here, help would be much appreciated.

5
7

After having the same config for ten years or so I’m looking to upgrade my (n)vim config. I changed over to init.lua, added lsp and treesitter and it’s awesome. Real big improvement! I’m still looking for a replacement for my file explorer. I’m using vimfiler/unite.vim at the moment. I like it because it confirms to the [vinegar/oil](http://vimcasts.org/blog/2013/01/oil-and-vinegar-split-windows-and-project-drawer/) idea. So I’m looking for a file explorer plugin which opens full window in a buffer, preferably written in lua with the possibility for a tree view and a per-window state so I can toggle it on and off in a window without having to navigate to the same place again. I haven’t found anything matching those criteria at the moment. For example nvim-tree doesn’t allow for a [state per window](https://github.com/nvim-tree/nvim-tree.lua/issues/2255). I tried oil.nvim but that doesn’t support a tree view. Does anyone know of a plugin that satisfies my requirement? If nothing exists I’ll keep using vimfiler but I’m curious to see if anything else exists that implement these features.

13
4

Seems like TWIN's site (https://this-week-in-neovim.org/) is down - the dns doesn't resolve. IIRC the author was moving away from neovim and was having some maintainence issues, but I'm curious if anyone else has more info ^.^?

17
3
git.minimally.online

cross-posted from: https://board.minimally.online/post/20318 > I just recently discovered TIC-80 and then Fennel. I was already liking Lua but now I'm hooked on LISP!! Here's my Neovim config using lazy.nvim, all written in [fennel](https://fennel-lang.org/) thanks to [hotpot](https://github.com/rktjmp/hotpot.nvim) > > It's not marketed like one of those "template Neovim config repos" but it could be one of those if your heart desired. I based it loosely off kickstart.nvim.

15
3
https://media.hachyderm.io/media_attachments/files/110/768/828/620/008/854/original/ef0829ca7906f442.mp4

clangd-extensions.nvim ([https://git.sr.ht/\~p00f/clangd\_extensions.nvim](https://git.sr.ht/~p00f/clangd_extensions.nvim)) now has go-to-defintion in the type hierarchy window [@VimLinks](https://hachyderm.io/@VimLinks) [@neovim](https://sopuli.xyz/c/neovim)

10
0

I'm using Nightfox theme and treesitter parser for syntax highlight. My code blocks in markdown files get displayed in italic, which is quite unreadable… How could I configure nvim to displayed them as normal characters?

6
1
dotfyle.com

Just sharing this on Lemmy as well for all you amazing neovim users. :)

43
5

So, I've been using nvim on macos for almost two months and didn't have issues, but after the last update I'm seeing this: ``` Error detected while processing BufReadPost Autocommands for "*": Error executing lua callback: ...ocal/Cellar/neovim/0.9.1/share/nvim/runtime/filetype.lua:21: Error executing lua: ...ocal/Cellar/neovim/0.9.1/shar e/nvim/runtime/filetype.lua:22: BufReadPost Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error executing lua callback: vim/load er.lua:0: EACCES: permission denied: /Users/clmbmb/.cache/nvim/luac/%Users%clmbmb%.local%share%nvim%lazy%null-ls.nvim%lua%null-ls%rpc.luac ... ``` This happens (for now) only when trying to open .lua files. From what I gather there's something related to some filesystem security flags in macos. I'm new to macos, so I have no idea what happens. Any hints/solutions to this?

2
0

Is there a way to avoid opening a nested neovim instance inside a terminal buffer and instead open it as a new buffer inside the already running instance? I'm thinking something like what Fugitive does, but more general and that works for any shell commands.

11
21

Hi everyone long time vim/neovim user, currently for my latex I have in `~/.config/nvim/after/ftplugin.lua` the following line: ``` vim.opt_local.makeprg="pdflatex -output-format pdf -output-directory /tmp %" ``` I am now working in a latex project that has a makefile, is it possible to create something in the lines of: ```lua if ! makefile_exists then vim.opt_local.makeprg="pdflatex -output-format pdf -output-directory /tmp %" end ``` Ended up with this and it seems to work fine: `~/.config/nvim/after/ftplugin/tex.lua` ```lua local makefile_exists = vim.fs.find('makefile', { upward = true, stop = vim.uv.os_homedir(), path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), }) if #makefile_exists == 0 then vim.opt_local.makeprg = "pdflatex -output-format pdf -output-directory /tmp %" end ```

3
2

I'm using NvChad and in `~/.config/nvim/lua/core/mappings.lua` there is a keybinding for LSP code action: ```lua ["<leader>ca"] = { function() vim.lsp.buf.code_action() -- TODO: write buffer to file end, "LSP code action", }, ``` this keybinding applies the code action, but does not write to file. I want to write changes to file as soon as I've applied the code action. How can I use the documentation at https://neovim.io/doc/ to find the correct function? I've tried looking for a `write()` function but I could not find anything I can call from lua.

3
6
neovim
Neovim doomkernel 1y ago 100%
TWiN is back
dotfyle.com

We got TWiN back! No RSS for now but good to see someone stepping in and keep to project alive.

19
2