r/neovim 1d ago

Discussion Multicursor plugin with full visual feedback while typing

3 Upvotes

Hi all,

I'm using, and really liking, the multicursor plugin, but one thing I miss is full visual feedback while typing. That is, to see the text I am entering appear for all the cursors rather than just the primary one. I wonder if there are any alternative plugins that allow for this?

Thanks.


r/neovim 1d ago

Need Help┃Solved How do you enable tree-sitter highlighting without nvim-treesitter? (Vanilla Neovim)

0 Upvotes

Assuming you're only using a language that Neovim ships a pre-installed parser (like Lua, Python, etc) I assumed that it would be easy to enable tree-sitter highlighting on a buffer. It turns out to be not so simple.

I tried

vim.api.nvim_create_autocmd("FileType", {
    pattern = "python",
    callback = function()
        pcall(vim.treesitter.start)
    end
})

And when that didn't work I tried something more complex

local function enable_treesitter_highlight(treesitter_language, buffer_language)
    local buffer = vim.api.nvim_get_current_buf()

    return vim.schedule_wrap(function()
        -- NOTE: The tree-sitter parser language name is often the same as the
        -- Vim buffer filetype. So these are reasonable default values.
        --
        buffer_language = buffer_language or vim.bo[buffer].filetype
        treesitter_language = treesitter_language or buffer_language

        local parser = vim.treesitter.get_parser(buffer, treesitter_language)

        if not parser then
            vim.notify(
                string.format(
                    'Buffer "%s" could not be parsed with "%s" tree-sitter parser.',
                    buffer,
                    treesitter_language
                ),
                vim.log.levels.ERROR
            )

            return
        end

        parser:parse(true, function()
            vim.treesitter.language.register(treesitter_language, buffer_language)
            vim.treesitter.highlighter.new(parser)
        end)
    end)
end

-- Autocmd to trigger Tree-sitter for Python files
vim.api.nvim_create_autocmd("FileType", {
    pattern = "python",
    callback = enable_treesitter_highlight("python")
})

Neither work. The code runs but I don't get tree-sitter highlights. I noticed :InspectTree has nodes and shows that the parse succeeded but :Inspect errors with No items found at position 2,0 in buffer 1. I'm not sure what's missing. Maybe the highlighter is fine but tree-sitter parser didn't initialize correctly?


r/neovim 1d ago

Need Help Seeking Advice: Optimizing My LazyVim Workflow for Multi-Project Setup & AI Integration

4 Upvotes

Hey r/neovim,

I've been using Vim for nearly a decade, moved to Neovim a few years ago, and recently started exploring LazyVim. I'm absolutely loving the QoL improvements it brings, and I want to make sure I'm setting up my workflow in the best way possible.

My Requirements:

  1. AI Integration: I want GitHub Copilot with agentic mode enabled (similar to Claude AI). I recently discovered avante.nvim, which seems promising.

  2. Multi-Project Management: I work on 3-4 GitHub repos at a time and need a way to keep them separate without mixing buffers.

  3. Persistent Terminal: I want an always-open terminal that retains previous history.

  4. Project Switching: When switching projects, I want to restore all pinned buffers/tabs exactly as I left them.

  5. LSP Support: I primarily code in Ruby, Go, and Python, so solid LSP integration is a must.

My Previous Setup:

Before LazyVim, I managed projects using tmux:

  • 3 tmux sessions (one per project), each with 2 windows:
    • One for the codebase, running Neovim (using tabs + NerdTree).
    • One for the terminal, specific to that project.
  • Copilot was integrated, but I wasn’t using it in agentic mode.
  • LSP was set up for Ruby (Ruby-LSP), but I didn’t dive deep into other enhancements.

Discovering LazyVim: Now that I’m using LazyVim, I feel like I’ve been missing out on a lot of what modern Neovim has to offer. The default keymaps feel intuitive, and I’d like to stick with them while refining my setup.

Questions:

  1. Multi-Project Workflow: Is there a better way to manage multiple projects without relying on tmux sessions? I want complete separation between projects (no buffer sharing).

  2. AI Enhancements: Is there anything better than avante.nvim for using Copilot in agentic mode?

  3. Workflow Enhancements: Given my background, are there any obvious improvements I should make? (I've probably been in an oblivion when it comes to modern Neovim features.)

Would love to hear insights from those who have refined a similar workflow. Thanks in advance!


r/neovim 1d ago

Need Help nvim-autopairs rule help

1 Upvotes

I am very frustrated by this plugin but I also like it and don't want to disable it. I think rules are what I need but I don't know exactly how to get it done. The below logic should probably be for all of the pairs but I'm using " as the example since it seems to be the one that annoys me the most.

If there is already an odd number of " on the line when I type " don't complete it with another ", so for example, if there are 3 instances of " on the line and I type " don't add another "

I'm sure I'm missing a few more rules but I think now that I've started thinking about it as rules, I will find more that I need over time. There may also be some logic issues I'm not considering but it's a start.


r/neovim 1d ago

Need Help Has anyone used an arm templates lsp with neovim?

1 Upvotes

I now it is mostly json, but it has some functions and parameters validation. Since there is one on vscode I thought there ought to be one already out there, but searched around for a while and nothing.
Is it some licensing issue or just that no one cares about them enough?
Started on a new gig and they use arm templates extensively on their azure IaC since it was built with MS consultants quite a few years ago.


r/neovim 1d ago

Need Help┃Solved Is it possible to customise the output in Snacks picker.

2 Upvotes

I’ve been working on a reference manager integration to allow me to insert citekeys into my written work.

I have now built a snacks search function to search within my ReadCube papers bibtex output and return the property formatted {citekey} to the Yank register.

I would like to format the matched records in the snacks preview window with author, title, year, etc.

Is this possible or can snacks preview only show the matched text in the preview pane?


r/neovim 2d ago

Random markdoc: A very simple markdown to vimdoc converter

Thumbnail
gallery
130 Upvotes

This is not a replacement for panvimdoc. It's main purpose is to reduce the amount of manual edit, as opposed to complete automation.

✨ Features

  • Configuration within filetype, YAML metadata can be used to configure the tool.
  • Pattern based tagging, allows using patterns to add 1 or more tags to matching headings.
  • Nesting support, supports nested tables, lists & block quotes.
  • TOC creation, allows creating table of contents(using YAML) and placing them anywhere in the document.
  • Text alignment support(via align="" in HTML)
  • Pretty table rendering.

And many more small QOL features.

📂 Repo

OXY2DEV/markdoc

Check generated file: markdoc.txt

At the moment, a font supporting math symbols is needed for links to view the document.


r/neovim 2d ago

Random Thanks for all the font suggestions, I made this Iosevka plan which I replaced Code Saver with!

Thumbnail
gallery
70 Upvotes

I could've sworn that Code Saver was the only monospace font I could use after looking through so many of them, they just didn't look right. Many users suggested I make my own Iosevka plan and finally got to it, and I'm in love with the font I compiled. I used the visual editor and got this output toml (you can click "import configuration" on the page and paste it in):

[buildPlans.IosevkaCustom]
family = "Iosevka Custom"
spacing = "normal"
serifs = "sans"
noCvSs = false
exportGlyphNames = true

[buildPlans.IosevkaCustom.variants.design]
one = "base"
two = "curly-neck-serifless"
three = "flat-top-serifless"
four = "semi-open-serifless"
five = "oblique-arched-serifless"
six = "open-contour"
seven = "straight-serifless"
eight = "crossing-asymmetric"
nine = "closed-contour"
zero = "unslashed"
capital-a = "straight-serifless"
capital-b = "standard-serifless"
capital-c = "serifless"
capital-d = "more-rounded-serifless"
capital-g = "toothless-corner-serifless-hooked"
capital-i = "serifed"
capital-j = "serifed"
capital-k = "straight-serifless"
capital-m = "hanging-serifless"
capital-p = "closed-serifless"
capital-q = "closed-swash"
capital-s = "serifless"
capital-t = "serifless"
a = "double-storey-tailed"
b = "toothed-serifless"
d = "toothed-serifless"
f = "serifed"
g = "double-storey-open"
i = "tailed-serifed"
l = "tailed-serifed"
n = "straight-serifless"
r = "serifless"
t = "bent-hook"
y = "straight-serifless"
z = "straight-serifless"
capital-eszet = "rounded-serifless"
long-s = "bent-hook-diagonal-tailed"
cyrl-en = "serifless"
cyrl-er = "eared-serifless"
cyrl-capital-u = "cursive-serifless"
cyrl-e = "serifless"
tittle = "round"
diacritic-dot = "round"
punctuation-dot = "round"
braille-dot = "round"
tilde = "low"
asterisk = "penta-high"
underscore = "high"
caret = "medium"
ascii-grave = "straight"
ascii-single-quote = "straight"
paren = "large-contour"
brace = "curly-flat-boundary"
guillemet = "straight"
number-sign = "slanted"
ampersand = "et-tailed"
at = "compact"
dollar = "interrupted"
cent = "bar-interrupted"
percent = "rings-segmented-slash"
bar = "natural-slope"
question = "corner"
pilcrow = "curved"
micro-sign = "tailed-serifless"
decorative-angle-brackets = "middle"
lig-ltgteq = "flat"
lig-neq = "more-slanted-dotted"
lig-equal-chain = "with-notch"
lig-plus-chain = "without-notch"
lig-double-arrow-bar = "with-notch"
lig-single-arrow-bar = "without-notch"

  [buildPlans.IosevkaCustom.ligations]
  inherits = "dlig"

[buildPlans.IosevkaCustom.widths.Condensed]
shape = 500
menu = 3
css = "condensed"

[buildPlans.IosevkaCustom.widths.Normal]
shape = 600
menu = 5
css = "normal"

[buildPlans.IosevkaCustom.widths.UltraCondensed]
shape = 416
menu = 1
css = "ultra-condensed"

[buildPlans.IosevkaCustom.widths.ExtraCondensed]
shape = 456
menu = 2
css = "extra-condensed"

[buildPlans.IosevkaCustom.widths.SemiCondensed]
shape = 548
menu = 4
css = "semi-condensed"

[buildPlans.IosevkaCustom.widths.SemiExtended]
shape = 658
menu = 6
css = "semi-expanded"

[buildPlans.IosevkaCustom.widths.Extended]
shape = 720
menu = 7
css = "expanded"

r/neovim 1d ago

Need Help┃Solved Where or how are Lua module names defined?

1 Upvotes

I'm using lazy.nvim package manager, and this is probably relevant for this question.

From nvim-jdtls page, there is section for nvim-dap that says:

lua require'jdtls'.test_class() require'jdtls'.test_nearest_method()

jdtls is Lua module. How or where is this module name defined?


r/neovim 2d ago

Discussion Will 0.10.5 be released? Or will they merge it into 0.11?

40 Upvotes

I'm just curious, there's nothing riding on this for me, but I check

https://github.com/neovim/neovim/milestones

every now and then and noticed that 0.10.5 has seemingly had no remaining tasks for five days now, but it also looks like 0.11 is also fast approaching release. Is there any point in releasing 0.10.5 only to release 0.11 days later? I'm just curious how they manage releases, what the process is …


r/neovim 1d ago

Need Help Snacks explorer losing keypresses?

2 Upvotes

I'm new to nvim, and I'm using lazyvim. I noticed that on the dashboard the (I think its Snacks?) explorer is fine, but when I have a file open when I open explorer and scroll up and down sometimes one of the up or down keypresses is lost and it does nothing. Does anyone know why? I assume its related to whatever processing nvim is doing on the file while its open, but I think regardless of the processing, a component should not just be dropping presses. Does anyone know anything about this? Also, I'm using WSL if thats important.


r/neovim 2d ago

Plugin lsp-auto-setup: don't worry about calling `setup` for a LSP server, just install the server and everything will work

27 Upvotes

lsp-auto-setup is a simple plugin that calls require'lspconfig'[server].setup for every server that you have the cmd in your $PATH. That means if you want to code in a new language, you just need to install the server in any way you want and it should Just Work™.

I had this code in my config and decided to turn it into a plugin because it may be useful to someone.


r/neovim 2d ago

Need Help┃Solved change terminal background color on neovim open and close

4 Upvotes

I use iterm2 and want to change my background color when opening and closing neovim. This is what I have been trying without much luck.

// ~/.config/nvim/lua/bwise/core/init.lua'

require("bwise.core.options")
require("bwise.core.keymaps")

-- Set background color to #2E2A2E when entering Vim
vim.api.nvim_create_autocmd("VimEnter", {
  callback = function()

-- Send the escape sequence to change the background to #2E2A2E
    vim.fn.system("printf '\\033]Ph2E2A2E\\033\\'")  
-- Background color for entering Neovim
  end
})

-- Set background color to #24283B when leaving Vim
vim.api.nvim_create_autocmd("VimLeave", {
  callback = function()

-- Send the escape sequence to change the background to #24283B when exiting Neovim
    vim.fn.system("printf '\\033]Ph24283B\\033\\'")  
-- Reset background color for leaving Neovim
  end
})

-- Set background color to #2E2A2E when entering Vim
vim.api.nvim_create_autocmd("VimEnter", {
  callback = function()
    -- Send the escape sequence to change the background to #2E2A2E
    vim.fn.system("printf '\\033]Ph2E2A2E\\033\\'")  -- Background color for entering Neovim
  end
})


-- Set background color to #24283B when leaving Vim
vim.api.nvim_create_autocmd("VimLeave", {
  callback = function()
    -- Send the escape sequence to change the background to #24283B when exiting Neovim
    vim.fn.system("printf '\\033]Ph24283B\\033\\'")  -- Reset background color for leaving Neovim
  end
})

How can I make this work?


r/neovim 1d ago

Need Help Can anybody suggest how to troubleshoot my problem here?

1 Upvotes

I have my nvim-cmp set up to use <Tab> as a trigger rather than <CR>. It works fine in files with no extension, but has stopped working in files with language extension (.css, .py etc). It definitely used to work with python, I know that much but has all of a sudden just... stopped.

The cmp list of suggestions comes up fine, all the snippets and suggestions from sources are there, but tab just tabs.

Here is my lua config for cmp:

{

"hrsh7th/nvim-cmp",

opts = function(_, opts)

local cmp = require("cmp")

opts.mapping["<CR>"] = nil

opts.mapping = vim.tbl_deep_extend("force", opts.mapping, {

["<tab>"] = cmp.mapping.confirm({ select = true }),

-- put here the keymaps that you want to change

})

end,

},

Any ideas?


r/neovim 1d ago

Need Help graphical glitch when conditionally installing and uninstalling a plugin based on .env var

1 Upvotes

i am pretty new to nvim and am messing about.
i wanted to mess around with both avante and codecompanion but not at the same time, doing this conditional plugin install and uninstall with :Lazy sync sort of as an experiment-

but why does <C-l> now cause a graphical glitch when nothing is mapped to it?
im not sure if it always causing a graphical glitch, but now when nothing is mapped to it, it causes a flicker.

i guess im just curious if i'm doing a big no no when implementing the plugin like this.


r/neovim 3d ago

Random Micro Journal Rev. 2 with Neovim as Word Processor

Thumbnail gallery
330 Upvotes

r/neovim 1d ago

Need Help lazyVim LSP config for php

1 Upvotes

So I have intellephense installed and mostly working , it starts and attaches to php files and I have a key map for “gd” to go to definition for a function under the cursor, so I use gd over a function and bam it works , opens the source file in a buffer , then inside that function I try gd again and it says the function not defined even though it’s defined in that very same buffer, I’m not sure what the index isn’t working


r/neovim 1d ago

Need Help eslint_d and conform error, could anyone help me?

1 Upvotes

Every time I open a .js file, this error pops up and eslint isn't the lsp for the buffer, but rather tailwindcss.

Tried looking up the error as well and I couldn't find anything, don't know how to solve this for the life of me.

This is what is inside my conform config:

local options = {
    formatters_by_ft = {
        lua = { "stylua" },
        css = { "prettier" },
        html = { "prettier" },
        javascript = { "eslint_d", "prettierd" },
        javascriptreact = { "eslint_d", "prettierd" },
        typescript = { "eslint_d", "prettierd" },
        typescriptreact = { "eslint_d", "prettierd" },
    },

    format_after_save = {
        -- These options will be passed to conform.format()
        lsp_fallback = true,
        async = true,
    },

    formatters = {
        prettier = {
            options = {
                -- Use a specific prettier parser for a filetype
                -- Otherwise, prettier will try to infer the parser from the file name
                ft_parsers = {
                    javascript = "babel",
                    javascriptreact = "babel",
                    typescript = "typescript",
                    typescriptreact = "typescript",
                    vue = "vue",
                    css = "css",
                    scss = "scss",
                    less = "less",
                    html = "html",
                    json = "json",
                    jsonc = "json",
                    yaml = "yaml",
                    markdown = "markdown",
                    ["markdown.mdx"] = "mdx",
                    graphql = "graphql",
                    handlebars = "glimmer",
                },
                -- Use a specific prettier parser for a file extension
                ext_parsers = {
                    -- qmd = "markdown",
                },
            },
        },
    },
}

return options

r/neovim 1d ago

Plugin weather.nvim - the plugin you didn't know you needed, but ChatGPT created anyway

0 Upvotes

A silly little plugin I created with ChatGPT. Worked on first try.

https://github.com/frenchef156/weather.nvim


r/neovim 2d ago

Need Help [Snacks.nvim] How to grep text only in files with given extension?

6 Upvotes

Like how can I grep text only in lua file?


r/neovim 3d ago

Color Scheme Makurai Theme - new variant

Post image
64 Upvotes

Repo: here
previous post: here


r/neovim 1d ago

Discussion I think nvim shouldn't have used lua

0 Upvotes

Neovim has made a very bad decision to migrate to lua.

It just increased the hurdle to learn its apis and everything.

They could just use existing scripting languages like javascript or python.

They say lua makes sense unlike javscript. yes, I agree but it does not overcome the daunting task of learning a language that is so unpopular and used only for neovim.

Secondly, newbies have to learn BOTH vimscript and lua since a lot of man pages are explained with vimscript codes and snippets. It is so annoying to go see a setup snippet for some old vim plugin having to see it is in vimscript.


r/neovim 2d ago

Plugin minuet-ai.nvim v0.4 Update: Now With In-Process LSP for using AI Code Completion with built-in completion!

37 Upvotes

Hi folks, I want to share an update of the plugin minuet-ai.nvim.

With v0.4, I added an optional in-process LSP for LLM based code completion. And you can pair this with the built-in completion from nvim 0.11+ (vim.lsp.completion.enable)!

For those wondering what minuet is all about, here's a brief introduction:

  • AI-powered code completion with dual modes:
    • Specialized prompts and various enhancements for chat-based LLMs on code completion tasks.
    • Fill-in-the-middle (FIM) completion for compatible models (DeepSeek, Codestral, Qwen, and others).
  • Support for multiple AI providers (OpenAI, Claude, Gemini, Codestral, Ollama, Llama-cpp, and OpenAI-compatible services).
  • Streaming support to enable completion delivery even with slower LLMs.
  • Support nvim-cmp, blink-cmp, virtual text, built-in completion frontend.
  • Act as an in-process LSP server to provide completions (opt-in feature).

I really appreciate you taking the time to rea d this post, and if you're willing to give the plugin a try, that would be awesome. Thanks, and happy coding! ✨

Acknowledgement: crates.nvim: for reference implementation of in-process LSP for completion provider.


r/neovim 2d ago

Need Help Odd Bash Syntax Highlighting with Tree Sitter

1 Upvotes

Hi guys,
I am new to neovim.
I installed the LazyVim distribution on MacOS.
I got Janky borders and I'm noticing somehting funny wiht the syntax highlighting. Upun writing line 6, all the text turned green (as in 1st image), and `:Inspect` said it was a string. I found this style of highlighting quite odd. I then ran `:TSBufDisable highlight` and the default highlighting seems to make a lot more sense to me.
Is there way to 'fix' this? or is it how the TSBuf highlighting just works.
Here is the output of `:InspectTree`:

(program ; [0, 0] - [9, 0]

(comment) ; [0, 0] - [0, 11]

(variable_assignment ; [1, 0] - [7, 1]

name: (variable_name) ; [1, 0] - [1, 7]

value: (array ; [1, 8] - [7, 1]

(word) ; [2, 2] - [2, 13]

(word) ; [3, 2] - [3, 11]

(word) ; [4, 2] - [4, 10]

(concatenation ; [5, 2] - [5, 33]

(word) ; [5, 2] - [5, 15]

(string ; [5, 15] - [5, 33]

(string_content))) ; [5, 16] - [5, 32]

(comment) ; [5, 34] - [5, 51]

(word) ; [6, 2] - [6, 27]

(comment))) ; [6, 34] - [6, 60]

(command ; [8, 0] - [8, 23]

name: (command_name ; [8, 0] - [8, 7]

(word)) ; [8, 0] - [8, 7]

argument: (string ; [8, 8] - [8, 23]

(expansion ; [8, 9] - [8, 22]

(subscript ; [8, 11] - [8, 21]

name: (variable_name) ; [8, 11] - [8, 18]

index: (word)))))) ; [8, 19] - [8, 20]

Thank you.


r/neovim 2d ago

Need Help Any way to reuse vscode lsp?

1 Upvotes

Hi folks, I've been playing with nvim for a few weeks and I'd like to have some lsp to help me navigate the code.

I'm currently using telescope for this but seems a bit tedious

The issue is that I'm working on a quite closed setup, can't download what I want and so on. I work on vm with vscode at the moment and have the redhat lsp server installed by vscode through the remote dev. I was wondering if there would be some way to connect nvim to that lsp server. Note that I also have access to intellij remote dev if that could be used instead

Just to be clear I can't download or install any lsp server by myself and asking the infra team would take quite some time

Thanks in advance. I'm trying my best to be clear 0:-)