Neovim
- This Week in Neovim79: Official Supermaven code completion in Neovim, Beautiful menu UI for Neovim, NvChad UI collection, reactive UI developmentdotfyle.com Official Supermaven code completion in Neovim, Beautiful menu UI for Neovim, NvChad UI collection, reactive UI development
This Week in Neovim 79 with news and updates from the Neovim plugin ecosystem and Neovim core.
cross-posted from: https://discuss.tchncs.de/post/23311254
- Compilation mode for 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
- This week in neovim 78: NeovimConf speaker applications, render-markdown.nvim, telescope-frecency.nvim, smart-open.nvim, avante.nvimdotfyle.com NeovimConf speaker applications, render-markdown.nvim, telescope-frecency.nvim, smart-open.nvim, avante.nvim
This Week in Neovim 78 with news and updates from the Neovim plugin ecosystem and Neovim core.
cross-posted from: https://discuss.tchncs.de/post/22480504
- parrot.nvim: use Claude Opus, ollama, perplexity.ai and OpenAI from neovimgithub.com GitHub - frankroeder/parrot.nvim: parrot.nvim 🦜 - the plugin that brings stochastic parrots to Neovim.
parrot.nvim 🦜 - the plugin that brings stochastic parrots to Neovim. - frankroeder/parrot.nvim
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:
- Anthropic API
- perplexity.ai API
- OpenAI API
- Local and offline serving via ollama
- 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
- Vim Boss - Neovim
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
- Help with custom theming
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
- Release Nvim 0.9.5github.com Release Nvim 0.9.5 · neovim/neovim
NVIM v0.9.5 Build type: Release LuaJIT 2.1.1692716794 This is a maintenance release, focusing on bugfixes. Notably, fixes were made for issues with using and testing Nvim on less common platforms,...
- New community about Kakoune
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 and you're welcome to join whether you're using kakoune already or just want to learn about it :))
- It's LSP portable?
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?
- What's your keymapping organization strategy
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?
- !neovim@sopuli.xyz looking for moderators
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 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.
- How to use env variables inside which-key plugin mapping? [SOLVED]
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
- PSA: modicator.nvim now has lualine.nvim support out of the box
Hi! My plugin modicator.nvim now has support for 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.
- Neovim & Asciidoc & Webbrowser Combination
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.
- LSP goto definition sometimes causes nvim_win_get_buf to fail
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? - Apparently you can use Esc in norm commands. Very useful!
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.
- Are there multiple communities of Neovim in fediverse?
I am new lemmy user and I wanted to whether there are different nvim communities or same ones like,
- https://lemmy.world/c/neovim@sopuli.xyz
- https://programming.dev/c/neovim
- Neovim v0.9.2 is now available
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
- Support question: lazy.vim and ansible-language-server
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.
- Split window file explorer
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 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.
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.
- This Week in Neovim #51: RIP Vim Boss, preview LSP code actions, grep using the power of an AST, mini.nvim additions and 19 new plugins!dotfyle.com RIP Vim Boss, preview LSP code actions, grep using the power of an AST, mini.nvim additions and 19 new plugins!
This Week in Neovim 51 with news and updates from the Neovim plugin ecosystem and Neovim core.
- Anyone know what's happening with this-week-in-neovim?
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 .?
- Neovim 💚 Fennel!
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 thanks to hotpot > > 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.
- 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
Video
Click to view this content.
clangd-extensions.nvim (https://git.sr.ht/\~p00f/clangd\_extensions.nvim) now has go-to-defintion in the type hierarchy window
- Code blocs are rendered in italic in markdown files
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?
- This week in neovim
Just sharing this on Lemmy as well.
- Issue with neovim on macos
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?
- Avoid nesting neovim
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.
- Change makeprg only if makefile doesn't exist
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 ```
- How to find functions in documentation
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. - TWiN is back
We got TWiN back! No RSS for now but good to see someone stepping in and keep to project alive.
- Why would/wouldn’t you switch to a modern IDE like Visual Studio/VS Code if given the decision right now?
out of curiousity, since I feel like most of the time I touch any vi derivative it’s because I need a text editor on a command line, not because I really really wanna use it
- Should I switch my Neovim config from VimScript to Lua?
So, I've been a Neovim user for a few years now. I started as most of you (I assume) with vim, and just kept on using and expanding that config file over the years.
I only recently realized there's quite a split between the Vim and Neovim plugins and that the Neovim community is pushing Lua as a better development platform. From what I can see, some users are switching their configs from Vimscript to Lua. To be honest all I know about Lua is that it means moon in Portuguese...
Should I too? What would the advantages be? What would the disadvantages be? For those who did switch, why did you switch and what was your experience? For those who didn't why did you not?
p.s. review (roast) my dotfiles
edit: thank you all for your input! I will consider slowly switching to lua by modifying only some parts of the config as some of you suggested.
- neovim surround plugins require too many keystrokes
I’ve tried all the surround plugins but what I really want is just the simple flow of: make a selection -> press “, ( etc to surround. Is that not possible with vim?
- How does textidote compare to ltex-ls?
I saw that null-ls.nvim just added textidote support. Textidote seems to be a spelling/grammar checker that wraps LanguageTool, just like ltex-ls. Does anyone know how they compare?
- Mason Markdown Formatting
I am rewriting my ancient vim config into Lua with nvim. I am using Mason to grab lsp language servers and for the most part it works great!
I have this in my remaps so I can
<leader>f
to format the current file (still need to figure out formatting on save too, but I can't for the life of me get Markdown formatting working.vim.keymap.set("n", "<leader>f", function() vim.lsp.buf.format() end)
I have markdownlint, marksman, prettier, and prettierd all installed wth Mason (though I haven't written any keymaps or configs for them). Any idea how I can format my Markdown? I write in it all day every day so it's gonna help a ton if I can get it working. Secondly any ideas how I can do the same mapping for the formatting on save? Still pretty new to Lua.
- Making telescope.nvim find_files show hidden files by default - Following ThePrimeagen's guide
YouTube Video
Click to view this content.
Hey guys, I'm following the tutorial above, and in his video he doesn't do anything specific to show hidden files, but it works for him. My
.config/nvim/after/plugin/telescope.lua
file looks like this: I've looked up solutions but they all use a different syntax, and none work for me. Any idea how I can make the find_files command also show hidden files by using this syntax? Thanks! - Pro tip for people not yet used to HJKL arrow keys
This is a very simple thing but it can be useful for folks who are still using mostly arrow keys. It finally clicked for me when I started using Tridactyl for Firefox :)
Most of the time you need down and up motions so you rest your index finger on J and middle finger on K. J looks little bit like a down arrow (mnemonics jown and kup don't seem very intuitive to me). So now you have the main arrow keys assigned to your fingers. Naturally you rest your ring finger on the L key and when you occasionally need to move left just move your index finger to the H key.