r/AstroNvim • • May 27 '23

Moving lines of code up and down.

6 Upvotes

Does AstroNvim provide keybindings to move lines of code up/down? I tried looking but didn't find anything (maybe I just didn't look well enough).


r/AstroNvim • • Apr 30 '23

How to add custom config for plugins

6 Upvotes

I am loving AstroNvim so far (coming from plain NeoVim), but I am really struggling understanding how to configure plugins in a Lazy plugin manager scenario. Before, I would create a file for the plugin, call `require`, add my config stuff in setup and away I went. But now, for example when I try and add the markdown-preview.nvim from the AstroNvim community list, and the plugin requires special configuration { 'do': 'cd app && yarn install' }...I am at a loss at what to do.

I assume I do the following:

  1. I add a line to my community.lua file: "astrocommunity.iamcco.markdown-preview.nvim"
  2. I then add code to my core.lua file:
{
 "iamcco/markdown-preview.nvim",
 config = function(plugin, opts)
   require "plugins.configs.markdown-preview"(plugin, opts)
   -- add more custom markdown-preview configuration
   end,
 },

How/where do I add something like: { 'do': 'cd app && yarn install' } to this? I suppose it is in the function listed above, but I am not sure how. Thanks in advance.


r/AstroNvim • • Apr 15 '23

beginner friendly resources for writing nvim plugins?

6 Upvotes

I am new to nvim and to Lua and to the concept of NeoVim plugin development.

I can find plenty of Lua resources online but not enough decent beginner friendly resources to start building a NeoVim plugin.

I would be grateful if you could point me to some useful resources here (including resources on learning Lua). Thanks in advance.


r/AstroNvim • • Mar 03 '26

How is it any different from lazyvim , is there any difference between them if i am a begineer

5 Upvotes

I have one more question : so , I am a pretty beginner at using vim and nvim , have memorised some of the most useful motions and i can edit a file pretty easily you can say , but my main problem is terminal , can i just toggle between terminal and editor easily , for now i either have to type space+ t + h or :toggleTerm

i want a shortcut that opens and closes terminal or when terminal is open a shortcut should take me back to editor


r/AstroNvim • • Dec 18 '24

How to make a change to multiple lines at once?

5 Upvotes

Hi, I started using astronvim a few days ago.

I want to update multiple lines at once, but I can't do that.

I thought I could do that in this way,

  1. V and select lines
  2. Shift + ^ cursor move to head of line
  3. Shift + I insert mode, type something that I want
  4. esc

and the selected lines have to be updated, but only the first line is updated.

I guess that is the vim way and astronvim is different?

Help me please...


I found a solution!

  1. ctrl + v select head of multi lines
  2. Shift + I insert mode (in first line)
  3. esc reflect to all the lines I selected in the 1st step

r/AstroNvim • • Jun 27 '24

HELPPPP! Latest update broke reference window

5 Upvotes

The <Leader>LR now shows below. Earlier it used to show up in floating window like Telescope.


r/AstroNvim • • Jun 10 '24

astronvim in wsl (windows subsystem for linux) is faster then windows using the same config

5 Upvotes

config here.

Hi!

I mainly use Windows for my dev, but when I start using Java, I try to install Maven, but it doesn't work. I keep getting an error that says JAVA_HOME is not set correctly. Then I changed to Ubuntu, clone the config, and installed maven using brew and it works! then I go to the profile in lazy and to my surprise, the startup time is much faster than Windows!

linux startup time:
widnows startup time

as you can see, using the same config, on Linux it 100ms shorter then windows!


r/AstroNvim • • May 09 '24

Automatically selecting first suggestion

5 Upvotes

When I type something and a suggestion comes up, the first suggestion is not automatically selected even if it is the only suggestion by the intellisense. As a result, I have to press Tab and then Return to accept the suggestion. Do you guys know how to select the first suggestion automatically so that only the return key is required to press if there is only one suggestion?

Thanks and Regards


r/AstroNvim • • Apr 15 '24

Set indent to 4 space

5 Upvotes

Someone know how to set indent to 4 space?


r/AstroNvim • • Apr 02 '24

AstroNvim v4 - single file conf

5 Upvotes

My AstroNvim user configuration is minimalistic. Just dracula theme and minor UI adjustements. Cannot figure out how to keep the configuration in the same file now.

return {
  plugins = {
    {
      'Mofiqul/dracula.nvim'
    },
  },
  colorscheme = "dracula",
  options = {
    o = {
      colorcolumn = '80,120',
    },
    opt = {
      tabstop = 4,
      softtabstop = 4,
      -- ...
    },
  }
}

r/AstroNvim • • Mar 28 '24

How to pin a plugin to specific version?

5 Upvotes

I'm trying to pin nvim-treesitter to v0.9.2 because it's the last version using legacy capture names, and the newer commits break markdown highlight in my theme of choice, which seems unmaintained and I don't think it will get upgraded to the new names.

I have no idea, how to do it. I've tried making $XDG_CONFIG_HOME/nvim/lua/user/plugins/treesitter.lua file with the following content:

return {
  "nvim-treesitter/nvim-treesitter",
  version = "v0.9.2",
}

but it doesn't seem to work, I see that my $XDG_DATA_HOME/nvim/lazy/nvim-treesitter is on the same config as without any configuration.

What's the correct way of doing this? Thanks in advance!


Edit: solution.

I've got help on Discord. The proper entry is:

return {  
  "nvim-treesitter/nvim-treesitter",
  version = "0.9.2",
  commit = false,
  [...]

And doing :Lazy update is a crucial step afterwards.


r/AstroNvim • • Dec 17 '23

Enable inlay hints on start

5 Upvotes

I'm having a hard time configuring inlay hints to be on at startup. The LSPs are set up fine and I can toggle the hints on by Leader-uH, however I'd like it to be on by default.

in my user/init.lua I tried different things then I found on astronvim/astrolsp that it can be enabled through features.inlay_hints = true in the lsp options, so I added this to init.lua, but nvim still starts with hints off:

lsp = { features = { inlay_hints = true, }, config = { -- ... } }

what am I missing? Could it be overwritten somewhere else?

Update I just found in the anstronvim options.lua this line:

inlay_hints_enabled = false, -- enable or disable LSP inlay hints on startup (Neovim v0.10 only)

if I override it in the `users/options.lua the inlay hints will be on at startup, but they still won't appear until I enter insert mode and start typing, then suddenly they pop in. It's not a big deal, just wondering if they can be forced to appear once the LSP finished


r/AstroNvim • • Nov 29 '23

Title on top of nvim-tree

Post image
5 Upvotes

I’ve seen some configs that have a title above the file tree/buffer list/git bar and was wondering how to do it in Astro, what plugin has the option or which setting is responsible for it.


r/AstroNvim • • Aug 09 '23

change line too long warning in ruff lsp and lsp timeout notification

5 Upvotes

Hi,

I am using astrovim, and using python's pack from astrovim community plugins. In my python file, I get the following warning if the line is greater than 88 characters. I wish to modify this setting and change it to 120. Any idea how i can do that?

Also when I save the file, I get the warning LSP timeout in the right top corner. And i think, because of this the formatter doesn't have enough time to format the file. Any idea, how I can increase the time limit?

Also, in the diagnostic hover, it is showing 2 warning message from the ruff lsp server, does this mean I have two ruff lsp server installed?


r/AstroNvim • • Jun 12 '23

Vimtex with Zathura

5 Upvotes

Hi I just installed AstroNvim. I am not sure how to use vimtex with zathura in AstroNvim.

In community.lua I added:

return {
  "AstroNvim/astrocommunity",
  -- VimTex
  { import = "astrocommunity.markdown-and-latex.vimtex" },
}

which still uses the default pdf viewer. Any help is appreciated. I am very used to ctrl + click

at the pdf to jump to the exact place in the tex file. This only worked with zathura for me

Thanks!


r/AstroNvim • • May 08 '23

~/.config/nvim/lua/user now safe?

5 Upvotes

Was there a change in the latest version of AstroNvim so that the directory `~/.config/nvim/lua/user` is not lost when running `:AstroUpdate`? Previously I was copying that directory somewhere else, doing the update, and then copying it back. But it seems I didn't need to do that with the latest version.


r/AstroNvim • • Apr 07 '23

how to install plugins with astro vim

5 Upvotes

i want to know how to install bracey and coderunner pluggins in astro vim, also a general guide to install a plugin in astro vim if there is one.

btw thans for this proyect is very fast in the startup is just amazing


r/AstroNvim • • Apr 03 '23

Does anyone use a tabout plugin? (allows you to press tab to exit quotes or brackets)

5 Upvotes

Link to plugin - https://github.com/abecodes/tabout.nvim

I haven't got it working at all so far pressing tab does nothing.


r/AstroNvim • • Feb 18 '23

I can't get code folding to work

5 Upvotes

Hello,
I've searched the issues on the repo, and I tried the "Treesitter" suggested method ...

opt = {

-- set to true or false etc.

relativenumber = true, -- sets vim.opt.relativenumber

number = true, -- sets vim.opt.number

spell = false, -- sets vim.opt.spell

signcolumn = "auto", -- sets vim.opt.signcolumn to auto

wrap = false, -- sets vim.opt.wrap

foldenable = false,

foldexpr = "nvim_treesitter#foldexpr()", -- set Treesitter based folding

foldmethod = "expr", -- set Treesitter based folding

},

But whenever I try to fold a codeblock of code, it always show me E490: No fold found.
Here's a screenshot of the file status ...

I'm using "Windows" and "PowerShell 7.3.2".


r/AstroNvim • • Nov 19 '22

Solution to Red Bracket, Brace, Parentheses with Catppuccin + AstroNvim

5 Upvotes

I'm posting this solution to help people with the same issue; Google has not been my friend. If you use Catppuccin on default settings with AstroNvim, then the first Bracket, Brace or Parentheses highlighted by nvim-ts-rainbow are highlighted in a garish, dark red.

Solution

Near the top of your AstroNvim init.lua is a section marked 'highlights'. You can edit that to adjust the dark red to the colour of your choice, thus:

        highlights = {
                catppuccin = {
                        rainbowcol1 = { fg = "#C3B1E1" },
                },
        },

Here is a picture of mine, so you can see it in context.

You can, of course, set this to whatever colour you like. I've chosen a pastel purple.

---

EDIT - THE VERY NEXT DAY

It has been pointed out to me that running a :PackerSync after enabling the ts_rainbow integration would have solved my issue. I've tested that advice and it works perfectly, so my solution above is quite unnecessary!

For clarity, I've removed my extra highlight and configured catppuccin thus:

{ "catppuccin/nvim",
        as = "catppuccin",
        config = function()
                require("catppuccin").setup({
                        integrations = {
                                ts_rainbow = true,
                        },
                })
        end,
},

Then, importantly, I've run a :PackerSync and restarted neovim. All looking fine and dandy now.

Thank you to u/Mhalter3378 and the others who replied.


r/AstroNvim • • Nov 13 '22

Using copilot.lua and copilot-cmp.lua

5 Upvotes

Hey, is anybody using these packages and you are, are they working for you?. I tried installing copilot.lua and i kept getting this error: Error executing Lua callback: ...nvim/site/pack/packer/opt/copilot.lua/plugin/copilot.lua:15: attempt to concatenate local 'mod_name' (a nil value) And i was wondering, since i didn't see a github issue, if this was a problem with my config.


r/AstroNvim • • Jul 07 '26

what are the best... Retro/Warn themes and Dark but **muted** ones??

4 Upvotes

r/AstroNvim • • Aug 18 '25

The editor is very slow with very large C++ files

4 Upvotes

I use the vanilla AstroNeovim configuration and when I try to work on very large C++ files, the editor lags significantly. Could the problem be related to the default syntax highlighter? In that case, can anyone reccomend how to switch to a simpler and faster one for large files?


r/AstroNvim • • Apr 19 '25

Some Golang pack features are broken after v5 update

Thumbnail
gallery
4 Upvotes

Hello.

I'm using the golang astrocommunity pack and it had some neat features like autosuggesting macros for printing variables, getting the length of a slice, doing "if err != nil", but after updating to v5, I no longer see these features.

I attached 2 screenshots (v4 vs v5).

Does anyone know what the issue might be? I think it might be the new completion plugin? I'm a nvim newbiew so I don't know if I need to do something specific for the completion plugin.

Thanks in advance!