I simply want to emulate the effect of -p by default i.e. open all files in tabs when multiple files are supplied. I wrote the following autocommand to make it work.
lua
-- Open files in tabs by default
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if not vim.opt.diff:get() and #vim.fn.argv() > 1 then
vim.cmd("tab sball")
vim.cmd("tabfirst")
end
end,
})
But it seems to bork the colorscheme for all but the first tab. It's weird since Running the same commands manually after neovim is loaded works perfectly. I may have something to do with the order in which things are run. Is it possible to run this command as late as possible?
I'm open to alternative approaches that gets the job done.
While LLMs deliver at times questionable quality of code, they can be none the less helpful to give feedback, explain syntax or high level concepts. I was wondering how people are integrating them in neovim. How are you using LLMs? Is it worth thinking about a setup?
I never can't stop tweaking my neovim configuration because there's too many people out there that offer incredible plugins!
I eventually took time to dive into snacks.nvim and I've implemented quite some of these features in my config.
Does anybody knows a way to use the undo picker to show the difference between the current node and the node under the cursor instead of comparing the latter with its previous version?
Edit: while this post mentions obsidian, it's about the neovim plugin and not the software even though they both share the same name.
Hello there,
I've been trying hard to find a way to implement obsidian in a way that fits my workflow and I may be close to success.
A missing feature for me is the ability to search for notes that include a list of given tags. I know how to search for several tags but the list of results is the notes that include at least one of them while I'd like to see only the notes that include all of them.
Please tell me that's possible, I'm just stupid and missed that, so I can eventually use this terrific plugin everyday.
Neovim 0.11 was just released. As in previous installments in this series, let’s talk a bit about some of the big highlights! As always, the full list of changes can be found in the release notes (use :h news to read inside of Neovim).
Table of Contents Breaking Changes LSP Simpler LSP setup and con...
JSX/TSX text-objects and motions. Contribute to mawkler/jsx-element.nvim development by creating an account on GitHub.
Link Actions
Hi! I built this small plugin that adds JSX/TSX text-objects and motions using Treesitter: jsx-element.nvim. I was surprised that it (to my knowledge) doesn't exist yet.
From the README:
Use ]t/[t to go to the next/previous JSX/TSX element.
Use it/at to use JSX/TSX elements as text-objects. For example dit for "delete inside tag". This works with self-closing elements:
undefined
<Checkbox value="checkedA" />
╰───── it ─────╯
╰─────────── at ────────────╯
It also works with paired elements:
undefined
<Button variant="text">This is a button</Button>
╰───── it ─────╯
╰───────────────────── at ─────────────────────╯
I am using AstroNvim, but I believe that doesn't matter too much in this instance
I am very much new to html and js and the stuffs - but this tag indenting is catching me very offguard.
When I type a new tag it gets indented all nicely, and when opening a new line with o or O key, it nicely puts an indent if I am already in another tag. But when I then save with :w or ZZ, it reformats the indenting again... I think this might be two formatting agents fighting one another with different goals to format the xml tag indenting?
I installed node with npm, as it kinda seems that that is a requirement for working with html stuffs smoothly... and I installed some Lsp and ... stuffs with TsInstall and LspInstall and such... but I would expect those to not change formatting like this.
Has someone here experienced a similar issue? Is nvim in general maybe not the best for webdev? My friend uses brackets, which se
I've been using Neovim for about eight years, but I knever knew about :help o_CTRL-V until today. It lets you perform a command over a column.
I had the code below and wanted to remove all trailing colons:
undefined
foo:
bar:
baz:
faz:
What I meant to do was to do was (with the cursor on the first line) $<C-v>3jd to visually select all colons and then delete them. But I accidentally did $d<C-v>3j, which, to my surprise, did the same thing.
I did know about :help o_V, which lets you turn a characterwise operation like di{ into a line-wise one by doing dVi{. But it never occurred to me that I could do the same thing with <C-v>.
So I really needed my pylsp to use a different pyenv install, and just want to share my basic solution in hopes it'll help someone else.
The basic gist of it is that I use vim.system() to get the version paths through pyenv:
bash
pyenv root
pyenv versions --bare --skip-aliases
and create a telescope picker for selection.
Then I use vim.lsp.client.notify() with the workspace/didChangeConfiguration lsp method to change pylsp's settings (for which options can be found here).
Code
lua
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require(
I want to create a WYSIWYG editor for markdown, and I want it to be keyboard-driven with vim editing philosophy.
I want the editor to have rich formatting, rather than the equally spaced cells of characters in the terminal. This would enable rows having different text sizes, usage of non-monospaced fonts, editing RTL languages such as arabic or hebrew, and bypass other terminal limitations.
Embedding neovim would be nice in theory, enabling all compatible vim features. But it seems to come with great difficulties, since I am forgoing the entire rendering philosophy that neovim depends on (equally spaced cells of the terminal).
SO I am thinking it would be better to emulate the vim features I want, starting with basic keybindings and motions, and go from there. But I am worried that I might end up regret this choice? It seems that embedding neovim is too monumental of a task for what I want to do. Am I mistaken?
A macOS application that manages Neovide instances per Git repository, providing a seamless project-based editing experience. - theherk/NeovideProject
Link Actions
I like smooth scroll. I love Neovim. So I use Neovide. But I really wanted a nice way to manage instances per git repository / project, including server / remote socket management and allowing files to be opened into the correct instance. It detects running instances and opens into or switches to them accordingly.
This is also integrated into Finder and open via a swift wrapper. So one can, for example, use raycast to quick switch projects.
Check it out if that sounds interesting. There is also a longer video guide on the Usage wiki.
I need some advice how to handle project-specific plugin configuration for Neovim. My paid software gig involves work for several different client projects which are basically structured like this:
What I struggle with is overriding/extending the config for Neovim plugins for each environment.
let's say for example clientA uses a self-hosted GitLab instance which requires me to override the lazy.nvim config for some Git-related plugins. How could I achieve this?
I looked into exrc. afaict this would require duplicating any client-specific configuration for each new repository. Instead what I would like is something like ~/work-clientA/init.lua which would then be sourced automatically for each project (repo) inside work-clientA.
Honestly... everybody should try out neovim for at least a week. I mean like... fully commit to it.
It's just amazing how fast and light on resource usage it is, compared to vscode.
For reference: I just opened qmk_firmware which has a shit load of clang code and files. Guess what, neovim doesn't even break a sweat, while vscode almost burns my CPU.